Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4793300
operations.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
operations.php
View Options
<?php
$result
=
''
;
if
(
array_key_exists
(
'operation'
,
$_REQUEST
))
{
require
(
'ListOperation.php'
);
$operation
=
ucfirst
(
$_REQUEST
[
"operation"
]);
if
(
method_exists
(
'ListOperation'
,
$operation
))
{
$left
=
explode
(
"
\n
"
,
$_REQUEST
[
'lists'
][
0
]);
$right
=
explode
(
"
\n
"
,
$_REQUEST
[
'lists'
][
1
]);
$result
=
implode
(
"
\n
"
,
ListOperation
::
$operation
(
$left
,
$right
));
}
else
{
$result
=
"// Unknown list operation."
;
}
}
?>
<form name="lists" method="post" action="/lists/operations">
<div class="large-12 columns">
<div class="row">
<div class="large-3 columns">
<h6 class="panel" style="text-align: center;">List A</h6>
<textarea name="lists[0]" rows=20>
<?
=
$_REQUEST
[
'lists'
][
0
]
?>
</textarea>
</div>
<div class="large-1 columns">
<h6 class="panel" style="text-align: center;">Operation</h6>
<label for="operation_add"><input name="operation" value="add" type="radio" id="operation_add"> <i class="gen-enclosed foundicon-plus"> add</i></label>
<label for="operation_intersect"><input name="operation" value="intersect" CHECKED type="radio" id="operation_intersect"> <i class="gen-enclosed foundicon-remove"> intersect</i></label>
<label for="operation_substract"><input name="operation" value="substract" type="radio" id="operation_substract"> <i class="gen-enclosed foundicon-minus"> substract</i></label>
<p> </p>
<p><input type="submit" value="Compute" class="button" /></p>
</div>
<div class="large-3 columns">
<h6 class="panel" style="text-align: center;">List B</h6>
<textarea name="lists[1]" rows=20>
<?
=
$_REQUEST
[
'lists'
][
1
]
?>
</textarea>
</div>
<div class="large-3 columns">
<h6 class="panel" style="text-align: center;">Result</h6>
<textarea name="lists[2]" rows=20>
<?
=
$result
?>
</textarea>
</div>
</div>
</div>
<div style="clear: both;" />
</form>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Feb 28, 21:45 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2440459
Default Alt Text
operations.php (1 KB)
Attached To
Mode
rTOOLS Nasqueron Tools
Attached
Detach File
Event Timeline
Log In to Comment