Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_cache_limiter();
- session_start();
- error_reporting(E_ALL);
- ini_set('display_errors',1);
- require('config.php');
- require('functions.php');
- //check for administrative rights
- if (allow_access('Administrators') != "yes")
- {
- include ('no_access.html');
- exit;
- }
- //Get the id from the previous page
- $id_memos=$_GET['id_memos'];
- $sql="SELECT * FROM `memos` WHERE id_memos='$id_memos'";
- $result=mysql_query($sql);
- $rows=mysql_fetch_array($result);
- //Set up Checkbox
- $act="";
- if($row['memos_active'] == 1) {$act = 'checked="checked"';}
- $title='Edit This Memo';
- include 'ctts_header.php';
- ?><head>
- <script type="text/javascript">
- $(function(){
- // Datepicker
- $('#start_date').datepicker({
- inline: true,
- dateFormat: "yy-mm-dd"
- });
- // Datepicker
- $('#end_date').datepicker({
- inline: true,
- dateFormat: "yy-mm-dd"
- });
- // Datepicker
- $('#inspect_exp').datepicker({
- inline: true,
- dateFormat: "yy-mm-dd"
- });
- // Datepicker
- $('#regist_exp').datepicker({
- inline: true,
- dateFormat: "yy-mm-dd"
- });
- // Datepicker
- $('#memo_date').datepicker({
- inline: true,
- dateFormat: "yy-mm-dd"
- });
- // Timepicker Only
- $('#time_in').timepicker({
- ampm: true,
- });
- $('#time_out').timepicker({
- ampm: true,
- });
- //hover states on the static widgets
- $('#dialog_link, ul#icons li').hover(
- function() { $(this).addClass('ui-state-hover'); },
- function() { $(this).removeClass('ui-state-hover'); }
- );
- });
- </script>
- </head>
- <div id="content">
- <h2>Edit This Memo</h2>
- <form action="update_memo.php" method="post" name="form1" id="form1">
- <table align="left">
- <tr valign="baseline">
- <td><input type="hidden" name="id_memos" value="<?php echo $rows['id_memos']; ?>" /></td>
- </tr>
- <tr valign="baseline">
- <td nowrap="nowrap" align="right" valign="top">Memo:</td>
- <td><textarea name="memo" cols="50" rows="5"><?php echo $rows['memo']; ?></textarea></td>
- </tr>
- <tr valign="baseline">
- <td nowrap="nowrap" align="right">Active:</td>
- <td><input name="memos_active" type="checkbox" value="1" checked="checked"<?php echo $act; ?> /></td>
- </tr>
- <tr valign="baseline">
- <td nowrap="nowrap" align="right"> </td>
- <td><input class="button" type="submit" name="submit" value="Save Changes" /></td>
- </tr>
- </table>
- </form>
- </form>
- <!-- end .content --></div>
- <!-- end content-container --></div>
- <?php include 'footer.php'; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement