first my index.php
<?
include("includes/header.php");
include("includes/auth/common.php");
include("includes/functions.inc");
include("includes/style.php");
?>
<body bgcolor="#6A6A6A" topmargin="0" bottommargin="3" leftmargin="0" rightmargin="0">
<table align="center" cellpadding="0" cellspacing="0" width="600" id="AutoNumber1">
<tr>
<td width="100%">
<table align="middle" border="0" bgcolor="#DDDDDD" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000" width="600" id="AutoNumber1">
<tr>
<td width="100%">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#BBBBBB" width="100%" id="AutoNumber2">
<tr>
<td width="20" style="border-right-style: solid; border-right-width: 1" bgcolor="#CCCCCC" valign="bottom">
<img border="0" src="images/left_side.gif" width="20" height="200">
</td>
secondly header.php
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>theutherfish.com</title>
thirdly common.php
<?
@ $conn = mysql_pconnect("localhost", "****", "****")
or die("Could not connect");
@ $db = mysql_select_db("****") or die("could not select database");
?>
forth - functions.php
<?
function emoticons($comment) {
$newline = str_replace(':)','<img src="/images/emoticons/smiley.gif">',$comment);
$newline = str_replace(':(','<img src="/images/emoticons/frown.gif" width="18" height="18">',$newline);
$newline = str_replace(';)','<img src="/images/emoticons/wink.gif" width="18" height="18">',$newline);
$newline = str_replace(':P','<img src="/images/emoticons/nerr.gif" width="18" height="18">',$newline);
$newline = str_replace('(H)','<img src="/images/emoticons/cool.gif" width="18" height="18">',$newline);
$newline = str_replace(':@','<img src="/images/emoticons/mad.gif" width="18" height="18">',$newline);
$newline = str_replace(':D','<img src="/images/emoticons/vhappy.gif" width="18" height="18">',$newline);
$newline = str_replace(':S','<img src="/images/emoticons/wacko.gif" width="18" height="18">',$newline);
$newline = str_replace(':p','<img src="/images/emoticons/nerr.gif" width="18" height="18">',$newline);
$newline = str_replace('(h)','<img src="/images/emoticons/cool.gif" width="18" height="18">',$newline);
$newline = str_replace(':@','<img src="/images/emoticons/mad.gif" width="18" height="18">',$newline);
$newline = str_replace(':d','<img src="/images/emoticons/vhappy.gif" width="18" height="18">',$newline);
$newline = str_replace(':s','<img src="/images/emoticons/wacko.gif" width="18" height="18">',$newline);
echo $newline;
}
function home() {
$sql = "select * from stories ORDER BY id desc LIMIT 0,10";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result))
{
$comment = $row[story];
?>
<table border="1" bgcolor="#BBBBBB" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000" width="560" id="AutoNumber1">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
<tr>
<td width="70%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3">
<tr height="20">
<td width="100%" align="left">
<font face="Verdana" size="2"><p style="margin-left: 3; margin-right: 3; margin-top: 0"><B><?=$row[headline]?></B></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%"><br><font face="Verdana" size="2">
<p style="margin-left: 3; margin-right: 3; margin-top: 0">
<? emoticons($comment);
if ($story["edit"] != '') {
echo "<br><br>[edit]<br>";
$comment = $story[edit];
emoticons($comment);
}
else {
}
?> <br><br></td>
</tr>
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
<tr>
<td align="right">
<font face="Verdana" size="2"><p style="margin-left: 3; margin-right: 3; margin-top: 3; margin-bottom: 3">
Message Posted By <?=$row[writer]?> On <?=$row[time]?>
</font></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<?
}
}
function menu () {
?>
<script language="JavaScript" src="sitemap_scr.js">
</script>
<table id="m1mainSXMenu2" cellspacing="0" cellpadding="5" class="x1" border="0" width="560">
<tr align="left">
<td onmouseover="chgBg(m1,'m1tlm0',3);exM(m1,'none','',event)" onmouseout="chgBg(m1,'m1tlm0',0,1)" id="m1tlm0" class="m1mit" bgcolor="#CCCCCC">
<a id="m1tlm0a" class="m1CL0" href="http://www.theutherfish.com" >
<div class='topFold'>Home</div></a></td>
<td onmouseover="chgBg(m1,'m1tlm1',3);exM(m1,'m1mn1','m1tlm1',event)" onmouseout="chgBg(m1,'m1tlm1',0);coM(m1,'m1mn1')" id="m1tlm1" class="m1mit" bgcolor="#CCCCCC" >
<a id="m1tlm1a" class="m1CL0" href="javascript:void(0);" onMouseOver="exMNS(m1,'m1mn1',event)" onmouseout="coMNS(m1,'m1mn1')" >
<div id='m1mn1top' class='topFold'>Content</div></a></td>
<td onmouseover="chgBg(m1,'m1tlm2',3);exM(m1,'m1mn2','m1tlm2',event)" onmouseout="chgBg(m1,'m1tlm2',0);coM(m1,'m1mn1')" id="m1tlm2" class="m1mit" bgcolor="#CCCCCC" >
<a id="m1tlm2a" class="m1CL0" href="javascript:void(0);" onMouseOver="exMNS(m1,'m1mn2',event)" onmouseout="coMNS(m1,'m1mn2')" >
<div id='m1mn1top' class='topFold'>Misc</div></a></td>
<td onmouseover="chgBg(m1,'m1tlm3',3);exM(m1,'m1mn3','m1tlm3',event)" onmouseout="chgBg(m1,'m1tlm3',0);coM(m1,'m1mn1')" id="m1tlm3" class="m1mit" bgcolor="#CCCCCC">
<a id="m1tlm3a" class="m1CL0" href="javascript:void(0);" onMouseOver="exMNS(m1,'m1mn3',event)" onmouseout="coMNS(m1,'m1mn3')" >
<div id='m1mn1top' class='topFold'>Other</div></a></td>
</tr></table>
<?
}
function welcome() {
if(isset($_COOKIE['user'])) {
$sql = "SELECT
* FROM custom
WHERE username
= '".$_COOKIE['user']."'";
$query = mysql_query($sql) or die("could not select records");
while ( $row = mysql_fetch_array($query) ) {
echo "Welcome, <b>".$row["fname"]."</b>! ( <a href=/users/index.php>User CP</a> | <a href=/users/logout.php>Log Out</a>)";
}
}
else
{
echo "Welcome <b>Guest</b>! ( <a href=/users/login.php>Login</a> | <a href=/users/register.php>Regsiter</a> )";
}
}
?>
and finally style.php
<?
if(isset($_COOKIE['user'])) {
$sql = "SELECT * from custom where username='".mysql_escape_string(trim($_COOKIE['user']))."'";
$result = mysql_query($sql) or die(mysql_error());
while( $row = mysql_fetch_array($result) ) {
?>
<style>
<!--
a:link {font-size : <?=$row['linksize']?>px; color : #<?=$row['link']?>; font-weight : bold; text-decoration : none; font-family : <?=$row['linkface']?>}
a:visited {font-size : <?=$row['linksize']?>px; color : #<?=$row['visited']?>; font-weight : bold; text-decoration : none; font-family : <?=$row['linkface']?> }
a:hover {font-size : <?=$row['linksize']?>px; color : #<?=$row['hover']?>; text-decoration : underline; font-weight : bold; font-family : <?=$row['linkface']?> }
a:active {font-size : <?=$row['linksize']?>px; color : #<?=$row['active']?>; text-decoration : underline; font-weight : bold; font-family : <?=$row['linkface']?> }
.{font-family : <?=$row['fontface']?>; font-size : <?=$row['fontsize']?>px; color : #<?=$row['fontcolor']?>; }
TABLE.user{background-color : #<?=$row['table']?>}
-->
</style>
</head>
<body bgcolor="<?=$row['bgcolor']?>" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<? } } else { ?>
<style>
<!--
a:link {font-weight : bold; text-decoration : none; font-family : verdana; font-size : 12px;}
a:visited {color : black; font-weight : bold; text-decoration : none; font-family : verdana; font-size : 12px;}
a:hover {color : red; text-decoration : none; font-weight : bold; font-family : verdana; font-size : 12px;}
a:active { color : red; text-decoration : none; font-weight : bold; font-family : verdana; font-size : 12px;}
.{font-family : verdana; font-size : 12px; color: #000000;}
TABLE.user{background-color : #DDDDDD}
-->
</style>
</head>
<body bgcolor="#6A6A6A" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<? } ?>
hope this helps :rolleyes: