settings.inc 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <p class="title">
  2. General settings:
  3. </p>
  4. <hr />
  5. <form id="mainConfig" method="post" action="index.php">
  6. <?php
  7. $conf = $conf_obj->get('main');
  8. $model = $conf_obj->get_config_model('main');
  9. $line = '<input type="hidden" name="conf_change_type" value="main"></input>';
  10. # For now there's no use to the 'form_field' setting, as main only uses select, user only inputs
  11. foreach ( $model as $key => $item ) {
  12. $line .= '<label for="' . $key . '">' . $item['label'] . '</label>';
  13. $line .= '<select name="' . $key '" id="' . $key . '">';
  14. foreach ( $item['select_opts'] as $option ) {
  15. $line .= '<option value="' . $option . '">' . $option . '</option>';
  16. }
  17. $line .= '</select>';
  18. echo "$line\n";
  19. }
  20. ?>
  21. <input type="submit" value="Commit Changes"></input>
  22. </form>
  23. <hr />
  24. <p class="title">
  25. User management:
  26. </p>
  27. <hr />
  28. <form id="userConfig" method="post" action="index.php">
  29. <?php
  30. $conf = $conf_obj->get('user');
  31. $model = $conf_obj->get_config_model('user');
  32. $line = '<input type="hidden" name="conf_change_type" value="user"></input>';
  33. foreach ( $conf as $user => $data ) {
  34. foreach ( $model as $key => $item ) {
  35. $line .= '<label for="' . $key . '">' . $item['label'] . '</label>';
  36. $val = "";
  37. if( array_key_exists( $key, $data ) ) {
  38. } else if( array_key_exists( 'masks', $conf ) ) {
  39. if( $conf['masks'] == 'parent' ) $val =
  40. }
  41. $line .= '<input name="' . $key . '" id="' . $key . '" type="' . $item['field_type'] . '" placeholder="' . $item['placeholder'] . '" value="' . $val . '"></input><br />';
  42. echo "$line\n";
  43. }
  44. }
  45. ?>
  46. <input type="submit" value="Commit Changes"></input>
  47. </form>
  48. <p class="title">
  49. Add User:
  50. </p>
  51. <form id="addUser" method="post" action="index.php">
  52. <input type="hidden" name="conf_change_type" value="user"></input>
  53. <?php
  54. foreach ( $model as $key => $item ) {
  55. $line .= '<label for="' . $key . '">' . $item['label'] . '</label>';
  56. $line .= '<input name="' . $key . '" id="' . $key . '" type="' . $item['field_type'] . '" placeholder="' . $item['placeholder'] . '" value=""></input><br />';
  57. echo "$line\n";
  58. }
  59. ?>
  60. <input type="submit" value="Commit Changes"></input>
  61. </form>
  62. <hr />
  63. <p class="title">
  64. Theme cloner:
  65. </p>
  66. <hr />
  67. <p>
  68. Want to write your own theme?
  69. Clone a theme here then see the <a href="https://tcms.troglodyne.net/index.php?nav=5&post=fileshare/manual/Chapter 03-Customization.post" title="GET UR MIND RITE">styling guide</a>
  70. for information on how tCMS' templates, image sets and CSS work in the theming system.
  71. </p>
  72. INSERT FORM HERE