Unsupported scripts and control panel web app for a hosting company
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

editsite.webserver.php 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <form action="<?PHP echo CP_PATH; ?>editsite/<?PHP echo $_GET['n']; ?>" method="post">
  2. <?PHP
  3. $sql = 'SELECT site_php, site_htaccess, site_index FROM sites WHERE ';
  4. $sql .= 'site_id = ' . $_GET['n'];
  5. $res = mysql_query($sql);
  6. $row = mysql_fetch_assoc($res);
  7. $htaccess = ((int) $row['site_htaccess'] == 1) ? ' checked="checked" ' : '';
  8. $index = ((int) $row['site_index'] == 1) ? ' checked="checked" ' : '';
  9. ?>
  10. <input type="hidden" name="task" value="webserver">
  11. <input type="hidden" name="site" value="<?PHP echo $_GET['n']; ?>">
  12. <div class="block">
  13. <h2>Webserver settings</h2>
  14. <div class="innerblock">
  15. <p class="blurb">
  16. It may take a few minutes for changes to these settings to take effect.
  17. </p>
  18. <table class="form leftpad">
  19. <tr>
  20. <th>Enable .htaccess files</th>
  21. <td><input type="checkbox" name="htaccess"<?PHP echo $htaccess; ?>></td>
  22. </tr>
  23. <tr>
  24. <th>Allow directory indexing</th>
  25. <td><input type="checkbox" name="index"<?PHP echo $index; ?>></td>
  26. </tr>
  27. <tr>
  28. <th>PHP Version</th>
  29. <td>
  30. <select name="phpversion" class="inflat">
  31. <?PHP
  32. $targets = array('stable', 'dev', 'legacy');
  33. foreach ($targets as $php) {
  34. $binary = '/opt/php/'.$php;
  35. if (!file_exists($binary)) { continue; }
  36. echo '<option value="'.$php.'"';
  37. if ($row['site_php'] == $php) { echo ' selected="selected"'; }
  38. echo '>'.ucfirst($php) . ' - ';
  39. echo substr(readlink($binary), strlen('/opt/php/'), -1);
  40. echo '</option>';
  41. }
  42. ?>
  43. </select>
  44. </td>
  45. </tr>
  46. <tr>
  47. <th>Actions</th>
  48. <td><input type="submit" value="Update">
  49. <input type="reset" value="Reset"></td>
  50. </tr>
  51. </table>
  52. </div>
  53. </div>
  54. </form>