"cursed, post: 45334":^ :blink:nice idea
<?php
require_once("backend/functions.php");
dbconn(false);
stdhead("Add Affiliate");
if ($_SERVER['REQUEST_METHOD'] == "POST") {
// the following 4 lines are needed if your server has register_globals set to Off
$who = $_POST['who'];
$name = $_POST['name'];
$url = $_POST['url'];
$SQL = " INSERT INTO affil ";
$SQL = $SQL . " (who, name, Url) VALUES ";
$SQL = $SQL . " ('$who', '$name','$url') ";
$result = mysql_query($SQL);
if (!$result) {
echo("ERROR: " . mysql_error() . "\n$SQL\n"); }
echo ("New Link Added\n");
}
?>
friends_block.php
<?
begin_block(" Friends ");
$query = mysql_query ("SELECT * From affil");
while($row = mysql_fetch_array($query))
{
$url = $row['Url'];
$description = $row['who'];
$name = $row['name'];
echo "<center> <br>",$row['Url'],$row['name']," </a> <br> ",$row['who'];
}
end_block();
?> <td align="center"><a href=admincp.php?action=censor><img src="images/admin/censor.png" border=0 width=32 height=32><BR>Word Censor</a><BR></td>
Add:
<td align="center"><a href=admincp.php?action=clearshoutbox><img src="images/admin/forums.gif" border=0 width=32 height=32><BR>Clear Shoutbox</a><BR></td>
before:
?>
Add:
if ($action == "clearshoutbox") {
stdhead("Clear Shoutbox");
navmenu();
begin_frame("Clear Shoutbox", center);
if ($yes == "yes") {
$res = mysql_query("TRUNCATE `shoutbox`");
if ($res) echo "Shoutbox cleared";
} else {
echo "Are you sure you want to clear the shoutbox?<br>";
echo "<a href='admincp.php?action=clearshoutbox&yes=yes'><b>Yes</b></a>";
}
end_frame();
stdfoot();
} "Nikkbu, post: 43763":Yours :mellow:or how about this one