+++ /dev/null
-<?php\r
-\r
- include_once('config.php');\r
- \r
- if(isset($_REQUEST['formaction']) && $_REQUEST['formaction']=='saveoptions')\r
- {\r
- $db=new PDO('sqlite:'.$dblocation);\r
- $st=$db->prepare("UPDATE tblOption SET OptionValue=? WHERE Option=?;");\r
- foreach($_REQUEST as $key=>$val)\r
- {\r
- $st->bindParam(1,$val);\r
- $st->bindParam(2,$key);\r
- $st->execute();\r
- }\r
- }\r
-\r
-function content()\r
-{\r
- global $dblocation;\r
- $db=new PDO('sqlite:'.$dblocation);\r
- \r
- $rs=$db->query("SELECT Option, OptionValue, OptionDescription FROM tblOption;");\r
- \r
-?>\r
- <h2 style="text-align:center;">Options</h2>\r
- <form name="frmoptions" method="post">\r
- <input type="hidden" name="formaction" value="saveoptions">\r
- <table>\r
- <tr>\r
- <th>Option</th>\r
- <th>Value</th>\r
- <th>Description</th>\r
- </tr>\r
- <?php\r
- while($record=$rs->fetch())\r
- {\r
- print '<tr>';\r
- print '<td valign="TOP">'.$record[0].'</td>';\r
- print '<td valign="TOP"><input type="text" name="'.$record[0].'" value="'.$record[1].'"></td>';\r
- print '<td valign="TOP">'.$record[2].'</td>';\r
- print '</tr>';\r
- }\r
- ?>\r
- <tr>\r
- <td colspan="3">\r
- <center>\r
- <input type="submit" value="Save">\r
- </center>\r
- </td>\r
- </tr>\r
- </table>\r
-<?php\r
-}\r
-\r
- include_once('linkbar.php');\r
- include_once('template.php');\r
-\r
-?>
\ No newline at end of file