/trunk/PHPnew/admin/admin_main.php

http://mycaptain.googlecode.com/ · PHP · 101 lines · 81 code · 18 blank · 2 comment · 2 complexity · 275e8b8de2e6175d421a2581f7e0ce5e MD5 · raw file

  1. <?php
  2. include_once ('admin_global.php');
  3. $r=$db->Get_user_shell_check($uid, $shell);
  4. if(@$_GET['action']=='logout')$db->Get_user_out();
  5. $query=$db->findall("p_config");
  6. while($row=$db->fetch_array($query))
  7. $row_arr[$row['name']]=$row['values'];
  8. //print_r($row_arr);
  9. //print_r($_POST);
  10. if(isset($_POST['update']))
  11. {
  12. unset($_POST['update']);//unset() ???????
  13. foreach($_POST as $name=>$values)// ????POST????? ???????$name,???$values
  14. {
  15. $db->query("update p_config set `values` ='$values' where `name` ='$name'");
  16. }
  17. $db->Get_admin_msg("admin_main.php");
  18. }
  19. ?>
  20. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  21. <HTML><HEAD><TITLE>????</TITLE>
  22. <META http-equiv=Content-Type content="text/html; charset=gb2312">
  23. <META content=Alan name=Author><LINK rev=MADE
  24. href="mailto:haowubai@hotmail.com"><LINK href="images/private.css"
  25. type=text/css rel=stylesheet>
  26. <META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
  27. <BODY>
  28. <TABLE class=navi cellSpacing=1 align=center border=0>
  29. <TBODY>
  30. <TR>
  31. <form action="" method="post">
  32. <TH>?? >> ????</TH></TR></TBODY></TABLE><BR>
  33. <table border=0 cellspacing=1 align=center class=form>
  34. <tr>
  35. <th colspan="2">????</th>
  36. </tr>
  37. <tr>
  38. <td align="right">????:</td>
  39. <td><input type="text" name="websitename" value="<?php echo $row_arr['websitename'];?>" size="20" maxlength="40"/> </td>
  40. </tr>
  41. <tr>
  42. <td align="right">????:</td>
  43. <td><input type="text" name="website_url" value="<?php echo $row_arr['website_url'];?>" size="20" maxlength="40"/> </td>
  44. </tr>
  45. <tr>
  46. <td align="right">???:</td>
  47. <td><input type="text" name="website_keyword" value="<?php echo $row_arr['website_keyword'];?>" size="40" maxlength="40"/> </td>
  48. </tr>
  49. <tr>
  50. <td align="right">??:</td>
  51. <td><input type="text" name="website_cp" value="<?php echo $row_arr['website_cp'];?>" size="40" maxlength="40"/> </td>
  52. </tr>
  53. <tr>
  54. <td align="right">??:</td>
  55. <td><input type="text" name="website_tel" value="<?php echo $row_arr['website_tel'];?>" size="40" maxlength="40"/> </td>
  56. </tr>
  57. <tr>
  58. <td align="right">email:</td>
  59. <td><input type="text" name="website_email" value="<?php echo $row_arr['website_email'];?>" size="40" maxlength="40"/> </td>
  60. </tr>
  61. <tr>
  62. <td align="right">??:</td>
  63. <td><input type="text" name="principal_name" value="<?php echo $row_arr['principal_name'];?>" size="40" maxlength="40"/> </td>
  64. </tr>
  65. <tr>
  66. <td align="right">??:</td>
  67. <td><input type="text" name="principal_phone" value="<?php echo $row_arr['principal_phone'];?>" size="40" maxlength="40"/> </td>
  68. </tr>
  69. <tr>
  70. <td align="right">QQ:</td>
  71. <td><input type="text" name="principal_QQ" value="<?php echo $row_arr['principal_QQ'];?>" size="40" maxlength="40"/> </td>
  72. </tr>
  73. <tr>
  74. <td align="right">??:</td>
  75. <td><input type="text" name="principal_add" value="<?php echo $row_arr['principal_add'];?>" size="40" maxlength="40"/> </td>
  76. </tr>
  77. <tr>
  78. <td colspan="2" align="center" height='30'>
  79. <input type="submit" name="update" value=" ?? "/>
  80. </td> </form>
  81. </tr>
  82. </table>
  83. </BODY></HTML>