Oppaitime's version of Gazelle
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.

new.php 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?
  2. View::show_header('Create a collection', 'bbcode');
  3. if (!check_perms('site_collages_renamepersonal')) {
  4. $ChangeJS = " onchange=\"if ( this.options[this.selectedIndex].value == '0') { $('#namebox').ghide(); $('#personal').gshow(); } else { $('#namebox').gshow(); $('#personal').ghide(); }\"";
  5. }
  6. if (!check_perms('site_collages_renamepersonal') && $Category === '0') {
  7. $NoName = true;
  8. }
  9. ?>
  10. <div class="thin">
  11. <?
  12. if (isset($Err)) { ?>
  13. <div class="save_message error"><?=$Err?></div>
  14. <br />
  15. <?
  16. } ?>
  17. <div class="box pad">
  18. <form class="create_form" name="collage" action="collages.php" method="post">
  19. <input type="hidden" name="action" value="new_handle" />
  20. <input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
  21. <table class="layout">
  22. <tr id="collagename">
  23. <td class="label"><strong>Name</strong></td>
  24. <td>
  25. <input type="text"<?=$NoName ? ' class="hidden"' : ''; ?> name="name" size="60" id="namebox" value="<?=display_str($Name)?>" />
  26. <span id="personal"<?=$NoName ? '' : ' class="hidden"'; ?> style="font-style: oblique;"><strong><?=$LoggedUser['Username']?>'s personal collection</strong></span>
  27. </td>
  28. </tr>
  29. <tr>
  30. <td class="label"><strong>Category</strong></td>
  31. <td>
  32. <select name="category"<?=$ChangeJS?>>
  33. <?
  34. array_shift($CollageCats);
  35. foreach ($CollageCats as $CatID=>$CatName) { ?>
  36. <option value="<?=$CatID + 1 ?>"<?=(($CatID + 1 == $Category) ? ' selected="selected"' : '')?>><?=$CatName?></option>
  37. <?
  38. }
  39. $DB->query("
  40. SELECT COUNT(ID)
  41. FROM collages
  42. WHERE UserID = '$LoggedUser[ID]'
  43. AND CategoryID = '0'
  44. AND Deleted = '0'");
  45. list($CollageCount) = $DB->next_record();
  46. if (($CollageCount < $LoggedUser['Permissions']['MaxCollages']) && check_perms('site_collages_personal')) { ?>
  47. <option value="0"<?=(($Category === '0') ? ' selected="selected"' : '')?>>Personal</option>
  48. <?
  49. } ?>
  50. </select>
  51. <br />
  52. <ul>
  53. <li><strong>Theme</strong> - A collection containing releases that all relate to a certain theme</li>
  54. <li><strong>Staff picks</strong> - A listing of recommendations picked by the staff on special occasions.</li>
  55. <?
  56. if (($CollageCount < $LoggedUser['Permissions']['MaxCollages']) && check_perms('site_collages_personal')) { ?>
  57. <li><strong>Personal</strong> - You can put whatever you want here. It is your own personal collection.</li>
  58. <? } ?>
  59. </ul>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td class="label">Description</td>
  64. <td>
  65. <textarea class="bbcode_editor" name="description" id="description" cols="60" rows="10"><?=display_str($Description)?></textarea>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td class="label"><strong>Tags (comma-separated)</strong></td>
  70. <td>
  71. <input type="text" id="tags" name="tags" size="60" value="<?=display_str($Tags)?>" />
  72. </td>
  73. </tr>
  74. <tr>
  75. <td colspan="2" class="center">
  76. <strong>Please ensure your collection will be allowed under the <a href="rules.php?p=collages">Collection Rules</a>.</strong>
  77. </td>
  78. </tr>
  79. <tr>
  80. <td colspan="2" class="center"><input type="submit" value="Create collection" /></td>
  81. </tr>
  82. </table>
  83. </form>
  84. </div>
  85. </div>
  86. <? View::show_footer(); ?>