Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.13 KB | None | 0 0
  1. <ul id="pagePath">
  2. <li><a href="index.php">Pradžia</a></li>
  3. <li><a href="index.php?module=<?php echo $module; ?>&action=list">DVD</a></li>
  4. <li><?php if(!empty($id)) echo "DVD redagavimas"; else echo "Naujas DVD"; ?></li>
  5. </ul>
  6. <div class="float-clear"></div>
  7. <div id="formContainer">
  8. <?php if($formErrors != null) { ?>
  9. <div class="errorBox">
  10. Neįvesti arba neteisingai įvesti šie laukai:
  11. <?php
  12. echo $formErrors;
  13. ?>
  14. </div>
  15. <?php } ?>
  16. <form action="" method="post">
  17. <fieldset>
  18. <legend>DVD informacija</legend>
  19. <p><label class="field" for="title">Pavadinimas<?php echo in_array('title', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label>
  20. <input type="text" id="title" name="title" class="textbox textbox-300" value="<?php echo isset($data['title']) ? $data['title'] : ''; ?>"</p>
  21. <?php if(key_exists('title', $maxLengths)) echo "<span class='max-len'>(iki {$maxLengths['title']} simb.)</span>"; ?>
  22. <p><label class="field" for="description">Aprašymas</label>
  23. <textarea type="text" id="description" name="description" class="textarea" value="<?php echo isset($data['description']) ? $data['description'] : ''; ?>"><?php echo isset($data['description']) ? $data['description'] : ''; ?></textarea></p>
  24. <p></p>
  25. <p><label class="field" for="release_year">Išleidimo metai<?php echo in_array('release_year', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label>
  26. <input type="text" id="release_year" name="release_year" class="textbox textbox-70 date" value="<?php echo isset($data['release_year']) ? $data['release_year'] : ''; ?>"></p>
  27. <p>
  28. <label class="field" for="imdb_rating">IMDB reitingas<?php echo in_array('imdb_rating', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label>
  29. <input type="text" id="imdb_rating" name="imdb_rating" class="textbox textbox-70" value="<?php echo isset($data['imdb_rating']) ? $data['imdb_rating'] : ''; ?>"><span class="units"></span>
  30. <?php if(key_exists('imdb_rating', $maxLengths)) echo "<span class='max-len'>(iki {$maxLengths['imdb_rating']} simb.)</span>"; ?>
  31. </p>
  32. <p>
  33. <label class="field" for="selling_price">Pardavimo kaina<?php echo in_array('selling_price', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label>
  34. <input type="text" id="selling_price" name="selling_price" class="textbox textbox-70" value="<?php echo isset($data['selling_price']) ? $data['selling_price'] : ''; ?>"><span class="units"></span>
  35. <?php if(key_exists('selling_price', $maxLengths)) echo "<span class='max-len'>(iki {$maxLengths['selling_price']} simb.)</span>"; ?>
  36. </p>
  37. <p>
  38. <label class="field" for="length">Filmo trukmė<?php echo in_array('length', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label>
  39. <input type="text" id="length" name="length" class="textbox textbox-70" value="<?php echo isset($data['length']) ? $data['length'] : ''; ?>"><span class="units">min.</span>
  40. </p>
  41. <p><label class="field" for="fk_STUDIOstudio_id">Studija<?php echo in_array('fk_STUDIOstudio_id', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label></p>
  42. <select id="fk_STUDIOstudio_id" name="fk_STUDIOstudio_id">
  43. <option value="-1">---------------</option>
  44. <?php
  45. // išrenkame visas kategorijas sugeneruoti pasirinkimų lauką
  46. $studio = $studioObj->getStudioList();
  47. $selected = "";
  48. $studioIndex = array_values($data);
  49. $counter = 1;
  50. if(isset($data['fk_STUDIOstudio_id']) && $data['fk_STUDIOstudio_id'] == $studioIndex[7])
  51. {
  52. $selected = " selected='selected'";
  53. }
  54. foreach($studio as $key => $val)
  55. {
  56. if($counter == $studioIndex[7])
  57. {
  58. echo "<option {$selected} value='{$val['studio_id']}'>{$val['studio_name']}</option>";
  59. }
  60. else
  61. {
  62. echo "<option value='{$val['studio_id']}'>{$val['studio_name']}</option>";
  63. }
  64. $counter++;
  65. }
  66. ?>
  67. </select>
  68. <p></p>
  69. <p><label class="field" for="fk_ACTORactor_id">Aktorius<?php echo in_array('fk_ACTORactor_id', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label></p>
  70. <select id="fk_ACTORactor_id" name="fk_ACTORactor_id">
  71. <option value="-1">---------------</option>
  72. <?php
  73. // išrenkame visas kategorijas sugeneruoti pasirinkimų lauką
  74. $actor = $actorObj->getActorList();
  75. $selected = "";
  76. $actorIndex = array_values($data);
  77. $counter = 1;
  78. if(isset($data['fk_ACTORactor_id']) && $data['fk_ACTORactor_id'] == $actorIndex[8])
  79. {
  80. $selected = " selected='selected'";
  81. }
  82. foreach($actor as $key => $val)
  83. {
  84. if($counter == $actorIndex[8])
  85. {
  86. echo "<option {$selected} value='{$val['actor_id']}'>{$val['actor_name']} {$val['actor_surname']}</option>";
  87. }
  88. else
  89. {
  90. echo "<option {$selected} value='{$val['actor_id']}'>{$val['actor_name']} {$val['actor_surname']}</option>";
  91. }
  92. $counter++;
  93. }
  94. ?>
  95. </select>
  96. <p></p>
  97. <p><label class="field" for="fk_DIRECTORdirector_id">Režisierius<?php echo in_array('fk_DIRECTORdirector_id', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label></p>
  98. <select id="fk_DIRECTORdirector_id" name="fk_DIRECTORdirector_id">
  99. <option value="-1">---------------</option>
  100. <?php
  101. // išrenkame visas kategorijas sugeneruoti pasirinkimų lauką
  102. $director = $directorObj->getDirectorList();
  103. $selected = "";
  104. $directorIndex = array_values($data);
  105. $counter = 1;
  106. if(isset($data['fk_DIRECTORdirector_id']) && $data['fk_DIRECTORdirector_id'] == $directorIndex[9])
  107. {
  108. $selected = " selected='selected'";
  109. }
  110. foreach($director as $key => $val)
  111. {
  112. if($counter == $directorIndex[9])
  113. {
  114. echo "<option {$selected} value='{$val['director_id']}'>{$val['director_name']} {$val['director_surname']}</option>";
  115. }
  116. else
  117. {
  118. echo "<option value='{$val['director_id']}'>{$val['director_name']} {$val['director_surname']}</option>";
  119. }
  120. $counter++;
  121. }
  122. ?>
  123. </select>
  124. <p></p>
  125. <p><label class="field" for="fk_CATEGORYcategory_id">Kategorija<?php echo in_array('fk_CATEGORYcategory_id', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label></p>
  126. <select id="fk_CATEGORYcategory_id" name="fk_CATEGORYcategory_id">
  127. <option value="-1">---------------</option>
  128. <?php
  129. // išrenkame visas kategorijas sugeneruoti pasirinkimų lauką
  130. $category = $categoryObj->getCategoryList();
  131. $selected = "";
  132. $categoryIndex = array_values($data);
  133. $counter = 1;
  134. if(isset($data['fk_CATEGORYcategory_id']) && $data['fk_CATEGORYcategory_id'] == $categoryIndex[10])
  135. {
  136. $selected = " selected='selected'";
  137. }
  138. foreach($category as $key => $val)
  139. {
  140. if($counter == $categoryIndex[10])
  141. {
  142. echo "<option {$selected} value='{$val['category_id']}'>{$val['category_name']}</option>";
  143. }
  144. else
  145. {
  146. echo "<option value='{$val['category_id']}'>{$val['category_name']}</option>";
  147. }
  148. $counter++;
  149. }
  150. ?>
  151. </select>
  152. <p></p>
  153.  
  154. </fieldset>
  155. <p class="required-note"><font color="red">*</font> pažymėtus laukus užpildyti privaloma</p>
  156. <p>
  157. <input type="submit" class="submit button" name="submit" value="Išsaugoti">
  158. </p>
  159. <?php if(isset($data['dvd_id'])) { ?>
  160. <input type="hidden" name="dvd_id" value="<?php echo $data['dvd_id']; ?>" />
  161. <?php } ?>
  162. </form>
  163. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement