b
This commit is contained in:
13
enginiptv/panel/plugins/tablednd/server/ajaxJSONTest.php
Normal file
13
enginiptv/panel/plugins/tablednd/server/ajaxJSONTest.php
Normal file
@@ -0,0 +1,13 @@
|
||||
The server says: your row order was<br/>
|
||||
<?php
|
||||
$result = json_decode(file_get_contents('php://input'), true);
|
||||
show_results($result, "table-7");
|
||||
function show_results($result, $id, $indent = null) {
|
||||
foreach($result[$id] as $value) {
|
||||
echo "$indent$value<br/>";
|
||||
if (isset($result["$value"]))
|
||||
show_results($result, $value, $indent.implode(' ', array_fill(0, 12, '')));
|
||||
}
|
||||
}
|
||||
?>
|
||||
See the <a href="server/ajaxJSONTest_php.html" target="_BLANK">PHP Source</a><br/>
|
||||
@@ -0,0 +1,3 @@
|
||||
<code><span style="color: #000000">
|
||||
The server says: your row order was<br/><br /><span style="color: #0000BB"><?php<br />$result </span><span style="color: #007700">= </span><span style="color: #0000BB">json_decode</span><span style="color: #007700">(</span><span style="color: #0000BB">file_get_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">'php://input'</span><span style="color: #007700">), </span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">show_results</span><span style="color: #007700">(</span><span style="color: #0000BB">$result</span><span style="color: #007700">, </span><span style="color: #DD0000">"table-7"</span><span style="color: #007700">);<br />function </span><span style="color: #0000BB">show_results</span><span style="color: #007700">(</span><span style="color: #0000BB">$result</span><span style="color: #007700">, </span><span style="color: #0000BB">$id</span><span style="color: #007700">, </span><span style="color: #0000BB">$indent </span><span style="color: #007700">= </span><span style="color: #0000BB">null</span><span style="color: #007700">) {<br /> foreach(</span><span style="color: #0000BB">$result</span><span style="color: #007700">[</span><span style="color: #0000BB">$id</span><span style="color: #007700">] as </span><span style="color: #0000BB">$value</span><span style="color: #007700">) {<br /> echo </span><span style="color: #DD0000">"</span><span style="color: #0000BB">$indent$value</span><span style="color: #DD0000"><br/>"</span><span style="color: #007700">;<br /> if (isset(</span><span style="color: #0000BB">$result</span><span style="color: #007700">[</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$value</span><span style="color: #DD0000">"</span><span style="color: #007700">]))<br /> </span><span style="color: #0000BB">show_results</span><span style="color: #007700">(</span><span style="color: #0000BB">$result</span><span style="color: #007700">, </span><span style="color: #0000BB">$value</span><span style="color: #007700">, </span><span style="color: #0000BB">$indent</span><span style="color: #007700">.</span><span style="color: #0000BB">implode</span><span style="color: #007700">(</span><span style="color: #DD0000">'&nbsp;'</span><span style="color: #007700">, </span><span style="color: #0000BB">array_fill</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">12</span><span style="color: #007700">, </span><span style="color: #DD0000">''</span><span style="color: #007700">)));<br /> }<br />}<br /></span><span style="color: #0000BB">?><br /></span>See the <a href="server/ajaxJSONTest_php.html" target="_BLANK">PHP Source</a><br/><br /></span>
|
||||
</code>
|
||||
8
enginiptv/panel/plugins/tablednd/server/ajaxTest.php
Normal file
8
enginiptv/panel/plugins/tablednd/server/ajaxTest.php
Normal file
@@ -0,0 +1,8 @@
|
||||
The server says: your row order was<br/>
|
||||
<?php
|
||||
$result = $_REQUEST["table-3"];
|
||||
foreach($result as $value) {
|
||||
echo "$value<br/>";
|
||||
}
|
||||
?>
|
||||
See the <a href="server/ajaxTest_php.html" target="_BLANK">PHP Source</a><br/>
|
||||
@@ -0,0 +1,4 @@
|
||||
<script ></script>
|
||||
<code><span style="color: #000000">
|
||||
The server says: your row order was<br/><br /><span style="color: #0000BB"><?php<br />$result </span><span style="color: #007700">= </span><span style="color: #0000BB">$_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">"table-3"</span><span style="color: #007700">];<br />foreach(</span><span style="color: #0000BB">$result </span><span style="color: #007700">as </span><span style="color: #0000BB">$value</span><span style="color: #007700">) {<br /> echo </span><span style="color: #DD0000">"</span><span style="color: #0000BB">$value</span><span style="color: #DD0000"><br/>"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?><br /></span>See the <a href="server/ajaxTest_php.html" target="_BLANK">PHP Source</a><br/></span>
|
||||
</code>
|
||||
Reference in New Issue
Block a user