<?
$page = "trackback_settings.php";
include "manager_header.php";

// CHECK IF TRACKBACKS ARE DISABLED BY ADMIN
if($owner_group_info[allow_trackback] != "1") { exit(); }

if(isset($_POST['task'])) { $task = $_POST['task']; } else { $task = "main"; }
if($user_status == "member") { exit(); }
$result = "";



if($task == "dosave") {
$default_trackbacks = $_POST['default_trackbacks'];
$detect_trackbacks = $_POST['detect_trackbacks'];
$tb_blacklist = str_replace("&lt;", "<", $_POST['tb_blacklist']);

mysql_query("UPDATE bhost_weblogs SET default_trackbacks='$default_trackbacks', detect_trackbacks='$detect_trackbacks', tb_blacklist='$tb_blacklist' WHERE w_id='$weblog_info[w_id]'");
$weblog_info = mysql_fetch_assoc(mysql_query("SELECT * FROM bhost_weblogs WHERE w_id='$weblog_info[w_id]'"));
$task = "main";
$result = "<img src='../images/saved_icon.gif' border='0' class='success'> <font class='success'>$trackback_settings11</font><br><br>";
}




if($task == "main") {
$tb_blacklist = str_replace("<", "&lt;", $weblog_info[tb_blacklist]);

echo $head;
echo "
<h2>$trackback_settings1</h2>
$trackback_settings9

<br><br>
$result
<table cellpadding='0' cellspacing='0' class='form'>
<form action='trackback_settings.php' method='POST'>

<tr>
<td class='form1'>$trackback_settings2</td>
<td class='form2'>
<select name='default_trackbacks'>
<option value='1'"; if($weblog_info[default_trackbacks] == "1") { echo " SELECTED"; } echo ">$trackback_settings3</option>
<option value='0'"; if($weblog_info[default_trackbacks] == "0") { echo " SELECTED"; } echo ">$trackback_settings4</option>
</select>";tip2("58", "59");echo"
</td>
</tr>

<tr>
<td class='form1'>$trackback_settings5</td>
<td class='form2'>
<select name='detect_trackbacks'>
<option value='1'"; if($weblog_info[detect_trackbacks] == "1") { echo " SELECTED"; } echo ">$trackback_settings6</option>
<option value='0'"; if($weblog_info[detect_trackbacks] == "0") { echo " SELECTED"; } echo ">$trackback_settings7</option>
</select>";tip2("62", "63");echo"
</td>
</tr>

<tr>
<td class='form1' valign='top'>$trackback_settings8</td>
<td class='form2'><textarea name='tb_blacklist' rows='6' cols='40' class='settings'>$tb_blacklist</textarea><br><div class='help'>$trackback_settings13</div></td>
</tr>
</table>

<br>

<input type='submit' class='button' value='$trackback_settings10'>
<input type='hidden' name='task' value='dosave'>

</form>
";
echo $foot;

}

?>