Advertisement
Guest User

blbustka - Tomik

a guest
May 25th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. <html>
  2. <body>
  3. <p><h2>Patching tool:</h2></p>
  4. <p>Version for patch:</p>
  5. <?php
  6. $version = shell_exec("/opt/patches.sh 2>&1");
  7. echo "<pre>$version</pre>";
  8. chdir('/opt/patches/kc_patches/');
  9. echo getcwd() . "\n";
  10. $iterator = new DirectoryIterator('.');
  11. $filelist = array();
  12. $counter = 0;
  13. foreach ($iterator as $fileinfo) {
  14. $filelist[]=$fileinfo->getFilename();
  15. echo "$fileinfo" . "\n";
  16. $counter++;
  17. }
  18. echo $counter;
  19. echo $filelist[0];
  20. $value1=$filelist[0];
  21. # $value2=$filelist[1];
  22. # $value3=$filelist[2];
  23. ?>
  24. <form method="post">
  25. <p>KC release ver.: <select name="kc_version" >
  26. <?php
  27. foreach ($filelist as $counter) {
  28. echo $counter;
  29. echo $value1;
  30. echo $filelist[0];
  31. echo "<option value=" . "$filelist[$counter]" . ">" . "$filelist[$counter]" . "</option>";
  32. }
  33. ?>
  34. # <option value="<?php echo "$value2"; ?>"><?php echo "$value2"; ?></option>
  35. # <option value="<?php echo "$value3"; ?>"><?php echo "$value3"; ?></option>
  36. </select></p>
  37. <p><input type="submit" /></p>
  38. </form>
  39. </body>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement