diff --git a/lib/function.php b/lib/function.php index 3245682..5ff45f3 100644 --- a/lib/function.php +++ b/lib/function.php @@ -360,16 +360,18 @@ function calclvlexp($lvl){ function calcexp($posts,$days){ if(@($posts/$days)>0) return floor($posts*pow($posts*$days,0.5)); elseif($posts==0) return 0; - else return 'NaN'; + else return -1; // 'NaN'; } function calclvl($exp){ - if($exp>=0){ - $lvl=floor(@pow($exp,2/7)); - if(calclvlexp($lvl+1)==$exp) $lvl++; - if(!$lvl) $lvl=1; - }else $lvl=-floor(pow(-$exp,2/7)); - if(is_string($exp) && $exp=='NaN') $lvl='NaN'; - return $lvl; + if (is_string($exp) && $exp === 'NaN') return 'NaN'; + if ($exp >= 0) { + $lvl = floor(@pow($exp, 2/7)); + if (calclvlexp($lvl + 1) == $exp) $lvl++; + if (!$lvl) $lvl = 1; + } else { + $lvl = -floor(pow(-$exp,2/7)); + } + return $lvl; } function generatenumbergfx($num,$minlen=0,$double=false){ @@ -516,10 +518,10 @@ function doreplace2($msg, $options = null, $mood = 0) { if (!$smiliesoff) { global $smilies; - if(!$smilies) $smilies=readsmilies(); - for($s=0;$smilies[$s][0];$s++){ - $smilie=$smilies[$s]; - $msg=str_replace($smilie[0],"",$msg); + if (!$smilies) $smilies = readsmilies(); + for ($s = 0; $smilies[$s]; $s++) { + $smilie = $smilies[$s]; + $msg = str_replace($smilie[0], "", $msg); } } diff --git a/lib/rpg.php b/lib/rpg.php index 562d537..3d9c2fe 100644 --- a/lib/rpg.php +++ b/lib/rpg.php @@ -22,15 +22,24 @@ $stat=array('HP','MP','Atk','Def','Int','MDf','Dex','Lck','Spd'); $p=$u['posts']; $d=(ctime()-$u['regdate'])/86400; + $a=[]; + $m=[]; for($i=0;$i<9;$i++) { $m[$i]=1; + $a[$i]=0; } for($i=1;$i<7;$i++){ + if (!$u['eq'.$i]) { + continue; + } $item=$items[$u['eq'.$i]]; for($k=0;$k<9;$k++){ $is=$item['s'.$stat[$k]]; - if(substr($item['stype'],$k,1)=='m') $m[$k]*=$is/100; - else $a[$k]+=$is; + if (substr($item['stype'],$k,1)=='m') { + $m[$k]*=$is/100; + } else { + $a[$k] = ($a[$k] ?? 0) + $is; + } } } for($i=0;$i<9;$i++){ diff --git a/memberlist.php b/memberlist.php index 46265c1..a84d1d8 100644 --- a/memberlist.php +++ b/memberlist.php @@ -10,24 +10,36 @@ return $cmpb-$cmpa; } - if($sex) $qsex="&sex=$sex"; - if($pow) $qpow="&pow=$pow"; - if($ppp) $qppp="&ppp=$ppp"; - if($rpg) $qrpg="&rpg=1"; - $q = $qppp.$qrpg; + $sex = $_GET['sex'] ?? null; + $qsex = ($sex !== null ? "&sex=$sex" : ""); - if(!$ppp) $ppp=50; - if(!$page) $page=0; + $pow = null; + $qpow = ""; + if (isset($_GET['pow'])) { + $pow = intval($_GET['pow']); + $qpow = "&pow=$pow"; + } + $qrpg = ""; + $rpg = intval($_GET['rpg'] ?? 0); + $qrpg = "&rpg=$rpg"; - $lnk='query("$query$where ORDER BY name", MYSQL_ASSOC); @@ -55,9 +65,9 @@ $numusers=mysql_num_rows($users1); - for($i=0;$user = $sql->fetch($users1);$i++){ - $user['days'] = (ctime()-$user['regdate'])/86400; - $user['exp'] = calcexp($user['posts'],$user['days']); + for ($i = 0; $user = $sql->fetch($users1); $i++) { + $user['days'] = (ctime() - $user['regdate']) / 86400; + $user['exp'] = calcexp($user['posts'], $user['days']); $user['lvl'] = calclvl($user['exp']); $users[] = $user; } @@ -69,36 +79,37 @@ for($i=0;$i<($numusers/$ppp);$i++) $pagelinks.=($i==$page?' '.($i+1):" ".($i+1).''); - if($numusers>1) $s="s"; + $lnk='$tblstart - $tccellh colspan=2>$numusers user$s found. + $tccellh colspan=2>$numusers user". ($numusers != 1 ? "s" : "") ." found. $tccell1s> Sort by: $tccell2s> - $lnk=posts$q$qpow$qsex>Total posts | - $lnk=exp$q$qpow$qsex>EXP | - $lnk=name$q$qpow$qsex>User name | - $lnk=reg$q$qpow$qsex>Registration date | - $lnk=act$q$qpow$qsex>Last activity | - $lnk=age$q$qpow$qsex>Age + $lnk=posts$qpow$qsex>Total posts | + $lnk=exp$qpow$qsex>EXP | + $lnk=name$qpow$qsex>User name | + $lnk=reg$qpow$qsex>Registration date | + $lnk=act$qpow$qsex>Last activity | + $lnk=age$qpow$qsex>Age $tccell1s> Sex: $tccell2s> - $lnk=$sort$q$qpow&sex=m>Male | - $lnk=$sort$q$qpow&sex=f>Female | - $lnk=$sort$q$qpow&sex=n>N/A | - $lnk=$sort$q$qpow>All + $lnk=$sort$qpow&sex=m>Male | + $lnk=$sort$qpow&sex=f>Female | + $lnk=$sort$qpow&sex=n>N/A | + $lnk=$sort$qpow>All $tccell1s> Powerlevel: $tccell2s> - $lnk=$sort$q$qsex&pow=-1>Banned | - $lnk=$sort$q$qsex&pow=0>Normal | - ". ($loguser['powerlevel'] >= 1 ? "$lnk=$sort$q$qsex&pow=1>Normal + | " : "") ." - $lnk=$sort$q$qsex&pow=2>Moderator | - $lnk=$sort$q$qsex&pow=3>Administrator | - $lnk=$sort$q$qsex>All + $lnk=$sort$qsex&pow=-1>Banned | + $lnk=$sort$qsex&pow=0>Normal | + ". ($loguser['powerlevel'] >= 1 ? "$lnk=$sort$qsex&pow=1>Normal + | " : "") ." + $lnk=$sort$qsex&pow=2>Moderator | + $lnk=$sort$qsex&pow=3>Administrator | + $lnk=$sort$qsex>All $tblend
$tblstart $tccellh width=30># @@ -106,7 +117,7 @@ $tccellh>Username "; - if(!$rpg) { + if (!$rpg) { print " $tccellh width=200>Registered on $tccellh width=200>Last active @@ -114,10 +125,9 @@ $tccellh width=35>Level $tccellh width=100>EXP "; - } - else { + } else { $items = $sql->getarraybykey("SELECT * FROM items", 'id'); - $classes = $sql->getarraybykey("SELECT * FROM rpg_classes", 'id'); + $classes = $sql->getarraybykey("SELECT * FROM rpg_classes", 'id'); print "$tccellh width=35>Level"; print "$tccellh width=90>Class"; @@ -128,9 +138,10 @@ } $s = $ppp*$page; + $ulist = ""; for($u=0;$u < $ppp;$u++) { $i = $s + $u; - $user = $users[$i]; + $user = $users[$i] ?? null; if (!$user) break; $ulist.=""; @@ -155,7 +166,7 @@ "; } else { - if (!($class = $classes[$user['class']])) + if (!($class = ($classes[$user['class']] ?? null))) $class = array('name'=>'None'); $stats=getstats($user,$items,$class); diff --git a/status.php b/status.php index f978ee0..e9a6442 100644 --- a/status.php +++ b/status.php @@ -8,15 +8,18 @@ $p = $user['posts']; $d = (ctime()-$user['regdate'])/86400; - if(!$it) - $it=0; + $it = intval($_GET['it'] ?? 0); + $ne = intval($_GET['ne'] ?? 0); + $nc = intval($_GET['nc'] ?? 0); + $ct = intval($_GET['ct'] ?? 0); if(!$ne) $items = $sql->getarraybykey("SELECT * FROM items WHERE id=$user[eq1] OR id=$user[eq2] OR id=$user[eq3] OR id=$user[eq4] OR id=$user[eq5] OR id=$user[eq6] OR id=$it", 'id'); if(!$nc) $class = $sql->fetchq("SELECT * FROM `rpg_classes` WHERE `id` = '". $user['class'] ."'"); + $GPdif = 0; if($ct) { - $GPdif=floor($items[$user['eq'.$ct]][coins]*0.6)-$items[$it][coins]; + $GPdif=floor($items[$user['eq'.$ct]]['coins']*0.6)-$items[$it]['coins']; $user['eq'.$ct]=$it; } @@ -28,41 +31,41 @@ $class['name'] = "None"; } - $img=ImageCreate(256,224 - (8 * 0)); + $img=imagecreate(256,224 - (8 * 0)); imagesavealpha($img, true); imagealphablending($img, false); - $c['bg']= ImageColorAllocatealpha($img, 40, 40, 90, 127); - $c['bxb0']=ImageColorAllocate($img, 0, 0, 0); + $c['bg']= imagecolorallocatealpha($img, 40, 40, 90, 127); + $c['bxb0']=imagecolorallocate($img, 0, 0, 0); -// $c['bxb1']=ImageColorAllocate($img,225,200,180); -// $c['bxb2']=ImageColorAllocate($img,190,160,130); -// $c['bxb3']=ImageColorAllocate($img,130,110, 90); +// $c['bxb1']=imagecolorallocate($img,225,200,180); +// $c['bxb2']=imagecolorallocate($img,190,160,130); +// $c['bxb3']=imagecolorallocate($img,130,110, 90); - $c['bxb1']=ImageColorAllocate($img, 200, 180, 225); - $c['bxb2']=ImageColorAllocate($img, 160, 130, 190); - $c['bxb3']=ImageColorAllocate($img, 90, 110, 130); + $c['bxb1']=imagecolorallocate($img, 200, 180, 225); + $c['bxb2']=imagecolorallocate($img, 160, 130, 190); + $c['bxb3']=imagecolorallocate($img, 90, 110, 130); for($i=0;$i<100;$i++) - $c[$i]=ImageColorAllocate($img, 15+$i/1.5, 8, 20+$i); + $c[$i]=imagecolorallocate($img, 15+$i/1.5, 8, 20+$i); - $c['barE1']=ImageColorAllocate($img,120,150,180); - $c['barE2']=ImageColorAllocate($img, 30, 60, 90); + $c['barE1']=imagecolorallocate($img,120,150,180); + $c['barE2']=imagecolorallocate($img, 30, 60, 90); - $c['bar1'][ 1] = ImageColorAllocate($img, 215, 91, 129); - $c['bar1'][ 2] = ImageColorAllocate($img, 255, 136, 154); - $c['bar1'][ 3] = ImageColorAllocate($img, 255, 139, 89); - $c['bar1'][ 4] = ImageColorAllocate($img, 255, 251, 89); - $c['bar1'][ 5] = ImageColorAllocate($img, 89, 255, 139); - $c['bar1'][ 6] = ImageColorAllocate($img, 89, 213, 255); - $c['bar1'][ 7] = ImageColorAllocate($img, 196, 33, 33); - $c['bar1'][ 8] = ImageColorAllocate($img, 196, 66, 196); - $c['bar1'][ 9] = ImageColorAllocate($img, 100, 0, 155); - $c['bar1'][10] = ImageColorAllocate($img, 88, 0, 121); - $c['bar1'][11] = ImageColorAllocate($img, 0, 174, 215); - $c['bar1'][12] = ImageColorAllocate($img, 0, 99, 151); - $c['bar1'][13] = ImageColorAllocate($img, 175, 175, 175); - $c['bar1'][14] = ImageColorAllocate($img, 222, 222, 222); - $c['bar1'][15] = ImageColorAllocate($img, 255, 255, 255); + $c['bar1'][ 1] = imagecolorallocate($img, 215, 91, 129); + $c['bar1'][ 2] = imagecolorallocate($img, 255, 136, 154); + $c['bar1'][ 3] = imagecolorallocate($img, 255, 139, 89); + $c['bar1'][ 4] = imagecolorallocate($img, 255, 251, 89); + $c['bar1'][ 5] = imagecolorallocate($img, 89, 255, 139); + $c['bar1'][ 6] = imagecolorallocate($img, 89, 213, 255); + $c['bar1'][ 7] = imagecolorallocate($img, 196, 33, 33); + $c['bar1'][ 8] = imagecolorallocate($img, 196, 66, 196); + $c['bar1'][ 9] = imagecolorallocate($img, 100, 0, 155); + $c['bar1'][10] = imagecolorallocate($img, 88, 0, 121); + $c['bar1'][11] = imagecolorallocate($img, 0, 174, 215); + $c['bar1'][12] = imagecolorallocate($img, 0, 99, 151); + $c['bar1'][13] = imagecolorallocate($img, 175, 175, 175); + $c['bar1'][14] = imagecolorallocate($img, 222, 222, 222); + $c['bar1'][15] = imagecolorallocate($img, 255, 255, 255); $st['CHP'] = max($st['HP'] - $user['damage'], 0); if ($st['CHP'] <= 0) @@ -137,8 +140,8 @@ bars(); header('Content-type:image/png'); - ImagePNG($img); - ImageDestroy($img); + imagepng($img); + imagedestroy($img); @@ -152,17 +155,17 @@ function twrite($font,$x,$y,$l,$text){ $x+=($l-strlen($text))*8; for($i=0;$i 0) { - ImageFilledRectangle($img,137,41+24,136+$st['HP']/$sc[$s],47+24,$c['bxb0']); - ImageFilledRectangle($img,136,40+24,135+$st['HP']/$sc[$s],46+24,$c['bar1'][$s]); + imagefilledrectangle($img,137,41+24,136+$st['HP']/$sc[$s],47+24,$c['bxb0']); + imagefilledrectangle($img,136,40+24,135+$st['HP']/$sc[$s],46+24,$c['bar1'][$s]); if ($user['damage'] > 0) { $dmg = max($st[HP] - $user['damage'], 0) / $sc[$s]; $ctemp = imagecolorsforindex($img, $c['bar1'][$s]); $df = 0.6; - ImageFilledRectangle($img,135 + $st['HP']/$sc[$s],40+24,135+$dmg,46+24,imagecolorallocate($img, $ctemp['red'] * $df, $ctemp['green'] * $df, $ctemp['blue'] * $df)); + imagefilledrectangle($img,135 + $st['HP']/$sc[$s],40+24,135+$dmg,46+24,imagecolorallocate($img, $ctemp['red'] * $df, $ctemp['green'] * $df, $ctemp['blue'] * $df)); } } if ($st['MP'] > 0) { - ImageFilledRectangle($img,137,49+24,136+$st['MP']/$sc[$s],55+24,$c['bxb0']); - ImageFilledRectangle($img,136,48+24,135+$st['MP']/$sc[$s],54+24,$c['bar1'][$s]); + imagefilledrectangle($img,137,49+24,136+$st['MP']/$sc[$s],55+24,$c['bxb0']); + imagefilledrectangle($img,136,48+24,135+$st['MP']/$sc[$s],54+24,$c['bar1'][$s]); } for($i=2;$i<9;$i++) $st2[$i]=$st[$stat[$i]]; @@ -213,17 +216,17 @@ function bars(){ if(!$sc[$s]) $sc[$s]=1; for($i=2;$i<9;$i++){ if (floor($st[$stat[$i]]/$sc[$s]) > 0) { - ImageFilledRectangle($img,89,65+$i*8+24,89+$st[$stat[$i]]/$sc[$s], 71+$i*8+24,$c['bxb0']); - ImageFilledRectangle($img,88,64+$i*8+24,88+$st[$stat[$i]]/$sc[$s], 70+$i*8+24,$c['bar1'][$s]); + imagefilledrectangle($img,89,65+$i*8+24,89+$st[$stat[$i]]/$sc[$s], 71+$i*8+24,$c['bxb0']); + imagefilledrectangle($img,88,64+$i*8+24,88+$st[$stat[$i]]/$sc[$s], 70+$i*8+24,$c['bar1'][$s]); } } $e2 = 16 * 8; // width of bar $e1 = $e2 * $pct; $y = 168+1+24; - ImageFilledRectangle($img,9,$y + 1, 8 + $e2, $y + 4, $c['bxb0']); - ImageFilledRectangle($img,8,$y , 7 + $e2, $y + 3, $c['barE2']); - ImageFilledRectangle($img,8,$y , 7 + $e1, $y + 3, $c['barE1']); + imagefilledrectangle($img,9,$y + 1, 8 + $e2, $y + 4, $c['bxb0']); + imagefilledrectangle($img,8,$y , 7 + $e2, $y + 3, $c['barE2']); + imagefilledrectangle($img,8,$y , 7 + $e1, $y + 3, $c['barE1']); } function nlimiter($n) { diff --git a/tlayouts/regular.php b/tlayouts/regular.php index c19de4f..0471681 100644 --- a/tlayouts/regular.php +++ b/tlayouts/regular.php @@ -12,6 +12,8 @@ $exp = calcexp($post['posts'],(ctime()-$post['regdate']) / 86400); $lvl = calclvl($exp); $expleft = calcexpleft($exp); + $set['userpic'] = $set['userpic'] ?? ""; // please stop being undefined + if ($tlayout == 1) { $level = "Level: $lvl"; @@ -24,6 +26,8 @@ if ($barwidth < 1) $barwidth=0; + $baron = ""; + $baroff = ""; if ($barwidth > 0) $baron=""; if ($barwidth < $totalwidth) $baroff="'; @@ -338,7 +342,7 @@ $fcol3 = "#f0f8ff"; - $lastactivity = 'Active ' .timeunits(ctime()-$post[lastactivity]) ." ago"; + $lastactivity = 'Active ' .timeunits(ctime()-$post['lastactivity']) ." ago"; $postnum = ($post['num']) ."/"; $posttotal = $post['posts']; if(!$post['num']) { @@ -346,7 +350,7 @@ $postss = "s:"; } return "
$tblstart - ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> + ". str_replace('valign=top', 'valign=top', $set['tdbg']) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> — $set[userlink] — $smallfont ". ($set['userrank'] ? "
". $set['userrank'] : "") ." @@ -379,7 +383,7 @@ $fcol3 = "#000000"; } - $lastactivity = 'Active
' .timeunits(ctime()-$post[lastactivity]) ." ago"; + $lastactivity = 'Active ' .timeunits(ctime()-$post['lastactivity']) ." ago"; $postnum = ($post['num']) ."/"; $posttotal = $post['posts']; if(!$post['num']) { @@ -387,7 +391,7 @@ $postss = "s:"; } return "
$tblstart - ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3". ($post['posts'] >= 20000 ? " url('http://www.ffalexandria.com/orlandu/anya/side_bg.jpg'); background-position:bottom left" : "") ."; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> + ". str_replace('valign=top', 'valign=top', $set['tdbg']) ." rowspan=2 align=center style=\"background: $fcol3". ($post['posts'] >= 20000 ? " url('http://www.ffalexandria.com/orlandu/anya/side_bg.jpg'); background-position:bottom left" : "") ."; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> — $set[userlink] —
$smallfont ". ($set['userrank'] ? "
". $set['userrank'] : "") ." @@ -435,7 +439,7 @@ $fcol3 = "#fff0f8"; - $lastactivity = 'Active
' .timeunits(ctime()-$post[lastactivity]) ." ago"; + $lastactivity = 'Active ' .timeunits(ctime()-$post['lastactivity']) ." ago"; $postnum = ($post['num']) ."/"; $posttotal = $post['posts']; if(!$post['num']) { @@ -443,7 +447,7 @@ $postss = "s:"; } return "
$tblstart - ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> + ". str_replace('valign=top', 'valign=top', $set['tdbg']) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> — $set[userlink] — $smallfont ". ($set['userrank'] ? "
". $set['userrank'] : "") ." @@ -483,7 +487,7 @@ $fcol3 = "#000000"; - $lastactivity = 'Active
' .timeunits(ctime()-$post[lastactivity]) ." ago"; + $lastactivity = 'Active ' .timeunits(ctime()-$post['lastactivity']) ." ago"; $postnum = ($post['num']) ."/"; $posttotal = $post['posts']; if(!$post['num']) { @@ -491,7 +495,7 @@ $postss = "s:"; } return "
$tblstart - ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> + ". str_replace('valign=top', 'valign=top', $set['tdbg']) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> — $set[userlink] — $smallfont ". ($set['userrank'] ? "
". $set['userrank'] : "") ." @@ -513,8 +517,8 @@ $fcol1 = "#bbbbeb"; $fcol2 = "#8888a8"; $fcol3 = "#080818 url('http://bloodstar.rustedlogic.net/layout/background.png')"; - $lastactivity = 'Active
'. timeunits(ctime()-$post[lastactivity]) ." ago"; - $joindate = 'Joined '. date($dateshort,$post[regdate]+$tzoff) .""; + $lastactivity = 'Active '. timeunits(ctime()-$post['lastactivity']) ." ago"; + $joindate = 'Joined '. date($dateshort,$post['regdate']+$tzoff) .""; $postnum = ($post['num']) ."/"; $posttotal = $post['posts']; if(!$post['num']) { @@ -522,7 +526,7 @@ $postss = "s:"; } return "
$tblstart - ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> + ". str_replace('valign=top', 'valign=top', $set['tdbg']) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> — $set[userlink] — $smallfont ". ($set['userrank'] ? "
". $set['userrank'] ."
" : "") ." @@ -546,8 +550,8 @@ $fcol1 = "#9999cc"; $fcol2 = "#7777aa"; $fcol3 = "#000011"; - $lastactivity = 'Active
'. timeunits(ctime()-$post[lastactivity]) ." ago"; - $joindate = 'Joined '. date($dateshort,$post[regdate]+$tzoff) .""; + $lastactivity = 'Active '. timeunits(ctime()-$post['lastactivity']) ." ago"; + $joindate = 'Joined '. date($dateshort,$post['regdate']+$tzoff) .""; $postnum = ($post['num']) ."/"; $posttotal = $post['posts']; if(!$post['num']) { @@ -586,11 +590,11 @@ $postss = "s:"; } return "
$tblstart - ". str_replace('\' valign=top', ' a1\' valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> + ". str_replace('\' valign=top', ' a1\' valign=top', $set['tdbg']) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 12px; color: $fcol1; font-family: Verdana, sans-serif;\"> $css
- Post$postss $postnum$posttotal (". timeunits(ctime()-$post[lastposttime]) ."), - online ". timeunits(ctime()-$post[lastactivity]) ." ago + Post$postss $postnum$posttotal (". timeunits(ctime()-$post['lastposttime']) ."), + online ". timeunits(ctime()-$post['lastactivity']) ." ago ". (strpos($_SERVER['USER_AGENT'], "MSIE 6.0") ? "" : "") ." @@ -612,7 +616,7 @@ $fcol3 = "#181818"; return "
$tblstart - ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 14px; color: $fcol1; font-family: Verdana, sans-serif; padding-top: .5em;\"> + ". str_replace('valign=top', 'valign=top', $set['tdbg']) ." rowspan=2 align=center style=\"background: $fcol3; font-size: 14px; color: $fcol1; font-family: Verdana, sans-serif; padding-top: .5em;\"> $set[userlink]
Collection of nobodies
@@ -647,20 +651,20 @@ '6' => "
(Acc.)
", ); $user=mysql_fetch_array(mysql_query("SELECT name,posts,regdate,users_rpg.* FROM users,users_rpg WHERE id='". $post['uid'] ."' AND uid=id")); - $d=(ctime()-$user[regdate])/86400; + $d=(ctime()-$user['regdate'])/86400; $eqitems=mysql_query("SELECT * FROM items WHERE id=$user[eq1] OR id=$user[eq2] OR id=$user[eq3] OR id=$user[eq4] OR id=$user[eq5] OR id=$user[eq6]") or print mysql_error(); while($item=mysql_fetch_array($eqitems)) { $items[$item[id]]=$item; $eq[$item['cat']] = $item['name']; } if($ct){ - $GPdif=floor($items[$user['eq'.$ct]][coins]*0.6)-$items[$it][coins]; + $GPdif=floor($items[$user['eq'.$ct]]['coins']*0.6)-$items[$it]['coins']; $user['eq'.$ct]=$it; } $st=getstats($user,$items); - $st[GP]+=$GPdif; - if($st[lvl]>0) $pct=1-calcexpleft($st[exp])/totallvlexp($st[lvl]); - $st['expn'] = calcexpleft($st[exp]); + $st['GP']+=$GPdif; + if($st['lvl']>0) $pct=1-calcexpleft($st['exp'])/totallvlexp($st['lvl']); + $st['expn'] = calcexpleft($st['exp']); $st['eq'] = $eq; $x_hacks['rpgstats'][$post['uid']] = $st; @@ -668,8 +672,8 @@ $st = $x_hacks['rpgstats'][$post['uid']]; } - $lastactivity = 'Active '. timeunits(ctime()-$post[lastactivity]) ." ago"; - $joindate = 'Joined '. date($dateshort,$post[regdate]+$tzoff); + $lastactivity = 'Active '. timeunits(ctime()-$post['lastactivity']) ." ago"; + $joindate = 'Joined '. date($dateshort,$post['regdate']+$tzoff); $postnum = ($post['num']) ."/"; $posttotal = $post['posts']; if(!$post['num']) { @@ -685,7 +689,7 @@ return "
$tblstart - ". str_replace('valign=top', 'valign=top', $set[tdbg]) ." rowspan=2 width=200> + ". str_replace('valign=top', 'valign=top', $set['tdbg']) ." rowspan=2 width=200> @@ -851,4 +855,3 @@ } //End random shit for Inu's layout -?>
$set[userlink]