Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul id="pagePath">
- <li><a href="index.php">Pradžia</a></li>
- <li><a href="index.php?module=<?php echo $module; ?>&action=list">DVD</a></li>
- <li><?php if(!empty($id)) echo "DVD redagavimas"; else echo "Naujas DVD"; ?></li>
- </ul>
- <div class="float-clear"></div>
- <div id="formContainer">
- <?php if($formErrors != null) { ?>
- <div class="errorBox">
- Neįvesti arba neteisingai įvesti šie laukai:
- <?php
- echo $formErrors;
- ?>
- </div>
- <?php } ?>
- <form action="" method="post">
- <fieldset>
- <legend>DVD informacija</legend>
- <p><label class="field" for="title">Pavadinimas<?php echo in_array('title', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label>
- <input type="text" id="title" name="title" class="textbox textbox-300" value="<?php echo isset($data['title']) ? $data['title'] : ''; ?>"</p>
- <?php if(key_exists('title', $maxLengths)) echo "<span class='max-len'>(iki {$maxLengths['title']} simb.)</span>"; ?>
- <p><label class="field" for="description">Aprašymas</label>
- <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>
- <p></p>
- <p><label class="field" for="release_year">Išleidimo metai<?php echo in_array('release_year', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label>
- <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>
- <p>
- <label class="field" for="imdb_rating">IMDB reitingas<?php echo in_array('imdb_rating', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label>
- <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>
- <?php if(key_exists('imdb_rating', $maxLengths)) echo "<span class='max-len'>(iki {$maxLengths['imdb_rating']} simb.)</span>"; ?>
- </p>
- <p>
- <label class="field" for="selling_price">Pardavimo kaina<?php echo in_array('selling_price', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label>
- <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>
- <?php if(key_exists('selling_price', $maxLengths)) echo "<span class='max-len'>(iki {$maxLengths['selling_price']} simb.)</span>"; ?>
- </p>
- <p>
- <label class="field" for="length">Filmo trukmė<?php echo in_array('length', $required) ? '<span> <font color="red">*</font></span>' : ''; ?></label>
- <input type="text" id="length" name="length" class="textbox textbox-70" value="<?php echo isset($data['length']) ? $data['length'] : ''; ?>"><span class="units">min.</span>
- </p>
- <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>
- <select id="fk_STUDIOstudio_id" name="fk_STUDIOstudio_id">
- <option value="-1">---------------</option>
- <?php
- // išrenkame visas kategorijas sugeneruoti pasirinkimų lauką
- $studio = $studioObj->getStudioList();
- $selected = "";
- $studioIndex = array_values($data);
- $counter = 1;
- if(isset($data['fk_STUDIOstudio_id']) && $data['fk_STUDIOstudio_id'] == $studioIndex[7])
- {
- $selected = " selected='selected'";
- }
- foreach($studio as $key => $val)
- {
- if($counter == $studioIndex[7])
- {
- echo "<option {$selected} value='{$val['studio_id']}'>{$val['studio_name']}</option>";
- }
- else
- {
- echo "<option value='{$val['studio_id']}'>{$val['studio_name']}</option>";
- }
- $counter++;
- }
- ?>
- </select>
- <p></p>
- <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>
- <select id="fk_ACTORactor_id" name="fk_ACTORactor_id">
- <option value="-1">---------------</option>
- <?php
- // išrenkame visas kategorijas sugeneruoti pasirinkimų lauką
- $actor = $actorObj->getActorList();
- $selected = "";
- $actorIndex = array_values($data);
- $counter = 1;
- if(isset($data['fk_ACTORactor_id']) && $data['fk_ACTORactor_id'] == $actorIndex[8])
- {
- $selected = " selected='selected'";
- }
- foreach($actor as $key => $val)
- {
- if($counter == $actorIndex[8])
- {
- echo "<option {$selected} value='{$val['actor_id']}'>{$val['actor_name']} {$val['actor_surname']}</option>";
- }
- else
- {
- echo "<option {$selected} value='{$val['actor_id']}'>{$val['actor_name']} {$val['actor_surname']}</option>";
- }
- $counter++;
- }
- ?>
- </select>
- <p></p>
- <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>
- <select id="fk_DIRECTORdirector_id" name="fk_DIRECTORdirector_id">
- <option value="-1">---------------</option>
- <?php
- // išrenkame visas kategorijas sugeneruoti pasirinkimų lauką
- $director = $directorObj->getDirectorList();
- $selected = "";
- $directorIndex = array_values($data);
- $counter = 1;
- if(isset($data['fk_DIRECTORdirector_id']) && $data['fk_DIRECTORdirector_id'] == $directorIndex[9])
- {
- $selected = " selected='selected'";
- }
- foreach($director as $key => $val)
- {
- if($counter == $directorIndex[9])
- {
- echo "<option {$selected} value='{$val['director_id']}'>{$val['director_name']} {$val['director_surname']}</option>";
- }
- else
- {
- echo "<option value='{$val['director_id']}'>{$val['director_name']} {$val['director_surname']}</option>";
- }
- $counter++;
- }
- ?>
- </select>
- <p></p>
- <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>
- <select id="fk_CATEGORYcategory_id" name="fk_CATEGORYcategory_id">
- <option value="-1">---------------</option>
- <?php
- // išrenkame visas kategorijas sugeneruoti pasirinkimų lauką
- $category = $categoryObj->getCategoryList();
- $selected = "";
- $categoryIndex = array_values($data);
- $counter = 1;
- if(isset($data['fk_CATEGORYcategory_id']) && $data['fk_CATEGORYcategory_id'] == $categoryIndex[10])
- {
- $selected = " selected='selected'";
- }
- foreach($category as $key => $val)
- {
- if($counter == $categoryIndex[10])
- {
- echo "<option {$selected} value='{$val['category_id']}'>{$val['category_name']}</option>";
- }
- else
- {
- echo "<option value='{$val['category_id']}'>{$val['category_name']}</option>";
- }
- $counter++;
- }
- ?>
- </select>
- <p></p>
- </fieldset>
- <p class="required-note"><font color="red">*</font> pažymėtus laukus užpildyti privaloma</p>
- <p>
- <input type="submit" class="submit button" name="submit" value="Išsaugoti">
- </p>
- <?php if(isset($data['dvd_id'])) { ?>
- <input type="hidden" name="dvd_id" value="<?php echo $data['dvd_id']; ?>" />
- <?php } ?>
- </form>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement