ruạṛ
<?php /** * Edit testimonial * @version 0.10 * @author Robert Urquhart <programmer@activatedesign.co.nz> * @package WEP-CMS * @since braziers.co.nz */ session_start(); require_once 'scripts-includes/universal.php'; require_once 'scripts-includes/display.php'; $connID = connect_to_db(); if(!$testimonial_id = is_numeric_id($_GET['testimonial'], 0)) { $t = new testimonial(); if(isset($_SESSION['passback'])) { $t->load_from_data($_SESSION['passback']); } $button = $h1 = 'Add testimonial'; $action = 'process-testimonial-new.php'; $new = true; } else { $t = new testimonial($testimonial_id); if(!$t->testimonial_id) { getout('Testimonial not found','testimonials.php'); exit; } $action = 'process-testimonial-edit.php'; $button = 'Update testimonial'; $h1 = 'Edit testimonial'; } head('testimonials','Edit a testimonial'); //print_r($t); ?> <h1><?php echo $h1; ?></h1> <div class="mock_table" id="tab1"> <form method="post" action="processes/<?php echo $action; ?>" name="testimonial_edit" id="testimonial_edit" enctype="multipart/form-data"> <input name="testimonial_id" id="testimonial_id1" type="hidden" value="<?php echo $testimonial_id; ?>" /> <?php if(TESTIMONIALS_LIST): ?> <label for="type_id"> <span class="right">Testimonial type:</span> <span class="left"> <select name="type_id" id="type_id"> <?php echo $t->types->html_select_options($t->type_id,false); ?> </select> </span> </label> <?php endif; ?> <label for="witness"><span class="right">Customer name:</span><span class="left"><input name="witness" id="witness" type="text" size="60" maxlength="65" value="<?php echo $t->witness; ?>" /></span></label> <label for="testimony"><span class="right">Testimonial:</span><span class="left"><textarea name="testimony" id="testimony" cols="50" rows="8"><?php echo html_entity_decode($t->testimony,ENT_QUOTES); ?></textarea></span></label> <br class="clear" /> <p> </p> <p class="center"> <input name="submit" id="submit1" type="submit" value="<?php echo $button; ?>" /> </p> </form> </div> <!-- end tab 1 --> <?php footer(); exit; ?>
cải xoăn