see ppl asking for this and phoe saying he couldn't find his copies so here:
http://rapidshare.com/files/36528648/phoenixbytes.co.uk.zip.html
Started on the old forum in February 2008 · view the original in the archive · old links redirect here
see ppl asking for this and phoe saying he couldn't find his copies so here:
http://rapidshare.com/files/36528648/phoenixbytes.co.uk.zip.html
What bits are missing? And i will post them here..
functions.php
CODE<?php
function namesequal($friend, $login) { if (strtolower($friend) == strtolower($login)) { return true; } else { return false; } }
function make_wml_compat($string) { $string = ltrim($string); $string = ereg_replace(chr(10),"¶",$string); $string = ereg_replace("&#x","•",$string); $string = ereg_replace("©","-copy",$string); $string = ereg_replace("®","-reg",$string);
$string = ereg_replace("Â"," ",$string);
$string = ereg_replace("â"," ",$string);
$string = ereg_replace("&","&",$string);
$string = ereg_replace("¹","-1",$string);
$string = ereg_replace("²","-2",$string);
$string = ereg_replace("³","-3",$string);
$string = ereg_replace("€","-euro",$string);
// handle what could fuck things up!
$string = ereg_replace("<","<",$string);
$string = ereg_replace(">",">",$string);
$string = ereg_replace("\"",""",$string);
$string = ereg_replace("\'","'",$string);
$string = ereg_replace("\|","\\",$string);
$string = ereg_replace("\\\$","\$$",$string);
$curcharlength = strlen($string);
$outstring = $string;
for ($i = 0; $i <= ($curcharlength-1); $i++) {
$curchar = substr ($string,$i,1);
$ochar = ord($curchar);
if ($ochar > 122) {
$new = "&#x" . strtoupper(dechex($ochar)) . ";";
$outstring = ereg_replace($curchar,$new,$outstring);
}
if ($ochar < 32)
$outstring = ereg_replace($curchar,"", $outstring);
}
$outstring = ereg_replace("£","£", $outstring);
return $outstring;
}
function funk_it_up($string, $ses) {
$string = ereg_replace("¶","
",$string); $string = ereg_replace("µ","",$string); $string = " " . $string . " "; $string = ereg_replace("==="," ",$string);
$string = eregi_replace("call:([^<>[:space:]]+[[:alnum:]/])","<a href=\"wtai://wp/mc;\\1\">call \\1</a>", $string);
$string = eregi_replace("pbook:([^<>[:space:]]+[[:alnum:]/])","<a href=\"wtai://wp/ap;\\1;\\1\">save \\1</a>", $string);
$string = ereg_replace("((Http|http|https|link|rtsp)://[^<>[:space:]]+[[:alnum:]/])","<a href=\"\\1\">\\1</a>", $string);
$string = eregi_replace("webpic:([^<>[:space:]]+[[:alnum:]/])","<img src=\"http://\\1\" alt=\"\" />", $string);
$string = trim($string);
return $string;
}
function add_sicn($string) { $query = "SELECT typed, image FROM icons"; $result = mysql_query($query); $row = mysql_fetch_array($result); while ($row) { $text = $row["typed"]; $icon = $row["image"]; $string = str_replace($text, " <img src="http://domain.com/chat/icon/$icon.gif" alt="$text" /> ", $string); $row = mysql_fetch_array($result); } return $string; }
?>
Thats one of the files lol, I see it missing when i downloaded phonix from here.
i will also look out for missing files lol.. will try my best to help if i find any i will be sure to post them
p.s.. it would seem now the functions.php file has now been filled thanks to colaman the only other file thats seems to be there but empty is the "header.php" file that needs to be found lol.. these are the only 2 files i found empty
Here are some parts that maybe missing. This is all from the original version, if they have changed stuff since, u will have to config it.
Header.php web version
CODE<html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>$sitename</title> </head> <?PHP include('config.php');mysql_connect($db_host, $db_user, $db_pass) or die("Could not connect to the database, check settings"); mysql_select_db($db_name);
?>
<body align="center">header.php wap version
CODE<?php
header("Content-type: text/vnd.wap.wml"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache");
echo "<?xml version=\"1.0\"?>
<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\"><wml>";
include('config.php');
mysql_connect($db_host, $db_user, $db_pass) or die("Could not connect to the database, check settings"); mysql_select_db($db_name);
?>
ses.php
CODE<?php
$agent = $HTTP_USER_AGENT;
if (empty($HTTP_X_UP_SUBNO)) $subno = gethostbyaddr ($REMOTE_ADDR); else $subno = $HTTP_X_UP_SUBNO;
$query = "SELECT * FROM forum_users WHERE ses='$ses' limit 1"; $result = mysql_query($query); $row_ses = mysql_fetch_array($result); if ($result == false) { echo"Sorry!
There was an error connecting to the database.
The site may be busy.
if you continue to recive this message, try waiting a few minutes before logging in again
<a href="./login.php">click here</a> to login now.
\n
\n</body>\n</html>"; exit; } $group = $row_ses["group"];
// if set to '0' and the user is not admin or mod, the community will be offline, // and only moderators and admin can access. // else if set to 1, its online to all
$online = 1;
if ($online != 1) { if ($group != 1 && 2) { echo"Site Maintenance
Access to the community has been restricted while maintenance is in progress.
you should be able to access the community again soon.
Thank you.
\n
\n</body>\n</html>"; exit; } }
elseif ($online == 1) { if (empty($ses)) { echo"Sorry!
Your session has expired.
This could have happend because you logged out on your last visit,
have logged in again since creating your bookmark, or it could have been reset by use.
In any case, you will need to <a href="./login.php">login again</a> \n \n</body>\n</html>"; exit; } $num_rows = mysql_num_rows($result); if ($num_rows == 0) { echo"Sorry!
Your session has expired.
This could have happend because you logged out on your last visit, have logged in again
since creating your bookmark, or it could have been reset by use.
In any case, you will need to <a href="../login.php">login again</a> \n \n</body>\n</html>"; exit; }
}
?>
db_connect.php
CODE<?PHP include('config.php');
mysql_connect($db_host, $db_user, $db_pass) or die("Could not connect to the database, check settings"); mysql_select_db($db_name);
?>
sessions
CODE<?php
include('ses.php');
?>
funk.php
CODE<?php
$message = eregi_replace("07[0-9]{9}( |$)","[Number Removed] ", $message);
$message = ereg_replace("\n","
",$message); $message = ereg_replace("¶"," ",$message); $message = ereg_replace("µ","",$message); $message = " " . $message . " ";
$message = ereg_replace("((Http|http|https|rtsp)://[^<>[:space:]]+[[:alnum:]/])","<a href=\"\\1\">\\1</a>", $message);
$message = eregi_replace("((img|Img|IMG)[^<>[:space:]]+[[:alnum:]/])","<img src=\"http://\\1\" alt=\"Image\"/>", $message);
$message = preg_replace( "#\(b\)(.+?)\(/b\)#is", "**\\1**", $message );
$message = preg_replace( "#\(i\)(.+?)\(/i\)#is", "*\\1*", $message );
$message = preg_replace( "#\(u\)(.+?)\(/u\)#is", "\\1", $message );
$message = ereg_replace("
<img"," <img",$message);
$message = trim($message);
?>
login.php
CODE<?php
include("./scripts/header.php");
echo "Account Details \n";
echo "<form action="logincheck.php?act=login" method="GET">\n"; echo "Username \n"; echo "<input type="text" name="username" maxlength="50" value=""> \n"; echo "Password \n"; echo "<input type="text" name="password" maxlength="50" value=""> \n"; echo "<input type="submit" name="submit" value=" Login ">\n"; echo "</form>\n";
echo " \n<a href="register.php">Register a new account</a>\n";
echo "\n \n</body>\n</html>"; ?>
logincheck.php
CODE<?php
include("./scripts/db_connect.php");
$agent = $HTTP_USER_AGENT; if (empty($HTTP_X_UP_SUBNO)) $subno = gethostbyaddr ($REMOTE_ADDR); else $subno = $HTTP_X_UP_SUBNO;
$username = "$username"; $password = "$password";
if (empty($username)) $username = ""; if (empty($password)) $password = "";
if ($username =="") { include("./scripts/header.php"); echo "Error!
Username was blank!
<a href="./login.php">Try again</a> \n \n</body>\n</html>"; exit; } if ($password =="") { include("./scripts/header.php"); echo "Error!
Password was blank!
<a href="./login.php">Try again</a> \n \n</body>\n</html>"; exit; } elseif ($username !="" && $password !="") { $query = "SELECT * FROM forum_users WHERE password='$password' AND username='$username' limit 1"; $result = mysql_query($query); $num_rows = mysql_num_rows ($result); $row = mysql_fetch_array($result); if ($num_rows != 1) { include("./scripts/header.php"); echo "Login Error
Your username and/or password did not match those in our records.
Please check your details and try to <a href="./login.php">login</a> again.
\n
\n</body>\n</html>"; exit; } elseif ($num_rows == 1) { $query = "SELECT * FROM mgb_blocked WHERE (email rlike '".$row["email"]."' or name rlike '".$row["username"]."') and state=1 limit 1"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows > 0) { include("./scripts/header.php"); $rowb = mysql_fetch_array($result); echo "I give you, The bannalizer!
You have been banned for the following reason(s)
".$rowb["reason"]."
For more information on why you have been banned, or if you would like to find out how your ban can be lifted, contact the site administrator \n \n</body>\n</html>"; exit; } $query = "SELECT * FROM mgb_ipblock WHERE (subno='$subno' or agent='$agent') limit 1"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows != 0) { include("./scripts/header.php"); $row = mysql_fetch_array($result); echo "IP Blocked
The browser/IP that you use has been blocked from using this site.
I hope to come up with a better soloution in the near future.
For more information, please contact the site administrator.
\n
\n</body>\n</html>"; exit; } $loopyloop = 1; while ($loopyloop == 1) { $ses = substr(md5 (uniqid ("")),13); $query = "select * from forum_users where ses='$ses'"; $result= mysql_query ($query); $num_rows = mysql_num_rows($result); if ($num_rows == 0) $loopyloop = 0; } $query = "UPDATE forum_users SET ses='$ses', subno='$subno', agent='$HTTP_USER_AGENT', visits=visits+1 WHERE username='$username'"; $result = mysql_query($query);
$step1 = " select * from mgb_main ";
$step2 = mysql_query($step1);
$step3 = mysql_fetch_array($step2);
$ref_timer = 30; $pageto = "mainmenu.php?ses=$ses";
include("./scripts/header2.php");
echo "<img src=\"./logos/main.gif\" alt=\"Welcome!\" />
Welcome "; echo "<do type="accept" label="Menu"> <go href="mainmenu.php?ses=$ses" method="get"> </go></do>"; echo " ".$step3["message"].""; echo " Please hold while you are connected, or <a href="mainmenu.php?ses=$ses">Click Here</a> now. "; echo "\n \n</body>\n</html>"; exit; } }
?>
mainmenu.php CODE<?php
include("./scripts/header.php"); include("./scripts/ses.php");
// Lets get their username so that we can call them names!... no? ok, lets at least welcome them in!
$login = $row_ses["username"]; $curdate = gmdate("d-m-Y");
$query = "SELECT count() from friends where lastactive > DATE_ADD(NOW(), INTERVAL -3 MINUTE) and myrequest=0 AND username='$login'"; $result = mysql_query($query); $buddies = number_format(mysql_result($result,0,"count()"));
if ($buddies == 1) $mates = "$buddies";
elseif ($buddies >> 1) $mates = "$buddies"; else $mates = "$buddies";
#=======================================================================
$query = "select count() from friends where friendname='$login' AND myrequest='1'"; $result = mysql_query($query); $requests = number_format(mysql_result($result,0,"count()"));
if ($requests == 1) $new = "+$requests";
elseif ($requests >> 1) $new = "+$requests"; else $new = "";
$query = "select count() from friends where friendname='$login' AND myrequest='0'"; $result = mysql_query($query); $all = number_format(mysql_result($result,0,"count()"));
if ($all == 1) $lot = "$all";
elseif ($all >> 1) $lot = "$all"; else $all = "0";
#========================================================================
// This will appear thought the site, so i will only tell you once!!, // Bellow is the query that sets the users location.
$query = "UPDATE forum_users set lastactive=now(), location='Main Menu' where username='$login'"; mysql_query($query);
// YOU GOT MAIL! ... well, i dont know that for sure, but we can check to see if the user has!
$query ="select count() from mgb_mail where userto='$login' and read_state!=1 and bound!='out'"; $result = mysql_query($query); $ims = number_format(mysql_result($result,0,"count()"));
#+---------------------------------------------------------------------------------------------------------+ #| If they have mail, initiate the variable with the quantum equilibriator rectifier!... | #| OR, we could put the number of inboxes in barakets and stick it in a nice little $ims thingy (variable) | #| But if they dont have any, we leave the variable empty. | #+---------------------------------------------------------------------------------------------------------+
if ($ims >= 1) $inboxes = " ($ims)"; else $inboxes = "";
// count up registered users.
$query="SELECT COUNT() FROM forum_users"; $result=mysql_query($query); $memcount=number_format(mysql_result($result,0,"COUNT()"));
//Grab news update date
$query = "SELECT * from mgb_news ORDER BY id DESC LIMIT 0 , 1 "; $result = mysql_query($query); $news = mysql_fetch_array($result);
$id = $news["id"]; $updated = $news["updated"];
//SHOW THEM THE MONEY!! or the wml, what ever you choose.
echo "<img src="./logos/main.gif" alt="NeoCult" />"; echo" Welcome, $login! $curdate "; echo " <a href="./mail/index.php?ses=$ses&act=index">Messaging$inboxes</a>
<a href="./friends/index.php?ses=$ses">Friends ($mates/$lot$new)</a>
<a href="./forum/forums.php?ses=$ses">Forums</a>
<a href="./chat/chat.php?ses=$ses">Chat</a>
<a href="./online.php?ses=$ses">Online Users</a>
<a href="./subs.php?ses=$ses">Subscriptions</a>
<a href="./adminlist.php?ses=$ses">Admin List</a>
<a href="./news/viewer.php?ses=$ses&id=$id">News $updated</a>
<a href="./options/index.php?ses=$ses">Options</a>
<a href="./faq/faqmain.php?ses=$ses">FAQ</a>
<a href="./links.php?ses=$ses">Links</a>
<a href="./logout.php?ses=$ses&login=$login">Logout</a> "; echo " "; echo "<a href="./mlist.php?ses=$ses">Members:</a> $memcount "; echo " $cp ";
#+-----------------------------------------------------------------------------------------------------------------------+ #|Please do not edit bellow this point, whether being pages/files/text/links/basicaly anything, | #|or any information attached directly or indirectly to the information, being on this page or pages it may point to. | #+-----------------------------------------------------------------------------------------------------------------------+
echo "\n \n</body>\n</html>";
?>
index.php
CODE<?php
include('./scripts/header.php');
echo "<img src="./images/header.gif" alt="Welcome" />
Welcome!
<a href="./login.php">Login</a>
<a href="./register.php">Create an Account</a>
Creating an account is free!
<a href="forgotten.php">Forgotten your password?</a>
$cp \n\n \n</body>\n</html>";
?>