⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comments.php

📁 BLOG HOSTER---PHP & MYSQL Create Blogs in seconds Installation of your BlogHoster system is easy.
💻 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>&nbsp;$comments6</td></tr>
 <tr><td><input type='radio' name='show_comments' value='2'"; if($user_info[show_comments] == "2") { echo " CHECKED"; } echo "></td><td>&nbsp;$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>&nbsp;$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>&nbsp;$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>&nbsp;$comments11</td></tr>
 <tr><td><input type='radio' name='who_comments' value='2'"; if($user_info[who_comments] == "2") { echo " CHECKED"; } echo "></td><td>&nbsp;$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>&nbsp;$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>&nbsp;$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>&nbsp;$comments16</td></tr>
 <tr><td><input type='radio' name='default_comments' value='0'"; if($user_info[default_comments] == "0") { echo " CHECKED"; } echo "></td><td>&nbsp;$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;'>&nbsp;$comments19</td></tr>
 <tr><td><input type='radio' name='notify_comments' value='0'"; if($user_info[notify_comments] == "0") { echo " CHECKED"; } echo "></td><td>&nbsp;$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;'>&nbsp;$comments22</td></tr>
 <tr><td><input type='radio' name='logip_comments' value='0'"; if($user_info[logip_comments] == "0") { echo " CHECKED"; } echo "></td><td>&nbsp;$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>&nbsp;$comments25</td></tr>
 <tr><td><input type='radio' name='manage_comments' value='2'"; if($user_info[manage_comments] == "2") { echo " CHECKED"; } echo "></td><td>&nbsp;$comments26</td></tr>
 <tr><td><input type='radio' name='manage_comments' value='1'"; if($user_info[manage_comments] == "1") { echo " CHECKED"; } echo "></td><td>&nbsp;$comments27</td></tr>
 <tr><td><input type='radio' name='manage_comments' value='0'"; if($user_info[manage_comments] == "0") { echo " CHECKED"; } echo "></td><td>&nbsp;$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 + -