?
Path : /home/admin/domains/happytokorea.com/public_html_bk/gall/admin/ |
Current File : /home/admin/domains/happytokorea.com/public_html_bk/gall/admin/site.php |
<? include("header.php");?> <div id="top-panel"> <div id="panel"> <ul> <li><a href="site.php" class="report">Site</a></li> <li><a href="pay.php" class="report">Payment</a></li> <li><a href="promotion.php" class="report">Promotion</a></li> </ul> </div> </div> <script> function check_num(value) { var ValidChars = "0123456789."; var IsNumber=true; var Char; for (i = 0; i < value.length && IsNumber == true; i++) { Char = value.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; } function check_form(form_name) { error = false; form = form_name; var field_value = form.elements['s_data'].value; if(!check_num(field_value)){ alert("Decimal Only"); } return check_num(field_value); } </script> <? if(isset($_POST[s_data])){ $db->query("update site set s_data = '".$_POST[s_data]."' where s_name = 'deal'"); } ?> <? $deal = $db->queryUniqueObject("select * from site where s_name = 'deal'");?> <div id="content"> <div id="box" align="left"> <h3 id="adduser">Dealer Discount</h3> <form id="form" action="" method="post" onSubmit="return check_form(create_account);" name="create_account" > <fieldset id="personal"> <legend>Dealer Discount</legend> <label for="">Discount: </label> <input type="text" name="s_data" value="<? echo $deal->s_data;?>" size="5" style="text-align:right"> % <br /> </fieldset> <br /> <div align="center"> <input id="button1" type="submit" name="edit" value="Edit" /> <input id="button2" type="reset" /> </div> </form> </div> <br /> <div id="box" > <h3>SEO TAG</h3> <table width="99%"> <thead> <tr> <th><a href="#">Page</a></th> <th width="60px"><a href="#">Action</a></th> </tr> </thead> <tbody> <? $res = $db->query("select * from seo"); while($page = mysql_fetch_array($res)){ ?> <tr> <td> <a href="editseo.php?page=<? echo $page[seo_page];?>">Page <? echo $page[seo_page];?> </a></td> <td align="center"> <a href="editseo.php?page=<? echo $page[seo_page];?>"><img src="img/icons/user_edit.png" title="Edit user" width="16" height="16" /></a> </td> </tr> <? } ?> </tbody> </table> </div> </div> <? include("footer.php");?>