rendered paste body<?php
function users_online() {
echo "<table border=0 cellpadding=0 cellspacing=0>
<tr valign=center align=center>
<td width=27><img src=images/tl.gif></td>
<td width=100% background=images/tm.gif><p class=word1>Users Online</p></td>
<td width=27><img src=images/tr.gif></td>
</tr>
<tr valign=top>
<td background=images/content_05.gif></td></tr>
<tr><td colspan=3 bgcolor=000000 class=inside>";
$query1 = mysql_query("select * from site_users where online = '1'");
$query2 = mysql_num_rows($query1);
echo "<b>$query2</b> Users Online<br><ul>";
while($row = mysql_fetch_array($query1)) {
echo "<li><a href=#>$row[username]</a></li>";
} }
echo "</ul></td></tr>
<tr valign=top>
<td><img src=images/bl.gif></td>
<td background=images/bm.gif></td>
<td><img src=images/br.gif></td>
</tr>
</table>";
function mygfx_menu() {
if($_SESSION[logged_in] == "1") {
echo "<table border=0 cellpadding=0 cellspacing=0>
<tr valign=center align=center>
<td width=27><img src=images/tl.gif></td>
<td width=100% background=images/tm.gif><p class=word1>MyHGS</p></td>
<td width=27><img src=images/tr.gif></td>
</tr>
<tr valign=top>
<td background=images/content_05.gif></td></tr>
<tr><td colspan=3 bgcolor=000000 class=inside>
<img src=images/profile.gif> <a href=?mpage=myhgs&action=profile>Profile</a><br>
<img src=images/gallery.gif> <a href=?mpage=myhgs&action=gallery>Gallery</a><br>
<img src=images/message.gif> <a href=?mpage=myhgs&action=messages>Messages</a><br>
<img src=images/tut.gif> <a href=?mpage=myhgs&action=tutorials>Tutorials</a><br>
</td></tr>
<tr valign=top>
<td><img src=images/bl.gif></td>
<td background=images/bm.gif></td>
<td><img src=images/br.gif></td>
</tr>
</table>";
}
}
function site_menu() {
echo "<table border=0 cellpadding=0 cellspacing=0>
<tr valign=center align=center>
<td width=27><img src=images/tl.gif></td>
<td width=100% background=images/tm.gif><p class=word1>Site Navigation</p></td>
<td width=27><img src=images/tr.gif></td>
</tr>
<tr valign=top>
<td background=images/content_05.gif></td></tr>
<tr><td colspan=3 bgcolor=000000 class=inside>";
if($_SESSION[logged_in]) { echo "<a href=?mpage=logout>Logout</a><br>"; }
if(!$_SESSION[logged_in]) { echo "<a href=?mpage=login>Login</a><br>"; }
if(!$_SESSION[logged_in]) { echo "<a href=?mpage=register>Register</a><Br><Br>"; }
echo "<a href=http://mrsunjester.info/forum/ target=_blank>Forums</a><br>
<a href=?mpage=news>News</a><br>
<a href=?mpage=contact>Contact</a><br>
<a href=?mpage=shop>Our Shop</a><br>
<a href=?mpage=affiliate>Affiliate</a><br>
<a href=?mpage=submit>Submission</a><br>
</td></tr>
<tr valign=top>
<td><img src=images/bl.gif></td>
<td background=images/bm.gif></td>
<td><img src=images/br.gif></td>
</tr>
</table>";
}
function show_news() {
$query = mysql_query("select * from site_news");
while($row = mysql_fetch_array($query)) {
echo "<table width=100%><tr valign=top><td width=30><img src=$row[news_image] width=30 height=30
class=img1></td>
<td width=70%><font
color=ffffff><b>$row[news_title]</b><br>".substr($row[news_news],0,160)."</font></td>
<td align=right><a href=$row[link] target=_blank>read more</a></tD>
</tR></table><hr color=353535 size=1>";
}
}
function logout() {
if($_SESSION[logged_in] == "1") {
mysql_query("update site_users set online = '0' where username = '$_SESSION[username]'");
session_destroy();
echo "<Script>document.location.replace('index.php');</script>";
}
}
function show_contact() {
echo "contact";
}
function show_affiliate() {
$query1 = mysql_query("select * from site_affiliates where aff_shown = '1'");
$query2 = mysql_num_rows($query1); // affiliate count
echo "<table align=center width=60%><tr>";
while($row = mysql_fetch_array($query1)) {
echo "<td><a href=$row[aff_url] target=_blank><img src=$row[aff_image] border=0 width=88
height=30></a></td>";
}
echo "</tR></table>";
}
function show_shop() {
echo "buy our shit";
}
function show_submission() {
if($_SESSION[logged_in] == "1") {
include("submit.php");
} else { echo "<center>not logged in</center>"; } }
function show_login() {
include("login.php");
}
function show_register() {
$email = strip_tags($_POST[email]);
$username = strip_tags($_POST[username]);
$password = md5($_POST[password]);
//2:29 PM 4/23/2007
$aim = strip_tags($_POST[aim]);
$yahoo = strip_tags($_POST[yahoo]);
if($email || $username || $password) {
$checkuser1 = mysql_query("select * from site_users where username = '$username'");
$checkuser2 = mysql_num_rows($checkuser1);
if(isset($username)) {
if($username > 0) {
mysql_query("insert into site_users (id,online,username,password,email,active,aim,yahoo)
values('','0','$username','$password','$email','1','$aim','$yahoo')");
echo "<br>Thanks you, you may <a href=?mpage=login>login</a> now";
}
}
}
echo "<table border=0 width=100%>
<tr valign=top>
<td>username</td><td><form method=post action=?mpage=register><input type=text
name=username></td></tr>
<tr valign=top><td>password</td><td><input type=password name=password></td></tr>
<tr valign=top><td>email</td><td><input type=text name=email></td></tr>
<tr valign=top><td>AIM</td><td><input type=text name=aim></td></tr>
<tr valign=top><td>Yahoo™</td><td><input type=text name=yahoo></td></tr>
<tr><td></td><td><input type=submit value=submit></td></tr>
</table>";
}
function show_myhgs() {
$action = strip_tags($_GET[action]);
$query = mysql_query("select * from site_users where username = '$_SESSION[username]'");
while($row = mysql_fetch_array($query)) {
$email = strip_tags($row[email]);
$aim = strip_tags($row[aim]);
$yahoo = strip_tags($row[yahoo]);
$xfire = strip_tags($row[xfire]);
$avatar = strip_tags($row[avatar]);
$website = strip_tags($row[website]);
}
if($action == "profile") {
if($_SESSION[logged_in] == "1") {
if($_POST[email]) {
$email = strip_tags($_POST[email]);
mysql_query("update site_users set email = '$email' where username =
'$_SESSION[username]'");
}
echo "<form method=post action=?mpage=myhgs&action=profile>
<table border=0 cellpadding=0 cellspacing=8 width=100%>
<tr><td><h2>Username</h2></td><td>$_SESSION[username]</td></tr>
<tr valign=top><td><h2>Email</h2></td><td><input type=text name=email
value='$email' size=30></td></tr>
<tr valign=top><td><h2>AIM</h2></td><td><input type=text name=aim value='$aim'
size=30></td></tr>
<tr valign=top><td><h2>Yahoo</h2></td><td><input type=text name=yahoo
value='$yahoo' size=30></td></tr>
<tr valign=top><td><h2>xFire</h2></td><td><input type=text name=xfire
value='$xfire' size=30></td></tr>
<tr valign=top><td><h2>Avatar</h2></td><td><input type=text name=avatar
value='$avatar' size=30></td></tr>
<tr valign=top><td><h2>Website</h2></td><td><input type=text name=website
value='$website' size=30></td></tr>
</table><p align=right><input type=submit value='Save Profile'></form>";
} else { echo "<center>not logged in</center>"; } }
if($action == "gallery") {
if($_SESSION[logged_in] == "1") {
echo "<form method=post action=?mpage=myhgs&action=gallery enctype=multipart/form-data>
<input type=file name=imagefile>
<br>
<input type=submit name=Submit value=Submit>";
if(isset($Submit)) {
if ($_FILES['imagefile']['type'] == "image/gif") {
copy ($_FILES['imagefile']['tmp_name'], "uploads/".$_FILES['imagefile']['name']) or die
("Could not copy");
echo "Name: ".$_FILES['imagefile']['name']."<br>";
echo "Size: ".$_FILES['imagefile']['size']."<br>";
echo "Type: ".$_FILES['imagefile']['type']."<br>";
echo "Copy Done....";
} else { //210
echo "<br><br>";
echo "Could Not Copy, Wrong Filetype (".$_FILES[imagefile][name].")<br>";
}
} }
} else { echo "<center>not logged in</center>"; } }
if($action == "messages") {
if($_SESSION[logged_in] == "1") {
echo "$_SESSION[username]'s messages";
} else { echo "<center>not logged in</center>"; } }
if($action == "tutorials") {
if($_SESSION[logged_in] == "1") {
echo "$_SESSION[username]'s tutorials";
} else { echo "<center>not logged in</center>"; } }
}
?>