Guest User

Test_Script_2

a guest
Aug 31st, 2015
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.87 KB | None | 0 0
  1. <?php
  2. set_time_limit(600);
  3. error_reporting(E_ALL);
  4. ini_set('display_errors', TRUE);
  5. ini_set('display_startup_errors', TRUE);
  6.  
  7. isset($_REQUEST["limit"]) ? $limit = $_REQUEST["limit"] : $limit = 15;
  8. isset($_REQUEST["longorshort"]) ? $longorshort = $_REQUEST["longorshort"] : $longorshort = "long";
  9. $start = 1;
  10.  
  11. echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  12. <html>
  13. <head>
  14. <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">';
  15.  
  16. echo "<title>Test Script 2</title></head><body>";
  17. echo '<script src="test_script_js7.js"></script>';
  18.  
  19. echo "
  20.  <br>Clicking the button below will start the script running
  21.  <br>The script called via XMLHttpRequest will generate a random delay between 40 and 55 seconds (5-10 seconds if \"longorshort\" is set to \"short\" in the url string), then a randomly generated string will be displayed in the table on the bottom
  22.  <br>The default limit on iterations is fifteen
  23.  <br>When the process terminates normally, the phrase \"test complete\" will be output in the \"Main Info\" cell
  24.  <br><b>The script called via XMLHttpRequest will <u>never take more than 60 seconds</u> to complete processing</b>
  25.  
  26. ";
  27. echo "<br><img src=start.jpg onclick=\"getter_outer($limit, '$start', '$longorshort')\"><br><a href=\"javascript:master_switch();\">click here to abort</a>  ";
  28.  
  29. echo "<table border=1><tr>";
  30. echo "<td valign=top><div id=main_info>Main Info:</div></td>";
  31. echo "<td valign=top><div id=iteration>Iterations:</div></td>";
  32. echo "<td valign=top><div id=message>Messages:</div></td>";
  33. echo "</tr></table>";
  34.  
  35. echo "<table border=1 style=table-layout:fixed;><tr>";
  36. for ($i = 1; $i <= $limit; $i++) {
  37.   echo "<td valign=top><div class=getter id=post_$i><i>Result $i</i></div></td>";
  38.   if ( ($i%5 == 0) ) {echo "</tr><tr>";}
  39. }
  40. echo "</tr></table>";
  41.  
  42.  
  43.  
  44.  
  45. echo '</body></html>';
  46. ?>
Advertisement
Add Comment
Please, Sign In to add comment