?? comments.php
字號:
<?
$page = "comments.php";
include "header.php";
// CHECK IF COMMENTS ARE DISABLED BY ADMIN
if($group_info[allow_comments] != "1") { exit(); }
if(isset($_POST['task'])) { $task = $_POST['task']; } else { $task = "main"; }
if($task == "dosave") {
$show_comments = $_POST['show_comments'];
$who_comments = $_POST['who_comments'];
$default_comments = $_POST['default_comments'];
$notify_comments = $_POST['notify_comments'];
$logip_comments = $_POST['logip_comments'];
$manage_comments = $_POST['manage_comments'];
mysql_query("UPDATE bhost_users SET show_comments='$show_comments', who_comments='$who_comments', default_comments='$default_comments', notify_comments='$notify_comments', logip_comments='$logip_comments', manage_comments='$manage_comments' WHERE u_id='$user_info[u_id]'");
$user_info = mysql_fetch_assoc(mysql_query("SELECT * FROM bhost_users WHERE u_id='$user_info[u_id]'"));
echo $head;
echo "
<h2>$comments1</h2>
$comments2
<br><br>
<form action='comments.php' method='POST'>
<input type='submit' class='button' value='$comments3'>
</form>
";
echo $foot;
exit();
}
if($task == "main") {
echo $head;
echo "
<h2>$comments1</h2>
$comments4
<br><br>
<form action='comments.php' method='POST'>
<b>$comments5</b><br>
<table width='400' cellpadding='0' cellspacing='0' style='margin-top: 5px;'>
<tr><td>
<table cellpadding='0' cellspacing='0'>
<tr><td><input type='radio' name='show_comments' value='3'"; if($user_info[show_comments] == "3") { echo " CHECKED"; } echo "></td><td> $comments6</td></tr>
<tr><td><input type='radio' name='show_comments' value='2'"; if($user_info[show_comments] == "2") { echo " CHECKED"; } echo "></td><td> $comments7</td></tr>
"; if($group_info[allow_members] == "1") { echo "<tr><td><input type='radio' name='show_comments' value='1'"; if($user_info[show_comments] == "1") { echo " CHECKED"; } echo "></td><td> $comments8</td></tr>"; } echo "
<tr><td><input type='radio' name='show_comments' value='0'"; if($user_info[show_comments] == "0") { echo " CHECKED"; } echo "></td><td> $comments9</td></tr>
</td></tr></table>
</td></tr></table>
<br>
<b>$comments10</b><br>
<table width='400' cellpadding='0' cellspacing='0' style='margin-top: 5px;'>
<tr><td>
<table cellpadding='0' cellspacing='0'>
<tr><td><input type='radio' name='who_comments' value='3'"; if($user_info[who_comments] == "3") { echo " CHECKED"; } echo "></td><td> $comments11</td></tr>
<tr><td><input type='radio' name='who_comments' value='2'"; if($user_info[who_comments] == "2") { echo " CHECKED"; } echo "></td><td> $comments12</td></tr>
"; if($group_info[allow_members] == "1") { echo "<tr><td><input type='radio' name='who_comments' value='1'"; if($user_info[who_comments] == "1") { echo " CHECKED"; } echo "></td><td> $comments13</td></tr>"; } echo "
<tr><td><input type='radio' name='who_comments' value='0'"; if($user_info[who_comments] == "0") { echo " CHECKED"; } echo "></td><td> $comments14</td></tr>
</td></tr></table>
</td></tr></table>
<br>
<b>$comments15</b><br>
<table width='400' cellpadding='0' cellspacing='0' style='margin-top: 5px;'>
<tr><td>
<table cellpadding='0' cellspacing='0'>
<tr><td><input type='radio' name='default_comments' value='1'"; if($user_info[default_comments] == "1") { echo " CHECKED"; } echo "></td><td> $comments16</td></tr>
<tr><td><input type='radio' name='default_comments' value='0'"; if($user_info[default_comments] == "0") { echo " CHECKED"; } echo "></td><td> $comments17</td></tr>
</td></tr></table>
</td></tr></table>
<br>
<b>$comments18</b><br>
<table width='400' cellpadding='0' cellspacing='0' style='margin-top: 5px;'>
<tr><td>
<table cellpadding='0' cellspacing='0'>
<tr><td valign='top'><input type='radio' name='notify_comments' value='1'"; if($user_info[notify_comments] == "1") { echo " CHECKED"; } echo "></td><td valign='top' style='padding-top: 3px;'> $comments19</td></tr>
<tr><td><input type='radio' name='notify_comments' value='0'"; if($user_info[notify_comments] == "0") { echo " CHECKED"; } echo "></td><td> $comments20</td></tr>
</td></tr></table>
</td></tr></table>
<br>
<b>$comments21</b><br>
<table width='400' cellpadding='0' cellspacing='0' style='margin-top: 5px;'>
<tr><td>
<table cellpadding='0' cellspacing='0'>
<tr><td valign='top'><input type='radio' name='logip_comments' value='1'"; if($user_info[logip_comments] == "1") { echo " CHECKED"; } echo "></td><td valign='top' style='padding-top: 3px;'> $comments22</td></tr>
<tr><td><input type='radio' name='logip_comments' value='0'"; if($user_info[logip_comments] == "0") { echo " CHECKED"; } echo "></td><td> $comments23</td></tr>
</td></tr></table>
</td></tr></table>
<br>
<b>$comments24</b><br>
<table width='400' cellpadding='0' cellspacing='0' style='margin-top: 5px;'>
<tr><td>
<table cellpadding='0' cellspacing='0'>
<tr><td><input type='radio' name='manage_comments' value='3'"; if($user_info[manage_comments] == "3") { echo " CHECKED"; } echo "></td><td> $comments25</td></tr>
<tr><td><input type='radio' name='manage_comments' value='2'"; if($user_info[manage_comments] == "2") { echo " CHECKED"; } echo "></td><td> $comments26</td></tr>
<tr><td><input type='radio' name='manage_comments' value='1'"; if($user_info[manage_comments] == "1") { echo " CHECKED"; } echo "></td><td> $comments27</td></tr>
<tr><td><input type='radio' name='manage_comments' value='0'"; if($user_info[manage_comments] == "0") { echo " CHECKED"; } echo "></td><td> $comments28</td></tr>
</td></tr></table>
</td></tr></table>
<br>
<input type='submit' class='button' value='$comments29'>
<input type='hidden' name='task' value='dosave'>
</form>
";
echo $foot;
}
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -