wapdesire v2 xhtml (teaze-n-plz.com)
Collapse
X
-
Originally posted by convictor View Postthanks for the share, I got it running following the advice here
One question though, in owner tools, site settings, how to I change the time zone? Should I type it as +2GMT or 0200GMT or any other way?
Comment
-
Hey Try this functions with yours as cant post through inbox too long
Code:<?php function PostToHost($host, $path, $data_to_send) { $result=""; $fp=fsockopen($host,80,$errno, $errstr, 30); if($fp){ fputs($fp, "POST $path HTTP/1.0\n"); fputs($fp, "Host: $host\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\n"); fputs($fp, "Content-length: " . strlen($data_to_send) . "\n"); fputs($fp, "Connection: close\n\n"); fputs($fp, $data_to_send); while(!feof($fp)){$result.= fgets($fp, 128);} fclose($fp); return $result; } } function mobads() { $mob_mode = "test"; $mob_alternate_link = "<a class=\"link\" href=\"http://wapdesire.com\">Best Web n Wap Community</a>"; $mob_ua = urlencode(getenv("HTTP_USER_AGENT")); $mob_ip = urlencode($_SERVER['REMOTE_ADDR']); if ($mob_mode=='live') $mob_m = "&m"; $mob_url = 'http://ads.admob.com/ad_source.php?s=a147bceef2a4c2a&u='.$mob_ua.'&i='.$mob_ip.$mob_m; @$mob_ad_serve = fopen($mob_url,'r'); if ($mob_ad_serve) { while (!feof($mob_ad_serve)) $mob_contents .= fread($mob_ad_serve,1024); fclose($mob_ad_serve); } $mob_link = explode("><",$mob_contents); $mob_ad_text = $mob_link[0]; $mob_ad_link = $mob_link[1]; if (isset($mob_ad_link) && ($mob_ad_link !='')) $ret = "<a class=\"link\" href=\"$mob_ad_link\">$mob_ad_text</a>"; else $ret = $mob_alternate_link; return $ret; } function sqlesc($x) { return "'".mysql_real_escape_string($x)."'"; } function addvisitor() { $cc=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE name='counter'")); $cc=$cc[0]+1; $res=mysql_query("UPDATE settings SET value='".$cc."' WHERE name='counter'"); } function sitename() { $sql="select * from settings where name='sitename'"; $query=mysql_query($sql); $array=mysql_fetch_array($query); return $array["value"]; } function align() { $sql="select * from settings where name='align'"; $query=mysql_query($sql); $array=mysql_fetch_array($query); return $array["value"]; } function email($type) { $sql="select * from settings where name='".$type."_email'"; $query=mysql_query($sql); $array=mysql_fetch_array($query); return $array["value"]; } function timezone() { $sql="select * from settings where name='timezone'"; $query=mysql_query($sql); $array=mysql_fetch_array($query); return $array["value"]; } function filter($string) { $sql="SELECT * FROM filter"; $query=mysql_query($sql); $array=mysql_fetch_array($query); while($array) { $word=$array["word"]; $replace=$array["replace"]; $string=eregi_replace($word, "$replace", $string); $array=mysql_fetch_array($query); } return $string; } function isspam($text) { global $sid; if(isowner(getuid_sid($sid)))return false; $text=str_replace(" ","",$text); $text=strtolower($text); $res=mysql_query("SELECT site FROM blocked WHERE site!='NULL' AND (autoreport='1' OR autoreport='2')"); while($row=mysql_fetch_array($res)){$sites[]=$row[0];} for($i=0;$i<count($sites);$i++){ $nosf=substr_count($text,$sites[$i]); if($nosf>0){return true;} } return false; } /////////////////////////////////////// ini_set("display_errors", "0"); if(!get_magic_quotes_gpc()) { $_GET = array_map('trim', $_GET); $_POST = array_map('trim', $_POST); $_COOKIE = array_map('trim', $_COOKIE); $_GET = array_map('addslashes', $_GET); $_POST = array_map('addslashes', $_POST); $_COOKIE = array_map('addslashes', $_COOKIE); $_GET = array_map('addslashes', $_GET); $_POST = array_map('addslashes', $_POST); $_COOKIE = array_map('addslashes', $_COOKIE); } function check_injection() { $badchars = array("DROP","TRUNCATE", "SELECT", "UPDATE", "DELETE" , "UNION", "WHERE", "FROM","INSERT","ORDER BY"); foreach($_REQUEST as $value) { if(in_array(strtoupper($value), $badchars)) { $logfile= 'logs/log.txt'; //chmod 777 $IP = $_SERVER['REMOTE_ADDR']; $logdetails= date("F j, Y, g:i a") . ': ' . '<a href=http://dnsstuff.com/tools/city.ch?ip='.$_SERVER['REMOTE_ADDR'].' target=_blank>'.$_SERVER['REMOTE_ADDR'].'</a>'; $fp = fopen($logfile, "r+"); fwrite($fp, $logdetails, strlen($logdetails)); fclose($fp); header('Location:antihack.fbi'); } else { $check = preg_split("//", $value, -1, PREG_SPLIT_OFFSET_CAPTURE); foreach($check as $char) { if(in_array(strtoupper($char), $badchars)) { $logfile= 'logs/log.txt'; $IP = $_SERVER['REMOTE_ADDR']; $logdetails= date("F j, Y, g:i a") . ': ' . '<a href=http://dnsstuff.com/tools/city.ch?ip='.$_SERVER['REMOTE_ADDR'].' target=_blank>'.$_SERVER['REMOTE_ADDR'].'</a>'; $fp = fopen($logfile, "r+"); fwrite($fp, $logdetails, strlen($logdetails)); fclose($fp); header('Location:http://go-to-hell.com'); }}}} } function cleanInput($text) { $search = array( '@<script[^>]*?>.*?</script>@si', // Strip out javascript '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly '@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments ); $output = preg_replace($search, '', $text); return $output; } function sanitize($text) { if (is_array($text)) { foreach($text as $var=>$val) { $output[$var] = sanitize($val); } } else { if (get_magic_quotes_gpc()) { $text = stripslashes($text); } $text = cleanInput($text); $output = mysql_real_escape_string($text); } return $output; } function dbParse($input){ if(magic_quotes_gpc())$input=stripslashes($input); if(function_exists('mysql_real_escape_string')){ $input=mysql_real_escape_string($input); }elseif(function_exists('mysql_escape_string')){ $input=mysql_escape_string($input); }else{ $input=addslashes($input); } return $input; } function get($name) { if (isset($_REQUEST[$name])) /* if you don't have magic quotes on return addslashes($_REQUEST[$name]); */ return $_REQUEST[$name]; else return false; } function get_var($var) { $myvar=$_REQUEST["$var"]; if(is_array($myvar))$var=$myvar[0]; else $var=htmlspecialchars(trim($_REQUEST["$var"]),ENT_QUOTES); return $var; } function clean($str) { $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } return mysql_real_escape_string($str); } function safe($text) { $safe = stripslashes($text); if(function_exists("mysql_real_escape_string")) { $safe = mysql_real_escape_string($safe); }else if(function_exists("mysql_escape_string")) { $safe = mysql_escape_string($safe); } return $safe; } function getbbcode($text, $sid, $filtered) { $text = htmlspecialchars($text,ENT_QUOTES); $text = preg_replace("/\[b\](.*?)\[\/b\]/i","<b>\\1</b>", $text); $text = preg_replace('=\[b\]\s*(.*?)\s*\[/b\]=i', '<img src="$1" />', $text); $text = preg_replace("/\[i\](.*?)\[\/i\]/i","<i>\\1</i>", $text); $text = preg_replace("/\[u\](.*?)\[\/u\]/i","<u>\\1</u>", $text); $text = preg_replace("/\[big\](.*?)\[\/big\]/i","<big>\\1</big>", $text); $text = preg_replace("/\[small\](.*?)\[\/small\]/i","<small>\\1</small>", $text); $text = preg_replace('=\[size\s*\=\s*([0-9]+)\s*(pt)?\s*\]\s*(.*?)\s*\[/size\]=si', '<span style="font-size:$1$2">$3</span>', $text); $text = preg_replace("/\[s\](.*)\[\/s\]/Usi", "<span style=\"text-decoration: line-through\">\\1</span>", $text); $text = preg_replace("/\[size=(.*)\](.*)\[\/size\]/Usi", "<span style=\"font-size:\\1ex\">\\2</span>", $text); $text = preg_replace('=\[font\s*\=\s*([a-z ]+)\s*\]\s*(.*?)\s*\[/font\]=si', '<span style="font-family:$1">$2</span>', $text); $text = preg_replace("/\[font\=(.*?)\](.*?)\[\/font\]/is","<span style=\"color:$1\">$2</span>",$text); $text = preg_replace("=\[tt\](.*?)\[/tt\]=is", '<tt>\1</tt>', $text); $text = preg_replace("=\[sup\](.*?)\[/sup\]=is", '<sup>\1</sup>', $text); $text = preg_replace("=\[sub\](.*?)\[/sub\]=is", '<sub>\1</sub>', $text); $text = preg_replace("/\[blink\](.*?)\[\/blink\]/i","<blink>\\1</blink>", $text); $text = preg_replace("/\[strike\](.*?)\[\/strike\]/i","<strike>\\1</strike>", $text); $text = preg_replace('#\[quote="(.*)":([a-z0-9]+)\](.*)\[/quote:\\2\]#siU', '[quote=$1]$3[/quote]', $text); $text = preg_replace('#\[url=(.*):([a-z0-9]+)\](.*)\[/url=\\2\]#siU', '[url=$1]$3[/url]', $text); $text = preg_replace("/\[myspace\](.*)\[\/myspace\]/Usi", "<a href=\"http://www.myspace.com/\\1\">\\1</a>", $text); $text = preg_replace("/\[fbook\](.*)\[\/fbook\]/Usi", "<a href=\"http://www.facebook.com/\\1\">\\1</a>", $text); $text = preg_replace("/\[url\=(.*?)\](.*?)\[\/url\]/is","<a href=\"$1\">$2</a>",$text); $text = preg_replace("/\[lnkurl\=(.*?)\](.*?)\[\/lnkurl\]/is","<a href=\"$1\">$2</a>",$text); $text = preg_replace('=\[email\]\s*(.*?)\s*\[/email\]=i', '<a href="mailto:$1">$1</a>', $text); $text = preg_replace('=\[email\s*\=\s*(.*?)\s*\]\s*(.*?)\s*\[/email\]=i', '<a href="mailto:$1">$2</a>', $text); $text = ereg_replace("http://[A-Za-z0-9./=?-_]+","<a href=\"\\0\">\\0</a>", $text); $text = preg_replace("/\[image\=((.*?)(.php|php4|php5|xhtml|html))\]/i","Im trying To Hack please contact a host asap", $text); $text = preg_replace("/\[pet](.*?)\[\/pet\]/is","<a href=\"tamagotchi.php?action=prof&pid=$1&sid=$sid\">Feed My Pet!</a>",$text); $text = preg_replace("/\[topic\=(.*?)\](.*?)\[\/topic\]/is","<a href=\"../forums/viewtopic.php?thread=$1&go=last&sid=$sid\">$2</a>",$text); $text = preg_replace("/\[club\=(.*?)\](.*?)\[\/club\]/is","<a href=\"../clubs/view.php?id=$1&sid=$sid\">$2</a>",$text); $text = preg_replace("/\[blog\=(.*?)\](.*?)\[\/blog\]/is","<a href=\"../wapsites/blogs.php?read=1&id=$1&sid=$sid\">$2</a>",$text); $text = preg_replace("/\[midi\=(.*? )\]/is","<bgsound src=\"$1\"/>", $text); $text = preg_replace("/\[marquee\](.*?)\[\/marquee\]/i","<marquee>\\1</marquee>", $text); $text = preg_replace("/\[marqueer\](.*?)\[\/marqueer\]/i","<marqueer\">\\1</marqueer>", $text); $text = preg_replace("/\[marqueered\](.*?)\[\/marqueered\]/i","<marquee loop=\"1\" bgcolor=\"red\" direction=\"alternate\">\\1</marquee>", $text); $text = preg_replace("/\[marqueep\](.*?)\[\/marqueep\]/i","<marquee loop=\"1\" bgcolor=\"pink\" direction=\"alternate\">\\1</marquee>", $text); $text = preg_replace("/\[marqueebl\](.*?)\[\/marqueebl\]/i","<marquee loop=\"1\" bgcolor=\"blue\" direction=\"alternate\">\\1</marquee>", $text); $text = preg_replace("/\[marqueepu\](.*?)\[\/marqueepu\]/i","<marquee loop=\"1\" bgcolor=\"purple\" direction=\"alternate\">\\1</marquee>", $text); $text = preg_replace("/\[marqueeo\](.*?)\[\/marqueeo\]/i","<marquee loop=\"1\" bgcolor=\"orange\" direction=\"alternate\">\\1</marquee>", $text); $text = preg_replace("/\[marqueey\](.*?)\[\/marqueey\]/i","<marquee loop=\"1\" bgcolor=\"yellow\" direction=\"alternate\">\\1</marquee>", $text); $text = preg_replace("/\[marqueel\](.*?)\[\/marqueel\]/i","<marquee loop=\"1\" bgcolor=\"lime\" direction=\"alternate\">\\1</marquee>", $text); $text = preg_replace("/\[marqueeg\](.*?)\[\/marqueeg\]/i","<marquee loop=\"1\" bgcolor=\"green\" direction=\"alternate\">\\1</marquee>", $text); $text = preg_replace("/\[marqueew\](.*?)\[\/marqueew\]/i","<marquee loop=\"1\" bgcolor=\"white\" direction=\"alternate\">\\1</marquee>", $text); $text = preg_replace("/\[marquees\](.*?)\[\/marquees\]/i","<marquee loop=\"1\" bgcolor=\"silver\" direction=\"alternate\">\\1</marquee>", $text); $text = preg_replace("/\[marqueeb\](.*?)\[\/marqueeb\]/i","<marquee loop=\"1\" bgcolor=\"gold\" direction=\"alternate\">\\1</marquee>", $text); $text=preg_replace("/\[mrsilver\](.*?)\[\/mrsilver\]/i","<marquee bgcolor=silver direction=\"up\">\\1</marquee>", $text); $text=preg_replace("/\[mrblue\](.*?)\[\/mrblue\]/i","<marquee bgcolor=blue direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mrred\](.*?)\[\/mrred\]/i","<marquee bgcolor=red direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mrlime\](.*?)\[\/mrlime\]/i","<marquee bgcolor=lime direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mrgreen\](.*?)\[\/mrgreen\]/i","<marquee bgcolor=green direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mrwhite\](.*?)\[\/mrwhite\]/i","<marquee bgcolor=white direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mryellow\](.*?)\[\/mryellow\]/i","<marquee bgcolor=yellow direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mrgrey\](.*?)\[\/mrgrey\]/i","<marquee bgcolor=grey direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mrsilver\](.*?)\[\/mrsilver\]/i","<marquee bgcolor=siler direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mrpurple\](.*?)\[\/mrpurple\]/i","<marquee bgcolor=purple direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mlblue\](.*?)\[\/mlblue\]/i","<marquee bgcolor=blue direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mlred\](.*?)\[\/mlred\]/i","<marquee bgcolor=red direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mllime\](.*?)\[\/mllime\]/i","<marquee bgcolor=lime direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mlgreen\](.*?)\[\/mlgreen\]/i","<marquee bgcolor=green direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mlwhite\](.*?)\[\/mlwhite\]/i","<marquee bgcolor=white direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mlyellow\](.*?)\[\/mlyellow\]/i","<marquee bgcolor=yellow direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mlgrey\](.*?)\[\/mlgrey\]/i","<marquee bgcolor=grey direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mlsilver\](.*?)\[\/mlsilver\]/i","<marquee bgcolor=siler direction=\"left\">\\1</marquee>", $text); $text=preg_replace("/\[mlpurple\](.*?)\[\/mlpurple\]/i","<marquee bgcolor=purple direction=\"left\">\\1</marquee>", $text); $text = preg_replace('=\[color\s*\=\s*(#[0-9a-f]{6}|[a-z]+)\s*\]\s*(.*?)\s*\[/color\]=si', '<span style="color:$1">$2</span>', $text); $text = preg_replace('=\[color\s*\=\s*(#[0-9a-f]{6}|[a-z]+)\s*\]\s*(.*?)\s*\[/color\]=si', '<span style="color:$1">$2</span>', $text); $text=preg_replace("/\[red\](.*?)\[\/red\]/i","<font color=\"red\">\\1</font>", $text); $text=preg_replace("/\[lime\](.*?)\[\/lime\]/i","<font color=\"lime\">\\1</font>", $text); $text=preg_replace("/\[green\](.*?)\[\/green\]/i","<font color=\"green\">\\1</font>", $text); $text=preg_replace("/\[yellow\](.*?)\[\/yellow\]/i","<font color=\"yellow\">\\1</font>", $text); $text=preg_replace("/\[white\](.*?)\[\/white\]/i","<font color=\"white\">\\1</font>", $text); $text=preg_replace("/\[blue\](.*?)\[\/blue\]/i","<font color=\"blue\">\\1</font>", $text); $text=preg_replace("/\[grey\](.*?)\[\/grey\]/i","<font color=\"grey\">\\1</font>", $text); $text=preg_replace("/\[silver\](.*?)\[\/silver\]/i","<font color=\"silver\">\\1</font>", $text); $text=preg_replace("/\[navy\](.*?)\[\/navy\]/i","<font color=\"navy\">\\1</font>", $text); $text=preg_replace("/\[darkgreen\](.*?)\[\/darkgreen\]/i","<font color=\"darkgreen\">\\1</font>", $text); $text=preg_replace("/\[aqua\](.*?)\[\/aqua\]/i","<font color=\"aqua\">\\1</font>", $text); $text=preg_replace("/\[aquamarine\](.*?)\[\/aquamarine\]/i","<font color=\"aquamarine\">\\1</font>", $text); $text=preg_replace("/\[maroon\](.*?)\[\/maroon\]/i","<font color=\"maroon\">\\1</font>", $text); $text=preg_replace("/\[purple\](.*?)\[\/purple\]/i","<font color=\"purple\">\\1</font>", $text); $text=preg_replace("/\[skyblue\](.*?)\[\/skyblue\]/i","<font color=\"skyblue\">\\1</font>", $text); $text=preg_replace("/\[darkseagreen\](.*?)\[\/darkseagreen\]/i","<font color=\"darkseagreen\">\\1</font>", $text); $text=preg_replace("/\[yellowgreen\](.*?)\[\/yellowgreen\]/i","<font color=\"yellowgreen\">\\1</font>", $text); $text=preg_replace("/\[sienna\](.*?)\[\/sienna\]/i","<font color=\"sienna\">\\1</font>", $text); $text=preg_replace("/\[greenyellow\](.*?)\[\/greenyellow\]/i","<font color=\"greenyellow\">\\1</font>", $text); $text=preg_replace("/\[powderblue\](.*?)\[\/powderblue\]/i","<font color=\"powderblue\">\\1</font>", $text); $text=preg_replace("/\[tan\](.*?)\[\/tan\]/i","<font color=\"tan\">\\1</font>", $text); $text=preg_replace("/\[thistle\](.*?)\[\/thistle\]/i","<font color=\"thistle\">\\1</font>", $text); $text=preg_replace("/\[orchid\](.*?)\[\/orchid\]/i","<font color=\"orchid\">\\1</font>", $text); $text=preg_replace("/\[goldenrod\](.*?)\[\/goldenrod\]/i","<font color=\"goldenrod\">\\1</font>", $text); $text=preg_replace("/\[crimson\](.*?)\[\/crimson\]/i","<font color=\"crimson\">\\1</font>", $text); $text=preg_replace("/\[plum\](.*?)\[\/plum\]/i","<font color=\"plum\">\\1</font>", $text); $text=preg_replace("/\[lightcyan\](.*?)\[\/lightcyan\]/i","<font color=\"lightcyan\">\\1</font>", $text); $text=preg_replace("/\[violet\](.*?)\[\/violet\]/i","<font color=\"violet\">\\1</font>", $text); $text=preg_replace("/\[khaki\](.*?)\[\/khaki\]/i","<font color=\"khaki\">\\1</font>", $text); $text=preg_replace("/\[magenta\](.*?)\[\/magenta\]/i","<font color=\"magenta\">\\1</font>", $text); $text=preg_replace("/\[hotpink\](.*?)\[\/hotpink\]/i","<font color=\"hotpink\">\\1</font>", $text); $text=preg_replace("/\[orange\](.*?)\[\/orange\]/i","<font color=\"orange\">\\1</font>", $text); if(substr_count($text,"[br/]")<=3){$text=str_replace("[br/]","<br/>",$text);} $sml=mysql_fetch_array(mysql_query("SELECT images FROM users WHERE id='".getuid_sid($sid)."'")); if(($sml[0]=="1")||($sid==0)){$text=getsmilies($text);} if($filtered=="1"){ if(swearing($text)){ //$text=strtolower($text); $text=filter($text); /* $text=str_replace("****","f*ck",$text); $text=str_replace("****","sh*t",$text); $text=str_replace("dick","d*ck",$text); $text=str_replace("pussy","pu**y",$text); $text=str_replace("cunt","c*nt",$text); $text=str_replace("cock","c*ck",$text); $text=str_replace("slut","sl*t",$text); $text=str_replace("faggot","f*gg*t",$text); $text=str_replace("wanker","w*nk*r",$text); $text=str_replace("prick","pr*ck",$text); $text=str_replace("bastard","b*st*rd",$text); $text=str_replace("bitch","b*tch",$text); */ } } return $text; } /////////////////////////////////Number of registered members function regmemcount() { $rmc = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users")); return $rmc[0]; } ////////////////////////////////////////////Parse PM function parsepm($text, $sid="") { $text = getbbcode($text, $sid, 1); return $text; } /////////////////////////////////////getremote function getRemoteInfo () { $proxy=""; $IP = ""; if (isSet($_SERVER)) { if (isSet($_SERVER["HTTP_X_FORWARDED_FOR"])) { $IP = $_SERVER["HTTP_X_FORWARDED_FOR"]; $proxy = $_SERVER["REMOTE_ADDR"]; } elseif (isSet($_SERVER["HTTP_CLIENT_IP"])) { $IP = $_SERVER["HTTP_CLIENT_IP"]; } else { $IP = $_SERVER["REMOTE_ADDR"]; } } else { if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) { $IP = getenv( 'HTTP_X_FORWARDED_FOR' ); $proxy = getenv( 'REMOTE_ADDR' ); } elseif ( getenv( 'HTTP_CLIENT_IP' ) ) { $IP = getenv( 'HTTP_CLIENT_IP' ); } else { $IP = getenv( 'REMOTE_ADDR' ); } } if (strstr($IP, ',')) { $ips = explode(',', $IP); $IP = $ips[0]; } $RemoteInfo[0]=$IP; $RemoteInfo[1]=@GetHostByAddr($IP); $RemoteInfo[2]=$proxy; return $RemoteInfo; } ////////////////////////////////private profile function shad0w($uid, $who) { $pm = mysql_fetch_array(mysql_query("SELECT viewpro FROM users WHERE id='".$who."'")); if($pm[0]=='2') { if (ismod($uid)) { return true; }else{ return false; } return false; }else if($pm[0]=='1') { if($uid==$who||arebuds($uid,$who)||ismod($uid)) { return true; }else{ return false; } }else if($pm[0]=='0') { return true; } } //////////////////////////gettimemsg function gettimemsg($sec) {$years=0;$months=0;$weeks=0;$days=0;$mins=0;$hours=0; if ($sec>59){$secs=$sec%60;$mins=$sec/60;$mins=(integer)$mins;} if ($mins>59){$hours=$mins/60;$hours=(integer)$hours;$mins=$mins%60;} if ($hours>23){$days=$hours/24;$days=(integer)$days;$hours=$hours%24;} if ($days>6){$weeks=$days/7;$weeks=(integer)$weeks;$days=$days%7;} if ($weeks>3){$months=$weeks/4;$months=(integer)$months;$weeks=$weeks%4;} if ($months>11){$years=$months/12;$years=(integer)$years;$months=$months%12;} if($years>0){if($years==1){$yearmsg="year";} else{$yearmsg="years";} if($months==1){$monthsmsg="month";} else{$monthsmsg="months";} if($days==1){$daysmsg="day";} else{$daysmsg="days";} if($hours==1){$hoursmsg="hour";} else{$hoursmsg="hours";} if($mins==1){$minsmsg="minute";} else{$minsmsg="minutes";} if($secs==1){$secsmsg="second";} else{$secsmsg="seconds";} if($months!=0){$monthscheck="$months $monthsmsg ";} else{$monthscheck="";} if(($days!=0)&&($months==0)){$dayscheck="$days $daysmsg ";} else{$dayscheck="";} if(($hours!=0)&&($months==0)&&($days==0)){$hourscheck="$hours $hoursmsg ";} else{$hourscheck="";} if(($mins!=0)&&($months==0)&&($days==0)&&($hours==0)){$minscheck="$mins $minsmsg ";} else{$minscheck="";} if(($secs!=0)&&($months==0)&&($days==0)&&($hours==0)&&($mins==0)){$secscheck="$secs $secsmsg";} else{$secscheck="";}return "$years $yearmsg $monthscheck$dayscheck$hourscheck$minscheck$secscheck";} if(($years<1)&&($months>0)){ if($months==1){$monthsmsg="month";} else{$monthsmsg="months";}if($days==1){$daysmsg="day";} else{$daysmsg="days";} if($hours==1){$hoursmsg="hour";} else{$hoursmsg="hours";} if($mins==1){$minsmsg="minute";} else{$minsmsg="minutes";} if($secs==1){$secsmsg="second";} else{$secsmsg="seconds";} if($days!=0){$dayscheck="$days $daysmsg ";} else{$dayscheck="";} if(($hours!=0)&&($days==0)){$hourscheck="$hours $hoursmsg ";} else{$hourscheck="";} if(($mins!=0)&&($days==0)&&($hours==0)){$minscheck="$mins $minsmsg ";} else{$minscheck="";} if(($secs!=0)&&($days==0)&&($hours==0)&&($mins==0)){$secscheck="$secs $secsmsg";} else{$secscheck="";}return "$months $monthsmsg $dayscheck$hourscheck$minscheck$secscheck";} if(($months<1)&&($weeks>0)){ if($weeks==1){$weeksmsg="week";} else{$weeksmsg="weeks";}if($days==1){$daysmsg="day";} else{$daysmsg="days";} if($hours==1){$hoursmsg="hour";} else{$hoursmsg="hours";}if($mins==1){$minsmsg="minute";} else{$minsmsg="minutes";} if($secs==1){$secsmsg="second";} else{$secsmsg="seconds";}if($days!=0){$dayscheck="$days $daysmsg ";} else{$dayscheck="";} if(($hours!=0)&&($days==0)){$hourscheck="$hours $hoursmsg ";} else{$hourscheck="";} if(($mins!=0)&&($days==0)&&($hours==0)){$minscheck="$mins $minsmsg ";} else{$minscheck="";} if(($secs!=0)&&($days==0)&&($hours==0)&&($mins==0)){$secscheck="$secs $secsmsg";} else{$secscheck="";}return "$weeks $weeksmsg $dayscheck$hourscheck$minscheck$secscheck";} if(($weeks<1)&&($days>0)){ if($days==1){$daysmsg="day";} else{$daysmsg="days";}if($hours==1){$hoursmsg="hour";} else{$hoursmsg="hours";}if($mins==1){$minsmsg="minute";} else{$minsmsg="minutes";}if($secs==1){$secsmsg="second";} else{$secsmsg="seconds";} if($hours!=0){$hourscheck="$hours $hoursmsg ";} else{$hourscheck="";} if(($mins!=0)&&($hours==0)){$minscheck="$mins $minsmsg ";} else{$minscheck="";} if(($secs!=0)&&($hours==0)&&($mins==0)){$secscheck="$secs $secsmsg";} else{$secscheck="";}return "$days $daysmsg $hourscheck$minscheck$secscheck";} if(($days<1)&&($hours>0)){if($hours==1){$hoursmsg="hour";} else{$hoursmsg="hours";} if($mins==1){$minsmsg="minute";}else{$minsmsg="minutes";} if($secs==1){$secsmsg="second";} else{$secsmsg="seconds";} if($mins!=0){$minscheck="$mins $minsmsg ";} else{$minscheck="";} if(($secs!=0)&&($mins==0)){$secscheck="$secs $secsmsg";} else{$secscheck="";}return "$hours $hoursmsg $minscheck$secscheck";} if(($hours<1)&&($mins>0)){ if($mins==1){$minsmsg="minute";} else{$minsmsg="minutes";} if(($secs==1)&&($mins==0)){$secsmsg="second";} else{$secsmsg="seconds";} if($secs!=0){$secscheck="$secs $secsmsg";} else{$secscheck="";}return "$mins $minsmsg $secscheck";} if(($mins<1)&&($sec>0)){ if($sec==1){$secsmsg="second";} else{$secsmsg="seconds";} if($sec!=0){$secscheck="$sec $secsmsg";} else{$secscheck="";}return "$secscheck";} else{return "Online!";}} /////////////////////////boxstart function boxstart($title){ echo " <div class=\"boxed\"> <div class=\"boxedTitle\"> <h1 align=\"center\" class=\"boxedTitleText\"><b>$title</b> </h1> </div> <div class=\"boxedContent\"> "; } function boxend(){ echo "</div></div>"; } function greeting() { $getdata=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE name='greeting'")); return $getdata[0]; } function greeting2() { $getdata=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE name='greeting2'")); return $getdata[0]; } function getsmilies($text) { $sql="SELECT * FROM smilies"; $smilies=mysql_query($sql); while($smilie=mysql_fetch_array($smilies)) { $scode=$smilie[1]; $spath=$smilie[2]; if(!is_file("$spath"))$spath="../".$smilie[2]; $text=str_replace($scode,"<img src=\"$spath\" alt=\"$scode\"/>",$text); } return $text; } function swearing($str) { $str=str_replace(" ","",$str); $sites[0]="****"; $sites[1]="****"; $sites[2]="dick"; $sites[3]="pussy"; $sites[4]="cunt"; $sites[5]="cock"; $sites[6]="slut"; $sites[7]="faggot"; $sites[8]="wanker"; $sites[9]="prick"; $sites[10]="bastard"; $sites[11]="bitch"; for($i=0;$i<count($sites);$i++) { $str=strtolower($str); $nosf=substr_count($str,$sites[$i]); if($nosf>0) { return true; } } return false; } function getnumonline($sid) { if(ghosts(getuid_sid($sid))){ $online=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users a INNER JOIN online b ON a.id=b.uid")); $online2=$online[0]; }else{ $online=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users a INNER JOIN online b ON a.id=b.uid")); $online2=$online[0]; $count=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users a INNER JOIN online b ON a.id=b.uid WHERE a.hidden='1' AND a.id!='".getuid_sid($sid)."'")); if($count[0]>0)$online2=($online[0]-$count[0]); } return $online2; } function online_buds($uid) { $counter =0; $buds=mysql_query("SELECT uid, tid FROM buds WHERE (uid='".$uid."' OR tid='".$uid."') AND agreed='1'"); while($bud=mysql_fetch_array($buds)) { if($bud[0]==$uid){$tid=$bud[1];} else{$tid=$bud[0];} if(isonline($tid)){$counter++;} } return $counter; } function isonline($uid) { /*$uon=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE uid='".$uid."'")); if($uon[0]>0){return true;} else{return false;}*/ if(isowner(getuid_sid($sid))){ $online=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users a INNER JOIN online b ON a.id=b.uid WHERE a.id='".$uid."'")); }else{ $online=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users a INNER JOIN online b ON a.id=b.uid WHERE a.hidden='0' AND a.id='".$uid."'")); } if($online[0]>0){return true;} else{return false;} } /////////////////////////Get plusses function getpoints($uid) { $points = mysql_fetch_array(mysql_query("SELECT points FROM proiles WHERE id='".$uid."'")); return $plus[0]; } /////////////////////////Can uid sign who's guestbook? function cansigngb($uid, $who) { if(arebuds($uid, $who)) { return true; } if($uid==$who) { return false; //imagine if someone signed his own gbook o.O } if(getpoints($uid)>=10) { return true; } return false; } /////////////////////////////////////////////Are buds? function arebuds($uid, $tid) { $res = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM buds WHERE ((uid='".$uid."' AND tid='".$tid."') OR (uid='".$tid."' AND tid='".$uid."')) AND agreed='1'")); if($res[0]>0) { return true; } return false; } function total_buds($uid) { $notb=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM buds WHERE (uid='".$uid."' OR tid='".$uid."') AND agreed='1'")); return $notb[0]; } function forumview() { $getdata=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE name='forumview'")); return $getdata[0]; } function validation() { $getval=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE name='validation'")); if($getval[0]=='1'){return true;} else{return false;} } function addonline($uid,$place,$link) { global $timezone; $ses_exist=mysql_fetch_array(mysql_query("SELECT id, uid FROM ses WHERE uid='".$uid."'")); $lastact=mysql_fetch_array(mysql_query("SELECT lastact FROM users WHERE id='".$uid."'")); $user_time=mysql_fetch_array(mysql_query("SELECT time FROM profiles WHERE uid='".$uid."'")); $user_loc=mysql_fetch_array(mysql_query("SELECT place FROM online WHERE uid='".$uid."'")); if($ses_exist[0]!="") { if($user_loc[0]=="Logging On"||$user_loc[0]=="Creating Profile"||$user_loc[0]=="Logging Out")$lastact[0]=time(); $timetoadd=time()-$lastact[0]; if($timetoadd>120)$timetoadd=0; mysql_query("UPDATE profiles SET time='".($user_time[0]+$timetoadd)."' WHERE uid='".$uid."'"); } //$deloff=mysql_query("DELETE FROM online WHERE time <'".$timeout."'"); $res=mysql_query("UPDATE users SET lastact='".time()."' WHERE id='".$uid."'"); $linkpart=mysql_fetch_array(mysql_query("SELECT link FROM online WHERE uid='".$uid."'")); if($link==""){$link=$linkpart[0];} $res=mysql_query("INSERT INTO online SET uid='".$uid."', time='".time()."', place='".$place."', link='".$link."'"); if(!$res){ $res=mysql_query("UPDATE online SET time='".time()."', place='".$place."', link='".$link."' WHERE uid='".$uid."'"); } $maxmem=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE id='2'")); $result=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online")); if($result[0]>=$maxmem[0]){ $tnow=date("H:i - D jS M y"); mysql_query("UPDATE settings set name='".$tnow."', value='".$result[0]."' WHERE id='2'"); } $maxtoday=mysql_fetch_array(mysql_query("SELECT ppl FROM mpot WHERE ddt='".date("l jS F")."'")); if(($maxtoday[0]==0)||($maxtoday=="")){ mysql_query("INSERT INTO mpot SET ddt='".date("l jS F")."', ppl='1', dtm='".date("g:ia")."'"); $maxtoday[0]=1; } if($result[0]>=$maxtoday[0]){ mysql_query("UPDATE mpot SET ppl='".$result[0]."', dtm='".date("g:ia")."' WHERE ddt='".date("l jS F")."'"); } } function getsxtm() { $getdata=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE name='sesexp'")); return $getdata[0]; } function autopm($msg, $who) { mysql_query("INSERT INTO inbox SET text='".$msg."', byid='1', toid='".$who."', unread='1', timesent='".time()."'"); } function cleardata() { $timeout=time()-1200; $deloff=mysql_query("DELETE FROM online WHERE time <'".$timeout."'"); $timeto=120; $timenw=time(); $timeout=$timenw-$timeto; $exec=mysql_query("DELETE FROM chatonline WHERE lton<'".$timeout."'"); $timeto=300; $timenw=time(); $timeout=$timenw-$timeto; $exec=mysql_query("DELETE FROM chat WHERE timesent<'".$timeout."'"); $timeto=5*60; $timenw=time(); $timeout=$timenw-$timeto; $rooms=mysql_query("SELECT id FROM chatrooms WHERE public='0' AND clubid='0' AND lastmsg<'".$timeout."'"); while($room=mysql_fetch_array($rooms)) { $ppl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline WHERE rid='".$room[0]."'")); if($ppl[0]==0){$exec=mysql_query("DELETE FROM chatrooms WHERE id='".$room[0]."'");} } $lbpm=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE name='lastbpm'")); $td=date("Y-m-d"); if($td!=$lbpm[0]) { $sql="SELECT uid, birthday FROM profiles WHERE month(`birthday`)=month(curdate()) and dayofmonth(`birthday`)=dayofmonth(curdate())"; $ppl=mysql_query($sql); while($mem=mysql_fetch_array($ppl)) { $msg="[card=008]to you ".getnick_uid($mem[0])."[/card] ".sitename()." team wish you a day full of joy and happiness and many happy returns[br/]*fireworks*[br/][small][i]p.s: this is an automated pm[/i][/small]"; autopm($msg, $mem[0]); } mysql_query("UPDATE settings SET value='".$td."' WHERE name='lastbpm'"); } } function ipbanned_msg() { $banto=mysql_fetch_array(mysql_query("SELECT remaining FROM banned WHERE penalty='4' AND ipaddress='".ip()."' AND browser='".browser()."' LIMIT 1 ")); $login_page="./login.php"; if(!is_file($login_page))$login_page="../login.php"; $error_gif="./images/error.gif"; if(!is_file($error_gif))$error_gif="../images/error.gif"; $title="<img src=\"$error_gif\" alt=\"!\"/><br/><b>This IP address is blocked!!!</b>"; $main="<p align=\"center\"> How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over<br/><br/> <b>Time Left: </b>".time_msg($banto[0]-time(),0)."<br/> </p> <div class=\"center\"> <form action=\"$login_page\" method=\"get\"> <b>Nickname:</b><br/> <input name=\"username\" size=\"12\" maxlength=\"12\"/><br/> <b>Password:</b><br/> <input type=\"password\" name=\"password\" size=\"10\" maxlength=\"10\"/><br/> <input type=\"submit\" value=\"Login!\"> </form> </div> <p align=\"center\"> Not registered yet? <br/><a href=\"register.php\">Register!</a><br/> <a href=\"index.php?action=terms&sid=$sid\">Site Rules</a> </p>"; echo xhtml($sid,$title,0,0,0,0,0,0,0,0,0,$main); } function shoutbanned_msg($sid) { $banto=mysql_fetch_array(mysql_query("SELECT remaining, reason, byid FROM banned WHERE uid='".getuid_sid($sid)."' AND penalty='0'")); $error_gif="./images/error.gif"; if(!is_file($error_gif))$error_gif="../images/error.gif"; $title="<img src=\"$error_gif\" alt=\"[x]\"/><br/><b>You are Shoutbox Banned</b>"; $main="<p align=\"left\"> <b>By:</b><br/> ".getnick_uid($banto[2])."<br/> <b>Reason:</b><br/> $banto[1]<br/> <b>Time Left:</b><br/> ".time_msg($banto[0]-time(),0)." </p>"; $main.="<p align=".align()."><a href=\"../online.php?sid=$sid\">Online menu ".getnumonline($sid)."</a>| <a href=\"../extras.php?sid=$sid\">Extras</a>| <a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>| <a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>| <a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>| <a href=\"../chat/public.php?sid=$sid\">Chat</a>| <a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/> <a href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></p>"; echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main); } function banned_msg($sid) { $banto=mysql_fetch_array(mysql_query("SELECT remaining, reason, byid FROM banned WHERE uid='".getuid_sid($sid)."' AND penalty='3'")); $error_gif="./images/error.gif"; if(!is_file($error_gif))$error_gif="../images/error.gif"; $title="<img src=\"$error_gif\" alt=\"x\"/><br/><b>You are Banned</b>"; $main="<p align=\"center\"> <b>By:</b><br/> ".getnick_uid($banto[2])."<br/> <b>Reason:</b><br/> $banto[1]<br/> <b>Time Left:</b><br/> ".time_msg($banto[0]-time(),0)." </p>"; echo xhtml($sid,$title,0,0,0,0,0,0,0,0,0,$main); } function forumbanned_msg($sid) { $banto=mysql_fetch_array(mysql_query("SELECT remaining, reason, byid FROM banned WHERE uid='".getuid_sid($sid)."' AND penalty='1'")); $title="<img src=\"../images/error.gif\" alt=\"[x]\"/><br/><b>You are Banned From Forums</b>"; $main="<p align=\"left\"> <b>By:</b><br/> ".getnick_uid($banto[2])."<br/> <b>Reason:</b><br/> $banto[1]<br/> <b>Time Left:</b><br/> ".time_msg($banto[0]-time(),0)." </p>"; $main.="<p align=".align()."><a href=\"../online.php?sid=$sid\">Online menu ".getnumonline($sid)."</a>| <a href=\"../extras.php?sid=$sid\">Extras</a>| <a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>| <a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>| <a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>| <a href=\"../chat/public.php?sid=$sid\">Chat</a>| <a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/> <a href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></p>"; echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main); } function chatbanned_msg($sid) { $banto=mysql_fetch_array(mysql_query("SELECT remaining, reason, byid FROM banned WHERE uid='".getuid_sid($sid)."' AND penalty='2'")); $title="<img src=\"../images/error.gif\" alt=\"[x]\"/><br/><b>You are Banned From Chat</b>"; $main="<p align=\"left\"> <b>By:</b><br/> ".getnick_uid($banto[2])."<br/> <b>Reason:</b><br/> $banto[1]<br/> <b>Time Left:</b><br/> ".time_msg($banto[0]-time(),0)." </p>"; $main.="<p align=".align()."><a href=\"../online.php?sid=$sid\">Online menu ".getnumonline($sid)."</a>| <a href=\"../extras.php?sid=$sid\">Extras</a>| <a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>| <a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>| <a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>| <a href=\"../chat/public.php?sid=$sid\">Chat</a>| <a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/> <a href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a></p>"; echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main); } function session_expired() { $indexpage="./index.php"; if(!is_file($indexpage))$indexpage="../index.php"; echo " <p align=\"center\"> You are not logged in<br/> Or Your session has been expired<br/><br/> <a href=\"$indexpage\">Login</a> </p> "; } /////////////////////Get Page Jumber function getjumper2($action, $sid,$pgurl) { $rets = "<form action=\"$pgurl.php\" method=\"get\">"; $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\">"; $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\">"; $rets .= "<input name=\"page\" format=\"*N\" size=\"2\"/>"; $rets .= "<input type=\"Submit\" name=\"Submit\" Value=\"Go To Page\"></form>"; return $rets; } function getjumper($url,$extra,$value,$sid) { $jump="<div class=".align()."> <form action=\"$url.php\" method=\"get\"> <input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>\n"; if($extra!="")$jump.="<input type=\"hidden\" name=\"$extra\" value=\"$value\"/>\n"; $jump.="<input type=\"hidden\" name=\"sid\" value=\"$sid\"/> <input type=\"submit\" value=\"Goto Page\"/> </form> </div>\n"; return $jump; } function antiflood() { $getdata=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE name='antiflood'")); return $getdata[0]; } function blocked_site($str,$sender) { if(isowner($sender)||isheadadmin($sender)||isadmin($sender)||ismod($sender)){return false;} $str=str_replace(" ","",$str); $str=strtolower($str); $res=mysql_query("SELECT site FROM blocked WHERE site!='NULL' AND (autoreport='0' OR autoreport='2')"); while($row=mysql_fetch_array($res)){$sites[]=$row[0];} for($i=0;$i<count($sites);$i++){ $nosf=substr_count($str,$sites[$i]); if($nosf>0){return true;} } return false; } function blocked_browser($str,$uid) { $res=mysql_query("SELECT id, browser FROM blocked WHERE browser!='NULL'"); while($row=mysql_fetch_array($res)){ $brwsr[]=$row[1]; } for($i=0;$i<count($brwsr);$i++) { if(substr_count($str,$brwsr[$i])>0){ $opt=0; if(isuser($uid)){$opt=1;} $row_browser=mysql_fetch_array(mysql_query("SELECT * FROM blocked WHERE browser='".$brwsr[$i]."'")); $browser=explode("/",$row_browser[browser]); echo head_tag("Error!!!",$opt,getnick_uid($uid)); $title="<img src=\"./images/error.gif\" alt=\"x\"/><br/> <b>Error!!!</b>"; $main="<p align=\"center\"> <b>Your Device $browser[0] Is Blocked</b><br/> If You Think This Should Be Lifted Contact Us At flirtyfriends.co.uk<br/> <br/> <b>Device:</b> $row_browser[browser]<br/> <b>Reason</b> $row_browser[reason] </p>\n"; echo xhtml($sid,$title,0,0,0,0,0,0,0,0,0,$main); echo foot_tag(); exit(); } } } function blocked_network($str,$uid) { $network=mysql_query("SELECT * FROM blocked WHERE network LIKE '%".$str."%' AND network!='NULL'"); if(mysql_num_rows($network)>0){ while($row_network=mysql_fetch_array($network)){ $opt=0; if(isuser($uid)){$opt=1;} echo head_tag("Error!!!",$opt,getnick_uid($uid)); $title="<img src=\"./images/error.gif\" alt=\"x\"/><br/> <b>Error!!!</b>"; $main="<p align=\"center\"> <b>Your Network $row_network[network] Is Blocked</b><br/> If You Think This Should Be Lifted Contact Us At flirtyfriends.co.uk<br/> <br/> <b>Network:</b> ".network(ip(),"isp")."<br/> <b>Reason</b> $row_network[reason] </p>"; echo xhtml($sid,$title,0,0,0,0,0,0,0,0,0,$main); echo foot_tag(); exit(); } } } function blocked_ip($str,$uid) { $ipaddress=mysql_query("SELECT * FROM blocked WHERE ipaddress='".$str."' AND ipaddress!='NULL'"); if(mysql_num_rows($ipaddress)>0){ while($row_ipaddress=mysql_fetch_array($ipaddress)){ $opt=0; if(isuser($uid)){$opt=1;} echo head_tag("Error!!!",$opt,getnick_uid($uid)); $title="<img src=\"./images/error.gif\" alt=\"x\"/><br/> <b>Error!!!</b>"; $main="<p align=\"center\"> <b>Your Ip-Address $row_ipaddress[ipaddress] Is Blocked</b><br/> If You Think This Should Be Lifted Contact Us At flirtyfriends.co.uk<br/> <br/> <b>Ip:</b> ".ip()."<br/> <b>Reason</b> $row_ipaddress[reason] </p>"; echo xhtml($sid,$title,0,0,0,0,0,0,0,0,0,$main); echo foot_tag(); exit(); } } } function time_msg($sec,$mode) { if($mode==0) { $years=0; $months=0; $weeks=0; $days=0; $mins=0; $hours=0; if ($sec>59) { $mins=$sec/60; $mins=(integer)$mins; $secs=$sec%60; } if ($mins>59) { $hours=$mins/60; $hours=(integer)$hours; $mins=$mins%60; } if ($hours>23) { $days=$hours/24; $days=(integer)$days; $hours=$hours%24; } if ($days>6) { $weeks=$days/7; $weeks=(integer)$weeks; $days=$days%7; } if ($weeks>3) { $months=$weeks/4; $months=(integer)$months; $weeks=$weeks%4; } if ($months>11) { $years=$months/12; $years=(integer)$years; $months=$months%12; } if($years>0) { if($years==1){$yearmsg="year";}else{$yearmsg="years";} if($months==1){$monthsmsg="month";}else{$monthsmsg="months";} if($days==1){$daysmsg="day";}else{$daysmsg="days";} if($hours==1){$hoursmsg="hour";}else{$hoursmsg="hours";} if($mins==1){$minsmsg="minute";}else{$minsmsg="minutes";} if($secs==1){$secsmsg="second";}else{$secsmsg="seconds";} if($months!=0){$monthscheck="$months $monthsmsg";}else{$monthscheck="";} if(($days!=0)&&($months==0)){$dayscheck=" $days $daysmsg";}else{$dayscheck="";} if(($hours!=0)&&($months==0)&&($days==0)){$hourscheck=" $hours $hoursmsg";}else{$hourscheck="";} if(($mins!=0)&&($months==0)&&($days==0)&&($hours==0)){$minscheck=" $mins $minsmsg";}else{$minscheck="";} if(($secs!=0)&&($months==0)&&($days==0)&&($hours==0)&&($mins==0)){$secscheck=" $secs $secsmsg";}else{$secscheck="";} return "$years $yearmsg $monthscheck$dayscheck$hourscheck$minscheck$secscheck"; } if(($years<1)&&($months>0)) { if($months==1){$monthsmsg="month";}else{$monthsmsg="months";} if($days==1){$daysmsg="day";}else{$daysmsg="days";} if($hours==1){$hoursmsg="hour";}else{$hoursmsg="hours";} if($mins==1){$minsmsg="minute";}else{$minsmsg="minutes";} if($secs==1){$secsmsg="second";}else{$secsmsg="seconds";} if($days!=0){$dayscheck="$days $daysmsg";}else{$dayscheck="";} if(($hours!=0)&&($days==0)){$hourscheck=" $hours $hoursmsg";}else{$hourscheck="";} if(($mins!=0)&&($days==0)&&($hours==0)){$minscheck=" $mins $minsmsg";}else{$minscheck="";} if(($secs!=0)&&($days==0)&&($hours==0)&&($mins==0)){$secscheck=" $secs $secsmsg";}else{$secscheck="";} return "$months $monthsmsg $dayscheck$hourscheck$minscheck$secscheck"; } if(($months<1)&&($weeks>0)) { if($weeks==1){$weeksmsg="week";}else{$weeksmsg="weeks";} if($days==1){$daysmsg="day";}else{$daysmsg="days";} if($hours==1){$hoursmsg="hour";}else{$hoursmsg="hours";} if($mins==1){$minsmsg="minute";}else{$minsmsg="minutes";} if($secs==1){$secsmsg="second";}else{$secsmsg="seconds";} if($days!=0){$dayscheck="$days $daysmsg";}else{$dayscheck="";} if(($hours!=0)&&($days==0)){$hourscheck=" $hours $hoursmsg";}else{$hourscheck="";} if(($mins!=0)&&($days==0)&&($hours==0)){$minscheck=" $mins $minsmsg";}else{$minscheck="";} if(($secs!=0)&&($days==0)&&($hours==0)&&($mins==0)){$secscheck=" $secs $secsmsg";}else{$secscheck="";} return "$weeks $weeksmsg $dayscheck$hourscheck$minscheck$secscheck"; } if(($weeks<1)&&($days>0)) { if($days==1){$daysmsg="day";}else{$daysmsg="days";} if($hours==1){$hoursmsg="hour";}else{$hoursmsg="hours";} if($mins==1){$minsmsg="minute";}else{$minsmsg="minutes";} if($secs==1){$secsmsg="second";}else{$secsmsg="seconds";} if($hours!=0){$hourscheck="$hours $hoursmsg";}else{$hourscheck="";} if(($mins!=0)&&($hours==0)){$minscheck=" $mins $minsmsg";}else{$minscheck="";} if(($secs!=0)&&($hours==0)&&($mins==0)){$secscheck=" $secs $secsmsg";}else{$secscheck="";} return "$days $daysmsg $hourscheck$minscheck$secscheck"; } if(($days<1)&&($hours>0)) { if($hours==1){$hoursmsg="hour";}else{$hoursmsg="hours";} if($mins==1){$minsmsg="minute";}else{$minsmsg="minutes";} if($secs==1){$secsmsg="second";}else{$secsmsg="seconds";} if($mins!=0){$minscheck="$mins $minsmsg";}else{$minscheck="";} if(($secs!=0)&&($mins==0)){$secscheck="$secs $secsmsg";}else{$secscheck="";} return "$hours $hoursmsg $minscheck$secscheck"; } if(($hours<1)&&($mins>0)) { if($mins==1){$minsmsg="minute";}else{$minsmsg="minutes";} if(($secs==1)&&($mins==0)){$secsmsg="second";}else{$secsmsg="seconds";} if($secs!=0){$secscheck="$secs $secsmsg";}else{$secscheck="";} return "$mins $minsmsg $secscheck"; } if(($mins<1)&&($sec>0)) { if($sec==1){$secsmsg="second";}else{$secsmsg="seconds";} if($sec!=0){$secscheck="$sec $secsmsg";}else{$secscheck="";} return "$secscheck"; }else{ return "Online!"; } }else if($mode==1) { $ds=floor($sec/60/60/24); return "$ds days"; } } function addtochat($uid,$rid) { $timeto=120; $timenw=time(); $timeout=$timenw - $timeto; $exec=mysql_query("DELETE FROM chatonline WHERE lton<'".$timeout."'"); $res=mysql_query("INSERT INTO chatonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'"); if(!$res){mysql_query("UPDATE chatonline SET lton='".time()."', rid='".$rid."' WHERE uid='".$uid."'");} } function canenter($uid,$rid) { $fex=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatrooms WHERE id='".$rid."'")); $ginfo=mysql_fetch_array(mysql_query("SELECT minage, maxage, level, points FROM groups WHERE rid='".$rid."'")); $uperms=mysql_fetch_array(mysql_query("SELECT b.birthday, a.level, b.points FROM users a INNER JOIN profiles b ON a.id=b.uid WHERE a.id='".$uid."'")); $clid=mysql_fetch_array(mysql_query("SELECT clubid FROM chatrooms WHERE id='".$rid."'")); if($clid[0]>0){ $ismm=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM clubmembers WHERE uid='".$uid."' AND clubid='".$clid[0]."'")); if($ismm[0]==1){return true;} } else if($uperms[1]==5){return true;} else if($ginfo[0]>0){ if(getage($uperms[0])>=$ginfo[0]){return true;} } else if($ginfo[1]>0){ if(getage($uperms[0])<=$ginfo[1]){return true;} } else if($uperms[1]>=$ginfo[2]){return true;} else if($uperms[2]>=$ginfo[3]){return true;} else if($fex[0]==1){return true;} else{return false;} } function canaccess($uid,$fid) { $fex=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM forums WHERE id='".$fid."'")); $ginfo=mysql_fetch_array(mysql_query("SELECT minage, maxage, level, points FROM groups WHERE fid='".$fid."'")); $uperms=mysql_fetch_array(mysql_query("SELECT b.birthday, a.level, b.points FROM users a INNER JOIN profiles b ON a.id=b.uid WHERE a.id='".$uid."'")); $clid=mysql_fetch_array(mysql_query("SELECT clubid FROM forums WHERE id='".$fid."'")); if($uperms[1]==5){return true;} else if($ginfo[0]>0){ if(getage($uperms[0])>=$ginfo[0]){return true;} } else if($ginfo[1]>0){ if(getage($uperms[0])<=$ginfo[1]){return true;} } else if($clid[0]>0){ $ismm=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM clubmembers WHERE uid='".$uid."' AND clubid='".$clid[0]."'")); if($ismm[0]==1){return true;} } else if($uperms[1]>=$ginfo[2]){return true;} else if($uperms[2]>=$ginfo[3]){return true;} else if($fex[0]==1){return true;} else{return false;} /* if($uperms[2]<$ginfo[3]){return false;} }*/ if($ginfo[2]==5) { if(isowner($uid)){return true;} else{return false;} } if($ginfo[2]==6) { if(ishost($uid)){return true;} else{return false;} } if($ginfo[2]==7) { if(istech($uid)){return true;} else{return false;} } if($ginfo[2]==4) { if(isheadadmin($uid)){return true;} else if(isowner($uid)){return true;} else{return false;} } if($ginfo[2]==3) { if(isadmin($uid)){return true;} else if(isheadadmin($uid)){return true;} else if(isowner($uid)){return true;} else{return false;} } if($ginfo[2]==2) { if(isadmin($uid)){return true;} else if(isheadadmin($uid)){return true;} else if(isowner($uid)){return true;} else{return false;} } if($ginfo[2]==1) { if(ismod($uid)){return true;} else if(isadmin($uid)){return true;} else if(isheadadmin($uid)){return true;} else if(isowner($uid)){return true;} else{return false;} } } function getext($strfnm) { /* $str = trim($strfnm); if (strlen($str)<4){ return $str; } for($i=strlen($str);$i>0;$i--) { $ext .= substr($str,$i,1); if(strlen($ext)==3) { $ext = strrev($ext); return $ext; } } */ return pathinfo($strfnm, PATHINFO_EXTENSION); } ?>
Attached Files
Comment
-
nadym, check ur .htaccess file, or delete ithttp://myfacepals.com
MYFACEPALS SOCIAL NETWORKsigpic
Comment
-
Originally posted by makvanpor2000 View Postnadym, check ur .htaccess file, or delete it
Another question...What's the procedure to change the level of owner to 5?. I know it can be done by doing something with phpMyAdmin. But can anyone tell me how to set the level?
Comment
Comment