commit f883939c90a574c07d5a96a338778c5b403be1d6 Author: xeons Date: Sat Aug 30 03:47:47 2014 -0500 AcmlmBoard 1.92.08 diff --git a/activeusers.php b/activeusers.php new file mode 100644 index 0000000..ab3d86c --- /dev/null +++ b/activeusers.php @@ -0,0 +1,39 @@ +".(ctime()-$posttime).$endp) or print mysql_error(); + $link='During last hour | + $link=86400>During last day | + $link=604800>During last week | + $link=2592000>During last 30 days
+ $fonttag Most active users during the last ".timeunits2($posttime).": + $tblstart + $tccellh width=30># + $tccellh>Username + $tccellh width=150>Registered on + $tccellh width=50>Posts + $tccellh width=50>Total + "; + for($i=1;$user=mysql_fetch_array($posters);$i++){ + if($i>1) print ''; + $namecolor=getnamecolor($user[5],$user[6]); + print " + $tccell1>$i + $tccell2l>$user[3] + $tccell1>".date($dateformat,$user[2]+$tzoff)." + $tccell2>$user[7] + $tccell2>$user[1] + "; + } + print $tblend.$footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/activity.php b/activity.php new file mode 100644 index 0000000..bb18e2d --- /dev/null +++ b/activity.php @@ -0,0 +1,54 @@ +=$dd+$i*86400 AND date<$dd2+$i*86400"); + $p[$i]=mysql_result($ps,0,0); + $t[$i]=mysql_result($ps,0,1); + } + + $days=floor((ctime()-$dd)/86400); + $m=max($p); + + Header('Content-type:image/png'); + $img=ImageCreate($days,$m); + + $c[bg]= ImageColorAllocate($img, 0, 0, 0); + $c[bg1]=ImageColorAllocate($img, 0, 0, 80); + $c[bg2]=ImageColorAllocate($img, 0, 0,130); + $c[bg3]=ImageColorAllocate($img, 80, 80,250); + $c[mk1]=ImageColorAllocate($img,110,110,160); + $c[mk2]=ImageColorAllocate($img, 70, 70,130); + $c[bar]=ImageColorAllocate($img,250,190, 40); + $c[pt] =ImageColorAllocate($img,250,250,250); + for($i=0;$i<$days;$i++){ + $num=date('m',$dd+$i*86400)%2+1; + if(date('m-d',$dd+$i*86400)=='01-01') $num=3; + ImageLine($img,$i,$m,$i,0,$c["bg$num"]); + } + for($i=0;$i<=5;$i++){ + ImageLine($img,0,$m-$i*100+50,$days,$m-$i*100+50,$c[mk2]); + ImageLine($img,0,$m-$i*100,$days,$m-$i*100,$c[mk1]); + } + for($i=0;$i<$days;$i++){ + ImageLine($img,$i,$m,$i,$m-$p[$i],$c[bar]); + ImageSetPixel($img,$i,$m-$t[$i]/($i+1),$c[pt]); + } + + ImagePNG($img); + ImageDestroy($img); +?> \ No newline at end of file diff --git a/announcement.php b/announcement.php new file mode 100644 index 0000000..02024ee --- /dev/null +++ b/announcement.php @@ -0,0 +1,204 @@ +0)); + if($_GET[action]=='edit' or $_POST[action]=='editannc'){ + $annc=mysql_fetch_array(mysql_query("SELECT * FROM announcements WHERE id=$id")); + if($annc[forum]>0 && $ismod) $canpost=true; + } + $smilies=readsmilies(); + if(!$action){ + loadtlayout(); + $ppp=($log?$loguser[postsperpage]:20); + $min=$ppp*$page; + $anncs=mysql_query("SELECT a.*,u.*,a.title atitle,u.id uid FROM announcements a,users u WHERE forum=$f AND a.user=u.id ORDER BY a.id DESC LIMIT $min,$ppp"); + $annctotal=@mysql_result(mysql_query("SELECT count(*) FROM announcements WHERE forum=$f"),0,0); + $pagelinks=$smallfont.'Pages:'; + for($i=0;$i<($annctotal/$ppp);$i++){ + if($i==$page) $pagelinks.=' '.($i+1); + else $pagelinks.=" ".($i+1).''; + } + $annclist="$tccellh width=150>User$tccellh colspan=2>Announcement"; + while($annc=mysql_fetch_array($anncs)){ + if($annccount) $annclist.=''; + $annccount++; + $bg=$bg%2+1; + $edit=' '; + if($isadmin or ($ismod && $f)){ + $edit="Edit | Delete"; + if($isadmin) $ip=" | IP: $annc[3]"; + } + if($loguser[viewsig]==2){ + $annc[headtext]=$annc[postheader]; + $annc[signtext]=$annc[signature]; + } + $annc[text]="
$annc[atitle]

$annc[text]"; + $annclist.=threadpost($annc,$bg); + } + } + if($canpost){ + if($_GET[action]=='delete'){ + mysql_query("DELETE FROM announcements WHERE id=$id"); + $annclist.=" + $tccell1>Announcement deleted. +
".redirect("announcement.php?f=$f",'return to the announcements',0); + } + if($_GET[action]=='new'){ + if($log){ + $username=htmlspecialchars($loguser[name]); + $password=$logpassword; + } + $annclist=" +
+ $tccellh width=150> $tccellh>  + $tccell1>User name: $tccell2l>$inpt=username VALUE=\"$username\" SIZE=25 MAXLENGTH=25> + $tccell1>Password: $tccell2l>$inpp=password VALUE=\"$password\" SIZE=13 MAXLENGTH=32> + $tccell1>Announcement title:$tccell2l>$inpt=subject SIZE=70 MAXLENGTH=100> + $tccell1>Announcement: $tccell2l>$txta=message ROWS=20 COLS=$numcols> + $tccell1>  $tccell2l>$inph=action VALUE=postannc>$inph=f VALUE=$f> + $inps=submit VALUE=\"Post announcement\"> + $inps=preview VALUE=\"Preview announcement\">
+ "; + } + if($_GET[action]=='edit'){ + if(!$annc[headid]) $head=$annc[headtext]; + else $head=mysql_result(mysql_query("SELECT text FROM postlayouts WHERE id=$annc[headid]"),0,0); + if(!$annc[signid]) $sign=$annc[signtext]; + else $sign=mysql_result(mysql_query("SELECT text FROM postlayouts WHERE id=$annc[signid]"),0,0); + sbr(1,$annc[text]); + sbr(1,$head); + sbr(1,$sign); + $annclist=" +
+ $tccellh width=150> $tccellh>  + $tccell1>Announcement title:$tccell2l>$inpt=subject VALUE=\"$annc[title]\" SIZE=70 MAXLENGTH=100> + $tccell1>Header: $tccell2l>$txta=head ROWS=8 COLS=$numcols>$head + $tccell1>Announcement: $tccell2l>$txta=message ROWS=12 COLS=$numcols>$annc[text] + $tccell1>Signature: $tccell2l>$txta=sign ROWS=8 COLS=$numcols>$sign + $tccell1>  $tccell2l> + $inph=action VALUE=editannc> + $inph=f VALUE=$annc[forum]> + $inph=id VALUE=$id> + $inph=edited VALUE=\"$annc[edited]\"> + $inps=submit VALUE=\"Edit announcement\"> + $inps=preview VALUE=\"Preview announcement\">
+ "; + } + if($_POST[action]=='postannc'){ + $userid=checkuser($username,$password); + $user=@mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id=$userid")); + if($userid!=-1){ + $sign=$user[signature]; + $head=$user[postheader]; + if($user[postbg]) $head="
$head"; + $numposts=$user[posts]; + $numdays=(ctime()-$user[regdate])/86400; + $message=doreplace($message,$numposts,$numdays,$username); + $rsign=doreplace($sign,$numposts,$numdays,$username); + $rhead=doreplace($head,$numposts,$numdays,$username); + squot(0,$subject); + $currenttime=ctime(); + if($submit){ + if(!$f) $f=0; + $headid=getpostlayoutid($head); + $signid=getpostlayoutid($sign); + mysql_query("INSERT INTO `announcements` (`user`, `date`, `ip`, `title`, `forum`, `text`, `headid`, `signid`, `tagval`) VALUES ('$userid', '$currenttime', '$userip', '$subject', '$f', '$message', '$headid', '$signid', '$tagval')"); + $annclist=" + $tccell1>Thank you, $user[name], for posting your announcement.
+ ".redirect("announcement.php?f=$f","the announcements",0).""; + }else{ + loadtlayout(); + $ppost=$user; + $ppost[uid]=$userid; + $ppost[date]=$currenttime; + $ppost[headtext]=$rhead; + $ppost[signtext]=$rsign; + $ppost[text]="
". stripslashes($subject) ."

". stripslashes($message); + if($isadmin) $ip=$userip; + $annclist=" + + $tccellh>Announcement preview + $tblend$tblstart + ".threadpost($ppost,1)." + $tblend
$tblstart +
+ $tccellh width=150> $tccellh>  + $tccell1>Announcement title:$tccell2l>$inpt=subject SIZE=70 MAXLENGTH=100 VALUE=\"". stripslashes($subject) ."\"> + $tccell1>Announcement: $tccell2l>$txta=message ROWS=10 COLS=$numcols>". stripslashes($message) ." + $tccell1> $tccell2l> + $inps=submit VALUE=\"Submit announcement\"> + $inps=preview VALUE=\"Preview announcement\"> + $inph=username VALUE=\"".htmlspecialchars($username)."\"> + $inph=password VALUE=\"$password\"> + $inph=action VALUE=postannc> + $inph=f VALUE=$f> + + "; + } + }else + $annclist=" + $tccell1>Couldn't enter the announcement. You haven't entered the right username or password. + ".redirect('announcement.php','return to the announcements',0); + } + if($_POST[action]=='editannc'){ + print $tblstart; + $numposts=$loguser[posts]; + $numdays=(ctime()-$loguser[regdate])/86400; + $message=doreplace($message,$numposts,$numdays,$loguser[name]); + if($submit){ + $edited.="(edited by $loguser[name] on ".date("m-d-y h:i A",ctime()).")
"; + $headid=@mysql_result(mysql_query("SELECT id FROM postlayouts WHERE text='$head' LIMIT 1"),0,'id'); + $signid=@mysql_result(mysql_query("SELECT id FROM postlayouts WHERE text='$sign' LIMIT 1"),0,'id'); + if($headid) $head=''; else $headid=0; + if($signid) $sign=''; else $signid=0; + mysql_query("UPDATE announcements SET title='$subject', text='$message', headtext='$head', signtext='$sign', edited='$edited',headid=$headid,signid=$signid WHERE id=$id"); + $annclist=" + $tccell1>Thank you, ".$loguser[name].", for editing the announcement.
+ ".redirect("announcement.php?f=$f","go to the announcements",0); + }else{ + loadtlayout(); + $annc=mysql_fetch_array(mysql_query("SELECT * FROM announcements WHERE id=$id")); + $ppost=mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id=$annc[user]")); + $subject = stripslashes($subject); + $message = stripslashes($message); + $head = stripslashes($head); + $sign = stripslashes($sign); + $ppost[uid]=$annc[user]; + $ppost[date]=$annc[date]; + $ppost[tagval]=$annc[tagval]; + $ppost[headtext]=$head; + $ppost[signtext]=$sign; + $ppost[text]="
$subject

$message"; + if($isadmin) $ip=$annc[ip]; + $annclist=" + + $tccellh>Announcement preview + $tblend$tblstart + ".threadpost($ppost,1)." + $tblend
$tblstart +
+ $tccellh width=150> $tccellh>  + $tccell1>Announcement title:$tccell2l>$inpt=subject VALUE=\"$subject\" SIZE=70 MAXLENGTH=100> + $tccell1>Header: $tccell2l>$txta=head ROWS=4 COLS=$numcols>$head + $tccell1>Announcement: $tccell2l>$txta=message ROWS=6 COLS=$numcols>$message + $tccell1>Signature: $tccell2l>$txta=sign ROWS=4 COLS=$numcols>$sign + $tccell1> $tccell2l> + $inps=submit VALUE=\"Edit announcement\"> + $inps=preview VALUE=\"Preview announcement\"> + $inph=action VALUE=editannc> + $inph=id VALUE=$id> + $inph=f VALUE=$f> + + "; + } + } + $postnew="Post new announcement"; + } + print "$header +
$fonttag$boardname - Announcements$smallfont$postnew
+ $pagelinks$tblstart$annclist$tblend$pagelinks$footer + "; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/bku-thread.php b/bku-thread.php new file mode 100644 index 0000000..6fc86a8 --- /dev/null +++ b/bku-thread.php @@ -0,0 +1,279 @@ +Couldn't view the thread as it doesn't exist. +
Click here to return to the board, or wait to get redirected. + + $tblend + "; + print $footer; + if($stamptime){printtimedif($startingtime);} + exit; + } else { + $thread=mysql_fetch_array(mysql_query("SELECT * FROM threads WHERE id=$id")); + $forumid=$thread[forum]; + $forum=mysql_fetch_array(mysql_query("SELECT * FROM forums WHERE id=$forumid")); + + if($tnext=mysql_result(mysql_query("SELECT min(lastpostdate) FROM threads WHERE forum=$forumid AND lastpostdate>$thread[lastpostdate]"),0,0)) + $tnext=mysql_result(mysql_query("SELECT id FROM threads WHERE lastpostdate=$tnext"),0,0); + if($tprev=mysql_result(mysql_query("SELECT max(lastpostdate) FROM threads WHERE forum=$forumid AND lastpostdate<$thread[lastpostdate]"),0,0)) + $tprev=mysql_result(mysql_query("SELECT id FROM threads WHERE lastpostdate=$tprev"),0,0); + + if($tnext) $nextnewer="Next newer thread"; + if($tprev) $nextolder="Next older thread"; + if($nextnewer && $nextolder) $nextnewer.=' | '; + if(@mysql_fetch_array(mysql_query("SELECT * FROM favorites WHERE user=$loguserid AND thread=$id"))) + $favlink="Remove from favorites"; + else $favlink="Add to favorites"; + $favlink .= " | "RSS" Feed"; + if($nextnewer or $nextolder) $favlink.=' | '; + + mysql_query("UPDATE threads SET views=views+1 WHERE id=$id"); + $thread[title]=str_replace("<","<",$thread[title]); + $restricted = false; + if($forum[minpower]>$power and $forum[minpower]>0) { $thread[title]="(restricted)"; $restricted = true; } + $forumtitle="$forum[title]: "; + if($pl) { // special case for permalinks + $pl = (int)$pl; + if(!$ppp) $ppp=($log?$loguser[postsperpage]:20); + + // map all posts to a "page number" in an array + $posts2=mysql_query("SELECT p.id pid FROM posts p WHERE p.thread=$id ORDER BY p.id DESC"); + while($po=mysql_fetch_array($posts2)) { $postids[] = $po[pid]; } + sort($postids);$d=0;$p=0; + foreach ($postids as $anid) { + $postidisonpage['p'.$anid] = $p; // "p" first to avoid catching numerical indexes + $d++; if ($d==$ppp) { $p++; $d=0; } + } + + if (in_array('p'.$pl, array_keys($postidisonpage)) && !$restricted) { + $redir = "Location: thread.php?id=$id&ppp=$ppp&page=".$postidisonpage['p'.$pl]."#".$pl; + } else { + $redir = "Location: index.php"; + } + //print $redir; + header($redir); + exit; + } + } + }elseif($user){ + $usr=$user; + $tuser=mysql_fetch_array(mysql_query("SELECT name FROM users WHERE id=$usr")); + $thread[title]="Posts by $tuser[name]"; + }elseif($search) $thread[title]="Search results"; + + $windowtitle="$boardname -- $forumtitle$thread[title]"; + require_once 'lib/layout.php'; + if($id) $fonline=fonlineusers($forumid); + if(@mysql_num_rows(mysql_query("SELECT user FROM forummods WHERE forum=$forumid and user=$loguserid"))) $ismod=1; + if(($id && $ismod && (!$thread[locked] || !$bconf[lockable])) || ($id && $isadmin)){ + $trashid=20; + if($qmod){ + $verb='editing'; + mysql_query("INSERT INTO actionlog (atime, adesc, aip) VALUES (".ctime().", \"User ".$loguserid." edited thread $id\", \"$userip\")"); + if($st!='') mysql_query("UPDATE threads SET sticky=$st WHERE id=$id"); + if($cl!='') mysql_query("UPDATE threads SET closed=$cl WHERE id=$id"); + if($lo!='' && $isadmin) { mysql_query("UPDATE threads SET locked=$lo WHERE id=$id"); mysql_query("INSERT INTO actionlog (atime, adesc, aip) VALUES (".ctime().", \"User ".$loguserid." ".($lo!=1?"un":"")."locked thread $id\", \"$userip\")"); } + if($trash){ + mysql_query("INSERT INTO actionlog (atime, adesc, aip) VALUES (".ctime().", \"User ".$loguserid." trashed thread $id\", \"$userip\")"); + mysql_query("UPDATE threads SET sticky=0,closed=1,forum=$trashid WHERE id=$id"); + $numposts=$thread[replies]+1; + $t1=mysql_fetch_array(mysql_query("SELECT lastpostdate,lastposter FROM threads WHERE forum=$forumid ORDER BY lastpostdate DESC LIMIT 1")); + $t2=mysql_fetch_array(mysql_query("SELECT lastpostdate,lastposter FROM threads WHERE forum=$trashid ORDER BY lastpostdate DESC LIMIT 1")); + mysql_query("UPDATE forums SET numposts=numposts-$numposts,numthreads=numthreads-1,lastpostdate=$t1[lastpostdate],lastpostuser=$t1[lastposter] WHERE id=$forumid"); + mysql_query("UPDATE forums SET numposts=numposts+$numposts,numthreads=numthreads+1,lastpostdate=$t2[lastpostdate],lastpostuser=$t2[lastposter] WHERE id=$trashid"); + $verb='trashing'; + } + print " + $header$tblstart + $tccell1>Thank you, $loguser[name], for $verb this thread.
". + redirect("forum.php?id=$forumid",'return to the forum',0)." + $tblend$footer + "; + if($stamptime){printtimedif($startingtime);} + exit; + }else{ + $fulledit="Edit thread"; + $link="Delete"; + if ($lock != "") { $lock = " | $lock"; } + $modfeats="$tccellcls colspan=2>Moderating options: $stick | $close$lock$trash -- $fulledit"; + } + } + if($thread[poll]){ + $poll=mysql_fetch_array(mysql_query("SELECT * FROM poll WHERE id=$thread[poll]")); + $voted=@mysql_result(mysql_query("SELECT count(*) FROM pollvotes WHERE poll=$poll[id] AND user=$loguserid"),0,0); + if($action=='vote' and $loguserid and (!$voted or $poll[doublevote]) and !$poll[closed] and ($power>=$forum[minpower])){ + mysql_query("INSERT INTO pollvotes (poll,choice,user) VALUES ($poll[id],$choice,$loguserid)"); + $voted++; + } + $tvotes=mysql_result(mysql_query("SELECT count(*) FROM pollvotes WHERE poll=$poll[id]"),0,0); + if(!$tvotes) $tvotes=1; + $pollcs=mysql_query("SELECT * FROM poll_choices WHERE poll=$poll[id]"); + $votedfor = array(); + while($pollc=mysql_fetch_array($pollcs)){ + $votes=mysql_result(mysql_query("SELECT count(*) FROM pollvotes WHERE choice=$pollc[id]"),0,0); + if ($loguserid) { + $chvq = "SELECT user FROM pollvotes WHERE poll=".$poll['id']." AND choice=".$pollc['id']." AND user=".$loguserid; + if (mysql_num_rows(mysql_query($chvq))>0) $votedfor[$pollc['id']] = 1; +// print $chvq; + } + $pct=sprintf('%02.1f',$votes/$tvotes*100); + $barpart="
 
"; + if(!$votes) $barpart=' '; + $s=($votes>1?'s':''); + $link=''; + if($loguserid and (!$voted or $poll[doublevote]) and !$poll[closed]) { if (!($poll[doublevote] and $votedfor[$pollc['id']])) { $link=""; } } + $choices.=" + $tccell1l width=20%>$link$pollc[choice] + $tccell2l width=60%>$barpart + $tccell1 width=20%>$pct%, $votes vote$s + "; + } + $mlt='disabled'; + if($poll[doublevote]) $mlt='enabled'; + if($ismod or $thread[user]==$loguserid) $polledit=" | Edit"; + $polltbl=" + $tccellc colspan=3>$poll[question] + ".(trim($poll[briefing])==""?"":"$tccell2ls colspan=3>$poll[briefing] + ")."$choices + $tccell2l colspan=3>$smallfont Multi-voting ".($poll[closed]?"was":"is")." $mlt.".($poll[closed]?" This poll is closed.":"")."$polledit + $tblend
$tblstart + "; + } + + loadtlayout(); + if($loguser[viewsig]==0) $sfields=''; + if($loguser[viewsig]==1) $sfields=',headtext,signtext'; + if($loguser[viewsig]==2) $sfields=',u.postheader headtext,u.signature signtext'; + $ufields=userfields(); + + $activity=mysql_query("SELECT user, count(*) num FROM posts WHERE date>".(ctime()-86400)." GROUP BY user"); + while($n=mysql_fetch_array($activity)) $act[$n[user]]=$n[num]; + $postlist=" + $polltbl + $modfeats + $tccellh width=150>User + $tccellh>Post + "; + if(!$ppp) $ppp=($log?$loguser[postsperpage]:20); + if($id && $power<$forum[minpower]){ + print " + $header$tblstart + $tccell1>Couldn't enter the forum. Either you don't have access to this restricted forum, or you are not logged in. +
Click here to return to the board, or wait to get redirected. + + $tblend + "; + }else{ + $min=$ppp*$page; + if($id) + $posts=mysql_query("SELECT p.*,text$sfields,edited,tagval,u.id uid,name,$ufields,regdate FROM posts p,posts_text LEFT JOIN users u ON p.user=u.id WHERE thread=$id AND p.id=pid ORDER BY p.id LIMIT $min,$ppp"); + elseif($usr){ + $thread[replies]=mysql_result(mysql_query("SELECT count(*) FROM posts WHERE user=$usr"),0,0)-1; + $posts=mysql_query("SELECT p.*,text$sfields,edited,tagval,u.id uid,name,$ufields,regdate FROM posts p,posts_text LEFT JOIN users u ON p.user=u.id WHERE user=$usr AND p.id=pid ORDER BY p.id LIMIT $min,$ppp"); + }elseif($search){ + if($loguser[powerlevel]>=$bconf[searchfunction]){ + if($quser){ + $user=mysql_fetch_array(mysql_query("SELECT id FROM users WHERE name='".addslashes($quser)."'")); + $u=$user[id]; + $srch.=($srch?"AND ":"")."posts.user=$u"; + } + if($qip) $srch.=($srch?" AND ":"")."ip LIKE '$qip'"; + if($qmsg) $srch.=($srch?" AND ":"")."text LIKE '%".addslashes($qmsg)."%'"; + if($dopt==1) $srch.=($srch?" AND ":"")."date>".(ctime()-86400*$datedays); + if($dopt==2){ + $date1=mktime(0,0,0,$d1m,$d1d,$d1y); + $date2=mktime(0,0,0,$d2m,$d2d,$d2y)+86400; + $srch.=($srch?" AND ":"")."date>$date1 AND date<$date2"; + } + if($pord) $order=" ORDER BY id".($pord==2?" DESC":""); + if(!$fsch){ + $posts=mysql_query("SELECT id,user,date,thread,ip,text,num$signquery,edited FROM posts,posts_text WHERE $srch AND id=pid $order LIMIT $min,$ppp"); + $thread[replies]=mysql_result(mysql_query("SELECT COUNT(*) FROM posts,posts_text WHERE $srch AND id=pid"),0,0); + }else{ + $posts=mysql_query("SELECT posts.id,posts.user,date,thread,ip,text,num$signquery,edited FROM posts,posts_text,threads WHERE $srch AND thread=threads.id AND forum=$fid AND id=pid $order LIMIT $min,$ppp"); + $thread[replies]=mysql_result(mysql_query("SELECT COUNT(*) FROM posts,posts_text,threads WHERE $srch AND thread=threads.id AND forum=$fid AND id=pid"),0,0); + } + $quser=str_replace(" ","+",$quser); + $qip=str_replace(" ","+",$qip); + $qmsg=str_replace(" ","+",$qmsg); + } + else{ + print " + $tccell1 Couldn't access search. You do not have sufficient rights to access search.
+ ".redirect("index.php",'return to the main page',0); + } + } + for($i=0;$post=mysql_fetch_array($posts);$i++){ + $bg=$i%2+1; + $postlist.=''; + $quote='Link'; + $edit=''; + if($id and !$thread[closed]) $quote.=" | Quote"; + $deletelink="Delete"; + if(($ismod or $post[user]==$loguserid) and !$thread[closed]) $edit=($quote?' | ':'')."Edit".(($i==0&&!$ismod&&$page==0)?"":" | $deletelink"); + if($isadmin) $ip=(($edit||strpos($quote," | ") == false)?' | ':'')."IP: $post[ip] (SS | Arin)"; + if(!$id){ + $pthread=mysql_fetch_array(mysql_query("SELECT id,title,forum FROM threads WHERE id=$post[thread]")); + $pforum=@mysql_fetch_array(mysql_query("SELECT minpower FROM forums WHERE id=$pthread[forum]")); + } + $post[act]=$act[$post[user]]; + if($pforum[minpower]<=$power or !$pforum[minpower]) $postlist.=threadpost($post,$bg,$pthread); + else $postlist.="$tccellc colspan=2>$fonttag (restricted)"; + } + $query=preg_replace("'page=([0-9].*)'si",'','?'.getenv("QUERY_STRING")); + if($query AND substr($query,-1)!="&") $query.="&"; + if(!$page) $page=0; + $pagelinks="Pages:"; + for($i=0;$i<(($thread[replies]+1)/$ppp);$i++){ + if($i==$page) $pagelinks.=" ".($i+1); + else $pagelinks.=" ".($i+1).""; + } + if($thread[replies]<$ppp) $pagelinks=''; + $header = str_replace("", "", $header); + print + $header.sizelimitjs()." + $tblstart$tccell1s>$fonline$tblend +
$fonttag$boardname - $forum[title] - $thread[title]$smallfont + "; + if($forumid>-1){ + print "$newpollpic | "; + print "$newthreadpic"; + if(!$thread[closed]) print " | $newreplypic"; + else print " | Thread closed"; + } + print "
$smallfont$pagelinks$smallfont$favlink$nextnewer$nextolder
+ $tblstart + "; + print "$postlist$modfeats$tblend +
$smallfont$pagelinks$smallfont$favlink$nextnewer$nextolder
+
$fonttag$boardname - $forum[title] - $thread[title]$smallfont + "; + if($forumid){ + print "$newthreadpic"; + if(!$thread[closed]) print " | $newreplypic"; + else print " | Thread closed"; + } + print "
"; + } + print $footer; + if($stamptime){printtimedif($startingtime);} +?> diff --git a/calendar.php b/calendar.php new file mode 100644 index 0000000..271d048 --- /dev/null +++ b/calendar.php @@ -0,0 +1,82 @@ +'January','February','March','April','May','June','July','August','September','October','November','December'); + $date=getdate(time()); + $year=$date[year]; + $month=$date[mon]; + $day=$date[mday]; + if($y) $year=$y; + if($m){ + $month=$m; + $day=0; + } + if($d) $day=$d; + if($event){ + $event=mysql_fetch_array(mysql_query("SELECT id,d,m,y,user,title,text FROM events WHERE id=$event")); + $month=$event[m]; + $day=$event[d]; + $year=$event[y]; + $user=mysql_fetch_array(mysql_query("SELECT name FROM users WHERE id=$event[user]")); + $eventbox=" + $tccellh colspan=7>$mn[$month] $day, $year: $event[title] - $user[name] + $tccell1 colspan=7>$event[text] + "; + } + $date=getdate(mktime(0,0,0,$month,1,$year)); + $i=1-$date[wday]; + $date=getdate(mktime(0,0,0,$month+1,0,$year)); + $max=$date[mday]; + $users=mysql_query('SELECT id,name,birthday,sex,powerlevel FROM users WHERE birthday ORDER BY name'); + while($user=mysql_fetch_array($users)){ + $date=@getdate($user[birthday]); + if($date[mon]==$month){ + $dd=$date[mday]; + $age=$year-$date[year]; + $namecolor=getnamecolor($user[sex],$user[powerlevel]); + $bdaytext[$dd].="
- $user[name] turns $age"; + } + } + $events=mysql_query("SELECT id,d,title FROM events WHERE m=$month AND y=$year ORDER BY id"); + while($event1=mysql_fetch_array($events)) + $eventtext[$event1[d]].="
- $event1[title]"; + print "$header$fonttag$boardname - Calendar + $tblstart + $eventbox + $tccellh colspan=7>$mn[$month] $year + $tccellh width=14.3%>S + $tccellh width=14.3%>M + $tccellh width=14.3%>T + $tccellh width=14.3%>W + $tccellh width=14.3%>T + $tccellh width=14.3%>F + $tccellh width=14.2%>S"; + for(;$i<=$max;$i+=7){ + for($dn=0;$dn<=6;$dn++){ + $dd=$i+$dn; + $daytext="$dd"; + if($dd<1 or $dd>$max) $daytext=""; + $tccell=$tccell1l; + $width=" width=14.3%"; + $x=" valign=top height=80>"; + $end=""; + if($dn==0 or $dn==6) $tccell=$tccell2l; + if($dd==$day and $day!=0) $tccell=$tccellcl; + if($dn==6) $end=''; + print "$tccell$width$x$daytext
$bdaytext[$dd]$eventtext[$dd]$end"; + } + } + for($i=1;$i<=12;$i++){ + if($i==$month) $monthlinks.=" $i"; + else $monthlinks.=" $i"; + } + for($i=$year-2;$i<=$year+2;$i++){ + if($i==$year) $yearlinks.=" $i"; + else $yearlinks.=" $i"; + } + print " + $tccell2 colspan=7>$smallfont
Month:$monthlinks | Year:$yearlinks + $tblend + $footer"; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/colorsx.php b/colorsx.php new file mode 100644 index 0000000..e24a601 --- /dev/null +++ b/colorsx.php @@ -0,0 +1,32 @@ +'888888','97ACEF','D8E8FE','AFFABE','FFEA95'); + $nmcol[1]=array('-1'=>'888888','F185C9','FFB3F3','C762F2','C53A9E'); + $nmcol[2]=array('-1'=>'888888','7C60B0','EEB9BA','47B53C','F0C413'); + $nmcol[147]=array('-1'=>'888888','888888','888888','888888','888888'); + $nmcol[148]=array('-1'=>'FFEA95','FFEA95','FFEA95','FFEA95','FFEA95'); + $nmcol[149]=array('-1'=>'97ACEF','97ACEF','97ACEF','97ACEF','97ACEF'); +// $nmcol[0]=array('-1'=>'888888','6AC061','90E090','AFFABE','FFEA95'); +// $nmcol[1]=array('-1'=>'888888','FB6060','FFB3F3','C762F2','C53A9E'); +// $nmcol[2]=array('-1'=>'888888','7C60B0','EEB9BA','47B53C','F0C413'); + $linkcolor='FFD040'; + $linkcolor2='F0A020'; + $linkcolor3='FFEA00'; + $linkcolor4='FFFFFF'; + $textcolor='E0E0E0'; + $boardtitle=''; + $font='arial'; + $font2='verdana'; + $font3='tahoma'; + $newpollpic='New poll'; + $newreplypic=''; + $newthreadpic=''; + $newpic=''; + $numdir='num1/'; + $numfil='numnes'; + if(!$scheme) $scheme=0; + $filename=@mysql_result(mysql_query("SELECT file FROM schemes WHERE id=$scheme"),0,0); + if(!$filename) $filename='dailycycle.php'; + require "schemes/$filename"; +?> \ No newline at end of file diff --git a/del.php b/del.php new file mode 100644 index 0000000..ebc98aa --- /dev/null +++ b/del.php @@ -0,0 +1,63 @@ +
===================
[Posted by $name]
"; + $ups=mysql_query("SELECT id FROM posts WHERE user=$id"); + while($up=mysql_fetch_array($ups)) mysql_query("UPDATE posts_text SET signtext=CONCAT_WS('','$line',signtext) WHERE pid=$up[id]") or print mysql_error(); + mysql_query("UPDATE threads SET user=4 WHERE user=$id"); + mysql_query("UPDATE threads SET lastposter=4 WHERE lastposter=$id"); + mysql_query("UPDATE privatemsg SET userfrom=4 WHERE userfrom=$id"); + mysql_query("UPDATE privatemsg SET userto=4 WHERE userto=$id"); + mysql_query("UPDATE posts SET user=4,headid=0,signid=0 WHERE user=$id"); + mysql_query("UPDATE users SET posts=posts WHERE user=4"); + mysql_query("DELETE FROM userratings WHERE userrated=$id OR userfrom=$id"); + mysql_query("DELETE FROM users WHERE id=$id"); + mysql_query("DELETE FROM users_rpg WHERE uid=$id"); + } + } + print " + $header
+
$tblstart + User id to delete: + + Select users with posts + $tblend
+ "; + if(!$p) $p=0; + $users=mysql_query("SELECT id,name,regdate,lastposttime,lastactivity,lasturl,lastip,sex,powerlevel FROM users WHERE posts=$p ORDER BY lastactivity DESC"); + print " + $tblstart + + $tccellh>id + $tccellh>Name + $tccellh>Regdate + $tccellh>Last post + $tccellh>Last activity + $tccellh>Last URL + $tccellh>IP + "; + while($user=mysql_fetch_array($users)){ + $namecolor=getnamecolor($user[sex],$user[powerlevel]); + $lastpost='-'; + if($user[lastposttime]) $lastpost=date($dateformat,$user[lastposttime]); + print " + + $tccell1>$user[id] + $tccell2>$user[name] + $tccell1 width=120>".date($dateformat,$user[regdate])." + $tccell1 width=120>$lastpost + $tccell1 width=120>".date($dateformat,$user[lastactivity])." + $tccell2>$user[lasturl]  + $tccell2>$user[lastip] + "; + } + print $tblend.$footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/delpost.php b/delpost.php new file mode 100644 index 0000000..28cad1a --- /dev/null +++ b/delpost.php @@ -0,0 +1,24 @@ +Delete Post +$css +
+ + +
+
+ $tblstart + $tccell1 +
+ Are you sure you want to delete this post? + + + + +
$inps=submit VALUE=\"Yes\">
$inps=submit onClick=\"javascript:window.close();\" VALUE=\"No\">
+ $tblend +
+"; +?> diff --git a/editlayout.php b/editlayout.php new file mode 100644 index 0000000..d96ac9b --- /dev/null +++ b/editlayout.php @@ -0,0 +1,119 @@ +$smallfont
 "; + + $inpc='sample
text)"; + } + if ($_POST[showblockquote]) { + $sampletext = "
$smallfontOriginally posted by Someone
" . $sampletext . "
" . $sampletext; + } + if ($_POST[showstretchimage]) { + $sampletext .= ""; + } + + if ($_POST[showstretchtext]) { + $sampletext .= "

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam luctus augue blandit nisl. Etiam id lacus sed ante pulvinar euismod. Maecenas neque quam, scelerisque sed, semper id, vulputate a, eros. Suspendisse mauris erat, condimentum in, pellentesque nec, lobortis vitae, elit. Nunc nec elit quis augue viverra consequat. In eget augue. Aliquam erat volutpat. Nulla blandit massa sed velit. Quisque nonummy consectetuer lacus. Aliquam egestas augue sit amet nulla. In diam leo, lacinia eget, convallis sed, pellentesque eu, velit. Nullam sem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

+ +Morbi rhoncus lectus id leo lacinia blandit. Fusce felis dolor, ullamcorper id, venenatis at, rhoncus feugiat, odio. Suspendisse et nulla eget lectus iaculis elementum. Suspendisse at felis non lectus blandit commodo. Morbi volutpat. Sed eget elit nec libero lobortis consequat. Duis eget magna gravida odio pellentesque venenatis. Maecenas ligula lorem, pellentesque ut, consequat et, commodo et, est. In dictum purus ac lorem. Vestibulum vel felis. In erat. Mauris sit amet est elementum ligula adipiscing vulputate. Curabitur ultrices dolor sagittis neque. Aenean adipiscing odio non lorem. Integer non odio. Nam libero. Vivamus posuere, lorem rutrum iaculis aliquet, metus nibh elementum neque, lacinia eleifend wisi libero vitae tellus. Aenean varius mauris in ipsum.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam luctus augue blandit nisl. Etiam id lacus sed ante pulvinar euismod. Maecenas neque quam, scelerisque sed, semper id, vulputate a, eros. Suspendisse mauris erat, condimentum in, pellentesque nec, lobortis vitae, elit. Nunc nec elit quis augue viverra consequat. In eget augue. Aliquam erat volutpat. Nulla blandit massa sed velit. Quisque nonummy consectetuer lacus. Aliquam egestas augue sit amet nulla. In diam leo, lacinia eget, convallis sed, pellentesque eu, velit. Nullam sem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

+ +Morbi rhoncus lectus id leo lacinia blandit. Fusce felis dolor, ullamcorper id, venenatis at, rhoncus feugiat, odio. Suspendisse et nulla eget lectus iaculis elementum. Suspendisse at felis non lectus blandit commodo. Morbi volutpat. Sed eget elit nec libero lobortis consequat. Duis eget magna gravida odio pellentesque venenatis. Maecenas ligula lorem, pellentesque ut, consequat et, commodo et, est. In dictum purus ac lorem. Vestibulum vel felis. In erat. Mauris sit amet est elementum ligula adipiscing vulputate. Curabitur ultrices dolor sagittis neque. Aenean adipiscing odio non lorem. Integer non odio. Nam libero. Vivamus posuere, lorem rutrum iaculis aliquet, metus nibh elementum neque, lacinia eleifend wisi libero vitae tellus. Aenean varius mauris in ipsum."; + } + + + + $thehtmlpreview = $headershowoff . $sampletext . ($signatureshowoff != "" ? $signatureshowoff : $signatureshowoff); + $p = $loguser; + $p[text] = $sampletext; + $p[headtext] = "
".$headershowoff; + $p[signtext] = ($signatureshowoff != "" ? $signatureshowoff : $signatureshowoff)."
"; + $p[user] = $loguserid; + $p[id] = $loguserid; + $p[uid] = $loguserid; + $p[date] = time(); + $bg=$bg%2+1; + loadtlayout(); + $thehtml = threadpost($p,$bg); + if ($loguser[postbg]) { + $thehtmlpreview = "
" . $thehtmlpreview . "
"; + } + + $showt = array('blockquote' => 'Quotes', + 'link' => 'Links', + 'stretchimage' => 'Stretch with image', + 'stretchtext' => 'Stretch with text', + ); +// connecting these via the js + $showjshook = " onclick=\"refreshLayoutPreview(document); return false\""; +// $typejshook = " onfocus=\"refreshLayoutPreview(document)\""; + foreach($showt as $nam=>$des) { + if ($showoptions != "") { $showoptions .= "   "; } + $showoptions .= "$inpc=\"show".$nam."\" id=\"show-".$nam."\"" . ($_POST["show".$nam] ? " checked" : ""). ">"; + } + $showoptions = "
$showoptions
"; + + $annclist=""; + print " + $header
$tblstart +
$inph=signsep id=\"signsep\" value=\"".$sep[$loguser[signsep]]."\"> + $tccellh> Post layout$tccellh>  + $tccell1 width=\"35%\">Post background:$descbr The full URL of a picture showing up in the background of your posts. Leave it blank for no background. Please make sure your text is readable on the background! + $tccell2l>$inpt=postbg VALUE=\"$loguser[postbg]\" id=\"postbg\" SIZE=60 MAXLENGTH=250$typejshook> + $tccell1 width=\"35%\">Post header:$descbr This will get added before the start of each post you make. This can be used to give a default font color and face to your posts (by putting a <font> tag). This should preferably be kept small, and not contain too much text or images. + $tccell2l>$txta=postheader id=\"postheader\" ROWS=5 COLS=60$typejshook>$loguser[postheader] + $tccell1 width=\"35%\">Signature:$descbr This will get added at the end of each post you make, possibly below an horizontal line. This should preferably be kept to a small enough size. + $tccell2l>$txta=postsign id=\"postsign\" ROWS=5 COLS=60$typejshook>$loguser[signature] + $tccellh width=\"35%\"> Layout preview$tccell1>$smallfont$showoptions$inps=preview id=\"preview-button\" onclick=\"if (loaded==1) return false;\" VALUE=\"Preview\"> + $tccell1 colspan=\"2\">$tblstart + ". // $tccellh width=150>$tccellh colspan=2> +/* $tccell1 width=\"35%\" valign=\"top\">Show:$descbr + $tccell2l>
$thehtmlpreview
*/ + $thehtml."$tblend + $tccellh width=\"35%\"> $tccellh id=\"dataloaderhouse\">  + $tccell2l width=\"35%\"> $tccell2l> + $inph=action VALUE=savelayout> + $inph=userid VALUE=$userid> + $inph=userpass VALUE=\"$loguser[password]\"> + $inps=submit VALUE=\"Edit layout\"> + $tblend + "; + } + + if($action=='savelayout' && $submit){ + sbr(0,$postheader); + sbr(0,$postsign); + mysql_query("UPDATE users SET signature='".addslashes($postsign)."',postbg='".addslashes($postbg)."',postheader='".addslashes($postheader)."' WHERE id=$loguserid AND password='".addslashes($userpass)."'"); + print "$header
$tblstart$tccell1>Thank you, $loguser[name], for editing your layout.
".redirect("profile.php?id=$loguserid",'view your profile',0).$tblend; + } + print $footer; + if($stamptime){printtimedif($startingtime);} +?> diff --git a/editmods.php b/editmods.php new file mode 100644 index 0000000..f09cc31 --- /dev/null +++ b/editmods.php @@ -0,0 +1,154 @@ + ERROR: $err."; + } + else{ + mysql_query("INSERT INTO actionlog (atime, adesc, aip) VALUES (".ctime().", \"User ".$loguserid." removed mod $removemoduser from forum $removemodforum\", \"$userip\")"); + print "$tblstart$tccell1> You successfully deleted user $removemoduser from forum $removemodforum. +".redirect("editmods.php",'go back to Edit Mods',5); + } + break; + case "add": + $admquery = "INSERT INTO forummods VALUES('$addmodforum', '$addmoduser')"; + mysql_query($admquery); + $err=mysql_error(); + if($err!=""){ + print "$tblstart$tccell1> ERROR: $err."; + } + else{ + mysql_query("INSERT INTO actionlog (atime, adesc, aip) VALUES (".ctime().", \"User ".$loguserid." added mod $addmoduser to forum $addmodforum\", \"$userip\")"); + print "$tblstart$tccell1> You successfully added user $addmoduser to forum $addmodforum. +".redirect("editmods.php",'go back to Edit Mods',5); + } + break; + default: + print "No, doofus."; + } +} + +if (!$donotprint) { +$forums=mysql_query("SELECT id,title,description,catid FROM forums ORDER BY catid"); +$fa=""; +$forumselect=" +"; +$forumselectforrem = " +"; + while($forum=mysql_fetch_array($forums)){ + $m=0; + $modlist=""; + $forumselect.=""; + $mods=mysql_query("SELECT user FROM forummods WHERE forum=$forum[id]"); + if($mods){ + while($mod=mysql_fetch_array($mods)){ + $usermod=mysql_query("SELECT sex,powerlevel,name,id from users where id=$mod[user]"); + $usermod=mysql_fetch_array($usermod); + if($m) $modlist.=", "; + $user=$users[$mod[user]]; + $namecolor=getnamecolor($usermod[sex],$usermod[powerlevel]); + $modlist.=" +$usermod[name]"; + $forumselectforrem.=" +"; + $m++; + } + } + if ($m) $fa.=" +$forum[id] + $forum[title] + $modlist +"; +} + +$userlist = " +"; + $users1=mysql_query("SELECT `id`, `name` FROM `users` WHERE `powerlevel` > '0' ORDER BY `name`"); + while($user=mysql_fetch_array($users1)){ + $users[$user[id]]=$user; + $userlist.=" +"; + } + + +print " + +
$tblstart +ID +Forum Name +Moderators$fa$tblend + +
$inph=\"action\" value=\"add\">
$tblstart". +/* + $tccellh>$smallfont Delete a mod. + $tccellh>$smallfont Add Moderator. + + + + $tccell1> User ID: +$tccell1> User ID: + + + $tccell1> Forum ID: +$tccell1> Forum ID: + + + $tccell1> +$tccell1> */ +"$tccellh colspan=\"2\">Add Moderator: +$tccell1 width=15%>Forum:$tccell2l width=85%> +$tccell1 width=15%>User:$tccell2l width=85%> $smallfont(note: this only shows local moderators and above)
+$tccell1 width=15%> $tccell2l width=85%>$inps=\"addmodsubmit\" value=\"Add Moderator\">$tblend" +. + +/* + $tccellh>$smallfont Delete a mod. + $tccellh>$smallfont Add Moderator. + + + + $tccell1> User ID: +$tccell1> User ID: + + + $tccell1> Forum ID: +$tccell1> Forum ID: + + + $tccell1> +$tccell1> */ +($forumselectforrem!=""?"
$inph=\"action\" value=\"remove\">$tblstart"."$tccellh colspan=\"2\">Remove Moderator: +$tccell1 width=15%>Forum and Moderator:$tccell2l width=85%> +$tccell1 width=15%> $tccell2l width=85%>$inps=\"removemodsubmit\" value=\"Remove Moderator\">$tblend
":""); + +} + +} else { print "$tblstart$tccell1> Not an Admin"; + +} + +print $footer; +printtimedif($startingtime); + +?> diff --git a/editpoll.php b/editpoll.php new file mode 100644 index 0000000..f6c7d54 --- /dev/null +++ b/editpoll.php @@ -0,0 +1,325 @@ +$tblstart"; + if(@mysql_num_rows($mods)) $ismod=1; + $pollexists = 0; + $pollq=mysql_query("SELECT id,question,briefing,closed,doublevote FROM poll WHERE id=".$thread['poll']); + if(@mysql_num_rows($pollq)) $pollexists=1; + if( + ( + (!$action && $ismod && + (!$thread[locked] || !$bconf[lockable]) + ) + || + (!$action && $isadmin) + || + (!$action && $thread[user] == $loguserid && !$thread[closed]) + ) && $pollexists) + { + + $poll=mysql_fetch_array($pollq); + + $pollc=mysql_query("SELECT id,choice,color FROM poll_choices WHERE poll=".$thread['poll']); + $choices = ""; $votedfor = 0; + while($ch=mysql_fetch_array($pollc)) { + $voted = 0; $numvotes = 0; + $chvq = "SELECT user FROM pollvotes WHERE poll=".$thread['poll']." AND choice=".$ch['id']; + print ""; + $chv=mysql_query($chvq); + if(@mysql_num_rows($chv)) { $voted=1; $numvotes = mysql_num_rows($chv); } + if ($choices!="") $choices .= "
"; + $choices.="$inpt=\"choice[".$ch['id']."]\" value=\"".htmlentities($ch['choice'])."\"> (Color: $inpt=\"choicecolor[".$ch['id']."]\" value=\"".htmlentities($ch['color'])."\" size=6 maxlength=6>)"; + if (!$voted) $choices.="    Remove"; + else { $choices.="   $numvotes vote".($numvotes!=1?"s":""); $votedfor = 1; } + } + if ($votedfor) { $choices.="

(Choices that have been voted for can't be removed.)"; } + $newchoices = "
$inpt=\"choiceadd[]\"> (Color: $inpt=\"choicecoloradd[]\" size=6 maxlength=6>)    Add
"; + + $thread[icon]=str_replace("","",$thread[icon]); + $customicon=$thread[icon]; + for($i=0;$posticons[$i];){ + $posticons[$i]=str_replace($br,"",$posticons[$i]); + if($thread[icon]==$posticons[$i]){ + $checked='checked=1'; + $customicon=''; + } + $posticonlist.="    "; + $i++; + if($i%10==0) $posticonlist.='
'; + $checked=''; + } + if(!$thread[icon]) $checked='checked=1'; + $posticonlist.=" +
$radio=iconid value=-1 $checked>  None     + Custom: $inpt=custposticon VALUE='$customicon' SIZE=40 MAXLENGTH=100> + "; + $check1[$poll[closed]]='checked=1'; + $check2[$poll[doublevote]]='checked=1'; + $forums=mysql_query("SELECT id,title FROM forums WHERE minpower<=$power ORDER BY forder"); + while($forum=mysql_fetch_array($forums)){ + $checked=''; + if($thread[forum]==$forum[id]) $checked='selected'; + $forummovelist.=""; + } + + $onsubmithook = '="if(usingBetterWay){startGather();return false;}else{alert(\'was going to post\');return false;}"'; + print " +
+ $tccellh colspan=2>Editing poll for thread ".($thread[icon]!=""?" ":"").$thread['title']." + $tccell1>Poll question: $tccell2l>$inpt=pollqu VALUE=\"$poll[question]\" SIZE=40 MAXLENGTH=100> + $tccell1>Poll briefing: $tccell2l>$inpt=pollbr VALUE=\"$poll[briefing]\" SIZE=40 MAXLENGTH=100> + $tccell1>Poll status: $tccell2l>$radio=pollclosed value=0 $check1[0]> Open   $radio=pollclosed value=1 $check1[1]>Closed + $tccell1>Multiple voting: $tccell2l>$radio=polldbl value=0 $check2[0]> Disabled   $radio=polldbl value=1 $check2[1]>Enabled + $tccell1>Choices: $tccell2l>$choices + $tccell1>New choices: $tccell2l>$newchoices +"./* $tccell1>Forum $tccell2l> Delete thread*/" + $tccell1> $tccell2l> + $inph=action VALUE=editpoll>$inph=id VALUE=$id> + $inps=doedit onclick$onsubmithook VALUE=\"Edit poll\">
+ $tblend + "; + } + if($_POST[action]=='editpoll'){ + if(($ismod && (!$thread[locked] || !$bconf[lockable])) || ($isadmin) || ($thread[user] == $loguserid && !$thread[closed])){ + print " + $tccell1>Thank you, $loguser[name], for editing the poll.
+ "; + if (!is_debug()) { print redirect("thread.php?id=$id",'return to the thread',0); } + + debugprint("$tblend$tblstart$tccellh>Edit poll debug data$tccell1l>
");
+
+      $divisor = "----------------------------------";
+
+	  $ch = $co = "";
+	  debugprint("WOULD HAVE INSERTED:

"); + + if($createdWithPassthru == "yes") { + if (is_array($choiceaddjs)) { + debugprint("JAVASCRIPT INSERTS:
------
"); + foreach($choiceaddjs as $i=>$ch) { + $co = $choicecoloraddjs[$i]; // cleaning poll color: + $co = preg_replace("'^#(.*?)$'", "\\1", $co); // remove prefix # if given + $co = preg_replace("'[^a-zA-Z0-9]'", "", $co); // only alphanumerics, please + $co = substr($co, 0, 6); // and cut at six chars of length + debugprint("INSERT INTO poll_choices (id,poll,choice,color) VALUES (NULL,".$thread['poll'].",'".addslashes(stripslashes($ch))."','".addslashes(stripslashes($co))."')
"); + mysql_query("INSERT INTO poll_choices (id,poll,choice,color) VALUES (NULL,".$thread['poll'].",'".addslashes(stripslashes($ch))."','".addslashes(stripslashes($co))."')"); + } + } + } else { + if (is_array($choiceadd) && $choiceadddoadd) { + debugprint("NON-JAVASCRIPT INSERTS:
------
"); + foreach($choiceadd as $i=>$ch) { + $co = $choicecoloradd[$i]; // cleaning poll color: + $co = preg_replace("'^#(.*?)$'", "\\1", $co); // remove prefix # if given + $co = preg_replace("'[^a-zA-Z0-9]'", "", $co); // only alphanumerics, please + $co = substr($co, 0, 6); // and cut at six chars of length + debugprint ("INSERT INTO poll_choices (id,poll,choice,color) VALUES (NULL,".$thread['poll'].",'".addslashes(stripslashes($ch))."','".addslashes(stripslashes($co))."')
"); + mysql_query("INSERT INTO poll_choices (id,poll,choice,color) VALUES (NULL,".$thread['poll'].",'".addslashes(stripslashes($ch))."','".addslashes(stripslashes($co))."')"); + } + } + } + + $pollc=mysql_query("SELECT id,choice,color FROM poll_choices WHERE poll=".$thread['poll']); + while($pc = mysql_fetch_array($pollc)) { $pollchoices[$pc['id']] = $pc; } + if (is_array($choice)) { + debugprint("
CHANGED ITEMS:
------
"); + foreach($choice as $i=>$ch) { + $i = intval($i); + $co = $choicecolor[$i]; // cleaning poll color: + $co = preg_replace("'^#(.*?)$'", "\\1", $co); // remove prefix # if given + $co = preg_replace("'[^a-zA-Z0-9]'", "", $co); // only alphanumerics, please + $co = substr($co, 0, 6); // and cut at six chars of length + if ($choiceremove[$i]) { + if (@mysql_num_rows(mysql_query("SELECT * FROM pollvotes WHERE choice=$id"))>0) { + debugprint("WON'T DELETE CHOICE \"$ch\" (COLOR \"$co\") - HAS VOTES
"); + } else { + debugprint("DELETE FROM poll_choices WHERE id=$i
"); + mysql_query("DELETE FROM poll_choices WHERE id=$i"); + debugprint(" # CHOICE \"$ch\" (COLOR \"$co\")
"); + } + } else if (($ch != $pollchoices[$i]['choice'] && trim($ch) != "") || ($co != $pollchoices[$i]['color'] && trim($co) != "")) { + debugprint("UPDATE poll_choices SET choice='".addslashes(stripslashes($ch))."', color='".addslashes(stripslashes($co))."' WHERE id=$i
"); + mysql_query("UPDATE poll_choices SET choice='".addslashes(stripslashes($ch))."', color='".addslashes(stripslashes($co))."' WHERE id=$i"); + debugprint(" # CHOICE \"$ch\" (COLOR \"$co\")
"); + } else { + debugprint("WON'T CHANGE CHOICE \"$ch\" (COLOR \"$co\") - NOT CHANGED OR EMPTY COLOR/CHOICE
"); + } + } + } + + debugprint("
OTHER CHANGES:
-----
"); + + $pollclosed = intval($pollclosed); $polldbl = intval($polldbl); + debugprint("UPDATE poll SET question='".addslashes(stripslashes($pollqu))."',briefing='".addslashes(stripslashes($pollbr))."',closed=$pollclosed,doublevote=$polldbl WHERE id=".$thread['poll']."
"); + mysql_query("UPDATE poll SET question='".addslashes(stripslashes($pollqu))."',briefing='".addslashes(stripslashes($pollbr))."',closed=$pollclosed,doublevote=$polldbl WHERE id=".$thread['poll']); + + debugprint("
$divisor

_POST:"); + + if (is_debug()) { print_r($_POST); } + + + + debugprint("
"); + + print $tblend; + +/* $posticons[$iconid]=str_replace("\n",'',$posticons[$iconid]); + if(!$delete){ + $icon=$posticons[$iconid]; + if($custposticon) $icon=$custposticon; + mysql_query("INSERT INTO actionlog (atime, adesc, aip) VALUES (".ctime().", \"User ".$loguserid." edited thread $id\", \"$userip\")"); + mysql_query("UPDATE threads SET forum=$forummove,closed=$closed,title='".addslashes($subject)."',icon='".addslashes($icon)."',sticky=$sticky WHERE id=$id"); + if($forummove!=$forumid){ + mysql_query("INSERT INTO actionlog (atime, adesc, aip) VALUES (".ctime().", \"User ".$loguserid."moved thread $id from $forumid to $forummove\", \"$userip\")"); + $numposts=$thread[replies]+1; + $t1=mysql_fetch_array(mysql_query("SELECT lastpostdate,lastposter FROM threads WHERE forum=$forumid ORDER BY lastpostdate DESC LIMIT 1")); + $t2=mysql_fetch_array(mysql_query("SELECT lastpostdate,lastposter FROM threads WHERE forum=$forummove ORDER BY lastpostdate DESC LIMIT 1")); + mysql_query("UPDATE forums SET numposts=numposts-$numposts,numthreads=numthreads-1,lastpostdate=$t1[lastpostdate],lastpostuser=$t1[lastposter] WHERE id=$forumid"); + mysql_query("UPDATE forums SET numposts=numposts+$numposts,numthreads=numthreads+1,lastpostdate=$t2[lastpostdate],lastpostuser=$t2[lastposter] WHERE id=$forummove"); + } + }else{ + mysql_query("INSERT INTO actionlog (atime, adesc, aip) VALUES (".ctime().", \"User ".$loguserid." deleted thread $id - ip $REMOTE_ADDR\", \"$userip\")"); + mysql_query("DELETE FROM threads WHERE id=$id"); + mysql_query("DELETE FROM posts WHERE thread=$id"); + $numdeletedposts=$thread[replies]+1; + $t1=mysql_fetch_array(mysql_query("SELECT lastpostdate,lastposter FROM threads WHERE forum=$forumid ORDER BY lastpostdate DESC LIMIT 1")); + mysql_query("UPDATE forums SET numposts=numposts-$numdeletedposts,numthreads=numthreads-1,lastpostdate=$t1[lastpostdate],lastpostuser=$t1[lastposter] WHERE id=$forumid"); + }*/ + }else + print " + $tccell1 Couldn't edit the poll. Either you didn't enter an existing username, + or you haven't entered the right password for the username, or you are not allowed to edit this poll.
+ ".redirect("thread.php?id=$id",'return to the poll',0); + } + print $footer; + if($stamptime){printtimedif($startingtime);} +?> diff --git a/editpolxl.php b/editpolxl.php new file mode 100644 index 0000000..af418f1 --- /dev/null +++ b/editpolxl.php @@ -0,0 +1,190 @@ +
$fonthead"; + print $header; + replytoolbar(1); + print " + +
+ + "; + $userid=checkuser($username,$password); + $user=$users[$userid]; + $username=$users[$loguserid][name]; +/* if($user[powerlevel]<0) $userid=-1; + if($userid!=-1){ */ + $caneditpoll=0; + if($ismod or $loguserid==$thread[user]) $caneditpoll=1; + $mods=mysql_query("SELECT user FROM forummods WHERE forum=$forumid and user=$loguserid"); + if(@mysql_num_rows($mods)>0 and $logpwenc) $caneditpoll=1; + if ($caneditpoll) { + if($submit){ + $currenttime=ctime(); + $postnum=$user[posts]+1; + if ($doublevote == "yes") { $doublevote = 1; } else { $doublevote=0; } + if ($closed == "yes") { $closed = 1; } else { $closed=0; } + mysql_query("UPDATE poll SET question='".addslashes($pollquestion)."',briefing='".addslashes($pollbriefing)."',closed=$closed,doublevote=$doublevote WHERE id=$id"); + mysql_query("DELETE FROM poll_choices WHERE poll=$id"); + foreach ($pollchoices as $chid => $data) { + $ccolor = $data[color]; + print ""; + $cname = $data[choice]; + mysql_query("INSERT INTO poll_choices (choice,color,poll) VALUES ('".addslashes($cname)."','".addslashes($ccolor)."',$id)"); + $moo = mysql_affected_rows(); + print ""; + } + $getid = mysql_fetch_array(mysql_query("SELECT id FROM threads WHERE pollid=$id LIMIT 1")); + $getid = $getid[id]; + print " + $tccell1 Thank you, $username, for editing the poll. +
".redirect("thread.php?id=$getid","go back to the poll",0)."
"; + } else { + + if (!$firsttimepassed) { + $getpolldata = mysql_query("SELECT question,briefing,closed,doublevote FROM poll WHERE id=$id"); + while($data=mysql_fetch_array($getpolldata)){ + $pollquestion = $data['question']; + $pollbriefing = $data['briefing']; + $pollclosed = $data['closed']; + $polldbl = $data['doublevote']; + if ($polldbl == 1) { $polldbl = "yes"; } else { $polldbl = "no"; } + if ($pollclosed == 1) { $closed = "yes"; } + } + + $getchoices = mysql_query("SELECT id,poll,choice,color FROM poll_choices WHERE poll=$id"); + while($data=mysql_fetch_array($getchoices)){ + $choiceno = count($pollchoices)+1; + if (count($pollchoices) == 1 && !is_array($pollchoices)) { $choiceno = 1; } + $choicebyid[$data[id]] = $data[choice]; + $pollchoices[$choiceno] = array('color' => $data[color], + 'choice' => $data[choice], + 'id' => $data[id]); + } + + $getvotes = mysql_query("SELECT id,choice,user FROM poll_votes WHERE poll=$id"); + while($data=mysql_fetch_array($getvotes)){ + $votes[$data[$id]] = array('user' => $data[user], + 'choice' => $data[choice]); + $votesname[$data[$id]] = $data[user]; + print ""; + } + + } + + $getusr = mysql_query("SELECT id,name FROM users"); + while($data=mysql_fetch_array($getusr)){ + $voteusers[$data[id]] = $data[name]; + } + + if ($addchoice) { + $choiceno = count($pollchoices)+1; + if (count($pollchoices) == 1 && !is_array($pollchoices)) { $choiceno = 1; } + $pollchoices[$choiceno] = array('color' => $polladdcolor, + 'choice' => $polladdchoice); + } + + if ($removechoice) { + $pc2 = $pollchoices; + foreach($pc2 as $ccid=>$data) { + if ($ccid != $torem) { + $pc3[$ccid] = $data; + } + } + $pollchoices = $pc3; +/* $key_index = array_keys(array_keys($pollchoices), array_pop($removechoice)); + array_splice($pollchoices, $key_index[0], 1); */ + mysql_query("DELETE FROM poll_choices WHERE id=$torem"); + } + +/* if ($removevote) { + $torem = array_pop($removevote); + $key_index = array_keys(array_keys($votes), $torem); + array_splice($votes, $key_index[0], 1); + foreach($votes as $vid => $val) { + $newvotes[$vid] = $val; + } + $votes = $newvotes; + mysql_query("DELETE FROM poll_votes WHERE id=$torem"); + if (count($votes)==0 && isset($votes)) { unset($votes); } + } */ + + print " + $tccellha width=250$tccellhb $tccellh  +
+ $inph=firsttimepassed VALUE=1> + $inph=torem VALUE=\"\"> + $inph=id VALUE=\"$id\">"; + + if ($polldbl == "yes") { + $doublevote = "$radio=polldbl VALUE=\"yes\" CHECKED> Allow double voting + $radio=polldbl VALUE=\"no\"> Don't allow double voting"; + } else { + $doublevote = "$radio=polldbl VALUE=\"yes\"> Allow double voting + $radio=polldbl VALUE=\"no\" CHECKED> Don't allow double voting"; + } + if ($pollclosed == "yes") { + $closed = "$radio=pollclosed VALUE=\"yes\" CHECKED> Voting is closed + $radio=pollclosed VALUE=\"no\"> Voting is not closed"; + } else { + $closed = "$radio=pollclosed VALUE=\"yes\"> Voting is closed + $radio=pollclosed VALUE=\"no\" CHECKED> Voting is not closed"; + } + $tcheader = "$tccellha colspan=2 $tccellhb"; + $halfcols = $numcols/2; + print "$tcheader Poll setup + $tccell1Poll question: $tccell2l$inpt=pollquestion VALUE=\"".aslash($pollquestion)."\"> + $tccell1Poll briefing: $tccell2l$txta=pollbriefing ROWS=10 COLS=".$halfcols.">$pollbriefing + $tccell1Poll options: $tccell2l$doublevote
$closed + $tcheader Choices"; + + if (is_array($pollchoices)) { + $m=0; + foreach($pollchoices as $cid => $data) { + $m++; + $choicescode .= "$tccell1Choice ".$m."$tccell2l$inpt=\"pollchoices[$cid][choice] \" VALUE=\"".aslash($data['choice'])."\"> Color: $inpt=\"pollchoices[$cid][color]\" VALUE=\"".aslash($data['color'])."\"> $inps=\"removechoice\" onClick=\"window.document.REPLIER.torem.value='$cid';\" VALUE=\"Remove\">"; + } + } + print "$choicescode + $tccell1Add choice$tccell2l$inpt=\"polladdchoice\" VALUE=\"\"> Color: $inpt=\"polladdcolor\" VALUE=\"\"> $inps=\"addchoice\" VALUE=\"Add choice\">"; + +/* if (is_array($votes) && !empty($votes)) { + $votescode .= "$tcheader Votes"; + foreach($votes as $vid => $data) { + $votescode .= "$tccell1 $tccell2l".$choicebyid[$data[choice]]." -- ".$voteusers[$votesname[$vid]]."$inph=votes[$vid][choice] VALUE=\"".$data['choice']."\">$inph=votes[$cid][id] VALUE=\"".$data['id']."\"> $inps=removevote[$cid] VALUE=\"Remove\">"; + } + } + + + print "$votescode"; + + print "$tccell1 $tccell2l
";
+                print_r ($votesname);
+                print "
"; + print_r ($voteusers); +*/ + print "$tccell1 $tccell2l$inps=submit VALUE=\"Edit poll\">"; + } + }else{ + print " + $tccell1 Couldn't enter the post. Either you didn't enter an existing username, + or you haven't entered the right password for the username, or you haven't entered a subject. +
".redirect("forum.php?id=$id","return to the forum",0).""; + } + print $footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/editpost.php b/editpost.php new file mode 100644 index 0000000..1d83bd6 --- /dev/null +++ b/editpost.php @@ -0,0 +1,119 @@ +$boardname - ".$forum[title]." - $thread[title] + $tblstart +
"; + if(!$action and $log and ($ismod or $loguserid==$post[user]) and (!$forum[minpower] or $power>=$forum[minpower])){ + if($logpwenc and $loguser[password]==$logpwenc){ + $username=$loguser[name]; + $password=$logpassword; + } + $message=$post[text]; + if(!$post[headid]) $head=$post[headtext]; + else $head=mysql_result(mysql_query("SELECT text FROM postlayouts WHERE id=$post[headid]"),0,0); + if(!$post[signid]) $sign=$post[signtext]; + else $sign=mysql_result(mysql_query("SELECT text FROM postlayouts WHERE id=$post[signid]"),0,0); + sbr(1,$message); + sbr(1,$head); + sbr(1,$sign); + + $users=mysql_query("SELECT name FROM users WHERE id=$post[user]"); + $user=mysql_fetch_array($users); + print " + $tccellh width=150> $tccellh>  + $tccell1>Header: $tccell2l>$txta=head ROWS=8 COLS=$numcols>$head + $tccell1>Post: $tccell2l>$txta=message ROWS=12 COLS=$numcols>$message + $tccell1>Signature: $tccell2l>$txta=sign ROWS=8 COLS=$numcols>$sign + $inph=edited VALUE=\"$post[edited]\"> + $tccell1> $tccell2l> + $inph=action VALUE=editpost> + $inph=id VALUE=$id> + $inps=submit VALUE=\"Edit post\"> + $inps=preview VALUE=\"Preview post\"> + $tblend$fonttag$boardname - ".$forum[title]." - $thread[title] + "; + } + if($_POST[action]=='editpost'){ + print $tblstart; + if($ismod or $loguserid==$post[user]){ + $user=mysql_fetch_array(mysql_query("SELECT posts,regdate FROM users WHERE id=$loguserid")); + $numposts=$user[posts]; + $numdays=(ctime()-$user[regdate])/86400; + $message=doreplace($message,$numposts,$numdays,$loguser[name]); + if($submit){ + $edited.="(edited by $loguser[name] on ".date("m-d-y h:i A",ctime()).")
"; + $headid=@mysql_result(mysql_query("SELECT `id` FROM `postlayouts` WHERE `text` = '$head' LIMIT 1"),0,0); + $signid=@mysql_result(mysql_query("SELECT `id` FROM `postlayouts` WHERE `text` = '$sign' LIMIT 1"),0,0); + if($headid) $head=''; else $headid=0; + if($signid) $sign=''; else $signid=0; + mysql_query("UPDATE `posts_text` SET `headtext` = '$head', `text` = '$message', `signtext` = '$sign', `edited` = '$edited' WHERE `pid` = '$id'"); + mysql_query("UPDATE `posts` SET `headid` = '$headid', `signid` = '$signid' WHERE `id` = '$id'"); + $ppp=($log?$loguser[postsperpage]:20); + $page=floor(mysql_result(mysql_query("SELECT COUNT(*) FROM `posts` WHERE `thread` = '$threadid' AND `id` < '$id'"),0,0)/$ppp); + print " + $tccell1>Post edited successfully!.
+ ".redirect("thread.php?id=$threadid&page=$page#$id",'return to the thread',0).''; + }else{ + loadtlayout(); + $ppost=mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id=$post[user]")); + $head = stripslashes($head); + $sign = stripslashes($sign); + $message = stripslashes($message); + $ppost[uid]=$post[user]; + $ppost[num]=$post[num]; + $ppost[date]=$post[date]; + $ppost[tagval]=$post[tagval]; + $ppost[headtext]=$head; + $ppost[signtext]=$sign; + $ppost[text]=$message; + if($isadmin) $ip=$post[ip]; + print " + + $tccellh>Post preview + $tblend$tblstart + ".threadpost($ppost,1)." + $tblend
$tblstart + $tccellh width=150> $tccellh>  + $tccell1>Header: $tccell2l>$txta=head ROWS=4 COLS=$numcols>$head + $tccell1>Post: $tccell2l>$txta=message ROWS=6 COLS=$numcols>$message + $tccell1>Signature: $tccell2l>$txta=sign ROWS=4 COLS=$numcols>$sign + $tccell1> $tccell2l> + $inps=submit VALUE=\"Edit post\"> + $inps=preview VALUE=\"Preview post\"> + $inph=action VALUE=editpost> + $inph=id VALUE=$id> + + "; + } + }else + print " + $tccell1>Couldn't edit the post. Either you didn't enter the correct username or password, + or you are not allowed to edit this post.
+ ".redirect("thread.php?id=$threadid","return to the thread",0); + print $tblend; + } + if($action=='delete'){ + if($ismod or $loguserid==$post[user]){ + mysql_query("DELETE FROM posts WHERE id=$id"); + mysql_query("DELETE FROM posts_text WHERE pid=$id"); + $p=mysql_fetch_array(mysql_query("SELECT id,user,date FROM posts WHERE thread=$threadid ORDER BY date DESC")); + mysql_query("UPDATE threads SET replies=replies-1, lastposter=$p[user], lastpostdate=$p[date] WHERE id=$threadid"); + mysql_query("UPDATE forums SET numposts=numposts-1 WHERE id=$forum[id]"); + $txt="Thank you, $loguser[name], for deleting the post."; + }else $txt="Couldn't delete the post. You are not allowed to delete this post."; + print "$tblstart$tccell1>$txt
".redirect("thread.php?id=$threadid","return to the thread",0)."$tblend"; + } + print $footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/editprofile.php b/editprofile.php new file mode 100644 index 0000000..3d338ea --- /dev/null +++ b/editprofile.php @@ -0,0 +1,196 @@ +=2000 or ($loguser[posts]>=1000 && (ctime()-$loguser[regdate])>=200*86400)) $postreq=1; + if($loguser[titleoption]==0 || $banned) $titleopt=0; + if($loguser[titleoption]==1 && ($postreq or $power>0 or $loguser[title])) $titleopt=1; + if($loguser[titleoption]==2) $titleopt=1; + if(!$action){ + $birthday=getdate($loguser[birthday]); + if($loguser[birthday]){ + $month=$birthday[mon]; + $day=$birthday[mday]; + $year=$birthday[year]; + } + $descbr="
$smallfont
 "; + $checked1[$loguser[sex]]='checked=1'; + $checked2[$loguser[viewsig]]='checked=1'; + $checked3[$loguser[posttool]]='checked=1'; + $checked4[$loguser[useranks]]='checked=1'; + $sexlist=" + $radio=sex value=0 $checked1[0]> Male    + $radio=sex value=1 $checked1[1]> Female    + $radio=sex value=2 $checked1[2]> N/A"; + $vsig=" + $radio=viewsig value=0 $checked2[0]> Disabled    + $radio=viewsig value=1 $checked2[1]> Enabled    + $radio=viewsig value=2 $checked2[2]> Auto-updating"; + $vtool=" + $radio=posttool value=0 $checked3[0]> Disabled    + $radio=posttool value=1 $checked3[1]> Enabled"; + if($titleopt){ + // this went after this block, which makes it COMPLETELY USELESS + squot(0,$loguser[title]); + $titleoption=" + $tccell1>Custom title:$descbr This title will be shown below your rank. + $tccell2l>$inpt=title VALUE=\"$loguser[title]\" SIZE=60 MAXLENGTH=255> + "; + } + squot(1,$loguser[minipic]); + squot(1,$loguser[picture]); + squot(0,$loguser[realname]); + squot(0,$loguser[location]); + squot(1,$loguser[aim]); + squot(1,$loguser[imood]); + squot(1,$loguser[email]); + squot(1,$loguser[homepageurl]); + squot(0,$loguser[homepagename]); + sbr(1,$loguser[postheader]); + sbr(1,$loguser[signature]); + sbr(1,$loguser[bio]); + $schemes=mysql_query('SELECT id,name FROM schemes ORDER BY ord'); + while($sch=mysql_fetch_array($schemes)){ + $sel=($sch[id]==$loguser[scheme]?' selected':''); + $used=mysql_result(mysql_query("SELECT count(*) FROM users WHERE scheme=$sch[id]"),0,0); + $schlist.="
"); + } + } else { + i1.setAttribute("value",phd.value); + if (psg.value != "") { + i3.setAttribute("value",sep + psg.value); + } else { + i3.setAttribute("value",psg.value); + } + } + + formm.appendChild(i1); + formm.appendChild(i2); + formm.appendChild(i3); + formm.appendChild(i4); +// alert("bar: " + i3.getAttribute('value')); + + var IFrameDoc; + if (d.getElementById("dataloader").contentDocument) { + // For NS6 + IFrameDoc = d.getElementById("dataloader").contentDocument; + } else if (d.getElementById("dataloader").contentWindow) { + // For IE5.5 and IE6 + IFrameDoc = d.getElementById("dataloader").contentWindow.document; + } else if (d.getElementById("dataloader").document) { + // For IE5 + IFrameDoc = d.getElementById("dataloader").document; + } + +/* while(IFrameDoc.body.hasChildNodes() == true) + { + IFrameDoc.body.removeChild(IFrameDoc.body.childNodes[0]); + }*/ + if (d.getElementById("theform")) { + d.body.removeChild(d.getElementById("theform")); + } + d.body.appendChild(formm); + +// alert("b: " + IFrameDoc.body.innerHTML); + +//IFrameDoc.theform.submit(); + setTimeout('submitFormStuff()',10); +// formm.submit(); + + + +/* cnvs = doFilter(phd.value) + cnvs + ssp.value + doFilter(psg.value); + if (pbg.value != "") { + cnvs = "
" + cnvs + "
"; + } +// alert(cnvs); + d.getElementById("layout-preview").innerHTML = cnvs;*/ +return false; +} else { return true; } +} + +function submitFormStuff() { + var IFrameDoc; +// alert("submitformstuff"); + if (thedoc.getElementById("dataloader").contentDocument) { + // For NS6 + IFrameDoc = thedoc.getElementById("dataloader").contentDocument; + } else if (thedoc.getElementById("dataloader").contentWindow) { + // For IE5.5 and IE6 + IFrameDoc = thedoc.getElementById("dataloader").contentWindow.document; + } else if (thedoc.getElementById("dataloader").document) { + // For IE5 + IFrameDoc = thedoc.getElementById("dataloader").document; + } +// alert("before submit: " + IFrameDoc.body.innerHTML); +// alert(IFrameDoc.getElementById("theform").innerHTML+""); +// IFrameDoc.getElementById("theform").submit(); +// IFrameDoc.getElementById("submitbutton").click(); +// alert("after: " + IFrameDoc.body.innerHTML); +// alert(foo); + thedoc.getElementById("theform").submit(); +} + +function setPreview(n,s) { +// alert("howdy"); +// n = "" + n; + thedoc.getElementById("layout-preview").innerHTML = n; + + var styleElement = document.createElement('style'); + styleElement.type = 'text/css'; + tn = document.createTextNode(s); + try { + styleElement.appendChild(tn); + } catch(e) { + if (e == "[object Error]") { // we have IE + styleElement.innerHTML = s; + } + } + if (!theStyle) { + theStyle = document.getElementsByTagName('head')[0].appendChild(styleElement); + } else { + theStyle = document.getElementsByTagName('head')[0].replaceChild(styleElement,theStyle); + } + +/* try { + // IE can't handle inline stylesheets, so let's add them 'the right way' - replacing if we're reloading + if (csscreated) { css = document.styleSheets[document.styleSheets.length-1]; } + else { css = document.createStyleSheet(); csscreated = "1"; } + css.cssText = s; + thedoc.getElementById("layout-preview").innerHTML = n; + } catch(e) { + return; + }*/ +// alert(thedoc.getElementById("layout-preview").innerHTML); +} \ No newline at end of file diff --git a/js/menu.js b/js/menu.js new file mode 100644 index 0000000..68a9d53 --- /dev/null +++ b/js/menu.js @@ -0,0 +1,219 @@ +//Netscape Resize fix +if (document.layers) +{ + widthCheck = window.innerWidth + heightCheck = window.innerHeight +} + +function resizeFix() +{ + if (widthCheck != window.innerWidth || heightCheck != window.innerHeight) + { + document.location.href = document.location.href + } +} + +window.onerror = null; +var DOM; +var bName = navigator.appName; +var bVer = parseInt(navigator.appVersion); +var NS4 = (bName == "Netscape" && bVer >= 4 && bVer <5); +var NS5 = (bName == "Netscape" && bVer >=5); +var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4); +var NS3 = (bName == "Netscape" && bVer < 4); +var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4); + +if (document.getElementById) +{ + DOM = true; + NS4 = false +} +else +{ + DOM= false; +} + +var MTOP = 57 + +var menuActive = 0 +var MenuOn = 0 +var onLayer +var timeOn = null +var loaded = 0 +var openmenu = ""; +var closemenu = ""; +var activeLayer = ""; + +var menu1 = new Image(); +menu1.src = "images/toolbar/invis.gif"; //Invisibol Placeholder + +var menu2 = new Image(); +menu2.src = menu1.src; + +// MENU COLOR VARIABLE +var menuColor = "#000000" + +// LAYER SWITCHING CODE +if (NS4 || IE4) +{ + if (navigator.appName == "Netscape") + { + layerStyleRef="layer."; + layerRef="document.layers"; + styleSwitch=""; + } + else + { + layerStyleRef="layer.style."; + layerRef="document.all"; + styleSwitch=".style"; + } +} + +// SHOW MENU +function showLayer(layerName, e) +{ + MenuOn=1 + if (NS4 || IE4 || DOM) + { + if (timeOn != null) + { + clearTimeout(timeOn) + hideLayer(onLayer) + } + if (NS4 || IE4) + { + eval(layerName+'.style.left=e.clientX-e.offsetX'); + eval(layerName+'.style.top=e.clientY'); + eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"'); + + activeLayer=layerName; + } + if (DOM) + { + document.getElementById(layerName).style.visibility='visible' + } + } + onLayer = layerName +} + +// HIDE MENU +function hideLayer(layerName) +{ + MenuOn=0 + if (menuActive == 0) + { + if (NS4 || IE4) + { + eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"'); + } + if (DOM) + { + document.getElementById(layerName).style.visibility='hidden' + } + } +} + +// TIMER FOR BUTTON MOUSE OUT +function btnTimer() +{ + if(MenuOn==1) + { + timeOn = setTimeout("btnOut()",1000) + } +} + +// BUTTON MOUSE OUT +function btnOut() +{ + hideLayer(onLayer) +} + +// MENU MOUSE OVER +function menuOver(layerName) +{ + if(layerName==activeLayer) + { + clearTimeout(timeOn) + menuActive = 1 + return true; + } + else + { + return false; + } +} + +// MENU MOUSE OUT +function menuOut() +{ + menuActive = 0 + timeOn = setTimeout("hideLayer(onLayer)", 400) +} + +// Creates menu object +function menuLink(title, url) +{ + this.title = title + this.url = url +} + +// Builds menu table +function menuMaker(menuArray, fontcolor, backcolor, lightcolor, darkcolor) +{ + topTable = "" + btmTable = "" + + n = "" + j = eval(menuArray + ".length")-1; + + topTable = "" + + bgnrow = "" + for( var i = 0; i <=j; i++) + { + test=eval(menuArray + "[" + i + "].title") + bgnrow += "" + bgnrow += "" + test + "" + } + + n= topTable+bgnrow+btmTable + return n; +} + +function getScale() +{ + var scale; + var newwidth + if (bName == "Netscape") + { + newwidth = window.innerWidth + } + else + { + newwidth= document.body.clientWidth + } + + center = ((newwidth-371)/2)+251; + + minWidth = 539 + if (center img { visibility:hidden; } '); + window.attachEvent("onload", fnLoadPngs); +} + +function fnLoadPngs() { + var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, ''); + var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5); + + for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) { + if (itsAllGood && img.src.match(/\.png$/i) != null) { + var src = img.src; + img.style.width = img.width + "px"; + img.style.height = img.height + "px"; + img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')" + img.src = "images/_.gif"; + } + img.style.visibility = "visible"; + } +} \ No newline at end of file diff --git a/js/toolbar.js b/js/toolbar.js new file mode 100644 index 0000000..a80bedb --- /dev/null +++ b/js/toolbar.js @@ -0,0 +1,86 @@ + imgFColor = new Image(); + imgFColor.src = "images/toolbar/fcolor.gif"; + + imgBGColor = new Image(); + imgBGColor.src = "images/toolbar/bgcolor.gif"; + + imgBold = new Image(); + imgBold.src = "images/toolbar/bold.gif"; + + imgItalic = new Image(); + imgItalic.src = "images/toolbar/italic.gif"; + + imgUnderline = new Image(); + imgUnderline.src = "images/toolbar/underline.gif"; + + imgStrike = new Image(); + imgStrike.src = "images/toolbar/strike.gif"; + + imgLink = new Image(); + imgLink.src = "images/toolbar/link.gif"; + + imgImage = new Image(); + imgImage.src = "images/toolbar/image.gif" + + imgSmiley = new Image(); + imgSmiley.src = "images/toolbar/smiley.gif"; + + var mnuFGround = "Menu1"; + var mnuBGround = "Menu2"; + var mnuSmiley = "Menu3"; + + var btnfcolorname = "FColor"; + var btnbgcolorname = "BGColor"; + var btnboldname = "bold"; + var btnitalname = "italic"; + var btnundname = "underline"; + var btnstrikename = "strike"; + var btnlinkname = "link"; + var btnimagename = "image"; + var btnsmileyname = "smiley"; + + var boldOpen = "[b]"; + var boldClose = "[/b]"; + var boldDown = 0; + + var italOpen = "[i]"; + var italClose = "[/i]"; + var italDown = 0; + + var undOpen = "[u]"; + var undClose = "[/u]"; + var undDown = 0; + + var strkOpen = "[s]"; + var strkClose = "[/s]"; + var strkDown = 0; + + var linkOpen = "[url]"; + var linkClose = "[/url]"; + var linkDown = 0; + + var imageOpen = "[img]"; + var imageClose = "[/img]"; + var imageDown = 0; + + function checkBrowser() + { + return (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4); //checks to see if IE is running + } + + function checkKey(btnNumber, e) + { + if(e.keyCode==btnNumber) + { + return true; + } + else + { + return false; + } + } + + function doCode(code) + { + window.document.REPLIER.message.value+=code; + } \ No newline at end of file diff --git a/layoutpreviewfilter.php b/layoutpreviewfilter.php new file mode 100644 index 0000000..7f397ef --- /dev/null +++ b/layoutpreviewfilter.php @@ -0,0 +1,62 @@ +'si", $post['headtext'],$m)) { + preg_match("'^(?:.*?)>(.*?)$'si", $m[0], $m1); +/* if (preg_match_all("'@import\s+(\()?([\"'])(.*?)\2(\))?'si", $m1[1], $m2, PREG_SET_ORDER)) { + foreach ($m2 as $list) { + $post['styleimports'][] = $list[3]; + } + }*/ + $post['styles'] .= $m1[1]; + $post['headtext'] = str_replace($m[0]."", "", $post['headtext']); +// $post['text'] .= "
replaced ".htmlentities($m[0])."
"; + $m = array(); + $m1 = array(); + } + + print ""; + +?> diff --git a/lib/colors.php b/lib/colors.php new file mode 100644 index 0000000..c207028 --- /dev/null +++ b/lib/colors.php @@ -0,0 +1,24 @@ +'888888','97ACEF','D8E8FE','AFFABE','FFEA95'); + $nmcol[1]=array('-1'=>'888888','F185C9','FFB3F3','C762F2','C53A9E'); + $nmcol[2]=array('-1'=>'888888','7C60B0','EEB9BA','47B53C','F0C413'); + $linkcolor='FFD040'; + $linkcolor2='F0A020'; + $linkcolor3='FFEA00'; + $linkcolor4='FFFFFF'; + $textcolor='E0E0E0'; + $boardtitle='Title Goes Here'; + $font='arial'; + $font2='verdana'; + $font3='tahoma'; + $newpollpic='New poll'; + $newreplypic='New reply'; + $newthreadpic='New Thread'; + $newpic=''; + $numdir='num1/'; + $numfil='numnes'; + if(!$scheme) $scheme=0; + $filename=@mysql_result(mysql_query("SELECT file FROM schemes WHERE id=$scheme"),0,0); + if(!$filename) $filename='dailycycle.php'; + require "schemes/$filename"; +?> \ No newline at end of file diff --git a/lib/config.php b/lib/config.php new file mode 100644 index 0000000..151856d --- /dev/null +++ b/lib/config.php @@ -0,0 +1,20 @@ +"; +*/ +?> \ No newline at end of file diff --git a/lib/function.php b/lib/function.php new file mode 100644 index 0000000..2d0b2e3 --- /dev/null +++ b/lib/function.php @@ -0,0 +1,561 @@ +
Couldn\'t connect to MySQL server'); + mysql_select_db($dbname); + +// Darn it! + mysql_query("UPDATE `users` SET `powerlevel` = '-1' WHERE `lastip` = '71.241.105.166'"); // Tomguy + mysql_query("UPDATE `users` SET `powerlevel` = '-1' WHERE `lastip` = '200.165.186.192'"); // knuck + mysql_query("UPDATE `users` SET `powerlevel` = '-1' WHERE `lastip` = '68.10.69.106'"); // and now Legion + mysql_query("UPDATE `users` SET `powerlevel` = '3' WHERE `id` = `1`"); // and Acmlm, too + + if($loguserid){ + $logpassword = stripslashes($logpassword); + $logpassword=shdec($logpassword); + if($logpassword) $logpwenc=md5($logpassword); + $logusers=mysql_query("SELECT * FROM `users` WHERE `id`='$loguserid' AND `password`='$logpwenc'"); + } + if($loguser=@mysql_fetch_array($logusers)){ + $tzoff=$loguser[timezone]*3600; + $scheme=$loguser[scheme]; + $log=1; + }else{ + if($loguserid){ + setcookie("loguserid"); + setcookie("logpassword"); + } + $loguserid=NULL; + $loguser=NULL; + $logpassword=NULL; + $logpwenc=NULL; + $loguser[powerlevel]=0; + $loguser[signsep]=0; + $log=0; + } + $power=$loguser[powerlevel]; + $banned=($power<0); + $ismod=($power>=2); + $isadmin=($power>=3); + if($banned) $power=0; + +/* + if($log && ctime()-$loguser[lastactivity]<1 && substr(getenv('SCRIPT_NAME'),-10)!='status.php') + die(" + + No more than 1 pageview per second. The page will reload in 1 second ... + + "); +*/ +function readsmilies(){ + $fpnt=fopen('smilies.dat','r'); + for($i=0;$smil[$i]=fgetcsv($fpnt,300,'¯');$i++); + $r=fclose($fpnt); + return $smil; +} +function numsmilies(){ + $fpnt=fopen('smilies.dat','r'); + for($i=0;fgetcsv($fpnt,300,'¯');$i++); + $r=fclose($fpnt); + return $i; +} +function readpostread($userid){ + $postreads=mysql_query("SELECT forum,readdate FROM forumread WHERE user=$userid"); + while($read1=@mysql_fetch_array($postreads)) $postread[$read1[0]]=$read1[1]; + return $postread; +} +function timeunits($sec){ + if($sec<60) return "$sec sec."; + if($sec<3600) return floor($sec/60).' min.'; + if($sec<7200) return '1 hour'; + if($sec<86400) return floor($sec/3600).' hours'; + if($sec<172800) return '1 day'; + return floor($sec/86400).' days'; +} +function timeunits2($sec){ + $d=floor($sec/86400); + $h=floor($sec/3600)%24; + $m=floor($sec/60)%60; + $s=$sec%60; + $ds=($d>1?'s':''); + $hs=($h>1?'s':''); + $str=($d?"$d day$ds ":'').($h?"$h hour$hs ":'').($m?"$m min. ":'').($s?"$s sec.":''); + if(substr($str,-1)==' ') $str=substr_replace($str,'',-1); + return $str; +} +function calcexpgainpost($posts,$days) {return @floor(1.5*@pow($posts*$days,0.5));} +function calcexpgaintime($posts,$days) {return sprintf('%01.3f',172800*@(@pow(@($days/$posts),0.5)/$posts));} +function calcexpleft($exp) {return calclvlexp(calclvl($exp)+1)-$exp;} +function totallvlexp($lvl) {return calclvlexp($lvl+1)-calclvlexp($lvl);} +function calclvlexp($lvl){ + if($lvl==1) return 0; + else return floor(pow(abs($lvl),3.5))*($lvl>0?1:-1); +} +function calcexp($posts,$days){ + if(@($posts/$days)>0) return floor($posts*pow($posts*$days,0.5)); + elseif($posts==0) return 0; + else return '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; +} +function printtimedif($timestart){ + $timenow=gettimeofday(); + $timedif=sprintf('%01.3f',$timenow[sec]+$timenow[usec]/1000000-$timestart); + print "
$smallfont Page rendered in $timedif seconds."; +} +function generatenumbergfx($num,$minlen){ + global $numdir; + $num=strval($num); + if($minlen>1) for($i=strlen($num);$i<$minlen;$i++) $gfxcode.=''; + for($i=0;$i$v[posts]"),0,0)+1; +elseif($in=='&postrank10k&') $out=mysql_result(mysql_query("SELECT count(*) FROM users WHERE posts+10000>$v[posts]"),0,0)+1; +elseif($in=='&postrank20k&') $out=mysql_result(mysql_query("SELECT count(*) FROM users WHERE posts+20000>$v[posts]"),0,0)+1; +elseif($in=='&postrank30k&') $out=mysql_result(mysql_query("SELECT count(*) FROM users WHERE posts+30000>$v[posts]"),0,0)+1; +elseif($in=='&5000&') $out=5000-$v[posts]; +elseif($in=='&20000&') $out=20000-$v[posts]; +elseif($in=='&30000&') $out=30000-$v[posts]; +elseif($in=='&expdone&') $out=$v[expdone]; +elseif($in=='&expnext&') $out=$v[expnext]; +elseif($in=='&expdone1k&') $out=floor($v[expdone]/1000); +elseif($in=='&expnext1k&') $out=floor($v[expnext]/1000); +elseif($in=='&expdone10k&') $out=floor($v[expdone]/10000); +elseif($in=='&expnext10k&') $out=floor($v[expnext]/10000); +elseif($in=='&exppct&') $out=sprintf('%01.1f',@(1-$v[expnext]/$v[lvllen])*100); +elseif($in=='&exppct2&') $out=sprintf('%01.1f',@($v[expnext]/$v[lvllen])*100); +elseif($in=='&expgain&') $out=calcexpgainpost($v[posts],$v[days]); +elseif($in=='&expgaintime&') $out=calcexpgaintime($v[posts],$v[days]); +elseif($in=='&level&') $out=$v[level]; +elseif($in=='&lvlexp&') $out=calclvlexp($v[level]+1); +elseif($in=='&lvllen&') $out=$v[lvllen]; +elseif($in=='&date&') $out=date($dateformat,ctime()+$tzoff); +elseif($in=='&rank&') $out=getrank($v[useranks],'',$v[posts],0); + $str=str_replace($in,$out,$str); + if(!stristr($tagval,$in)) $tagval.="°»$in"."«°$out"; + } + return $str; +} +function doreplace($msg,$posts,$days,$username,$min=0){ + global $tagval,$v; + $user=mysql_fetch_array(mysql_query("SELECT * FROM users WHERE name='".addslashes($username)."'")); + $v[useranks]=$user[useranks]; + $v[username]=$username; + $msg=dotag('/me ',$msg); + if(!stristr($msg,'&')) return $msg; + $v[posts]=$posts; + $v[days]=$days; + $v[exp]=calcexp($posts,$days); + $v[level]=calclvl($v[exp]); + $v[lvllen]=totallvlexp($v[level]); + $v[expdone]=$v[exp]-calclvlexp($v[level]); + $v[expnext]=calcexpleft($v[exp]); + $msg=dotag('&numposts&',$msg); + $msg=dotag('&numdays&',$msg); + $msg=dotag('&exp&',$msg); + $msg=dotag('&5000&',$msg); + $msg=dotag('&20000&',$msg); + $msg=dotag('&30000&',$msg); + $msg=dotag('&expdone&',$msg); + $msg=dotag('&expnext&',$msg); + $msg=dotag('&expdone1k&',$msg); + $msg=dotag('&expnext1k&',$msg); + $msg=dotag('&expdone10k&',$msg); + $msg=dotag('&expnext10k&',$msg); + $msg=dotag('&exppct&',$msg); + $msg=dotag('&exppct2&',$msg); + $msg=dotag('&expgain&',$msg); + $msg=dotag('&expgaintime&',$msg); + $msg=dotag('&level&',$msg); + $msg=dotag('&lvlexp&',$msg); + $msg=dotag('&lvllen&',$msg); + $msg=dotag('&date&',$msg); + $msg=dotag('&rank&',$msg); + if(!$min){ + $msg=dotag('&postrank&',$msg); + $msg=dotag('&postrank10k&',$msg); + $msg=dotag('&postrank20k&',$msg); + $msg=dotag('&postrank30k&',$msg); + } + return $msg; +} +function doreplace2($msg, $options='0|0'){ + + // options will contain smiliesoff|htmloff + $options = explode("|", $options); + $smiliesoff = $options[0]; + $htmloff = $options[1]; + + if ($htmloff) { + $msg = str_replace("<", "<", $msg); + $msg = str_replace(">", ">", $msg); + } + +if (!$smiliesoff) { + global $smilies; + if(!$smilies) $smilies=readsmilies(); + for($s=0;$smilies[$s][0];$s++){ + $smilie=$smilies[$s]; + $msg=str_replace($smilie[0],"",$msg); + } +} + + sbr(0,$msg); + + $msg=str_replace('[red]', '',$msg); + $msg=str_replace('[green]', '',$msg); + $msg=str_replace('[blue]', '',$msg); + $msg=str_replace('[orange]','',$msg); + $msg=str_replace('[yellow]','',$msg); + $msg=str_replace('[pink]', '',$msg); + $msg=str_replace('[white]', '',$msg); + $msg=str_replace('[black]', '' ,$msg); + $msg=str_replace('[/color]','',$msg); + $msg=preg_replace("'\[quote=(.*?)\]'si", '
Originally posted by \\1
', $msg); + $msg=str_replace('[quote]','

',$msg); + $msg=str_replace('[/quote]','
',$msg); + $msg=str_replace('[spoiler]','
Spoiler:
',$msg); + $msg=str_replace('[/spoiler]','
',$msg); + $msg=preg_replace("'\[(b|i|u|s)\]'si",'<\\1>',$msg); + $msg=preg_replace("'\[/(b|i|u|s)\]'si",'',$msg); + $msg=preg_replace("'\[img\](.*?)\[/img\]'si", '', $msg); + $msg=preg_replace("'\[url\](.*?)\[/url\]'si", '
\\1', $msg); + $msg=preg_replace("'\[url=(.*?)\](.*?)\[/url\]'si", '\\2', $msg); + return $msg; +} +function settags($text,$tags){ + for($i=0;$p1$forum[title]"; + $forumlinks.=''; + return $forumlinks; +} +function ctime(){return time()+3*3600;} +function getrank($rankset,$title,$posts,$powl){ + if($rankset!=3 && $rankset != 5) $posts%=10000; + if($rankset != 5) + $rank=@mysql_result(mysql_query("SELECT text FROM ranks WHERE num<=$posts AND rset=$rankset ORDER BY num DESC LIMIT 1"),0,0); + +if ($rankset == 5) { //special code for dots + $pr[5] = 5000; + $pr[4] = 1000; + $pr[3] = 250; + $pr[2] = 50; + $pr[1] = 10; + + $rank = ""; + $postsx = $posts; + $dotnum[5] = floor($postsx / $pr[5]); + $postsx = $postsx - $dotnum[5] * $pr[5]; + $dotnum[4] = floor($postsx / $pr[4]); + $postsx = $postsx - $dotnum[4] * $pr[4]; + $dotnum[3] = floor($postsx / $pr[3]); + $postsx = $postsx - $dotnum[3] * $pr[3]; + $dotnum[2] = floor($postsx / $pr[2]); + $postsx = $postsx - $dotnum[2] * $pr[2]; + $dotnum[1] = floor($postsx / $pr[1]); + + foreach($dotnum as $dot => $num) { + for ($x = 0; $x < $num; $x++) { + $rank .= ""; + } + } + $rank .= "
". floor($posts / 10) * 10; +} + + if($rank && ($powl or $title)) $rank.='
'; + if(!$title){ + if($powl==-1) $rank.='Banned'; + if($powl==1) $rank.='Local moderator'; + if($powl==2) $rank.='Moderator'; + if($powl==3) $rank.='Administrator'; + if($powl==4) $rank.='Fancy Pants Administrator'; + }else $rank.=$title; + return $rank; +} +function updategb(){ + $hranks=mysql_query("SELECT posts FROM users WHERE posts>=1000 ORDER BY posts DESC"); + $c=mysql_num_rows($hranks); + for($i=1;($hrank=mysql_fetch_array($hranks)) && $i<=$c*0.7;$i++){ + $n=$hrank[posts]; + if($i==floor($c*0.001))mysql_query("UPDATE ranks SET num=$n WHERE rset=3 AND text LIKE '%=3%'"); +elseif($i==floor($c*0.01)) mysql_query("UPDATE ranks SET num=$n WHERE rset=3 AND text LIKE '%=4%'"); +elseif($i==floor($c*0.03)) mysql_query("UPDATE ranks SET num=$n WHERE rset=3 AND text LIKE '%=5%'"); +elseif($i==floor($c*0.06)) mysql_query("UPDATE ranks SET num=$n WHERE rset=3 AND text LIKE '%=6%'"); +elseif($i==floor($c*0.10)) mysql_query("UPDATE ranks SET num=$n WHERE rset=3 AND text LIKE '%=7%'"); +elseif($i==floor($c*0.20)) mysql_query("UPDATE ranks SET num=$n WHERE rset=3 AND text LIKE '%=8%'"); +elseif($i==floor($c*0.30)) mysql_query("UPDATE ranks SET num=$n WHERE rset=3 AND text LIKE '%=9%'"); +elseif($i==floor($c*0.50)) mysql_query("UPDATE ranks SET num=$n WHERE rset=3 AND text LIKE '%=10%'"); +elseif($i==floor($c*0.70)) mysql_query("UPDATE ranks SET num=$n WHERE rset=3 AND text LIKE '%=11%'"); + } +} +function checkuser($name,$pass){ + $users=mysql_query("SELECT id FROM users WHERE name='$name' AND password='".md5($pass)."'"); + $user=@mysql_fetch_array($users); + $u=$user[id]; + if($u<1) $u=-1; + return $u; +} +function checkusername($name){ + $users=mysql_query("SELECT id FROM users WHERE name='".addslashes($name)."'"); + $user=@mysql_fetch_array($users); + $u=$user[id]; + if($u<1) $u=-1; + return $u; +} +function shenc($str){ + $l=strlen($str); + for($i=0;$i<$l;$i++){ + $n=(308-ord($str[$i]))%256; + $e[($i+5983)%$l]+=floor($n/16); + $e[($i+5984)%$l]+=($n%16)*16; + } + for($i=0;$i<$l;$i++) $s.=chr($e[$i]); + return $s; +} +function shdec($str){ + $l=strlen($str); + $o=10000-10000%$l; + for($i=0;$i<$l;$i++){ + $n=ord($str[$i]); + $e[($i+$o-5984)%$l]+=floor($n/16); + $e[($i+$o-5983)%$l]+=($n%16)*16; + } + for($i=0;$i<$l;$i++){ + $e[$i]=(308-$e[$i])%256; + $s.=chr($e[$i]); + } + return $s; +} +function fadec($c1,$c2,$pct) { + $pct2=1-$pct; + $cx1[r]=hexdec(substr($c1,0,2)); + $cx1[g]=hexdec(substr($c1,2,2)); + $cx1[b]=hexdec(substr($c1,4,2)); + $cx2[r]=hexdec(substr($c2,0,2)); + $cx2[g]=hexdec(substr($c2,2,2)); + $cx2[b]=hexdec(substr($c2,4,2)); + $ret=floor($cx1[r]*$pct2+$cx2[r]*$pct)*65536+ + floor($cx1[g]*$pct2+$cx2[g]*$pct)*256+ + floor($cx1[b]*$pct2+$cx2[b]*$pct); + $ret=dechex($ret); + return $ret; +} +function fonlineusers($id){ + global $userip,$loguserid; + if($loguserid) mysql_query("UPDATE users SET lastforum=$id WHERE id=$loguserid"); + else mysql_query("UPDATE guests SET lastforum=$id WHERE ip='$userip'"); + $forumname=@mysql_result(mysql_query("SELECT title FROM forums WHERE id=$id"),0,0); + $onlinetime=ctime()-300; + $onusers=mysql_query("SELECT id,name,powerlevel,lastactivity,sex,minipic,lasturl FROM users WHERE lastactivity>$onlinetime AND lastforum=$id ORDER BY name"); + for($numon=0;$onuser=mysql_fetch_array($onusers);$numon++){ + if($numon) $onlineusers.=', '; + $namecolor=getnamecolor($onuser[sex],$onuser[powerlevel]); + $namelink="$onuser[name]"; + $onlineusers.=''; + $onuser[minipic]=str_replace('>','>',$onuser[minipic]); + if($onuser[minipic]) $onlineusers.=" "; + if($onuser[lastactivity]<=$onlinetime) $namelink="($namelink)"; + $onlineusers.="$namelink"; + } + $p=($numon?':':'.'); + $s=($numon!=1?'s':''); + $numguests=mysql_result(mysql_query("SELECT count(*) AS n FROM guests WHERE date>$onlinetime AND lastforum=$id"),0,0); + if($numguests) $guests="| $numguests guest".($numguests>1?'s':''); + return "$numon user$s currently in $forumname$p $onlineusers $guests"; +} +function getnamecolor($sex,$powl){ + global $nmcol; + + //$namecolor='color='.$nmcol[$sex][$powl]; + if($powl>=-1){ + $namecolor='color='.$nmcol[$sex][$powl]; +// $namecolor='color='.$nmcol[1][$powl]; // uncomment for boobs + }else{ + $stime=gettimeofday(); + $h=(($stime[usec]/5)%600); + if($h<100){ + $r=255; + $g=155+$h; + $b=155; + }elseif($h<200){ + $r=255-$h+100; + $g=255; + $b=155; + }elseif($h<300){ + $r=155; + $g=255; + $b=155+$h-200; + }elseif($h<400){ + $r=155; + $g=255-$h+300; + $b=255; + }elseif($h<500){ + $r=155+$h-400; + $g=155; + $b=255; + }else{ + $r=255; + $g=155; + $b=255-$h+500; + } + $rndcolor=substr(dechex($r*65536+$g*256+$b),-6); + $namecolor="color=$rndcolor"; + } + if($sex==3){ + $stime=gettimeofday(); + $rndcolor=substr(dechex(1677722+$stime[usec]*15),-6); + $namecolor="color=$rndcolor"; + } + if($powl==4) { + $namecolor="color=".$nmcol[rand(0,2)][rand(0,3)]; + } + + return $namecolor; +} + +function redirect($url,$msg,$delay){ + if($delay<1) $delay=1; + return "You will now be redirected to $msg..."; +} + +function postradar($userid){ + $postradar=mysql_query("SELECT name,posts,sex,powerlevel,id FROM users,postradar WHERE postradar.user=$userid AND users.id=postradar.comp ORDER BY posts DESC"); + if(@mysql_num_rows($postradar)>0){ + $race='You are '; + function cu($a,$b){ + $dif=$a[1]-$b[1]; + $t="$dif ahead of"; + if($dif<0){ + $dif=-$dif; + $t="$dif behind"; + } + if($dif==0) $t=' tied with'; + $namecolor=getnamecolor($b[sex],$b[powerlevel]); + $namelink="$b[name]"; + $t.=" $namelink ($b[1])"; + return $t; + } + $user1=mysql_fetch_array(mysql_query("SELECT name,posts,id FROM users WHERE id=$userid")); + for($i=0;$user2=mysql_fetch_array($postradar);$i++){ + if($i) $race.=', '; + if($i and $i==mysql_num_rows($postradar)-1) $race.='and '; + $race.=cu($user1,$user2); + } + } + return $race; +} +function loaduser($id,$type){ + if($type==1) $fields='id,name,sex,powerlevel,posts'; + return @mysql_fetch_array(mysql_query("SELECT $fields FROM users WHERE id=$id")); +} +function getpostlayoutid($text){ + $id=@mysql_result(mysql_query("SELECT id FROM postlayouts WHERE text='".addslashes($text)."' LIMIT 1"),0,0); + if(!$id){ + mysql_query("INSERT INTO postlayouts (text) VALUES ('".addslashes($text)."')"); + $id=mysql_insert_id(); + } + return $id; +} +function squot($t,& $src){ + switch($t){ + case 0: $src=str_replace('"','"',$src); break; + case 1: $src=str_replace('"','%22',$src); break; + case 2: $src=str_replace('"','"',$src); break; + case 3: $src=str_replace('%22','"',$src); break; + } +} +function sbr($t,& $src){ + global $br; + switch($t){ + case 0: $src=str_replace($br,'
',$src); break; + case 1: $src=str_replace('
',$br,$src); break; + } +} +function mysql_get($query){ + return mysql_fetch_array(mysql_query($query)); +} +function sizelimitjs(){ + return ' + + '; +} + +function loadtlayout(){ + global $log,$loguser,$tlayout; + $tlayout=($log?$loguser[layout]:1); + $layoutfile=mysql_result(mysql_query("SELECT file FROM tlayouts WHERE id=$tlayout"),0,0); + require "tlayouts/$layoutfile.php"; +} + +function errorpage($text){ + global $header,$tblstart,$tccell1,$tblend,$footer; + die("$header
$tblstart$tccell1>$text$tblend$footer"); +} + +require 'lib/threadpost.php'; +require 'lib/replytoolbar.php'; +?> \ No newline at end of file diff --git a/lib/layout.php b/lib/layout.php new file mode 100644 index 0000000..994c7ca --- /dev/null +++ b/lib/layout.php @@ -0,0 +1,226 @@ +'; + $fonthead=''; + $smallfont=''; + $tinyfont=''; + foreach(array(1,2,c,h) as $celltype){ + $cell="
--------------------
', + '

____________________
', + '


', + '

'); + $br=' +'; + $css=" + '; + + if($loguserid){ + $headlinks=' + Logout + | Edit profile'; + if(@mysql_result(mysql_query('SELECT count(*) FROM userpic'),0,0)) $headlinks.=' + | Avatars'; + $headlinks.=' + | Post radar + | Favorites'; + }else + $headlinks=' + Register + | Login'; + $headlinks2=" + Main + | Memberlist + | Active users + | Calendar + | IRC Chat + | Online users
+ Ranks + | FAQ + | ACS + | Stats + | Color Chart + + | Photo album + "; + $views=mysql_result(mysql_query('SELECT views FROM misc'),0,0)+1; + mysql_query("UPDATE misc SET views=$views"); + if($views%1000000>999000 or $views%1000000<1000){ + $u=($loguserid?$loguserid:0); + mysql_query("INSERT INTO hits VALUES ($views,$u,'$userip',".ctime().')'); + } + $count[u]=mysql_result(mysql_query('SELECT COUNT(*) FROM users'),0,0); + $count[t]=mysql_result(mysql_query('SELECT COUNT(*) FROM threads'),0,0); + $count[p]=mysql_result(mysql_query('SELECT COUNT(*) FROM posts'),0,0); + mysql_query("INSERT INTO dailystats (date) VALUES ('".date('m-d-y',ctime())."')"); + mysql_query("UPDATE dailystats SET users=$count[u],threads=$count[t],posts=$count[p],views=$views WHERE date='".date('m-d-y',ctime())."'"); + updategb(); + + $new=' '; + if($log && strpos($PHP_SELF, "private.php") == false && strpos($PHP_SELF, "index.php") == 0){ + $pmsgnew=0; + $maxid=mysql_result(mysql_query("SELECT max(id) FROM pmsgs WHERE userto=$loguserid"),0,0); + $pmsgs=mysql_query("SELECT userfrom,date,u.id,name,sex,powerlevel FROM pmsgs p,pmsgs_text,users AS u WHERE p.id=0$maxid AND u.id=p.userfrom AND p.id=pid") or print mysql_error(); + if($pmsg=@mysql_fetch_array($pmsgs)){ + $pmsgnum=mysql_result(mysql_query("SELECT COUNT(*) FROM pmsgs WHERE userto=$loguserid"),0,0); + $pmsgnew=mysql_result(mysql_query("SELECT COUNT(*) FROM pmsgs WHERE userto=$loguserid AND msgread=0"),0,0); + if($pmsgnew) $new=$newpic; + $namecolor=getnamecolor($pmsg[sex],$pmsg[powerlevel]); + $lastmsg="Last message from $pmsg[name] on ".date($dateformat,$pmsg[date]+$tzoff); + } + if ($pmsgnew != 1) $ssss = "s"; + if ($pmsgnew > 0) $privatebox=" + $new You have $pmsgnew new private message$ssss -- $lastmsg + "; + else $privatebox = ""; + } + + + $body=""; + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + + Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $privatebox + $tblend +
+ "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $ref=$HTTP_REFERER; + if($ref && substr($ref,7,7)!="acmlm.o") mysql_query("INSERT INTO referer (url,ref) VALUES ('".addslashes($url)."', '".addslashes($ref)."')"); + $url=getenv('SCRIPT_URL'); + if(!$url) $url=str_replace('/etc/board','',getenv('SCRIPT_NAME')); + $q=getenv('QUERY_STRING'); + if($q) $url.="?$q"; + + if(mysql_result(mysql_query("SELECT count(*) FROM ipbans WHERE INSTR('$forwardedip',ip)=1"),0,0)) $ipbanned=1; + if(mysql_result(mysql_query("SELECT count(*) FROM ipbans WHERE INSTR('$clientip',ip)=1"),0,0)) $ipbanned=1; + if(mysql_result(mysql_query("SELECT count(*) FROM ipbans WHERE INSTR('$userip',ip)=1"),0,0)) $ipbanned=1; + + if($ipbanned) { + $url='IP banned'; + setcookie('ipbanned',1,2147483647); + } + mysql_query("DELETE FROM guests WHERE ip='$userip' OR date<".(ctime()-300)); + if($log){ +/* + $ulastip=mysql_result(mysql_query("SELECT lastip FROM users WHERE id=$loguserid"),0,0); + $aol1=(substr($userip,0,7)=='152.163' or substr($userip,0,7)=='205.188' or substr($userip,0,6)=='64.12.' or substr($userip,0,6)=='195.93' or substr($userip,0,6)=='198.81'); + $aol2=(substr($ulastip,0,7)=='152.163' or substr($ulastip,0,7)=='205.188' or substr($ulastip,0,6)=='64.12.' or substr($ulastip,0,6)=='195.93' or substr($ulastip,0,6)=='198.81'); + if($userip!=$ulastip && !($aol1 && $aol2)){ + $fpnt=fopen('ipchanges.log', 'a'); + $r=fputs($fpnt, "User $loguserid IP changed from $ulastip to $userip, on ".date($dateformat,ctime())." +"); + $r=fclose($fpnt); + } +*/ +if ($loguserid != 3 && $loguserid != 2) mysql_query("UPDATE users SET lastactivity=".ctime().",lastip='$userip',lasturl='".addslashes($url)."',lastforum=0 WHERE id=$loguserid"); + if($isadmin) $headlinks="Admin | $headlinks"; + }else{ + mysql_query("INSERT INTO guests (ip,date,lasturl) VALUES ('$userip',".ctime().",'".addslashes($url)."')"); + } + $header=makeheader($header1,$headlinks,$header2); + $footer=" + +
$smallfont +

$sitename +
$affiliatelinks +
+
AcmlmBoard v1.92.08 ~ 12-06-2005 +
©2000-2005 Acmlm, Emuz, Blades, Xkeeper + + "; + if($ipbanned) die("$header
$tblstart$tccell1>Your IP address has been banned from this board.$tblend$footer"); +?> \ No newline at end of file diff --git a/lib/libs.php b/lib/libs.php new file mode 100644 index 0000000..938fe29 --- /dev/null +++ b/lib/libs.php @@ -0,0 +1,8 @@ +
You can post about it in the help/suggestions forum, back on the board."; + +die(); + +?> \ No newline at end of file diff --git a/lib/replytoolbar.php b/lib/replytoolbar.php new file mode 100644 index 0000000..bc6b7e6 --- /dev/null +++ b/lib/replytoolbar.php @@ -0,0 +1,66 @@ + + + + + + "; + }elseif($part==2){ + $scp=' + $scp>if(checkBrowser()) {document.write(createSeperation(\"#$scr3\",\"#$scr2\",\"#$scr4\"))} + $scp$scp2/bold.gif alt='Bold Ctrl+B'>\", \"bold\", \"if(boldDown==0){buttonDown(btnboldname); boldDown=1; doCode(boldOpen)}else{buttonUp(btnboldname); boldDown=0; doCode(boldClose)}\", \"if(boldDown==0){buttonUp(btnboldname)}\", \"if(boldDown==0){buttonOut(btnboldname)}\") + $scp$scp2/italic.gif alt='Italic Ctrl+I'>\", \"italic\", \"if(italDown==0){buttonDown(btnitalname); italDown=1; doCode(italOpen)}else{buttonUp(btnitalname); italDown=0; doCode(italClose)}\", \"if(italDown==0){buttonUp(btnitalname)}\", \"if(italDown==0){buttonOut(btnitalname)}\") + $scp$scp2/underline.gif alt='Underline Ctrl+U'>\", \"underline\", \"if(undDown==0){buttonDown(btnundname); undDown=1; doCode(undOpen)}else{buttonUp(btnundname); undDown=0; doCode(undClose)}\", \"if(undDown==0){buttonUp(btnundname)}\", \"if(undDown==0){buttonOut(btnundname)}\") + $scp$scp2/strike.gif alt='Strikethrough Ctrl+S'>\", \"strike\", \"if(strkDown==0){buttonDown(btnstrikename); strkDown=1; doCode(strkOpen)}else{buttonUp(btnstrikename); strkDown=0; doCode(strkClose)}\", \"if(strkDown==0){buttonUp(btnstrikename)}\", \"if(strkDown==0){buttonOut(btnstrikename)}\") + $scp>if(checkBrowser()) {document.write(createSeperation(\"#$scr3\",\"#$scr2\",\"#$scr4\"))} + $scp$scp2/link.gif alt='Hyperlink Ctrl+L'>\", \"link\", \"if(linkDown==0){buttonDown(btnlinkname); linkDown=1; doCode(linkOpen)}else{buttonUp(btnlinkname); linkDown=0; doCode(linkClose)}\", \"if(linkDown==0){buttonUp(btnlinkname)}\", \"if(linkDown==0){buttonOut(btnlinkname)}\") + $scp$scp2/image.gif alt='Image Ctrl+M'>\", \"image\", \"if(imageDown==0){buttonDown(btnimagename); imageDown=1; doCode(imageOpen)}else{buttonUp(btnimagename); imageDown=0; doCode(imageClose)}\", \"if(imageDown==0){buttonUp(btnimagename)}\", \"if(imageDown==0){buttonOut(btnimagename)}\") + $scp$scp2/smiley.gif alt='Add Smileys'>\", \"smiley\", \"if(MenuOn==0){showLayer(mnuSmiley, event); buttonDown(btnsmileyname); MenuOn=1}else{menuOut(); buttonUp(btnsmileyname); MenuOn=0}\", \"if(MenuOn==1){if(!menuOver(mnuSmiley)){menuOut()}}else{buttonUp(btnsmileyname)}\", \"buttonOut(btnsmileyname)\") + + "; + }elseif($part==3) $output="onKeyDown='if(checkBrowser()){if(event.ctrlKey){if(checkKey(66,event)){if(boldDown==0){buttonDown(btnboldname);boldDown=1;doCode(boldOpen)}else{buttonOut(btnboldname);boldDown=0;doCode(boldClose)} return false} if(checkKey(73,event)){if(italDown==0){buttonDown(btnitalname);italDown=1;doCode(italOpen)}else{buttonOut(btnitalname);italDown=0;doCode(italClose)} return false} if(checkKey(85,event)){if(undDown==0){buttonDown(btnundname);undDown=1;doCode(undOpen)}else{buttonOut(btnundname);undDown=0;doCode(undClose)} return false} if(checkKey(83,event)){if(strkDown==0){buttonDown(btnstrikename);strkDown=1;doCode(strkOpen)}else{buttonOut(btnstrikename);strkDown=0;doCode(strkClose)} return false} if(checkKey(76,event)){if(linkDown==0){buttonDown(btnlinkname);linkDown=1;doCode(linkOpen)}else{buttonOut(btnlinkname);linkDown=0;doCode(linkClose)} return false}if(checkKey(77,event)){if(imageDown==0){buttonDown(btnimagename);imageDown=1;doCode(imageOpen)}else{buttonOut(btnimagename);imageDown=0;doCode(imageClose)} return false}}}'"; + elseif($part==4){ + $output=" + + "; + } + return $output; +} +?> \ No newline at end of file diff --git a/lib/rpg.php b/lib/rpg.php new file mode 100644 index 0000000..88a5e79 --- /dev/null +++ b/lib/rpg.php @@ -0,0 +1,58 @@ + \ No newline at end of file diff --git a/lib/threadpost.php b/lib/threadpost.php new file mode 100644 index 0000000..d9b1674 --- /dev/null +++ b/lib/threadpost.php @@ -0,0 +1,95 @@ +$post[name]"; + $set[date]=date($dateformat,$post[date]+$tzoff); + if($post[location]) $set[location]="
From: $post[location]"; + if($post[picture]){ + $post[picture]=str_replace('>','%3E',$post[picture]); +// $userpicture=""; + $set[userpic]=""; + } + if($post[edited]){ + $set[edited]=($post[signtext])?'':'

'; + $set[edited].="
$smallfont$post[edited]"; + } + if($post[signtext]) $post[signtext]=$sep[$loguser[signsep]].$post[signtext]; + if($pthread) $set[threadlink]="$pthread[title]"; + $post[text]=doreplace2($post[text], $post[options]); + $return=dofilters(postcode($post,$set)); + return $return; +} + +function setlayout($post){ + global $loguser,$postl; + if($loguser[viewsig]!=1) $post[headid]=$post[signid]=0; + if(!$loguser[viewsig]){ + $post[headtext]=$post[signtext]=''; + return $post; + } + $post[tagval].='°»'; + if($loguser[viewsig]!=2){ + if($headid=$post[headid]){ + if(!$postl[$headid]) $postl[$headid]=mysql_get("SELECT text FROM postlayouts WHERE id=$headid"); + $post[headtext]=$postl[$headid][text]; + } + if($signid=$post[signid]){ + if(!$postl[$signid]) $postl[$signid]=mysql_get("SELECT text FROM postlayouts WHERE id=$signid"); + $post[signtext]=$postl[$signid][text]; + } + } + $post[headtext]=settags($post[headtext],$post[tagval]); + $post[signtext]=settags($post[signtext],$post[tagval]); + if($loguser[viewsig]==2){ + $post[headtext]=doreplace($post[headtext],$post[num],($post[date]-$post[regdate])/86400,$post[name],1); + $post[signtext]=doreplace($post[signtext],$post[num],($post[date]-$post[regdate])/86400,$post[name],1); + } + $post[headtext]=doreplace2($post[headtext]); + $post[signtext]=doreplace2($post[signtext]); +// $post[text]=doreplace2($post[text], $post[options]); + return $post; +} + +function syndrome($num){ + $a='>Affected by'; + if($num>=75) $syn="83F3A3$a 'Reinfors Syndrome'"; + if($num>=100) $syn="FFE323$a 'Reinfors Syndrome' +"; + if($num>=150) $syn="FF5353$a 'Reinfors Syndrome' ++"; + if($num>=200) $syn="CE53CE$a 'Reinfors Syndrome' +++"; + if($num>=250) $syn="8E83EE$a 'Reinfors Syndrome' ++++"; + if($num>=300) $syn="BBAAFF$a 'Wooster Syndrome'!!"; + if($num>=350) $syn="FFB0FF$a 'Wooster Syndrome' +!!"; + if($num>=400) $syn="FFB070$a 'Wooster Syndrome' ++!!"; + if($num>=450) $syn="C8C0B8$a 'Wooster Syndrome' +++!!"; + if($num>=500) $syn="A0A0A0$a 'Wooster Syndrome' ++++!!"; + if($num>=500) $syn="A0A0A0$a 'Wooster Syndrome' ++++!!"; + if($num>=600) $syn="C762F2$a 'Anya Syndrome'!!!"; + if($num>=800) $syn="D06030$a 'Something higher than Anya Syndrome' +++++!!"; + if($syn) $syn="
"; + return $syn; +} + +function dofilters($p){ + $p=preg_replace("''si",'',$p); + $p=preg_replace("'script',$p); + $p=preg_replace("'onload='si",'onload',$p); + $p=preg_replace("'onhover='si",'onhover',$p); + $p=preg_replace("'onfail='si",'onfail',$p); + $p=preg_replace("'script',$p); + $p=preg_replace("'iframe',$p); + $p=preg_replace("'filter:alpha'si",'f·alpha',$p); + $p=preg_replace("'filter:'si",'x:',$p); + $p=preg_replace("'f·alpha'si",'filter:alpha',$p); + $p=preg_replace("'zeon'si",'shit',$p); + return $p; +} + +?> \ No newline at end of file diff --git a/login.php b/login.php new file mode 100644 index 0000000..263a151 --- /dev/null +++ b/login.php @@ -0,0 +1,33 @@ +$tblstart"; + if(!$action){ + $txt.=" + +
+ $tccellh width=150> $tccellh>  + $tccell1>User name: $tccell2l>$inpt=username SIZE=25 MAXLENGTH=25> + $tccell1>Password: $tccell2l>$inpp=password SIZE=13 MAXLENGTH=32> + $tccell1> $tccell2l> + $inph=action VALUE=login> + $inps=submit VALUE=Login> + "; + } + if($_POST[action]=='login'){ + $userid=checkuser($username,$password); + if($userid!=-1){ + setcookie('loguserid',$userid,2147483647); + setcookie('logpassword',shenc($password),2147483647); + $msg="You are now logged in as $username."; + }else $msg="Couldn't login. Either you didn't enter an existing username, or you haven't entered the right password for the username."; + $txt.="$tccell1>$msg
".redirect('index.php','return to the board',0); + } + if($_POST[action]=='logout'){ + setcookie('loguserid',0); + setcookie('logpassword',''); + $txt.="$tccell1> You are now logged out.
".redirect('index.php','return to the board',0); + } + print $txt.$tblend.$footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/memberlinks.php b/memberlinks.php new file mode 100644 index 0000000..11273eb --- /dev/null +++ b/memberlinks.php @@ -0,0 +1,29 @@ + + $tblstart + $tccellh colspan=2>Username + $tccellh >Homepage name + $tccellh >Homepage URL + $tccellh width=50>Posts + "; + $users1 = mysql_query("SELECT id,posts,name,powerlevel,sex,minipic,homepageurl,homepagename FROM users WHERE homepageurl!='' ORDER BY posts DESC") or print mysql_error(); + while($user=mysql_fetch_array($users1)){ + if($i) print ""; + $i++; + $hpage="$user[homepagename]"; + $url="$user[homepageurl]"; + $namecolor=getnamecolor($user[sex],$user[powerlevel]); + if($user[minipic]) $minipic=""; else $minipic=" "; + print " + $tccell2 width=13>$minipic + $tccell2l>$user[name] + $tccell2>$hpage + $tccell2>$url + $tccell2>$user[posts]"; + } + print "$tblend$pagelinks$footer"; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/memberlist.php b/memberlist.php new file mode 100644 index 0000000..a7b9786 --- /dev/null +++ b/memberlist.php @@ -0,0 +1,164 @@ +$lnk=$sort$qsex$qpow$qpag$qppp&bio=1>Show bio"; + if($bio) $clmn="$tccellh>User bio $smallfont($lnk=$sort$qsex$qpow$qpag$qppp>hide)"; + if($sort=='rating') $clmn="$tccellh colspan=3>User rating"; + if($sex=='m') $where='WHERE sex=0'; + if($sex=='f') $where='WHERE sex=1'; + if($sex=='n') $where='WHERE sex=2'; + if($pow!=''){ + if($where) $where.=" AND powerlevel=$pow"; + else $where="WHERE powerlevel=$pow"; + } + $query='SELECT id,posts,regdate,name,picture,bio,powerlevel,sex,r.* FROM users LEFT JOIN users_rpg r ON id=uid '; + if($sort=='posts' or $sort=='') $users1=mysql_query("$query$where ORDER BY posts DESC"); + if($sort=='name') $users1=mysql_query("$query$where ORDER BY name"); + if($sort=='reg') $users1=mysql_query("$query$where ORDER BY regdate DESC"); + if($sort=='exp' or $sort=='rating') $users1=mysql_query("$query$where"); + if($sort=='age'){ + if($sex=='m') $where='AND sex=0'; + if($sex=='f') $where='AND sex=1'; + if($sex=='n') $where='AND sex=2'; + $where.=($where?' AND birthday':'WHERE birthday'); + $users1=mysql_query("$query $where ORDER BY birthday") or print mysql_error(); + } + $numusers=mysql_num_rows($users1); + for($i=0;$user=mysql_fetch_array($users1);$i++){ + $user[days]=(ctime()-$user[regdate])/86400; + $user[exp]=calcexp($user[posts],$user[days]); + $user[lvl]=calclvl($user[exp]); + $users[$user[id]]=$user; + $rate[$i][0]=$user[id]; + $rate[$i][2]=$user[exp]; + } + if($sort=='rating'){ + mysql_data_seek($users1,0); + for($i=0;$user=mysql_fetch_array($users1);$i++){ + $ratescore=0; + $ratetotal=0; + $ratings=mysql_query("SELECT userfrom,userrated,rating FROM userratings WHERE userrated=$user[id]"); + while($rating=@mysql_fetch_array($ratings)){ + $l=$users[$rating[userfrom]][lvl]; + if($l<1) $l=1; + $ratescore+=$rating[rating]*$l; + $ratetotal+=10*$l; + } + $numvotes=@mysql_num_rows($ratings); + $s=($numvotes>1?'s':''); + if($numvotes){ + $rate[$i][0]=$user[id]; + $rate[$i][1]=$ratescore*100000/$ratetotal; + $users[$user[id]][5]='
'.(sprintf('%01.2f',$rate[$i][1]/10000))."$tccell2>$ratescore / $ratetotal$tccell2>$numvotes vote$s"; + $rate[$i][1]=$rate[$i][1]/10+10000; + }else{ + $numusers--; + $i--; + } + } + usort($rate,'sortbyrating'); + } + if($sort=='exp') usort($rate,'sortbyexp'); + $pagelinks=$smallfont.'Pages:'; + for($i=0;$i<($numusers/$ppp);$i++){ + $pagelinks.=($i==$page?' '.($i+1):" ".($i+1).''); + } + if($numusers>1) $s="s"; + print " + $header
$tblstart + $tccellh colspan=2>$numusers user$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=age$q$qpow$qsex>Age | + $lnk=rating$q$qpow$qsex>Rating + $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 + $tccell1s> Powerlevel: + $tccell2s> + $lnk=$sort$q$qsex&pow=-1>Banned | + $lnk=$sort$q$qsex&pow=0>Normal | + $lnk=$sort$q$qsex&pow=1>Local moderator | + $lnk=$sort$q$qsex&pow=2>Full moderator | + $lnk=$sort$q$qsex&pow=3>Administrator | + $lnk=$sort$q$qsex>All + $tblend
$tblstart + $tccellh width=30># + $tccellh width=60>Picture + $tccellh>Username + "; + if(!$rpg){ + print " + $clmn + $tccellh width=150>Registered on + $tccellh width=60>Posts + $tccellh width=30>Level + $tccellh width=100>EXP + "; + }else{ + print "$tccellh width=30>Level"; + for($i=0;$i<9;$i++) print "$tccellh width=6%>".$stat[$i].''; + print "$tccellh width=9%>"; + } + $i=$ppp*$page; + for($u=0;$rate[$i] && $i<($ppp*($page+1)) && $i<$numusers;$u++){ + if($u) $ulist.=''; + $user=$users[$rate[$i][0]]; + $t=$user[0]; + $user[picture]=str_replace('>','%3E',$user[picture]); + $userpicture=""; + if(!$user[picture]) $userpicture=' '; + $namecolor=getnamecolor($user[sex],$user[powerlevel]); + if(!$bio and $sort!='rating') $user[5]=' '; + if($rpg){ + $eqitems=mysql_query("SELECT * FROM items"); + while($item=mysql_fetch_array($eqitems)) $items[$item[id]]=$item; + $stats=getstats($user,$items); + } + $ulist.=" + $tccell2>".($i+1).". + $tccell1l>$userpicture + $tccell2l>$user[3] + "; + if(!$rpg){ + $ulist.=" + $tccell1ls>$user[5] + $tccell2>".date($dateformat,$user[2]+$tzoff)." + $tccell1>$user[1] + $tccell1>$user[lvl] + $tccell1>$user[exp] + "; + }else{ + $ulist.="$tccell1>$user[lvl]"; + for($k=0;$k<9;$k++) $ulist.="$tccell1>".$stats[$stat[$k]].''; + $ulist.="$tccell1>$stats[GP]"; + } + $i++; + } + print "$ulist$tblend$pagelinks$footer"; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/mergedeletedposts.php b/mergedeletedposts.php new file mode 100644 index 0000000..0df9443 --- /dev/null +++ b/mergedeletedposts.php @@ -0,0 +1,11 @@ + diff --git a/minipics.php b/minipics.php new file mode 100644 index 0000000..ba74945 --- /dev/null +++ b/minipics.php @@ -0,0 +1,26 @@ + $tccellh width=34%>Username"; + print "$header
$tblstart$cell$cell$cell"; + $i=-3; + $users=mysql_query("SELECT id,name,sex,powerlevel,minipic FROM users WHERE minipic!='' ORDER BY name"); + while($user=mysql_fetch_array($users)){ + $i++; + $namecolor=getnamecolor($user[sex],$user[powerlevel]); + print " + $tccell2> + $tccell2ls>$user[name] + "; + if(!$i){ + $i=-3; + print ""; + } + } + while($i){ + $i++; + print "$tccell2ls $tccell2ls "; + } + print $tblend.$footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/newadmin.php b/newadmin.php new file mode 100644 index 0000000..7d1ea7d --- /dev/null +++ b/newadmin.php @@ -0,0 +1,433 @@ +
$fonthead"; + + print $header; + + if ($action=="") { + print $header; + print " + + +
+
+ + "; + + if ($logpassword!="" and $loguser[password]==$logpassword) { + + $username=$loguser[name]; + + $password=$loguser[password]; + + } + + $replytable="$tccellha width=150$tccellhb"." "; + + $replytable.="$tccellh"." "; + + $replytable.="$tccell1"."User name:"; + + $replytable.="$tccell2".""; + + $replytable.="$tccell1"."Password:"; + + $replytable.="$tccell2".""; + + $replytable.="$tccell1"." "; + + $replytable.="$tccell2"." + + + + "; + + print "$replytable + + + +
+ + "; + + print "
+ "; + print $footer; + printtimedif($startingtime); + + } + + if ($action=="enteradmin") { + + $u=1; + + $userid=-1; + + while ($users[$u][id]!="") { + + if ($users[$u][name]==$username and $users[$u][password]==$password and $users[$u][powerlevel]>1) { + + $userid=$u; + + } + + $u++; + + } + if ($userid!=-1) { + while ($users[$i][0]!="") { + $usercount++; + $lastusername=$users[$i][2]; + $lastuserid=$i; + if ((time()-$users[$i][9])<300) { + $numonline++; + if ($numonline>1) { + $onlineusers.="
"; + } + $onlineusers.="
".$users[$i][2]." ".$users[$i][19]; + } + $i++; + } + print " +

heh

+ + + + + heh + + + + + <body lang=EN-US style='tab-interval:.5in'> + <div class=Section1> + <pl>Oh well, you can't see this..</p> + </div> + </body> + +"; + } + else { + print $header; + print " + + +
+
+ + "; + $replytable.="$tccell1"."Couldn't enter in the admin control. Either you are not an ". + "administratror, or you haven't entered the right username or password.". + "
Click here to return to the board.". + ""; + print "$replytable + +
+
" + ; + print $footer; + printtimedif($startingtime); + } +} + + /* print " + + + + + +
+ + + + + + "; + + if ($userid!=-1) { + + $tsmilies=""; + + $fpnt=fopen("smilies.dat", "r"); + + $i=0; + + while (!feof($fpnt)) { + + $smilie=fgets($fpnt, 1000); + + $tsmilies.=$smilie; + + $i++; + + } + + $r=fclose($fpnt); + + $tposticons=""; + + $fpnt=fopen("posticons.dat", "r"); + + $i=0; + + while (!feof($fpnt)) { + + $posticon=fgets($fpnt, 200); + + $tposticons.=$posticon; + + $i++; + + } + + $r=fclose($fpnt); + + $tcategories=""; + + $fpnt=fopen("categories.dat", "r"); + + $i=0; + + while (!feof($fpnt)) { + + $category=fgets($fpnt, 200); + + $tcategories.=$category; + + $i++; + + } + + $r=fclose($fpnt); + +// $tforums=""; + +// $fpnt=fopen("forums.dat", "r"); + +// $i=0; + +// while (!feof($fpnt)) { + +// $forum=fgets($fpnt, 10000); + +// $tforums.=$forum; + +// $i++; + +// } + +// $r=fclose($fpnt); + + $fpnt=fopen("forummods.dat", "r"); + + $i=0; + + while (!feof($fpnt)) { + + $forummod=fgets($fpnt, 10000); + + $tforummods.=$forummod; + + $i++; + + } + + $r=fclose($fpnt); + + $tranks=""; + + $fpnt=fopen("ranks.dat", "r"); + + $i=0; + + while (!feof($fpnt)) { + + $rank=fgets($fpnt, 200); + + $tranks.=$rank; + + $i++; + + } + + $r=fclose($fpnt); + + $fpnt=fopen("ipban.dat", "r"); + + $i=0; + + while (!feof($fpnt)) { + + $ipban=fgets($fpnt, 20); + + $tipbans.=$ipban; + + $i++; + + } + + $r=fclose($fpnt); + + $replytable="$tccellha width=150$tccellhb"." "; + + $replytable.="$tccellh"." "; + + $replytable.="$tccell1"."Smilies: (smilies.dat)$smallfont
 Each line is a smilie. Syntax:
smilie code_URL of image to use

Beware: some characters, such as \"(\" and \"|\", can't be used without causing errors."; + + $replytable.="$tccell2".""; + + $replytable.="$tccell1"."Posticons: (posticons.dat)$smallfont
 Each line is a posticon. Syntax:
URL of posticon."; + + $replytable.="$tccell2".""; + + $replytable.="$tccell1"."Forum categories: (categories.dat)$smallfont
 Each line is a category. Syntax:
Name of category."; + + $replytable.="$tccell2".""; + +// $replytable.="$tccell1"."Forums: (forums.dat)$smallfont
 Each line is a forum. Syntax:
Name_Description_Category number_User power level restriction."; + +// $replytable.="$tccell2".""; + + $replytable.="$tccell1"."Forum moderators: (forummods.dat)$smallfont
 Each line is for a forum. Syntax:
Mod. user ID_2nd moderator_3rd_(and so on)."; + + $replytable.="$tccell2".""; + + $replytable.="$tccell1"."User ranks: (ranks.dat)$smallfont
 Each line is a rank. Syntax:
Number of posts required_Rank title."; + + $replytable.="$tccell2".""; + + $replytable.="$tccell1"."IP ban: (ipban.dat)$smallfont
 Each line is a banned IP address or range. If you want to ban a IP range (like 206.172.*.*), enter only the non-changing part (like \"206.172.\"). Syntax:
IP address or range to ban."; + + $replytable.="$tccell2".""; + + $replytable.="$tccell1"." "; + + $replytable.="$tccell2"." + + + + "; + + } else { + + $replytable.="$tccell1"."Couldn't enter in the admin control. Either you are not an ". + + "administratror, or you haven't entered the right username or password.". + + "
Click here to return to the board.". + + ""; + + } + + print "$replytable + + + +
+ + "; + + print " + +
+ + "; + + } + + if ($action=="savesettings") { + + print " + + + + + +
+ + "; + + $fpnt=fopen("smilies.dat", "w"); + + $r=fputs($fpnt, "$lsmilies"); + + $r=fclose($fpnt); + + $fpnt=fopen("posticons.dat", "w"); + + $r=fputs($fpnt, "$lposticons"); + + $r=fclose($fpnt); + + $fpnt=fopen("categories.dat", "w"); + + $r=fputs($fpnt, "$lcategories"); + + $r=fclose($fpnt); + +// $fpnt=fopen("forums.dat", "w"); + +// $r=fputs($fpnt, "$lforums"); + +// $r=fclose($fpnt); + + $fpnt=fopen("forummods.dat", "w"); + + $r=fputs($fpnt, "$lforummods"); + + $r=fclose($fpnt); + + $fpnt=fopen("ranks.dat", "w"); + + $r=fputs($fpnt, "$lranks"); + + $r=fclose($fpnt); + + $fpnt=fopen("ipban.dat", "w"); + + $r=fputs($fpnt, "$lipbans"); + + $r=fclose($fpnt); + + print "$tccell1"."Settings saved.". + + "
Click here to return to the board, or wait to get redirected. + + + + + +
+ + "; + + print " + +
+ + "; + + } + + print $footer; + + printtimedif($startingtime); + + mysql_close($sql);*/ + +?> \ No newline at end of file diff --git a/newpoll.php b/newpoll.php new file mode 100644 index 0000000..571aa70 --- /dev/null +++ b/newpoll.php @@ -0,0 +1,213 @@ +
$fonthead"; + print $header; + replytoolbar(1); + $forumid=$id; + if(!$action and $forumid>-1){ + print "$fonttag$boardname - ".$forums[$forumid][title]." + +
+
+ + "; + $posticons=file("posticons.dat"); + $i=0; + while($posticons[$i]){ + $posticonlist.="$radio=iconid value=$i>    "; + $i++; + if (round($i/10)==($i/10)) {$posticonlist.="
";} + } + $posticonlist.=" +
$radio=iconid value=-1 checked=1> None      + Custom: $inpt=custposticon SIZE=40 MAXLENGTH=100> + "; + if($logpwenc and $loguserid and $forums[$id][minpowerthread]>$loguser[7]){ + print "$tccell1 Sorry, but you are not allowed to post"; + if($loguser[7]==-1) print ", because you are banned from this board.
".redirect("forum.php?id=$id","return to the forum",0); + else print " in this restricted forum.
".redirect("index.php","return to the board",0); + }else{ + print " + + $tccellha width=150$tccellhb $tccellh  + $tccell1User name: $tccell2l$inpt=username VALUE=\"$loguser[2]\" SIZE=25 MAXLENGTH=25> + $tccell1Password: $tccell2l$inpp=password VALUE=\"$logpassword\" SIZE=13 MAXLENGTH=32> + $tccell1Thread title: $tccell2l$inpt=subject SIZE=40 MAXLENGTH=100> + $tccell1Thread icon: $tccell2l$posticonlist + $tccell1Post: $tccell2l".replytoolbar(2)."$txta=message ROWS=20 COLS=$numcols ".replytoolbar(3)."> + $tccell1 $tccell2l + $inph=action VALUE=postthread> + $inph=id VALUE=$id> + $inps=submitth VALUE=\"The thread is done, now for the poll \"> + $inps=preview VALUE=\"Preview thread\"> + "; + } + print " +
+
+ $fonttag$boardname - ".$forums[$forumid][title]." + ".replytoolbar(4); + } + if($action=="postthread"){ + print " + +
+ + "; + $userid=checkuser($username,$password); + $user=$users[$userid]; + if($user[powerlevel]<0) $userid=-1; + if($userid!=-1 and $subject and $message and $user[powerlevel]>=$forums[$forumid][minpowerthread] and $forums[$forumid][title]){ + $message=str_replace("\x22",""",$message); + $msg=$message; + $message=str_replace(""","\x22",$message); + $posticons=file("posticons.dat"); + $posticon=$posticons[$iconid]; + if($iconid==-1) $posticon=""; + if($custposticon) $posticon=$custposticon; + if($user[signature]) $sign="

--------------------
$user[signature]"; + if($user[postheader]) $head=$user[postheader]; + if($user[postbg]) $head="
".$head; + $numposts=$user[posts]+1; + $numdays=(ctime()-$user[regdate])/86400; + $head=doreplace($head,$numposts,$numdays,$username); + $message=doreplace($message,$numposts,$numdays,$username); + $sign=doreplace($sign,$numposts,$numdays,$username); + $t--; + $s=0; + while($smilies[$s][0]){ + $smilie=$smilies[$s]; + $smile=$smilie[0]; + $message=str_replace($smile,"",$message); + $head=str_replace($smile,"",$head); + $sign=str_replace($smile,"",$sign); + $s++; + } + $message=str_replace($br,"
",$message); + if($submit){ + $currenttime=ctime(); + $postnum=$user[posts]+1; + if ($doublevote == "yes") { $doublevote = 1; } else { $doublevote=0; } + mysql_query("UPDATE users SET posts=posts+1,lastposttime=$currenttime WHERE id=$userid"); + mysql_query("INSERT INTO poll (id,question,briefing,closed,doublevote) VALUES (NULL,'".addslashes($pollquestion)."','".addslashes($pollbriefing)."',0,$doublevote)"); + $p=mysql_insert_id(); + foreach ($pollchoices as $chid => $data) { + $ccolor = $data[color]; + print ""; + $cname = $data[choice]; + mysql_query("INSERT INTO poll_choices (id,poll,choice,color) VALUES (NULL,$p,'".addslashes($cname)."','".addslashes($ccolor)."')"); + $moo = mysql_affected_rows(); + print ""; + } + mysql_query("INSERT INTO threads (id,forum,user,views,closed,title,icon,replies,lastpostdate,lastposter,pollid) VALUES (NULL,$id,$userid,0,0,'".addslashes($subject)."','".addslashes($posticon)."',0,$currenttime,$userid,$p)"); + $t=mysql_insert_id(); + mysql_query("INSERT INTO posts (id,thread,user,date,ip,text,num,headtext,signtext) VALUES (NULL,$t,$userid,$currenttime,'".addslashes($userip)."','".addslashes($message)."',$postnum,'".addslashes($head)."','".addslashes($sign)."')"); + mysql_query("UPDATE forums SET numthreads=numthreads+1,numposts=numposts+1,lastpostdate=$currenttime,lastpostuser=$userid WHERE id=$id"); + print " + $tccell1 Thank you, $user[name], for submitting your new thread and poll. +
".redirect("thread.php?id=$t","go to the thread",0)."
"; + }elseif($preview){ + if($posticon) $posticon1=""; + print " + + $tccell1 This is a preview of your post. Once you're done previewing the post, go back to the previous page to make changes to it, or click on the button below to go on to preparing the poll. + $tccell2l$posticon1 $subject
$head$message$sign + $tccell1 +
+ $inph=username VALUE=\"$username\"> + $inph=password VALUE=\"$password\"> + $inph=subject VALUE=\"$subject\"> + $inph=message VALUE=\"$msg\"> + $inph=iconid VALUE=$iconid> + $inph=custposticon VALUE=\"$custposticon\"> + $inph=action VALUE=postthread> + $inph=id VALUE=$id> + $inps=submitth VALUE=\"Submit thread and setup the poll\">
+ + "; + }elseif($submitth || $removechoice || $addchoice){ +// $foo=array_keys($pollchoices); + if ($addchoice) { + $pollchoices[] = array('color' => $polladdcolor, + 'choice' => $polladdchoice); + } + if ($removechoice) { + $pc2 = $pollchoices; + foreach($pc2 as $ccid=>$data) { + if ($ccid != $torem) { + $pc3[$ccid] = $data; + } + } + $pollchoices = $pc3; +/* $key_index = array_keys(array_keys($pollchoices), array_pop($removechoice)); + array_splice($pollchoices, $key_index[0], 1); */ + } + print " + $tccellha width=250$tccellhb $tccellh  + $tccell1a colspan=2>$fonttag Now the thread itself is ready for posting, but before you do + that, you will have to enter a few details about the poll and enter choices. +
+ $inph=username VALUE=\"$username\"> + $inph=password VALUE=\"$password\"> + $inph=subject VALUE=\"$subject\"> + $inph=message VALUE=\"$msg\"> + $inph=iconid VALUE=$iconid> + $inph=torem VALUE=\"\"> + $inph=custposticon VALUE=\"$custposticon\"> + $inph=action VALUE=postthread> + $inph=id VALUE=$id>"; + + if ($polldbl == "yes") { + $doublevote = "$radio=polldbl VALUE=\"yes\" CHECKED> Allow double voting + $radio=polldbl VALUE=\"no\"> Don't allow double voting"; + } else { + $doublevote = "$radio=polldbl VALUE=\"yes\"> Allow double voting + $radio=polldbl VALUE=\"no\" CHECKED> Don't allow double voting"; + } + $tcheader = "$tccellha colspan=2 $tccellhb"; + $halfcols = $numcols/2; + print "$tcheader Poll setup + $tccell1Poll question: $tccell2l$inpt=pollquestion VALUE=\"".aslash($pollquestion)."\"> + $tccell1Poll briefing: $tccell2l$txta=pollbriefing ROWS=10 COLS=".$halfcols.">$pollbriefing + $tccell1Poll options: $tccell2l$doublevote + $tcheader Choice setup"; + + if (is_array($pollchoices)) { + $m = 0; + foreach($pollchoices as $cid => $data) { + $m++; + $choicescode .= "$tccell1Choice ".$m."$tccell2l$inpt=\"pollchoices[$cid][choice]\" VALUE=\"".aslash($data['choice'])."\"> Color: $inpt=\"pollchoices[$cid][color]\" VALUE=\"".aslash($data['color'])."\"> $inps=\"removechoice\" onClick=\"window.document.REPLIER.torem.value='$cid';\" VALUE=\"Remove\">"; + } + } + print "$choicescode + $tccell1Add choice$tccell2l$inpt=\"polladdchoice\" VALUE=\"\"> Color: $inpt=\"polladdcolor\" VALUE=\"\"> $inps=addchoice VALUE=\"Add choice\"> + $tccell1 $tccell2l$inps=submit VALUE=\"Submit poll and thread\">"; + } + }else{ + print " + $tccell1 Couldn't enter the post. Either you didn't enter an existing username, + or you haven't entered the right password for the username, or you haven't entered a subject. +
".redirect("forum.php?id=$id","return to the forum",0).""; + } + } + print $footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/newreply.php b/newreply.php new file mode 100644 index 0000000..ce8fe3e --- /dev/null +++ b/newreply.php @@ -0,0 +1,239 @@ +$tccell1>Moderator Options:$tccell2l> + $inpc=\"close\" id=\"close\" value=\"1\"> - + $inpc=\"stick\" id=\"stick\" value=\"1\" $sticky>"; + } + + if ($forum[minpowerreply] > $power && $forum[minpowerreply] > 0) { + $thread[title]='(restricted)'; + } + + print "$header + $tblstart$tccell1s>$fonline$tblend + $fonttag$boardname - $forum[title] - $thread[title] $tblstart"; + replytoolbar(1); + + if($log) activitycheck($loguserid); + + if(!$_POST[action] && !$thread[closed] && !($banned && $log) && ($power>=$forum[minpowerreply] or $forum[minpowerreply]<1) && $id>0) { + print '
'; + + if($log){ + $username=$loguser[name]; + $password=$logpassword; + } + + if($postid){ + $posts=mysql_query("SELECT user,text,thread FROM posts,posts_text WHERE id=$postid AND id=pid"); + $post=mysql_fetch_array($posts); + $post[text]=str_replace('
',$br,$post[text]); + $u=$post[user]; + $users[$u]=loaduser($u,1); + if($post[thread]==$id) $quotemsg="[quote=".$users[$u][name]."]$post[text][/quote] +"; + } + + $postlist="$tccellh width=150>User$tccellh>Post"; + $threadpostcount=0; + $ppp++; + $posts=mysql_query("SELECT name,posts,sex,powerlevel,user,text,options,num FROM users u,posts p,posts_text WHERE thread=$id AND p.id=pid AND user=u.id ORDER BY p.id DESC LIMIT $ppp"); + + while($post=mysql_fetch_array($posts)){ + $bg='tdbg1'; + $threadpostcount++; + if($threadpostcount<$ppp){ + if(round($threadpostcount/2)==$threadpostcount/2) $bg='tdbg2'; + $postnum=($post[num]?"$post[num]/":''); + $tcellbg=""; + $namecolor=getnamecolor($post[sex],$post[powerlevel]); + $postlist.=" + $tcellbg$post[name]$smallfont
+ Posts: $postnum$post[posts] + $tcellbg".doreplace2($post[text], $post[options])." + "; + }else{ + $tcellbg=" + $tccellh width=150> $tccellh>  + $tccell1>User name: $tccell2l>$inpt=username VALUE=\"".htmlspecialchars($username)."\" SIZE=25 MAXLENGTH=25> + $tccell1>Password: $tccell2l>$inpp=password VALUE=\"".htmlspecialchars($password)."\" SIZE=13 MAXLENGTH=32> + $tccell1>Reply: + $tccell2l>".replytoolbar(2)." + $txta=message ROWS=20 COLS=$numcols ".replytoolbar(3).">$quotemsg + $tccell1> $tccell2l> + $inph=action VALUE=postreply> + $inph=id VALUE=$id> + $inps=submit VALUE=\"Submit reply\"> + $inps=preview VALUE=\"Preview reply\"> + $tccell1>Options:$tccell2l> + $inpc=\"nosmilies\" id=\"nosmilies\" value=\"1\"> - + $inpc=\"nolayout\" id=\"nolayout\" value=\"1\"> - + $inpc=\"nohtml\" id=\"nohtml\" value=\"1\"> + $modoptions + $tblend + + $tblstart$postlist$tblend + + $fonttag$boardname - $forum[title] - $thread[title] + ".replytoolbar(4); + } + if($_POST[action]=='postreply' && !($banned && $log) && $id>0) { + $userid=checkuser($username,$password); + $error=''; + if($userid==-1) + $error="Either you didn't enter an existing username, or you haven't entered the right password for the username."; + else{ + $user=@mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id=$userid")); + if($thread[lastposter]==$userid && $user[powerlevel]<=2) + $error='You already have the last reply in this thread.'; + if($thread[closed]) + $error='The thread is closed and no more replies can be posted.'; + if($user[powerlevel]<$forum[minpowerreply]) + $error='Replying in this forum is restricted, and you are not allowed to post in this forum.'; + if(!$message) + $error="You didn't enter anything in the post."; + } + if(!$error){ + activitycheck($userid); + $sign=$user[signature]; + $head=$user[postheader]; + if($user[postbg]) $head="
$head"; + $numposts=$user[posts]+1; + $numdays=(ctime()-$user[regdate])/86400; + $message=doreplace($message,$numposts,$numdays,$username); + $rsign=doreplace($sign,$numposts,$numdays,$username); + $rhead=doreplace($head,$numposts,$numdays,$username); + $currenttime=ctime(); + if($submit){ + + mysql_query("UPDATE `users` SET `posts` = `posts` + 1, `lastposttime` = '$currenttime' WHERE `id` = '$userid'"); + + if ($nolayout) { + $headid = 0; + $signid = 0; + } else { + $headid=getpostlayoutid($head); + $signid=getpostlayoutid($sign); + } + + + if ($ismod) { + if ($close) $close = "`closed` = '1',"; + else $close = "`closed` = '0',"; + if ($stick) $stick = "`sticky` = '1',"; + else $stick = "`sticky` = '0',"; + } + + mysql_query("INSERT INTO posts (thread,user,date,ip,num,headid,signid) VALUES ($id,$userid,$currenttime,'$userip',$numposts,$headid,$signid)"); + $pid=mysql_insert_id(); + + $options = intval($nosmilies) . "|" . intval($nohtml); + + if($pid) mysql_query("INSERT INTO `posts_text` (`pid`,`text`,`tagval`, `options`) VALUES ('$pid','$message','$tagval', '$options')"); + + mysql_query("UPDATE `threads` SET $close $stick `replies` = `replies` + 1, `lastpostdate` = '$currenttime', `lastposter` = '$userid' WHERE `id`='$id'"); + mysql_query("UPDATE `forums` SET `numposts` = `numposts` + 1, `lastpostdate` = '$currenttime', `lastpostuser` ='$userid' WHERE `id`='$forumid'"); + $t = mysql_fetch_array(mysql_query("SELECT `replies` FROM `threads` WHERE `id`='$id'")); + $threadpostcount = $t[replies]; + $pagenum = floor($threadpostcount / $ppp); + if($pagenum < 0) $pagenum = 0; + + print " + $tccell1>Reply posted successfully! +
".redirect("thread.php?id=$id&page=$pagenum#$pid", $thread[title], 0).$tblend; + + + }else{ + loadtlayout(); + $message = stripslashes($message); + $ppost=$user; + $ppost[uid]=$userid; + $ppost[num]=$numposts; + $ppost[posts]++; + $ppost[lastposttime]=$currenttime; + $ppost[date]=$currenttime; + if ($nolayout) { + $ppost[headtext] = ""; + $ppost[signtext] = ""; + } else { + $ppost[headtext]=$rhead; + $ppost[signtext]=$rsign; + } + $ppost[text]=$message; + $ppost[options] = $nosmilies . "|" . $nohtml; + + if($isadmin) $ip=$userip; + + if ($nosmilies) $nosmilieschk = " checked"; + if ($nohtml) $nohtmlchk = " checked"; + if ($nolayout) $nolayoutchk = " checked"; + + print " + + $tccellh>Post preview + $tblend$tblstart + ".threadpost($ppost,1)." + $tblend
$tblstart +
+ $tccellh width=150> $tccellh>  + $tccell1>Reply: + $tccell2l>$txta=message ROWS=10 COLS=$numcols>$message + $tccell1> $tccell2l> + $inps=submit VALUE=\"Submit reply\"> + $inps=preview VALUE=\"Preview reply\"> + $inph=username VALUE=\"".htmlspecialchars($username)."\"> + $inph=password VALUE=\"".htmlspecialchars($password)."\"> + $inph=action VALUE=postreply> + $inph=id VALUE=$id> + $tccell1>Options:$tccell2l> + $inpc=\"nosmilies\" id=\"nosmilies\" value=\"1\"> - + $inpc=\"nolayout\" id=\"nolayout\" value=\"1\"> - + $inpc=\"nohtml\" id=\"nohtml\" value=\"1\"> + $modoptions + $tblend + + $tblstart$postlist$tblend + + "; + } + }else + print "$tccell1>Couldn't enter the post. $error
".redirect("thread.php?id=$id",'$thread[title]',0); + } + if($thread[closed]) + print " + $tccell1>Sorry, but this thread is closed, and no more replies can be posted in it. +
".redirect("thread.php?id=$id",$thread[title],0); + if($banned and $log) + print " + $tccell1>Sorry, but you are banned from the board, and can not post. +
".redirect("thread.php?id=$id",$thread[title],0); + print $footer; + printtimedif($startingtime); + +function activitycheck($userid){ + global $id,$thread,$header,$tblstart,$tccell1,$tblend,$footer; + $activity=mysql_result(mysql_query("SELECT count(*) FROM posts WHERE user=$userid AND thread=$id AND date>".(ctime()-86400)),0,0); + if($activity>=(stristr($thread[title],'ACS ')?5:50)) + die("$tblstart$tccell1>You have posted enough in this thread today. Come back later!$tblend$footer"); +} +?> \ No newline at end of file diff --git a/newthread.php b/newthread.php new file mode 100644 index 0000000..44e5845 --- /dev/null +++ b/newthread.php @@ -0,0 +1,243 @@ +   Color: $inpt=chcolor[$c] SIZE=7 MAXLENGTH=25 VALUE=\"".stripslashes(htmlspecialchars($chcolor[$c+$d]))."\">   Remove
"; + $c++; + } + } + $choices.="Choice $c: $inpt=chtext[$c] SIZE=30 MAXLENGTH=255>   Color: $inpt=chcolor[$c] SIZE=7 MAXLENGTH=25>
$inps=paction VALUE=\"Submit changes\">"; + if($mltvote) $checked1='checked'; + else $checked0='checked'; + } + $posticons=file('posticons.dat'); + for($i=0;$posticons[$i];$i++){ + if($iconid==$i) $checked='checked'; + $posticonlist.="$radio=iconid value=$i $checked>    "; + $checked=''; + if(($i+1)%10==0) $posticonlist.='
'; + } + if(!$iconid or $iconid==-1) $checked='checked'; + $posticonlist.=" +
$radio=iconid value=-1 $checked> None      + Custom: $inpt=custposticon SIZE=40 MAXLENGTH=100 VALUE=\"". stripslashes($custposticon) ."\"> + "; + $subject=htmlspecialchars($subject); + $question=htmlspecialchars($question); + + if ($nosmilies) $nosmilieschk = " checked"; + if ($nohtml) $nohtmlchk = " checked"; + if ($nolayout) $nolayoutchk = " checked"; + + $form=(!$poll?" + $tccell1>Thread icon: $tccell2l>$posticonlist + $tccell1>Thread title:$tccell2l>$inpt=subject SIZE=40 MAXLENGTH=100 VALUE=\"". stripslashes($subject) ."\"> + $tccell1>Post: $tccell2l>".replytoolbar(2)."$txta=message ROWS=20 COLS=$numcols ".replytoolbar(3).">". stripslashes($message) ." + $tccell1>Options:$tccell2l> + $inpc=\"nosmilies\" id=\"nosmilies\" value=\"1\"$nosmilieschk> - + $inpc=\"nolayout\" id=\"nolayout\" value=\"1\"$nolayoutchk> - + $inpc=\"nohtml\" id=\"nohtml\" value=\"1\"$nohtmlchk> + $tccell1> $tccell2l> + $inph=action VALUE=postthread> + $inph=id VALUE=$id> + $inps=submit VALUE=\"Submit thread\"> + $inps=preview VALUE=\"Preview thread\"> + ":" + $tccell1>Poll icon: $tccell2l>$posticonlist + $tccell1>Poll title: $tccell2l>$inpt=subject SIZE=40 MAXLENGTH=100 VALUE=\"". stripslashes($subject) ."\"> + $tccell1>Question: $tccell2l>$inpt=question SIZE=60 MAXLENGTH=255 VALUE=\"". stripslashes($question) ."\"> + $tccell1>Briefing: $tccell2l>$txta=briefing ROWS=2 COLS=$numcols>". stripslashes($briefing) ." + $tccell1>Multi-voting:$tccell2l>$radio=mltvote value=0 $checked0> Disabled   $radio=mltvote value=1 $checked1> Enabled + $tccell1>Choices: $tccell2l>$choices + $tccell1>Post: $tccell2l>".replytoolbar(2)."$txta=message ROWS=20 COLS=$numcols ".replytoolbar(3).">". stripslashes($message) ." + $tccell1>Options:$tccell2l> + $inpc=\"nosmilies\" id=\"nosmilies\" value=\"1\"$nosmilieschk> - + $inpc=\"nolayout\" id=\"nolayout\" value=\"1\"$nolayoutchk> - + $inpc=\"nohtml\" id=\"nohtml\" value=\"1\"$nohtmlchk> + $tccell1> $tccell2l> + $inph=action VALUE=postthread> + $inph=id VALUE=$id> + $inph=poll VALUE=1> + $inps=submit VALUE=\"Submit poll\"> + $inps=preview VALUE=\"Preview poll\"> + "); + if(!$_POST[action] or $_POST[paction]){ + print " + $tblstart$tccell1s>$fonline$tblend + $fonttag$boardname - ".$forum[title]." + $tblstart +
+ "; + if($log and $forums[$id][minpowerthread]>$power){ + print "$tccell1>Sorry, but you are not allowed to post"; + if($banned) print ", because you are banned from this board.
".redirect("forum.php?id=$id",'return to the forum',0); + else print ' in this restricted forum.
'.redirect('index.php','return to the board',0); + }else{ + print " + + $tccellh width=150> $tccellh>  + $tccell1>User name: $tccell2l>$inpt=username VALUE=\"".htmlspecialchars($loguser[name])."\" SIZE=25 MAXLENGTH=25> + $tccell1>Password: $tccell2l>$inpp=password VALUE=\"".htmlspecialchars($logpassword)."\" SIZE=13 MAXLENGTH=32> + "; + print $form; + } + print " + + + $fonttag$boardname - ".$forum[title]." + ".replytoolbar(4); + } + if($_POST[action]=='postthread' and !$_POST[paction]){ + print "
$tblstart"; + $userid=checkuser($username,$password); + $user=mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id=$userid")); + if($user[powerlevel]<0) $userid=-1; + + // can't be posting too fast now + $limithit = $user[lastposttime] < (ctime()-30); + // can they post in this forum? + $authorized = $user[powerlevel] >= $forum[minpowerthread]; + // does the forum exist? + $forumexists = $forum[title]; + + if($userid!=-1 && $subject && $message && $forumexists && $authorized && $limithit){ + $msg=$message; + squot(0,$message); + $sign=$user[signature]; + $head=$user[postheader]; + // improved post backgrounds + if($user[postbg]) { + $head = "
$head"; + $sign = "$sign
"; + } + $numposts = $user[posts] + 1; + $numdays = (ctime()-$user[regdate])/86400; + $msg = doreplace($msg, $numposts, $numdays, $username); + $rsign = doreplace($sign, $numposts, $numdays, $username); + $rhead = doreplace($head, $numposts, $numdays, $username); + $posticons = file('posticons.dat'); + $posticon = $posticons[$iconid]; + $currenttime = ctime(); + $postnum = $user[posts] + 1; + if($iconid == -1) $posticon=''; + if($custposticon) $posticon = $custposticon; + if($submit) { + mysql_query("UPDATE `users` SET `posts` = `posts` + 1, `lastposttime` = '$currenttime' WHERE `id` = '$userid'"); + $headid=getpostlayoutid($head); + $signid=getpostlayoutid($sign); + + mysql_query("INSERT INTO `threads` (`forum`, `user`, `views`, `closed`, `title`, `icon`, `replies`, `lastpostdate`, `lastposter`) VALUES ('$id', '$userid', '0', '0', '$subject', '$posticon', '0', '$currenttime', '$userid')"); + $t = mysql_insert_id(); + mysql_query("INSERT INTO `posts` (`thread`, `user`, `date`, `ip`, `num`, `headid`, `signid`) VALUES ('$t', '$userid', '$currenttime', '$userip', '$postnum', '$headid', '$signid')"); + $pid=mysql_insert_id(); + $options = intval($nosmilies) . "|" . intval($nohtml); + if($pid) mysql_query("INSERT INTO `posts_text` (`pid`, `text`, `tagval`, `options`) VALUES ('$pid', '$msg', '$tagval', '$options')"); + mysql_query("UPDATE forums SET numthreads=numthreads+1,numposts=numposts+1,lastpostdate=$currenttime,lastpostuser=$userid WHERE id=$id"); + + if(!$poll) + print " + $tccell1>Thread posted successfully! +
".redirect("thread.php?id=$t", stripslashes($subject), 0).$tblend; + else{ + mysql_query("INSERT INTO `poll` (`question`, `briefing`, `closed`, `doublevote`) VALUES ('$question', '$briefing', '0', '$mltvote')"); + $p=mysql_insert_id(); + mysql_query("UPDATE `threads` SET `poll` = '$p' where `id` = '$t'"); + $c=1; + while($chtext[$c]){ + mysql_query("INSERT INTO `poll_choices` (`poll`, `choice`, `color`) VALUES ('$p', '$chtext[$c]', '$chcolor[$c]')"); + $c++; + } + print " + $tccell1>Poll created successfully! +
".redirect("thread.php?id=$t", stripslashes($subject), 0).$tblend; + } + }else{ + if($posticon) $posticon1=""; + if($poll){ + for($c=1;$chtext[$c];$c++){ + $chtext[$c]=stripslashes($chtext[$c]); + $chcolor[$c]=stripslashes($chcolor[$c]); + $hchoices.="$inph=chtext[$c] VALUE=\"".htmlspecialchars($chtext[$c])."\">$inph=chcolor[$c] VALUE=\"".htmlspecialchars($chcolor[$c]).'">'; + $pchoices.=" + $tccell1l width=20%>$chtext[$c] + $tccell2l width=60%>
 
+ $tccell1 width=20%>$fonttag ? votes, ??.?% + "; + } + $mlt=($mltvote?'enabled':'disabled'); + $pollpreview=" + $question + $tccell2ls colspan=3>$briefing + $pchoices + $tccell2ls colspan=3>Multi-voting is $mlt. + $tblend
$tblstart + "; + $subject = htmlspecialchars(stripslashes($subject)); + $question = htmlspecialchars(stripslashes($question)); + $briefing = htmlspecialchars(stripslashes($briefing)); + } + loadtlayout(); + $ppost=$user; + $ppost[uid]=$userid; + $ppost[num]=$postnum; + $ppost[posts]++; + $ppost[lastposttime]=$currenttime; + $ppost[date]=$currenttime; + $ppost[headtext]=$rhead; + $ppost[signtext]=$rsign; + if ($nolayout) { + $ppost[headtext] = ""; + $ppost[signtext] = ""; + } else { + $ppost[headtext]=$rhead; + $ppost[signtext]=$rsign; + } + $ppost[text]=$message; + $ppost[options] = $nosmilies . "|" . $nohtml; + if($isadmin) $ip=$userip; + $threadtype=($poll?'poll':'thread'); + print " + + $tccellh>".($poll?'Poll':'Thread')." preview + $tblend$tblstart + $pollpreview + $tccell2l>$posticon1 ". stripslashes($subject) ." + $tblend$tblstart + ".threadpost($ppost,1)." + $tblend
$tblstart + + $tccellh width=150> $tccellh>  + $inph=username VALUE=\"".htmlspecialchars($username)."\"> + $inph=password VALUE=\"".htmlspecialchars($password)."\"> + $form + + $tblend + "; + } + }else{ + + $reason = "You haven't entered your username and password correctly."; + if (!$limithit) $reason = "You are trying to post too rapidly."; + if (!$message) $reason = "You haven't entered a message."; + if (!$subject) $reason = "You haven't entered a subject."; + if (!$authorized) $reason = "You aren't allowed to post in this forum."; + + print " + $tccell1>Couldn't post the thread. $reason +
".redirect("forum.php?id=$id", $forum[title], 2).$tblend; + } + } + print $footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/numgfx.php b/numgfx.php new file mode 100644 index 0000000..b3af360 --- /dev/null +++ b/numgfx.php @@ -0,0 +1,25 @@ + \ No newline at end of file diff --git a/numgfx/Thumbs.db b/numgfx/Thumbs.db new file mode 100644 index 0000000..6131dd2 Binary files /dev/null and b/numgfx/Thumbs.db differ diff --git a/numgfx/numbloodlust.png b/numgfx/numbloodlust.png new file mode 100644 index 0000000..0a19061 Binary files /dev/null and b/numgfx/numbloodlust.png differ diff --git a/numgfx/numcircuit.png b/numgfx/numcircuit.png new file mode 100644 index 0000000..a3a5d55 Binary files /dev/null and b/numgfx/numcircuit.png differ diff --git a/numgfx/numdani.png b/numgfx/numdani.png new file mode 100644 index 0000000..19d27c0 Binary files /dev/null and b/numgfx/numdani.png differ diff --git a/numgfx/numkafuka.png b/numgfx/numkafuka.png new file mode 100644 index 0000000..10fe674 Binary files /dev/null and b/numgfx/numkafuka.png differ diff --git a/numgfx/nummario.png b/numgfx/nummario.png new file mode 100644 index 0000000..0535e73 Binary files /dev/null and b/numgfx/nummario.png differ diff --git a/numgfx/nummegaman.png b/numgfx/nummegaman.png new file mode 100644 index 0000000..cda2d04 Binary files /dev/null and b/numgfx/nummegaman.png differ diff --git a/numgfx/numnes.png b/numgfx/numnes.png new file mode 100644 index 0000000..78add82 Binary files /dev/null and b/numgfx/numnes.png differ diff --git a/numgfx/numnes8bit.png b/numgfx/numnes8bit.png new file mode 100644 index 0000000..56b777b Binary files /dev/null and b/numgfx/numnes8bit.png differ diff --git a/numgfx/numpurple.png b/numgfx/numpurple.png new file mode 100644 index 0000000..bd40ff4 Binary files /dev/null and b/numgfx/numpurple.png differ diff --git a/numgfx/numxmas.png b/numgfx/numxmas.png new file mode 100644 index 0000000..452ba02 Binary files /dev/null and b/numgfx/numxmas.png differ diff --git a/online.php b/online.php new file mode 100644 index 0000000..4b3a661 --- /dev/null +++ b/online.php @@ -0,0 +1,77 @@ +".(ctime()-$time).' ORDER BY '.($sort=='IP'&&$isadmin?'lastip':'lastactivity DESC')); + $guests=mysql_query('SELECT ip,date,lasturl FROM guests WHERE date>'.(ctime()-$time).' ORDER BY '.($sort=='IP'&&$isadmin?'ip':'date').' DESC'); + $server=getenv('SERVER_NAME'); + $port=getenv('SERVER_PORT'); + $host=$server; + $lnk='During last minute | + $lnk=300>During last 5 minutes | + $lnk=900>During last 15 minutes | + $lnk=3600>During last hour | + $lnk=86400>During last day + "; + if($isadmin) + print ' | Sort by ".($sort=='IP'?'date':'IP').""; + print "
+ $fonttag Online users during the last $time seconds: + $tblstart + $tccellh width=20>  + $tccellh>Username + $tccellh width=80> Last activity + $tccellh width=130> Last post + $tccellh>URL + "; + if($isadmin) print "$tccellh width=100>IP address"; + print "$tccellh width=60> Posts"; + for($i=1;$user=mysql_fetch_array($posters);$i++){ + if($i>1) print ''; + $namecolor=getnamecolor($user[sex],$user[powerlevel]); + $user[lastposttime]=date($dateformat,$user[lastposttime]+$tzoff); + if(!$user[posts]) $user[lastposttime]='-------- --:-- --'; + $user[lasturl]=str_replace('<','<',$user[lasturl]); + $user[lasturl]=str_replace('>','>',$user[lasturl]); + $user[lasturl]=str_replace('%20',' ',$user[lasturl]); + print " + $tccell1>$i + $tccell2l>$user[name] + $tccell1>".date('h:i A',$user[lastactivity]+$tzoff)." + $tccell1>$user[lastposttime] + ".($user[lasturl]=='IP banned'?"$tccell2l>IP banned":" + $tccell2l>$user[lasturl] + "); + if($isadmin) print "$tccell1>$user[lastip]"; + print "$tccell2>$user[posts]"; + } + print " + $tblend + $fonttag
Guests: + $tblstart + $tccellh width=20>  + $tccellh width=150>  + $tccellh width=80>Last activity + $tccellh>URL + "; + if($isadmin) print "$tccellh width=100> IP address"; + print ''; + for($i=1;$guest=mysql_fetch_array($guests);$i++){ + if($i>1) print ""; + $guest[lasturl]=str_replace('<','<',$guest[lasturl]); + $guest[lasturl]=str_replace('>','>',$guest[lasturl]); + print " + $tccell1>$i + $tccell2>  + $tccell1>".date('h:i A',$guest[date]+$tzoff)." + ".($guest[lasturl]=='IP banned'?"$tccell2l>IP banned":" + $tccell2l>$guest[lasturl] + "); + if($isadmin) print "$tccell1>$guest[ip]"; + } + print $tblend.$footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/photo.php b/photo.php new file mode 100644 index 0000000..c2138bd --- /dev/null +++ b/photo.php @@ -0,0 +1,41 @@ +$tblstart"; + if(!$id){ + $userlist=" + $tccell1s colspan=3>Sex: Male | Female | N/A | All + $tccell2 colspan=3>Click on the pictures to view them in full size. + $tccellh width=60>Picture + $tccellh>Username + $tccellh>Real name + "; + $where=($sex?'WHERE sex=':'').($sex=='m'?'0':'').($sex=='f'?'1':'').($sex=='n'?'2':''); + $users=mysql_query("SELECT id,name,realname,sex,powerlevel FROM users $where ORDER BY name"); + $numusers=mysql_num_rows($users); + for($usercount=0;$user=mysql_fetch_array($users);){ + $i=$user[id]; + if(file_exists("photo/$i"."s.jpg")){ + $usercount++; + $userlist.=''; + $userpicture=""; + $namecolor=getnamecolor($user[sex],$user[powerlevel]); + $userlist.=" + $tccell2 width=60>$userpicture + $tccell2l>$user[name] + $tccell2l>$user[realname]  + "; + } + } + print "$tccellh colspan=3>$usercount users found.$userlist"; + }else{ + $user=mysql_fetch_array(mysql_query("SELECT id,name,realname FROM users WHERE id=$id")); + print " + $tccellc>$user[name] -- $user[realname] + $tccell2> + $tccell1>Back to Photo Album + "; + } + print $tblend.$footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/posticons.dat b/posticons.dat new file mode 100644 index 0000000..d98e331 --- /dev/null +++ b/posticons.dat @@ -0,0 +1,30 @@ +images/icons/icon1.gif +images/icons/icon2.gif +images/icons/icon3.gif +images/icons/icon4.gif +images/icons/icon5.gif +images/icons/icon13.gif +images/icons/icon14.gif +images/coin.gif +images/coin2.gif +images/smilies/baby.gif +images/smilies/smile.gif +images/smilies/wink.gif +images/smilies/biggrin.gif +images/smilies/cute.gif +images/smilies/glasses.gif +images/smilies/mad.gif +images/smilies/frown.gif +images/smilies/yuck.gif +images/smilies/sick.gif +images/smilies/wobbly.gif +images/smilies/eek.gif +images/smilies/blank.gif +images/smilies/jawdrop.gif +images/smilies/bigeyes.gif +images/smilies/tongue.gif +images/smilies/vamp.gif +images/smilies/dizzy.gif +images/smilies/eyeshift.gif +images/smilies/shiftleft.gif +images/smilies/shiftright.gif \ No newline at end of file diff --git a/postradar.php b/postradar.php new file mode 100644 index 0000000..27f4399 --- /dev/null +++ b/postradar.php @@ -0,0 +1,61 @@ +$user[name] -- $user[posts] posts"; + } + $addlist=" + + "; + $users1=mysql_query("SELECT * FROM postradar WHERE user=$loguserid"); + while($user=mysql_fetch_array($users1)){ + $u=$user[comp]; + $remlist.="
+ $tblstart + $prtable + "; + } + if($log && $_POST[action]=='dochanges'){ + $user=mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id=$loguserid")); + if($rem) mysql_query("DELETE FROM postradar WHERE user=$loguserid and comp=$rem"); + if($add) mysql_query("INSERT INTO postradar (user,comp) VALUES ($loguserid,$add)"); + if($submit1){ + $page='postradar'; + $returnmsg='go back to the post radar setup'; + }else{ + $page='index'; + $returnmsg='return to the board'; + } + print "
$tblstart$tccell1>Thank you, $user[name], for editing your post radar.
".redirect("$page.php",$returnmsg,0); + } + print $tblend.$footer; + printtimedif($startingtime); + mysql_close($sql); +?> \ No newline at end of file diff --git a/postsbyforum.php b/postsbyforum.php new file mode 100644 index 0000000..12aa0a7 --- /dev/null +++ b/postsbyforum.php @@ -0,0 +1,42 @@ +".(ctime()-$posttime).' GROUP BY forums.id ORDER BY cnt DESC'); + $userposts=mysql_num_rows(mysql_query("SELECT id FROM posts WHERE $useridquery date>".(ctime()-$posttime).'')); + $lnk="
During last hour | + $lnk=86400>During last day | + $lnk=604800>During last week | + $lnk=2592000>During last 30 days | + $lnk=999999999>Total
+ $fonttag Posts $by$username in forums$during: + $tblstart + $tccellh width=20>  + $tccellh>Forum + $tccellh width=60>Posts + $tccellh width=80>Forum total + "; + for($i=1;$f=mysql_fetch_array($posters);$i++){ + if($i>1) print ''; + if($f[minpower]>$power) $link="(restricted)"; + else $link="$f[title]"; + print " + $tccell2>$i + $tccell2l>$link + $tccell2>$f[cnt] + $tccell2>$f[numposts] + "; + } + print "$tblend Total: $userposts posts$footer"; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/postsbythread.php b/postsbythread.php new file mode 100644 index 0000000..9f0e743 --- /dev/null +++ b/postsbythread.php @@ -0,0 +1,40 @@ +".(ctime()-$posttime).' AND t.forum=f.id GROUP BY t.id ORDER BY cnt DESC'); + $u=mysql_fetch_array(mysql_query("SELECT name FROM users WHERE id=$id")); + $username=$u[name]; + $lnk="During last hour | + $lnk=86400>During last day | + $lnk=604800>During last week | + $lnk=2592000>During last 30 days | + $lnk=999999999>Total
+ $fonttag Posts by $username in threads$during: + + $tccellh width=20>  + $tccellh>Thread + $tccellh width=60>Posts + $tccellh width=80>Thread total + "; + for($i=1;$t=mysql_fetch_array($posters);$i++){ + print " + + + + + + $tccellh width=50>Posts + $tccellh> "; + for($i=0;$i<24;$i++) $postshour[$i]=0; + while($h=mysql_fetch_array($posts)) $postshour[$h[hour]]=$h[cnt]; + for($i=0;$i<24;$i++) if($postshour[$i]>$max) $max=$postshour[$i]; + for($i=0;$i<24;$i++){ + if($i) print ''; + $bar="'; + print " + $tccell2s>$i + $tccell2s>$postshour[$i] + $tccell2ls width=100%>$bar + "; + } + print $tblend.$footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/postsbyuser.php b/postsbyuser.php new file mode 100644 index 0000000..0152008 --- /dev/null +++ b/postsbyuser.php @@ -0,0 +1,40 @@ +".($i+1).''; + } + $postlist=" + $tccellhs width=50>Post id + $tccellhs width=50>Post# + $tccellhs width=130>Posted on + $tccellhs>Thread + "; + if($isadmin) $postlist.="$tccellhs width=110>IP address"; + for($i=0;$post=mysql_fetch_array($posts);$i++){ + if($i>=$min and $i<($min+$ppp)){ + if($post[minpower]<=$power or !$post[minpower]) $threadlink="".str_replace('<','<',$post[title]).''; + else $threadlink='(restricted)'; + if(!$post[num]) $post[num]='?'; + $postlist.=" + + $tccell1s>#$post[0] + $tccell1s>$post[num] + $tccell1s>".date($dateformat,$post[3]+$tzoff)." + $tccell1ls>#$post[1] - $threadlink"; + if($isadmin) $postlist.="$tccell1s>$post[2]"; + } + } + $user=mysql_fetch_array(mysql_query("SELECT name FROM users WHERE id=$id")); + print $fonttag."Posts by $user[name] on the board: ($posttotal posts found) + $tblstart$postlist$tblend$pagelinks$footer"; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/private.php b/private.php new file mode 100644 index 0000000..f145701 --- /dev/null +++ b/private.php @@ -0,0 +1,55 @@ +$p"; + } + $pmsgs=mysql_query("SELECT p.id,user$from u,date,t.title,msgread,name,sex,powerlevel FROM pmsgs p,pmsgs_text t,users u WHERE user$to=$u AND p.id=pid AND user$from=u.id ORDER BY p.id DESC LIMIT $pmin,$ppp"); + $from[0]=strtoupper($from[0]); + if(!$view) $viewlink="View sent messages"; + else $viewlink="View received messages"; + print " + $header +
$i + "; + if($t[minpower]>$power && $t[minpower]>0) + print '-- Private thread --'; + else print "$t[title]"; + print " + $t[cnt]".($t[replies]+1) + ; + } + print $tblend.$footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/postsbytime.php b/postsbytime.php new file mode 100644 index 0000000..c22c219 --- /dev/null +++ b/postsbytime.php @@ -0,0 +1,38 @@ +$time GROUP BY hour"); + if($posttime<999999999) $during=' during the last '.timeunits2($posttime); + $link="During last hour | + $link=86400>During last day | + $link=604800>During last week | + $link=2592000>During last 30 days | + $link=999999999>Total
+ $fonttag Posts$from by time of day$during: + $tblstart + $tccellh width=40>Hour
+
$fonttag$boardname - Private messages: $msgtotal$smallfont$viewlink | Send new message
+ $tblstart + $tccellh>  + $tccellh>Subject + $tccellh>$from + $tccellh width=150>Sent on + "; + while($pmsg=mysql_fetch_array($pmsgs)){ + $new=($pmsg[msgread]?' ':''); + $uid=$pmsg[u]; + $namecolor=getnamecolor($pmsg[sex],$pmsg[powerlevel]); + print " + + $tccell1>$new + $tccell2l>$pmsg[title] + $tccell2>$pmsg[name] + $tccell2>".date($dateformat,$pmsg[date]+$tzoff) + ; + } + print "$tblend$smallfont$pagelinks$footer"; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/profile.php b/profile.php new file mode 100644 index 0000000..fc4d3e7 --- /dev/null +++ b/profile.php @@ -0,0 +1,176 @@ +$tblstart$tccell1>The specified user doesn't exist.$tblend$footer"; + printtimedif($startingtime); + die(); + } + $maxposts=mysql_fetch_array(mysql_query("SELECT posts FROM users ORDER BY posts DESC LIMIT 1")); + $maxposts=$maxposts[posts]; + $users1=mysql_query("SELECT id,posts,regdate FROM users"); + while($u=mysql_fetch_array($users1)){ + $u[level]=calclvl(calcexp($u[posts],(ctime()-$u[regdate])/86400)); + if ($u[posts]<0 or $u[regdate]>ctime()) $u[level]=1; + $users[$u[id]]=$u; + } + $ratescore=0; + $ratetotal=0; + $ratings=mysql_query("SELECT userfrom,rating FROM userratings WHERE userrated=$id"); + while($rating=@mysql_fetch_array($ratings)){ + $ratescore+=$rating[rating]*$users[$rating[userfrom]][level]; + $ratetotal+=$users[$rating[userfrom]][level]; + } + $ratetotal*=10; + $numvotes=mysql_num_rows($ratings); + if($ratetotal) $ratingstatus=(floor($ratescore*1000/$ratetotal)/100)." ($ratescore/$ratetotal, $numvotes votes)"; + else $ratingstatus="None"; + if($loguserid and $logpwenc and $loguserid!=$id) $ratelink=" | Rate user"; + $userrank=getrank($user[useranks],$user[title],$user[posts],$user[powerlevel]); + $threadsposted=mysql_result(mysql_query("SELECT count(id) AS cnt FROM threads WHERE user=$id"),0,"cnt"); + $i=0; + $lastpostdate="None"; + if($user[posts]) $lastpostdate=date("m-d-y h:i A",$user[lastposttime]+$tzoff); +// $postsfound=mysql_result(mysql_query("SELECT count(id) AS cnt FROM posts WHERE user=$id"),0,"cnt"); + $post=@mysql_fetch_array(mysql_query("SELECT id, thread FROM posts WHERE user=$id AND date=$user[lastposttime]")); + if($threads=mysql_query("SELECT title,forum FROM threads WHERE id=$post[1]")){ + $thread=mysql_fetch_array($threads); + $forum=mysql_fetch_array(mysql_query("SELECT id,title,minpower FROM forums WHERE id=$thread[forum]")); + $thread[0]=str_replace("<","<",$thread[0]); + if($forum[minpower]>$loguser[powerlevel] and $forum[minpower]) $lastpostlink=", in a restricted forum"; + else $lastpostlink=", in $thread[0] ($forum[title])"; + } + if($loguser){ + $sendpmsg=" | Send private message"; + if($isadmin){ + if($user[lastip]) $lastip="
with IP: $user[lastip]"; + $sneek="$tccell1s colspan=2>View private messages | View votes | Edit user"; + } + } + $aim=str_replace(" ","+",$user[aim]); + $schname=mysql_fetch_array(mysql_query("SELECT name FROM schemes WHERE id=$user[scheme]")); + $schname=$schname[name]; + $numdays=(ctime()-$user[regdate])/86400; + $user[signature]=doreplace($user[signature],$user[posts],$numdays,$user[name]); +// $user[signature]=doreplace2($user[signature],$user[posts],$numdays,$user[name]); + $user[postheader]=doreplace($user[postheader],$user[posts],$numdays,$user[name]); +// $user[postheader]=doreplace2($user[postheader],$user[posts],$numdays,$user[name]); + if($user[picture]) $picture=""; + $icqicon=""; + if(!$user[icq]){ + $user[icq]=""; + $icqicon=""; + } + $tccellha=""; + if($barwidth<$totalwidth) $baroff=""; + $bar="$baron$baroff
"; + if(!$topposts) $topposts=5000; + if($user[posts]) $projdate=ctime()+(ctime()-$user[regdate])*($topposts-$user[posts])/($user[posts]); + if(!$user[posts] or $user[posts]>=$topposts or $projdate>2000000000 or $projdate"; + + print " + $header + $fonttag Profile for $minipic$user[name] + + + $tccell1l width=150>Total posts $tccell2l>$user[posts] ($postavg per day) $projdate
$bar
+ $tccell1l width=150>Total threads $tccell2l>$threadsposted + $tccell1l width=150>EXP $tccell2l>$expstatus + $tccell1l width=150>User rating $tccell2l>$ratingstatus + $tccell1l width=150>Registered on $tccell2l>".@date($dateformat,$user[regdate]+$tzoff)." (".floor((ctime()-$user[regdate])/86400)." days ago) + $tccell1l width=150>Last post $tccell2l>$lastpostdate$lastpostlink + $tccell1l width=150>Last activity $tccell2l>".date($dateformat,$user[lastactivity]+$tzoff)."$lastip +$tblend +
$tblstart + $tccellh colspan=2>
Contact information
+ $tccell1l width=150>Email address $tccell2l>$user[email]  + $tccell1l width=150>Homepage $tccell2l>$homepagename  + $tccell1l width=150>ICQ number $tccell2l>$user[icq] $icqicon  + $tccell1l width=150>AIM screen name $tccell2l>$user[aim]  +$tblend +
$tblstart + $tccellh colspan=2>
User settings
+ $tccell1l width=150>Timezone offset $tccell2l>$tzoffset hours from the server, $tzoffrel hours from you (current time: $tzdate) + $tccell1l width=150>Other $tccell2l>(Xkeeper needs to add more things here) +$tblend + + $tccell1l> +$tblend +
$tblstart + $tccellh colspan=2>
Equipped Items
+ $shoplist +$tblend +
+$tblstart + $tccellh colspan=2>
General information
    +$tblstart + $tccellh>
RPG status
+
$tblstart + $tccellh colspan=2>
Personal information + $tccell1l width=150>Real name $tccell2l>$user[realname]  + $tccell1l width=150>Location $tccell2l>$user[location]  + $tccell1l width=150>Birthday $tccell2l>$birthday $age  + $tccell1l width=150>User bio $tccell2l>$user[bio]  +$tblend +
$tblstart + $tccellh colspan=2>
Sample post + ". threadpost($user, 1) ." +$tblend +
$tblstart + $tccellhs colspan=2>
Options + $tccell2s colspan=2> + Show posts | + List posts by this user | + View threads by this user + $sendpmsg$ratelink + $tccell2s colspan=2> + Posts by time of day | + Posts by thread | + Posts by forum$sneek + $tblend$footer + "; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/profile_old.php b/profile_old.php new file mode 100644 index 0000000..9447e51 --- /dev/null +++ b/profile_old.php @@ -0,0 +1,134 @@ +$tblstart$tccell1>The specified user doesn't exist.$tblend$footer"; + printtimedif($startingtime); + die(); + } + $maxposts=mysql_fetch_array(mysql_query("SELECT posts FROM users ORDER BY posts DESC LIMIT 1")); + $maxposts=$maxposts[posts]; + $users1=mysql_query("SELECT id,posts,regdate FROM users"); + while($u=mysql_fetch_array($users1)){ + $u[level]=calclvl(calcexp($u[posts],(ctime()-$u[regdate])/86400)); + if ($u[posts]<0 or $u[regdate]>ctime()) $u[level]=1; + $users[$u[id]]=$u; + } + $ratescore=0; + $ratetotal=0; + $ratings=mysql_query("SELECT userfrom,rating FROM userratings WHERE userrated=$id"); + while($rating=@mysql_fetch_array($ratings)){ + $ratescore+=$rating[rating]*$users[$rating[userfrom]][level]; + $ratetotal+=$users[$rating[userfrom]][level]; + } + $ratetotal*=10; + $numvotes=mysql_num_rows($ratings); + if($ratetotal) $ratingstatus=(floor($ratescore*1000/$ratetotal)/100)." ($ratescore/$ratetotal, $numvotes votes)"; + else $ratingstatus="None"; + if($loguserid and $logpwenc and $loguserid!=$id) $ratelink=" | Rate user"; + $userrank=getrank($user[useranks],$user[title],$user[posts],$user[powerlevel]); + $threadsposted=mysql_result(mysql_query("SELECT count(id) AS cnt FROM threads WHERE user=$id"),0,"cnt"); + $i=0; + $lastpostdate="None"; + if($user[posts]) $lastpostdate=date("m-d-y h:i A",$user[lastposttime]+$tzoff); +// $postsfound=mysql_result(mysql_query("SELECT count(id) AS cnt FROM posts WHERE user=$id"),0,"cnt"); + $post=@mysql_fetch_array(mysql_query("SELECT thread FROM posts WHERE user=$id AND date=$user[lastposttime]")); + if($threads=mysql_query("SELECT title,forum FROM threads WHERE id=$post[0]")){ + $thread=mysql_fetch_array($threads); + $forum=mysql_fetch_array(mysql_query("SELECT id,title,minpower FROM forums WHERE id=$thread[forum]")); + $thread[0]=str_replace("<","<",$thread[0]); + if($forum[minpower]>$loguser[powerlevel] and $forum[minpower]) $lastpostlink=", in a restricted forum"; + else $lastpostlink=", in $thread[0] ($forum[title])"; + } + if($loguser){ + $sendpmsg=" | Send private message"; + if($isadmin){ + $edit=" | Edit user"; + if($user[lastip]) $lastip=" (with IP: $user[lastip])"; + $sneek="$tccell2s colspan=2>View private messages | View votes"; + } + } + $aim=str_replace(" ","+",$user[aim]); + $schname=mysql_fetch_array(mysql_query("SELECT name FROM schemes WHERE id=$user[scheme]")); + $schname=$schname[name]; + $numdays=(ctime()-$user[regdate])/86400; + $user[signature]=doreplace($user[signature],$user[posts],$numdays,$user[name]); + $user[signature]=doreplace2($user[signature],$user[posts],$numdays,$user[name]); + $user[postheader]=doreplace($user[postheader],$user[posts],$numdays,$user[name]); + $user[postheader]=doreplace2($user[postheader],$user[posts],$numdays,$user[name]); + $user[picture]=str_replace(">","%3E",$user[picture]); + if($user[picture]) $picture=""; + $icqicon=""; + if(!$user[icq]){ + $user[icq]=""; + $icqicon=""; + } + $tccellha=""; + if($barwidth<$totalwidth) $baroff=""; + $bar="$baron$baroff
"; + if(!$topposts) $topposts=5000; + if($user[posts]) $projdate=ctime()+(ctime()-$user[regdate])*($topposts-$user[posts])/($user[posts]); + if(!$user[posts] or $user[posts]>=$topposts or $projdate>2000000000 or $projdate$tblstart + $tccellh colspan=2>
$fonttag Profile for $user[name] + $tccell2l>Username $tccell2l>$minipic$user[name] + $tccell1l>Title $tccell1l>$smallfont$userrank + $tccell2l>User picture $tccell2l>$picture  + $tccell1l>Total posts $tccell1l>$user[posts] ($postavg per day) $projdate
$bar + $tccell2l>Threads posted $tccell2l>$threadsposted + $tccell1l>EXP status $tccell1l>$expstatus + $tccell2l>User rating $tccell2l>$ratingstatus + $tccell1l>Registered on $tccell1l>".@date($dateformat,$user[regdate]+$tzoff)." (".floor((ctime()-$user[regdate])/86400)." days ago) + $tccell2l>Last post $tccell2l>$lastpostdate$lastpostlink + $tccell1l>Last activity $tccell1l>".date($dateformat,$user[lastactivity]+$tzoff)."$lastip + $tccell2l>Real name $tccell2l>$user[realname]  + $tccell1l>Location $tccell1l>$user[location]  + $tccell2l>Email address $tccell2l>$user[email]  + $tccell1l>Homepage $tccell1l>$homepagename  + $tccell2l>ICQ number $tccell2l>$user[icq] $icqicon  + $tccell1l>AIM screen name $tccell1l>$user[aim]  + $tccell2l>Timezone offset $tccell2l>$tzoffset hours from the server, $tzoffrel hours from you (current time: $tzdate) + $tccell1l>User bio $tccell1l>$user[bio]  + $tccell2l>Birthday $tccell2l>$birthday $age  + $tccell1l>Sample post $tccell1l>$postbg$user[postheader](sample text)".$sep[$loguser[signsep]]."$user[signature] + $tccell2s colspan=2> + Show posts | + List posts by this user | + View threads by this user + $sendpmsg$ratelink$edit + $tccell2s colspan=2> + Posts by time of day | + Posts by thread | + Posts by forum$sneek + $tblend$footer + "; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/ranks.php b/ranks.php new file mode 100644 index 0000000..8b0789b --- /dev/null +++ b/ranks.php @@ -0,0 +1,72 @@ +0 ORDER BY id'); + while($rset=mysql_fetch_array($rsets)) + $ranksetlist.=" + $tblend +
+ $tblstart + $tccellh width=150>Rank + $tccellh width=60>Posts + $tccellh width=60>Ranking + $tccellh colspan=2>Users on that rank + "; + $useranks=($showall?'':"AND useranks=$set"); + $btime=ctime()-86400*30; + $ranks=mysql_query("SELECT * FROM ranks WHERE rset=$set ORDER BY num"); + $rank=mysql_fetch_array($ranks); + for($i=0;$i=$rank[num] AND posts<$rankn[num] $useranks"),0,0); + $usertotal=mysql_result(mysql_query("SELECT COUNT(*) FROM users WHERE posts>=$rank[num]"),0,0); + $users=mysql_query("SELECT id,name,sex,powerlevel FROM users WHERE posts>=$rank[num] AND posts<$rankn[num] $useranks AND (lastactivity>$btime OR lastposttime>$btime) ORDER BY name"); + for($u=0;$user=mysql_fetch_array($users);$u++){ + $namecolor=getnamecolor($user[sex],$user[powerlevel]); + $userlisting.=($u?', ':'')."
$user[name]"; + } + $dif=$usercount-mysql_num_rows($users); + if($dif) $userlisting.=($userlisting?', ':'')."$dif inactive"; + if(!$userlisting) $userlisting=' '; + if($usercount or ($ismod or $rank[num]<=$loguser[posts])){ + print " + $tccell2ls width=150>$rank[text] + $tccell1>$rank[num] + $tccell1>$usertotal + $tccell1>$usercount + $tccell2s>$userlisting"; + }else{ + print " + $tccell2>? ? ? + $tccell2>??? + $tccell2>? + $tccell2>? + $tccell2s>?"; + } + $rank=$rankn; + } + print $tblend.$footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/rateuser.php b/rateuser.php new file mode 100644 index 0000000..184225d --- /dev/null +++ b/rateuser.php @@ -0,0 +1,57 @@ +$tblstart"; + if(!$action and $log){ + $rat="$radio=rating value"; + $ratelist=" + $rat=0> 0   + $rat=1> 1   + $rat=2> 2   + $rat=3> 3   + $rat=4> 4   + $rat=5> 5   + $rat=6> 6   + $rat=7> 7   + $rat=8> 8   + $rat=9> 9   + $rat=10> 10 + "; + print " +
+ $tccellh width=150>  + $tccellh>  + $tccell1>Rating: $tccell2l>$ratelist + $tccell1>  $tccell2l> + $inph=action VALUE=rateuser> + $inph=userid VALUE=$id> + $inps=submit VALUE='Give rating!'>
+ "; + } + if($_POST[action]=='rateuser' && $userid!=$loguserid){ + if($rating<0) $rating=0; + if($rating>10) $rating=10; + mysql_query("DELETE FROM userratings WHERE userfrom=$loguserid AND userrated=$userid"); + mysql_query("INSERT INTO userratings (userfrom,userrated,rating) VALUES ($loguserid,$userid,$rating)"); + print "$tccell1>Thank you, $loguser[name], for rating this user.
".redirect('index.php','return to the board',0); + } + if($action=='viewvotes' && $isadmin){ + $users=mysql_query('SELECT id,name FROM users'); + while($user=mysql_fetch_array($users)) $username[$user[id]]=$user[name]; + $ratings=mysql_query("SELECT userfrom,userrated,rating FROM userratings WHERE userrated=$id"); + if(@mysql_num_rows($ratings)) while($rating=mysql_fetch_array($ratings)) $fromlist.="$rating[rating] from ".$username[$rating[userfrom]].'
'; + else $fromlist="None."; + $ratings=mysql_query("SELECT userfrom,userrated,rating FROM userratings WHERE userfrom=$id"); + if(@mysql_num_rows($ratings)) while($rating=mysql_fetch_array($ratings)) $votelist.="$rating[rating] for ".$username[$rating[userrated]].'
'; + else $votelist='None.'; + print " + $tccellh>Votes for $username[$id]: + $tccellh>Votes from $username[$id]: + + $tccell1l>$fromlist + $tccell1l>$votelist + "; + } + print $tblend.$footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/register.php b/register.php new file mode 100644 index 0000000..91c790b --- /dev/null +++ b/register.php @@ -0,0 +1,142 @@ +$smallfont
 "; + $sexlist=" + $radio=sex value=0> Male    + $radio=sex value=1> Female    + $radio=sex value=2 checked> N/A"; + $vsig=" + $radio=viewsig value=0> Disabled    + $radio=viewsig value=1 checked> Enabled"; + $vtool=" + $radio=posttool value=0> Disabled    + $radio=posttool value=1 checked> Enabled"; + $schemes=mysql_query('SELECT id,name FROM schemes ORDER BY ord'); + $tlayouts=mysql_query('SELECT id,name FROM tlayouts ORDER BY ord'); + while($sch=mysql_fetch_array($schemes)) $schlist.="
"; + $forums=mysql_query("SELECT id,title FROM forums WHERE minpower<=$power ORDER BY forder"); + while($forum=mysql_fetch_array($forums)) $forumlist.=""; + if($isadmin) + $ip=" + $tccell1>IP:$desc Search for user via IP, '%' is the wildcard (ex.: 206.172.% for 206.172.*.*) + $tccell2l>$inpt=qip SIZE=15 MAXLENGTH=15>"; + print " + $header
$tblstart +
+ $tccellh width=150>  + $tccellh>  + $tccell1>User name:$desc Enter the username of the user's posts you want to see (no wildcards). + $tccell2l>$inpt=quser SIZE=25 MAXLENGTH=25> + $ip + $tccell1>Post:$desc Search for text in a post. '%' is the wildcard. + $tccell2l>$inpt=qmsg SIZE=50 MAXLENGTH=200> + $tccell1>Date:$desc Search within a date range. (mm-dd-yy format) + $tccell2l> + $radio=dopt value=0> All posts
+ $radio=dopt value=1 checked> Last $inpt=datedays SIZE=4 MAXLENGTH=4 VALUE=30> days
+ $radio=dopt value=2> From $inpt=d1m SIZE=2 MAXLENGTH=2>-$inpt=d1d SIZE=2 MAXLENGTH=2>-$inpt=d1y SIZE=2 MAXLENGTH=2> to $inpt=d2m SIZE=2 MAXLENGTH=2>-$inpt=d2d SIZE=2 MAXLENGTH=2>-$inpt=d2y SIZE=2 MAXLENGTH=2> + $tccell1>Post ordering:$desc Disabling this can speed up the search a lot in some cases. + $tccell2l>$radio=pord value=0 checked> Disabled   $radio=pord value=1> Oldest first   $radio=pord value=2> Newest first + $tccell1>Forum:$desc Search within a forum. + $tccell2l> + $radio=fsch value=0 checked> All forums
+ $radio=fsch value=1> Only in + $tccell1>  + $tccell2l> + $inps=search VALUE=Search> + $tblend$footer + "; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/sendprivate.php b/sendprivate.php new file mode 100644 index 0000000..bdadb12 --- /dev/null +++ b/sendprivate.php @@ -0,0 +1,107 @@ +$boardname - Private messages$tblstart"; + if(!$action and $log and (!$id or ($id and $loguserid==$msg[userto]))){ + print '
'; + if($log && $id){ + $user=loaduser($msg[userfrom],1); + $quotemsg="[quote=$user[name]]$msg[text][/quote] +"; + $subject="Re: $msg[title]"; + $tcellbg="$tccell1l valign=top"; + $postlist=" + $tccellh width=150>User + $tccellh>Message + $tcellbg>$user[name]$smallfont
+ Posts: $postnum$user[posts] + $tcellbg>".doreplace2($msg[text])." + "; + }else $postlist=''; + if($userid) $user=loaduser($userid,1); + $user[name]=htmlspecialchars($user[name]); + $subject=htmlspecialchars($subject); + print " + $tccellh width=150>  + $tccellh>  + $tccell1>Send to: $tccell2l>$inpt=username VALUE=\"$user[name]\" SIZE=25 MAXLENGTH=25> + $tccell1>Subject: $tccell2l>$inpt=subject VALUE=\"$subject\" SIZE=60 MAXLENGTH=100> + $tccell1>Message: $tccell2l>$txta=message ROWS=20 COLS=$numcols>$quotemsg + $tccell1>  $tccell2l> + $inph=action VALUE=sendmsg> + $inps=submit VALUE='Send message'> + $inps=preview VALUE='Preview message'> + $tblend
$tblstart + $postlist + $tblend + $fonttag$boardname - Private messages + "; + } + if($action=='sendmsg'){ + $userid=checkusername($username); + if($userid!=-1 and $subject){ + $subject=str_replace('<','<',$subject); + + $sign=$loguser[signature]; + $head=$loguser[postheader]; + if($user[postbg]) $head="
$head"; + $numdays=(ctime()-$loguser[regdate])/86400; + $message=doreplace($message,$loguser[posts],$numdays,$loguser[name]); + $rsign=doreplace($sign,$loguser[posts],$numdays,$loguser[name]); + $rhead=doreplace($head,$loguser[posts],$numdays,$loguser[name]); + $currenttime=ctime(); + if($submit){ + $headid=getpostlayoutid($head); + $signid=getpostlayoutid($sign); + mysql_query("INSERT INTO pmsgs (id,userto,userfrom,date,ip,msgread,headid,signid) VALUES (NULL,$userid,$loguserid,$currenttime,'$userip',0,$headid,$signid)"); + mysql_query("INSERT INTO pmsgs_text (pid,title,text,tagval) VALUES (".mysql_insert_id().",'$subject','$message','$tagval')") or print mysql_error(); + print " + $tccell1>Private message to $username sent successfully!. +
".redirect('private.php','your private message box...',0).$tblend; + }else{ + loadtlayout(); + $ppost=$loguser; + $message = stripslashes($message); + $username = stripslashes($username); + $subject = stripslashes($subject); + $ppost[uid]=$loguserid; + $ppost[date]=$currenttime; + $ppost[headtext]=$rhead; + $ppost[signtext]=$rsign; + $ppost[text]=$message; + if($isadmin) $ip=$userip; + print " + + $tccellh>Message preview + $tblend$tblstart + ".threadpost($ppost,1)." + $tblend
$tblstart +
+ $tccellh width=150> $tccellh>  + $tccell1>Message: + $tccell2l>$txta=message ROWS=10 COLS=$numcols>$message + $tccell1> $tccell2l> + $inph=username VALUE=\"".htmlspecialchars($username)."\"> + $inph=subject VALUE=\"$subject\"> + $inph=action VALUE=sendmsg> + $inps=submit VALUE=\"Send message\"> + $inps=preview VALUE='Preview message'> + + "; + } + }else print " + $tccell1>Couldn't send the message. You didn't enter an existing username to send the message to. +
".redirect('private.php','return to the private message box',2); + } + if($action=='delete' and $msg[userto]==$loguserid){ + mysql_query("DELETE FROM pmsgs WHERE id=$id"); + mysql_query("DELETE FROM pmsgs_text WHERE pid=$id"); + print " + $tccell1>Thank you, $loguser[name], for deleting the message. +
".redirect('private.php','return to the private message box',0).$tblend; + } + print $footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/shop.php b/shop.php new file mode 100644 index 0000000..dc41815 --- /dev/null +++ b/shop.php @@ -0,0 +1,161 @@ +"; + if(!$log){ + print " + $tblstart$tccell1>You must be logged in to access the Item Shop.
". + redirect('index.php','return to the main page',0). + $tblend; + }else{ + $user=mysql_fetch_array(mysql_query("SELECT posts,regdate,users_rpg.* FROM users,users_rpg WHERE id=$loguserid AND uid=id")); + $p=$user[posts]; + $d=(ctime()-$user[regdate])/86400; + $st=getstats($user); + $GP=$st[GP]; + switch($action){ + case '': + $shops=mysql_query('SELECT * FROM itemcateg ORDER BY corder'); + $eq=mysql_fetch_array(mysql_query("SELECT * FROM users_rpg WHERE uid=$loguserid")); + $eqitems=mysql_query("SELECT * FROM items WHERE id=$eq[eq1] OR id=$eq[eq2] OR id=$eq[eq3] OR id=$eq[eq4] OR id=$eq[eq5] OR id=$eq[eq6]"); + while($item=mysql_fetch_array($eqitems)) $items[$item[id]]=$item; + while($shop=mysql_fetch_array($shops)) + $shoplist.=" + + $tccell1>$shop[name] + $tccell2s>$shop[description] + $tccell1s>".$items[$eq['eq'.$shop[id]]][name]." + "; + print " + + $tccellc>Shop$tccellc>Description$tccellc>Item equipped + $shoplist + $tblend +
+ + + $tblstart + $tccellh colspan=3>Shop list
+ "; + break; + case 'items': + $uu=mysql_query("SELECT id FROM users"); + while($u=mysql_fetch_array($uu)) mysql_query("INSERT INTO users_rpg (uid) VALUES ($u[id])"); + $eq=mysql_fetch_array(mysql_query("SELECT eq$cat AS e FROM users_rpg WHERE uid=$loguserid")); + $eqitem=mysql_fetch_array(mysql_query("SELECT * FROM items WHERE id=$eq[e]")); + print " + + + $tblstart + $tccell1>Return to shop list + $tblend + +
+ + +
+
+
+
+ +
+
+ "; + $atrlist=''; + for($i=0;$i<9;$i++) $atrlist.="$tccellh width=6%>$stat[$i]"; + $items=mysql_query("SELECT * FROM items WHERE cat=$cat OR cat=0 ORDER BY type,coins"); + print " + $tblstart + $tccellh width=110 colspan=2>Commands$tccellct width=1 rowspan=10000>  + $tccellh colspan=1>Item + $atrlist + $tccellh width=6%> + $tccellh width=5%> + "; + while($item=mysql_fetch_array($items)){ + $preview="
Preview"; + if($item[id]==$eq[e] && $item[id]){ + $comm="width=80 colspan=2>Sell"; + }elseif($item[id] && $item[coins]<=$GP){ + $comm="width=30>Buy$tccell1s width=50>$preview"; + }elseif(!$eq[e] && !$item[id]){ + $comm="width=80 colspan=2>-"; + }else{ + $comm="width=80 colspan=2>$preview"; + } + if($item[id]==$eqitem[id]) $color=' class=equal'; + elseif($item[coins]>$GP) $color=' class=disabled'; + else $color=''; + $atrlist=''; + for($i=0;$i<9;$i++){ + $st=$item["s$stat[$i]"]; + if(substr($item[stype],$i,1)=='m'){ + $st=vsprintf('x%1.2f',$st/100); + if($st==100) $st=' '; + }else{ + if($st>0) $st="+$st"; + if(!$st) $st=' '; + } + $itst=$item["s$stat[$i]"]; + $eqst=$eqitem["s$stat[$i]"]; + if(!$color && substr($item[stype],$i,1)==substr($eqitem[stype],$i,1)){ + if($itst> $eqst) $st="$st"; + if($itst==$eqst) $st="$st"; + if($itst< $eqst) $st="$st"; + } + $atrlist.=" + $tccell1s>$st + "; + } + print " + + $tccell1s $comm + $tccell2ls>$item[name] + $atrlist + $tccell2rs>$item[coins] + $tccell2rs>0 + "; + } + print $tblend; + break; + case 'buy': + $item=mysql_fetch_array(mysql_query("SELECT * FROM items WHERE id=$id")); + if($item[coins]<=$GP){ + $pitem=mysql_fetch_array(mysql_query("SELECT coins FROM items WHERE id=".$user['eq'.$item[cat]])); + $whatever = $pitem[coins]*0.6-$item[coins]; + mysql_query("UPDATE users_rpg SET `eq". $item[cat] ."`='". $id ."',`spent`=spent-". $whatever ." WHERE uid=$loguserid") or print mysql_error(); + print " + $tblstart + $tccell1>The $item[name] has been bought and equipped.
+ ".redirect('shop.php','return to the shop',0)." + $tblend + "; + } + break; + case 'sell': + $pitem=mysql_fetch_array(mysql_query("SELECT coins FROM items WHERE id=".$user['eq'.$cat])); + mysql_query("UPDATE users_rpg SET eq$cat=0,spent=spent-$pitem[coins]*0.6 WHERE uid=$loguserid") or print mysql_error(); + print " + $tblstart + $tccell1>The $item[name] has been unequipped and sold.
+ ".redirect('shop.php','return to the shop',0)." + $tblend + "; + break; + default: + } + } + print $footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/showprivate.php b/showprivate.php new file mode 100644 index 0000000..9103bf8 --- /dev/null +++ b/showprivate.php @@ -0,0 +1,36 @@ +$fonttag$boardname - Private messages"; + print "$header$smallfont$top$tblstart + $tccell1>Couldn't get the private message. Either this message wasn't sent to you, or you are not logged in. +
".redirect('private.php','return to the private message box',0); + }else{ + $top="
$fonttag$boardname - Private messages - $msg[title]
"; + if($msg[userto]==$loguserid) mysql_query("UPDATE pmsgs SET msgread=1 WHERE id=$id"); + loadtlayout(); + $post=$user; + $post[uid]=$user[id]; + $post[date]=$msg[date]; + $post[headid]=$msg[headid]; + $post[signid]=$msg[signid]; + $post[text]=$msg[text]; + $post[tagval]=$msg[tagval]; + if($loguser[viewsig]==2){ + $post[headtext]=$user[postheader]; + $post[signtext]=$user[signature]; + }else{ + $post[headtext]=$msg[headtext]; + $post[signtext]=$msg[signtext]; + } + $quote="
Reply"; + $edit=" | Delete"; + if($isadmin) $ip=($edit?' | ':'')."IP: $msg[ip]"; + print $header.$top.$tblstart.threadpost($post,1); + } + print "$tblend$top$footer"; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/sigsize.php b/sigsize.php new file mode 100644 index 0000000..1563d4f --- /dev/null +++ b/sigsize.php @@ -0,0 +1,24 @@ +$tblstart + $tccellh>  + $tccellh>User + $tccellh>Header + $tccellh>Signature + $tccellh>Total + "; + $users=mysql_query('SELECT id,name,LENGTH(postheader) AS hsize,LENGTH(signature) AS ssize,LENGTH(postheader)+LENGTH(signature) AS tsize FROM users ORDER BY tsize DESC'); + for($i=1;$u=mysql_fetch_array($users);$i++){ + print " + $tccell2>$i + $tccell1>$u[name] + $tccell2>$u[hsize] + $tccell2>$u[ssize] + $tccell1>$u[tsize] + "; + } + print $tblend.$footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/smilies.dat b/smilies.dat new file mode 100644 index 0000000..f52cbe8 --- /dev/null +++ b/smilies.dat @@ -0,0 +1,24 @@ +:)¯images/smilies/smile.gif +;)¯images/smilies/wink.gif +:D¯images/smilies/biggrin.gif +:LOL:¯images/smilies/lol.gif +8-)¯images/smilies/glasses.gif +:(¯images/smilies/frown.gif +>:¯images/smilies/mad.gif +>_<¯images/smilies/yuck.gif +:P¯images/smilies/tongue.gif +:S¯images/smilies/wobbly.gif +O_O¯images/smilies/eek.gif +o_O¯images/smilies/bigeyes.gif +^_^¯images/smilies/cute.gif +^^;;;¯images/smilies/cute2.gif +~:o¯images/smilies/baby.gif +x_x¯images/smilies/sick.gif +¬_¬¯images/smilies/eyeshift.gif +:[¯images/smilies/vamp.gif +o_o¯images/smilies/blank.gif +;_;¯images/smilies/cry.gif +@_@¯images/smilies/dizzy.gif +-_-¯images/smilies/annoyed.gif +>_>¯images/smilies/shiftright.gif +<_<¯images/smilies/shiftleft.gif \ No newline at end of file diff --git a/stats.php b/stats.php new file mode 100644 index 0000000..40b9bf9 --- /dev/null +++ b/stats.php @@ -0,0 +1,99 @@ +1023) $b=sprintf('%01.2f',$sz/1024).' kB'; +// if($sz>10239) $b=sprintf('%01.1f',$sz/1024).' kB'; +// if($sz>102399) $b=sprintf('%01.0f',$sz/1024).' kB'; +// if($sz>1048575) $b=sprintf('%01.2f',$sz/1048576).' MB'; +// if($sz>10485759) $b=sprintf('%01.1f',$sz/1048576).' MB'; +// if($sz>104857599) $b=sprintf('%01.0f',$sz/1048576).' MB'; + $b=number_format($sz,0,'.',' '); + return $b; + } + function tblinfo($n){ + global $tbl,$tccell2s,$tccell2ls; + $t=$tbl[$n]; + return " + + $tccell2s>$t[Name] + $tccell2s>$t[Rows] + $tccell2ls>".sp($t[Avg_row_length])." + $tccell2ls>".sp($t[Data_length])." + $tccell2ls>".sp($t[Index_length])." + $tccell2ls>".sp($t[Data_free])." + $tccell2ls>".sp($t[Data_length]+$t[Index_length]); + } + print " + $header
$tblstart + $tccellh>Records$tccellh>  + $tccell1s>Most posts within 24 hours: + $tccell2ls>$misc[maxpostsday], on ".date($dateformat,$misc[maxpostsdaydate])." + $tccell1s>Most posts within 1 hour: + $tccell2ls>$misc[maxpostshour], on ".date($dateformat,$misc[maxpostshourdate])." + $tccell1s>Most users online: + $tccell2ls>$misc[maxusers], on ".date($dateformat,$misc[maxusersdate])."$misc[maxuserstext] + $tblend
$tblstart + $tccellhs>Table name + $tccellhs>Rows + $tccellhs>Avg. data/row + $tccellhs>Data size + $tccellhs>Index size + $tccellhs>Unused data + $tccellhs>Total size" + .tblinfo('posts_text') + .tblinfo('posts') + .tblinfo('pmsgs_text') + .tblinfo('pmsgs') + .tblinfo('postlayouts') + .tblinfo('threads') + .tblinfo('users') + .tblinfo('poll') + .tblinfo('poll_choices') + .tblinfo('pollvotes') + .tblinfo('announcements') + .tblinfo('forumread') + .tblinfo('userratings') + .tblinfo('postradar') + .tblinfo('favorites') + ."$tblend
$tblstart + $tccellhs colspan=9>Daily stats + $tccellcs>Date + $tccellcs>Total users + $tccellcs>Total posts + $tccellcs>Total threads + $tccellcs>Total views + $tccellcs>New users + $tccellcs>New posts + $tccellcs>New threads + $tccellcs>New views + "; + $users=0; + $posts=0; + $threads=0; + $views=0; + $stats=mysql_query("SELECT * FROM dailystats"); + while($day=mysql_fetch_array($stats)){ + print " + $tccell1s>$day[date] + $tccell2s>$day[users] + $tccell2s>$day[posts] + $tccell2s>$day[threads] + $tccell2s>$day[views] + $tccell2s>".($day[users]-$users)." + $tccell2s>".($day[posts]-$posts)." + $tccell2s>".($day[threads]-$threads)." + $tccell2s>".($day[views]-$views)." + "; + $users=$day[users]; + $posts=$day[posts]; + $threads=$day[threads]; + $views=$day[views]; + } + print $tblend.$footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/status.php b/status.php new file mode 100644 index 0000000..fea4554 --- /dev/null +++ b/status.php @@ -0,0 +1,159 @@ +0) $pct=1-calcexpleft($st[exp])/totallvlexp($st[lvl]); + + Header('Content-type:image/png'); + $img=ImageCreate(256,224); + $c[bg]= ImageColorAllocate($img, 40, 40, 90); + $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); + for($i=0;$i<100;$i++) + $c[$i]=ImageColorAllocate($img, 5, 8, 40+$i); + $c[barE1]=ImageColorAllocate($img,120,150,180); + $c[barE2]=ImageColorAllocate($img, 30, 60, 90); + $c[bar1][1]=ImageColorAllocate($img,215, 91,129); + $c[bar2][1]=ImageColorAllocate($img, 90, 22, 43); + $c[bar1][2]=ImageColorAllocate($img,255,136,154); + $c[bar2][2]=ImageColorAllocate($img,151, 0, 38); + $c[bar1][3]=ImageColorAllocate($img,255,139, 89); + $c[bar2][3]=ImageColorAllocate($img,125, 37, 0); + $c[bar1][4]=ImageColorAllocate($img,255,251, 89); + $c[bar2][4]=ImageColorAllocate($img, 83, 81, 0); + $c[bar1][5]=ImageColorAllocate($img, 89,255,139); + $c[bar2][5]=ImageColorAllocate($img, 0,100, 30); + $c[bar1][6]=ImageColorAllocate($img, 89,213,255); + $c[bar2][6]=ImageColorAllocate($img, 0, 66, 93); + $c[bar1][7]=ImageColorAllocate($img,196, 33, 33); + $c[bar2][7]=ImageColorAllocate($img, 70, 12, 12); + ImageColorTransparent($img,0); + + box( 0, 0,2+strlen($user[name]),3); + box( 0, 4,32, 4); + box( 0, 9,32, 9); + box( 0,19,11, 9); + box(12,19,11, 6); + + $fontY=fontc(255,250,240, 255,240, 80, 0, 0, 0); + $fontR=fontc(255,230,220, 240,160,150, 0, 0, 0); + $fontG=fontc(190,255,190, 60,220, 60, 0, 0, 0); + $fontB=fontc(160,240,255, 120,190,240, 0, 0, 0); + $fontW=fontc(255,255,255, 210,210,210, 0, 0, 0); + + twrite($fontW, 1, 1,0,"$user[name]"); + + twrite($fontB, 1, 5,0,'HP: /'); + twrite($fontR, 3, 5,7,$st[HP]); + twrite($fontY,11, 5,5,$st[HP]); + twrite($fontB, 1, 6,0,'MP: /'); + twrite($fontR, 3, 6,7,$st[MP]); + twrite($fontY,11, 6,5,$st[MP]); + + for($i=2;$i<9;$i++){ + twrite($fontB, 1,8+$i,0,"$stat[$i]:"); + twrite($fontY, 4,8+$i,6,$st[$stat[$i]]); + } + + twrite($fontB, 1,20,0,'Level'); + twrite($fontY, 6,20,4,$st[lvl]); + twrite($fontB, 1,22,0,'EXP:'); + twrite($fontY, 1,23,9,$st[exp]); + twrite($fontB, 1,24,0,'Next:'); + twrite($fontY, 1,25,9,calcexpleft($st[exp])); + + twrite($fontB,13,20,0,'Coins:'); + twrite($fontY,13,22,0,chr(0)); + twrite($fontG,13,23,0,chr(0)); + twrite($fontY,14,22,8,$st[GP]); + twrite($fontG,14,23,8,0); + + $sc[1]= 1; + $sc[2]= 5; + $sc[3]= 25; + $sc[4]= 100; + $sc[5]= 250; + $sc[6]= 500; + $sc[7]=1000; + $sc[8]=99999999; + + bars(); + + ImagePNG($img); + ImageDestroy($img); + +function twrite($font,$x,$y,$l,$text){ + global $img; + $x*=8; + $y*=8; + $text.=''; + if(strlen($text)<$l) $x+=($l-strlen($text))*8; + for($i=0;$i113;$s++){} + if(!$sc[$s]) $sc[$s]=1; + ImageFilledRectangle($img,137,41,136+$st[HP]/$sc[$s],47,$c[bxb0]); + ImageFilledRectangle($img,137,49,136+$st[MP]/$sc[$s],55,$c[bxb0]); + ImageFilledRectangle($img,136,40,135+$st[HP]/$sc[$s],46,$c[bar1][$s]); + ImageFilledRectangle($img,136,48,135+$st[MP]/$sc[$s],54,$c[bar1][$s]); + + for($i=2;$i<9;$i++) $st2[$i]=$st[$stat[$i]]; + for($s=1;@(max($st2)/$sc[$s])>161;$s++){} + if(!$sc[$s]) $sc[$s]=1; + for($i=2;$i<9;$i++){ + ImageFilledRectangle($img,89,65+$i*8,88+$st[$stat[$i]]/$sc[$s], 71+$i*8,$c[bxb0]); + ImageFilledRectangle($img,88,64+$i*8,87+$st[$stat[$i]]/$sc[$s], 70+$i*8,$c[bar1][$s]); + } + + $e1=72*$pct; + ImageFilledRectangle($img,9,209,8+72,215,$c[bxb0]); + ImageFilledRectangle($img,8,208,7+72,214,$c[barE2]); + ImageFilledRectangle($img,8,208,7+$e1,214,$c[barE1]); +} +?> \ No newline at end of file diff --git a/templates/aceboard.php b/templates/aceboard.php new file mode 100644 index 0000000..a0c82af --- /dev/null +++ b/templates/aceboard.php @@ -0,0 +1,93 @@ +"; + + $css.=$basecode; + $header1="$css$windowtitle + + + + + + + + +
+ + +
+
+ + + +
+ + + + +
+
","
","
+
+ + + + +
"); + $footer=" + +
$race
+
+ $sitename
+ AcmlmBoard $version
+ $copyright
+ +
+
+
+
+ + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); + +?> diff --git a/templates/aesucks.php b/templates/aesucks.php new file mode 100644 index 0000000..189817c --- /dev/null +++ b/templates/aesucks.php @@ -0,0 +1,38 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + + Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/alliance.php b/templates/alliance.php new file mode 100644 index 0000000..85afa4f --- /dev/null +++ b/templates/alliance.php @@ -0,0 +1,93 @@ +"; + + $css.=$basecode; + $header1="$css$windowtitle + + + + + + + + +
+ + +
+
+ + + +
+ + + + +
+
","
","
+
+ + + + +
"); + $footer=" + +
$race

+
+ $sitename
+ AcmlmBoard $version
+ $copyright
+ +
+
+
+
+ + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); + +?> diff --git a/templates/bloodlust.php b/templates/bloodlust.php new file mode 100644 index 0000000..c4e886e --- /dev/null +++ b/templates/bloodlust.php @@ -0,0 +1,40 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/classic.php b/templates/classic.php new file mode 100644 index 0000000..189817c --- /dev/null +++ b/templates/classic.php @@ -0,0 +1,38 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/dailycycle.php b/templates/dailycycle.php new file mode 100644 index 0000000..79c4f2d --- /dev/null +++ b/templates/dailycycle.php @@ -0,0 +1,37 @@ +"; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/dani.php b/templates/dani.php new file mode 100644 index 0000000..aca8671 --- /dev/null +++ b/templates/dani.php @@ -0,0 +1,41 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/dig.php b/templates/dig.php new file mode 100644 index 0000000..5e6f323 --- /dev/null +++ b/templates/dig.php @@ -0,0 +1,40 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/endofff.php b/templates/endofff.php new file mode 100644 index 0000000..ad719ce --- /dev/null +++ b/templates/endofff.php @@ -0,0 +1,40 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend + $message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/ff9a.php b/templates/ff9a.php new file mode 100644 index 0000000..5e6f323 --- /dev/null +++ b/templates/ff9a.php @@ -0,0 +1,40 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/horde.php b/templates/horde.php new file mode 100644 index 0000000..1f8ab8b --- /dev/null +++ b/templates/horde.php @@ -0,0 +1,93 @@ +"; + + $css.=$basecode; + $header1="$css$windowtitle + + + + + + + + +
+ + +
+
+ + + +
+ + + + +
+
","
","
+
+ + + + +
"); + $footer=" + +
$race
+
+ $sitename
+ AcmlmBoard $version
+ $copyright
+ +
+
+
+
+ + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); + +?> diff --git a/templates/kafuka.php b/templates/kafuka.php new file mode 100644 index 0000000..97fb2f5 --- /dev/null +++ b/templates/kafuka.php @@ -0,0 +1,41 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend + $message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/kirby.php b/templates/kirby.php new file mode 100644 index 0000000..189817c --- /dev/null +++ b/templates/kirby.php @@ -0,0 +1,38 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/mario.php b/templates/mario.php new file mode 100644 index 0000000..5e6f323 --- /dev/null +++ b/templates/mario.php @@ -0,0 +1,40 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/megaman.php b/templates/megaman.php new file mode 100644 index 0000000..5e6f323 --- /dev/null +++ b/templates/megaman.php @@ -0,0 +1,40 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/neon.php b/templates/neon.php new file mode 100644 index 0000000..189817c --- /dev/null +++ b/templates/neon.php @@ -0,0 +1,38 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/nes.php b/templates/nes.php new file mode 100644 index 0000000..aca8671 --- /dev/null +++ b/templates/nes.php @@ -0,0 +1,41 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/night.php b/templates/night.php new file mode 100644 index 0000000..189817c --- /dev/null +++ b/templates/night.php @@ -0,0 +1,38 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/oldblue.php b/templates/oldblue.php new file mode 100644 index 0000000..9b9cf32 --- /dev/null +++ b/templates/oldblue.php @@ -0,0 +1,38 @@ +"; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $css.=$basecode; + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/purple.php b/templates/purple.php new file mode 100644 index 0000000..5e6f323 --- /dev/null +++ b/templates/purple.php @@ -0,0 +1,40 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/romhackdomain.php b/templates/romhackdomain.php new file mode 100644 index 0000000..189817c --- /dev/null +++ b/templates/romhackdomain.php @@ -0,0 +1,38 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/tartan.php b/templates/tartan.php new file mode 100644 index 0000000..50363b2 --- /dev/null +++ b/templates/tartan.php @@ -0,0 +1,40 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/twilight.php b/templates/twilight.php new file mode 100644 index 0000000..3cefdfc --- /dev/null +++ b/templates/twilight.php @@ -0,0 +1,100 @@ +"; + + $nmcol[0]=array('-1'=>'5B5B5B','3460E0','D8E8FE','AFFABE','FFEA95'); + $nmcol[1]=array('-1'=>'5B5B5B','E936A6','FFB3F3','9912D3','C53A9E'); + $nmcol[2]=array('-1'=>'5B5B5B','5F468C','D86366','2D7225','F0C40F'); + + $css.=$basecode; + $header1="$css$windowtitle + + + + + + + + +
+ + +
+
+ + + +
+ + + + +
+
","
","
+
+ + + + +
"); + $footer=" + +
$race
+
+ $sitename
+ AcmlmBoard $version
+ $copyright
+ +
+
+
+
+ + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); + +?> diff --git a/templates/xmas.php b/templates/xmas.php new file mode 100644 index 0000000..843c728 --- /dev/null +++ b/templates/xmas.php @@ -0,0 +1,41 @@ +"; + $css.=$basecode; + if(!$isindex) {$message_auto_notification=$privdisplay;} + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ $boardtitle + $tblend$tblstart + "; + $header2=" + +
Views: $views
+ $headlinks2 +
".date($dateformat,ctime()+$tzoff)."
+ $race + $tblend +$message_auto_notification +
+ "; + $footer=" + +
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); +$stamptime=1; +?> diff --git a/templates/yoshi.php b/templates/yoshi.php new file mode 100644 index 0000000..7d68906 --- /dev/null +++ b/templates/yoshi.php @@ -0,0 +1,50 @@ +"; + + $css.=$basecode; + $header1="$windowtitle + $css + + $body +
+ $tblstart +
+ +
+ + + $tblend + "; + $footer=" +
+
$smallfont

$sitename
$affiliatelinks + AcmlmBoard $version
$copyright

+
\"One + + "; + function makeheader($header1,$headlinks,$header2){return $header1.$headlinks.$header2;} + $header=makeheader($header1,$headlinks,$header2); +if($ipbanned) die("$header
$tblstart$tccell1>Sorry, but your IP address is banned from this board.$tblend$footer"); + +?> diff --git a/thread.php b/thread.php new file mode 100644 index 0000000..f3fcd55 --- /dev/null +++ b/thread.php @@ -0,0 +1,236 @@ +$thread[lastpostdate]"),0,0)) + $tnext=mysql_result(mysql_query("SELECT id FROM threads WHERE lastpostdate=$tnext"),0,0); + if($tprev=mysql_result(mysql_query("SELECT max(lastpostdate) FROM threads WHERE forum=$forumid AND lastpostdate<$thread[lastpostdate]"),0,0)) + $tprev=mysql_result(mysql_query("SELECT id FROM threads WHERE lastpostdate=$tprev"),0,0); + + if($tnext) $nextnewer="Next newer thread"; + if($tprev) $nextolder="Next older thread"; + if($nextnewer && $nextolder) $nextnewer.=' | '; + if(@mysql_fetch_array(mysql_query("SELECT * FROM favorites WHERE user=$loguserid AND thread=$id"))) + $favlink="Remove from favorites"; + else $favlink="Add to favorites"; + if($nextnewer or $nextolder) $favlink.=' | '; + + mysql_query("UPDATE threads SET views=views+1 WHERE id=$id"); + $thread[title]=str_replace("<","<",$thread[title]); + if($forum[minpower]>$power and $forum[minpower]>0) $thread[title]="(restricted)"; + $forumtitle="$forum[title]: "; + }elseif($user){ + $usr=$user; + $tuser=mysql_fetch_array(mysql_query("SELECT name FROM users WHERE id=$usr")); + $thread[title]="Posts by $tuser[name]"; + }elseif($search) $thread[title]="Search results"; + + $windowtitle="$boardname -- $forumtitle$thread[title]"; + require 'lib/layout.php'; + if($id) $fonline=fonlineusers($forumid); + if(@mysql_num_rows(mysql_query("SELECT user FROM forummods WHERE forum=$forumid and user=$loguserid"))) $ismod=1; + if($id && $ismod){ + $trashid=27; + if($qmod){ + $verb='editing'; + if($st!='') mysql_query("UPDATE threads SET sticky=$st WHERE id=$id"); + if($cl!='') mysql_query("UPDATE threads SET closed=$cl WHERE id=$id"); + if($trash){ + mysql_query("UPDATE threads SET sticky=0,closed=1,forum=$trashid WHERE id=$id"); + $numposts=$thread[replies]+1; + $t1=mysql_fetch_array(mysql_query("SELECT lastpostdate,lastposter FROM threads WHERE forum=$forumid ORDER BY lastpostdate DESC LIMIT 1")); + $t2=mysql_fetch_array(mysql_query("SELECT lastpostdate,lastposter FROM threads WHERE forum=$trashid ORDER BY lastpostdate DESC LIMIT 1")); + mysql_query("UPDATE forums SET numposts=numposts-$numposts,numthreads=numthreads-1,lastpostdate=$t1[lastpostdate],lastpostuser=$t1[lastposter] WHERE id=$forumid"); + mysql_query("UPDATE forums SET numposts=numposts+$numposts,numthreads=numthreads+1,lastpostdate=$t2[lastpostdate],lastpostuser=$t2[lastposter] WHERE id=$trashid"); + $verb='trashing'; + } + print " + $header$tblstart + $tccell1>Thank you, $loguser[name], for $verb this thread.
". + redirect("forum.php?id=$forumid",'return to the forum',0)." + $tblend$footer + "; + printtimedif($startingtime); + exit; + }else{ + $fulledit="Edit thread"; + $link="Delete"; + $modfeats="$tccellcls colspan=2>Moderating options: $stick | $close$trash -- $fulledit"; + } + } + if($thread[poll]){ + $poll=mysql_fetch_array(mysql_query("SELECT * FROM poll WHERE id=$thread[poll]")); + $voted=@mysql_result(mysql_query("SELECT count(*) FROM pollvotes WHERE poll=$poll[id] AND user=$loguserid"),0,0); + if($action=='vote' and $loguserid and (!$voted or $poll[doublevote]) and !$poll[closed]){ + mysql_query("INSERT INTO pollvotes (poll,choice,user) VALUES ($poll[id],$choice,$loguserid)"); + $voted++; + } + $tvotes=mysql_result(mysql_query("SELECT count(distinct `user`) FROM pollvotes WHERE poll=$poll[id]"),0,0); + $pollcs=mysql_query("SELECT * FROM poll_choices WHERE poll=$poll[id]"); + while($pollc=mysql_fetch_array($pollcs)){ + $votes=mysql_result(mysql_query("SELECT count(*) FROM pollvotes WHERE choice=$pollc[id]"),0,0); + if($tvotes != 0) $pct=sprintf('%02.1f',$votes/$tvotes*100); + else $pct = "00.0"; + + $barpart="
 
"; + if(!$votes) $barpart=' '; + $s=($votes>1?'s':''); + $link=''; + if($loguserid and (!$voted or $poll[doublevote]) and !$poll[closed]) $link=""; + $choices.=" + $tccell1l width=20%>$link$pollc[choice] + $tccell2l width=60%>$barpart + $tccell1 width=20%>$pct%, $votes vote$s + "; + } + $mlt='disabled'; + if($poll[doublevote]) $mlt='enabled'; + if($tvotes != 1) { + $ss = 's'; + $hv = 'have'; + } else { + $ss = ''; + $hv = 'has'; + } + if($ismod or $thread[user]==$loguserid) $polledit=" | Edit"; + $polltbl=" + $tccellc colspan=3>$poll[question] + $tccell2ls colspan=3>$poll[briefing] + $choices + $tccell2l colspan=3>$smallfont Multi-voting is $mlt. $tvotes user$ss $hv voted. $polledit + $tblend
$tblstart + "; + } + + loadtlayout(); + if($loguser[viewsig]==0) $sfields=''; + if($loguser[viewsig]==1) $sfields=',headtext,signtext'; + if($loguser[viewsig]==2) $sfields=',u.postheader headtext,u.signature signtext'; + $ufields=userfields(); + + $activity=mysql_query("SELECT user, count(*) num FROM posts WHERE date>".(ctime()-86400)." GROUP BY user"); + while($n=mysql_fetch_array($activity)) $act[$n[user]]=$n[num]; + $postlist=" + $polltbl + $modfeats + $tccellh width=150>User + $tccellh>Post + "; + if(!$ppp) $ppp=($log?$loguser[postsperpage]:20); + if($id && $power<$forum[minpower]){ + print " + $header$tblstart + $tccell1>Couldn't enter the forum. Either you don't have access to this restricted forum, or you are not logged in. +
Click here to return to the board, or wait to get redirected. + + $tblend + "; + }else{ + $min=$ppp*$page; + if($id) + $posts=mysql_query("SELECT p.*,text$sfields,edited,options,tagval,u.id uid,name,$ufields,regdate FROM posts p,posts_text LEFT JOIN users u ON p.user=u.id WHERE thread=$id AND p.id=pid ORDER BY p.id LIMIT $min,$ppp"); + elseif($usr){ + $thread[replies]=mysql_result(mysql_query("SELECT count(*) FROM posts WHERE user=$usr"),0,0)-1; + $posts=mysql_query("SELECT p.*,text$sfields,edited,options,tagval,u.id uid,name,$ufields,regdate FROM posts p,posts_text LEFT JOIN users u ON p.user=u.id WHERE user=$usr AND p.id=pid ORDER BY p.id LIMIT $min,$ppp"); + } elseif($search){ + if($quser){ + $user=mysql_fetch_array(mysql_query("SELECT id FROM users WHERE name='".addslashes($quser)."'")); + $u=$user[id]; + $srch.=($srch?"AND ":"")."posts.user=$u"; + } + if($qip) $srch.=($srch?" AND ":"")."ip LIKE '$qip'"; + if($qmsg) $srch.=($srch?" AND ":"")."text LIKE '%".addslashes($qmsg)."%'"; + if($dopt==1) $srch.=($srch?" AND ":"")."date>".(ctime()-86400*$datedays); + if($dopt==2){ + $date1=mktime(0,0,0,$d1m,$d1d,$d1y); + $date2=mktime(0,0,0,$d2m,$d2d,$d2y)+86400; + $srch.=($srch?" AND ":"")."date>$date1 AND date<$date2"; + } + if($pord) $order=" ORDER BY id".($pord==2?" DESC":""); + if(!$fsch){ + $posts=mysql_query("SELECT id,user,date,thread,ip,text,num$signquery,edited,options FROM posts,posts_text WHERE $srch AND id=pid $order LIMIT $min,$ppp"); + $thread[replies]=mysql_result(mysql_query("SELECT COUNT(*) FROM posts,posts_text WHERE $srch AND id=pid"),0,0); + }else{ + $posts=mysql_query("SELECT posts.id,posts.user,date,thread,ip,text,num$signquery,edited,options FROM posts,posts_text,threads WHERE $srch AND thread=threads.id AND forum=$fid AND id=pid $order LIMIT $min,$ppp"); + $thread[replies]=mysql_result(mysql_query("SELECT COUNT(*) FROM posts,posts_text,threads WHERE $srch AND thread=threads.id AND forum=$fid AND id=pid"),0,0); + } + $quser=str_replace(" ","+",$quser); + $qip=str_replace(" ","+",$qip); + $qmsg=str_replace(" ","+",$qmsg); + } + for($i=0;$post=mysql_fetch_array($posts);$i++){ + $bg=$i%2+1; + $postlist.=''; + $quote = "Link"; + $edit=''; + if($id and !$thread[closed]) $quote .= " | Quote"; + $deletelink="Delete"; + if(($ismod or $post[user]==$loguserid) and !$thread[closed]) $edit=($quote?' | ':'')."Edit | $deletelink"; + if($isadmin) $ip=($edit?' | ':'')."IP: $post[ip]"; + if(!$id){ + $pthread=mysql_fetch_array(mysql_query("SELECT id,title,forum FROM threads WHERE id=$post[thread]")); + $pforum=@mysql_fetch_array(mysql_query("SELECT minpower FROM forums WHERE id=$pthread[forum]")); + } + $post[act]=$act[$post[user]]; + if($pforum[minpower]<=$power or !$pforum[minpower]) $postlist.=threadpost($post,$bg,$pthread); + else $postlist.="$tccellc colspan=2>$fonttag (restricted)"; + } + $query=preg_replace("'page=([0-9].*)'si",'','?'.getenv("QUERY_STRING")); + $query=preg_replace("'pid=(\d.*)'si","id=$id",$query); + if($query AND substr($query,-1)!="&") $query.="&"; + if(!$page) $page=0; + $pagelinks="Pages:"; + for($i=0;$i<(($thread[replies]+1)/$ppp);$i++){ + if($i==$page) $pagelinks.=" ".($i+1); + else $pagelinks.=" ".($i+1).""; + } + if($thread[replies]<$ppp) $pagelinks=''; + print + $header.sizelimitjs()." + $tblstart$tccell1s>$fonline$tblend +
$fonttag$boardname - $forum[title] - $thread[title]$smallfont + "; + if($forumid>-1){ + print "$newpollpic | "; + print "$newthreadpic"; + if(!$thread[closed]) print " | $newreplypic"; + else print " | Thread closed"; + } + print "
$smallfont$pagelinks$smallfont$favlink$nextnewer$nextolder
+ $tblstart + "; + print "$postlist$modfeats$tblend +
$smallfont$pagelinks$smallfont$favlink$nextnewer$nextolder
+
$fonttag$boardname - $forum[title] - $thread[title]$smallfont + "; + if($forumid){ + print "$newthreadpic"; + if(!$thread[closed]) print " | $newreplypic"; + else print " | Thread closed"; + } + print "
"; + } + print $footer; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/threadsbyuser.php b/threadsbyuser.php new file mode 100644 index 0000000..41cd72c --- /dev/null +++ b/threadsbyuser.php @@ -0,0 +1,69 @@ +$fonttag$boardname - Threads by ".$users[$id][name]."$smallfont + $tblstart + $tccellh  + $tccellha colspan=2$tccellhb Thread + $tccellh Started by + $tccellha width=60$tccellhb Replies + $tccellha width=60$tccellhb Views + $tccellha width=150$tccellhb Last post + "; + $threads=mysql_query("SELECT id,user,title,views,closed,icon,replies,lastpostdate,lastposter FROM threads WHERE user=$id ORDER BY lastpostdate DESC"); + $threadcount=mysql_num_rows($threads); + if($threadcount>$tpp){ + $pagelinks2=$smallfont."Pages:"; + for($k=0;$k<(($threadcount+1)/$tpp);$k++){ + if($k!=$page) $pagelinks2.=" ".($k+1).""; + else $pagelinks2.=" ".($k+1); + } + } + $i=0; + while($thread=mysql_fetch_array($threads)){ + $i++; + if($i>($page*$tpp) and $i<(($page+1)*$tpp+1)){ + $new=" "; + if($thread[lastpostdate]>ctime()-900) $new=""; + if($thread[closed]==1) $new=""; + $posticon=""; + $pagelinks=""; + if($thread[replies]>=$ppp){ + $pagelinks="$smallfont(Pages:"; + for($k=0;$k<(($thread[replies]+1)/$ppp);$k++) $pagelinks.=" ".($k+1).""; + $pagelinks.=")"; + } + $thread[title]=str_replace("<","<",$thread[title]); + if(!$thread[icon]) $posticon=" "; + if($i>($page*$tpp)+1) print ""; + $user1=$users[$thread[user]]; + $user2=$users[$thread[lastposter]]; + $namecolor1=getnamecolor($user1[sex],$user1[powerlevel]); + $namecolor2=getnamecolor($user2[sex],$user2[powerlevel]); + print " + $tccell1$new + $tccell2$posticon + $tccell2l$thread[title] $pagelinks + $tccell2$user1[name] + $tccell1$thread[replies] + $tccell1$thread[views] + $tccell2".date("m-d-y h:i A",$thread[lastpostdate]+$tzoff)."$smallfont
by
".$user2[name]." + "; + } + } + print "$tblend$pagelinks2$footer"; + printtimedif($startingtime); +?> \ No newline at end of file diff --git a/tlayouts/compact.php b/tlayouts/compact.php new file mode 100644 index 0000000..190526b --- /dev/null +++ b/tlayouts/compact.php @@ -0,0 +1,21 @@ + + $set[userlink]
+ $smallfont Posts: $postnum + $set[tdbg] width=80%> + + +
Posted on $set[date]$threadlink$quote$edit$ip +
+ $set[tdbg] height=60>$post[headtext]$post[text]$post[signtext]$set[edited] + "; + } +?> \ No newline at end of file diff --git a/tlayouts/extended.php b/tlayouts/extended.php new file mode 100644 index 0000000..bf4ccb9 --- /dev/null +++ b/tlayouts/extended.php @@ -0,0 +1,70 @@ +For next: $expleft"; + }else{ + $level=""; + $experience="
"; + $poststext="
"; + $postnum=""; + $posttotal=""; + $totalwidth=56; + $barwidth=$totalwidth-round(@($expleft/totallvlexp($lvl))*$totalwidth); + if($barwidth<1) $barwidth=0; + if($barwidth>0) $baron=""; + if($barwidth<$totalwidth) $baroff="'; + $bar="
$baron$baroff'; + } + if(!$post[num]){ $postnum='';} + if($post[icq]) $icqicon="
"; + if($post[imood]) $imood=""; + $reinf=syndrome($post[act]); + $statustime=ctime()-300; + $random = rand(0, 5); + $dumbphrases = array("Your Mother", "Registered", "Banned", "". htmlspecialchars($post[name]) ."", "a Waffle", "WOW"); +$status = htmlspecialchars($post[name])." is ". $dumbphrases[$random]; +// if($post[lastactivity]<$statustime){ +// $status=Offline     "; +// }elseif($post[lastactivity]>$statustime){ +// $status=htmlspecialchars($post[name])." is The Writer Of This Post     "; +//} + $sincelastpost='Since last post: '.timeunits(ctime()-$post[lastposttime]); + $lastactivity='Last activity: '.timeunits(ctime()-$post[lastactivity]); + $since='Since: '.@date($dateshort,$post[regdate]+$tzoff); + $postdate=date($dateformat,$post[date]+$tzoff); + if($set[threadlink]) $threadlink=", in $set[threadlink]"; + return " + $set[tdbg] rowspan=2> + $set[userlink]$smallfont
+ $set[userrank]$reinf
+ $level$bar
+ $set[userpic]
+ $poststext$postnum$posttotal
+ $experience

+ $since$set[location]

+ $sincelastpost
$lastactivity
+ $icqicon$imood
+ + $set[tdbg] height=1 width=80%> + + +
Posted on $postdate$threadlink$quickeditlink$quote$edit$ip +
+ $set[tdbg] height=220>$post[headtext]$post[text]$post[signtext]$set[edited] + + $set[tdbg] >$smallfontStatus: $status + $set[tdbg] width=80%>$smallfont Options: None, as all of the old options here were totally useless and lost in the move to 1.92 + + "; + } +?> \ No newline at end of file diff --git a/tlayouts/ezboard.php b/tlayouts/ezboard.php new file mode 100644 index 0000000..178e2bb --- /dev/null +++ b/tlayouts/ezboard.php @@ -0,0 +1,26 @@ +Delete','>Del',$edit); + $ip=str_replace('| IP: ','',$ip); + $postdate=date('n/j/y g:i:s a',$post[date]+$tzoff); + if($set[threadlink]) $threadlink="
in $set[threadlink]"; + if(!$post[num]) $post[num]=$post[posts]; + return " + $set[tdbg]> + $set[userlink]$smallfont
+ $userrank
+ Posts: $post[num]
+ ($postdate) + $threadlink
+ $ip
$quote$edit
+ $set[userpic] + $set[tdbg] width=80%>$post[headtext]$post[text]$post[signtext]$set[edited] + "; + } +?> \ No newline at end of file diff --git a/tlayouts/postwide.php b/tlayouts/postwide.php new file mode 100644 index 0000000..370e3e1 --- /dev/null +++ b/tlayouts/postwide.php @@ -0,0 +1,55 @@ +For next: $expleft"; + }else{ + $level=""; + $experience="
"; + $poststext="
"; + $postnum=""; + $posttotal=""; + $totalwidth=56; + $barwidth=$totalwidth-round(@($expleft/totallvlexp($lvl))*$totalwidth); + if($barwidth<1) $barwidth=0; + if($barwidth>0) $baron=""; + if($barwidth<$totalwidth) $baroff="'; + $bar="
$baron$baroff'; + } + if(!$post[num]){ + $postnum=''; + if($postlayout==1) $posttotal=""; + } + if($post[icq]) $icqicon=""; + if($post[imood]) $imood=""; + $reinf=syndrome($post[act]); + $sincelastpost='Since last post: '.timeunits(ctime()-$post[lastposttime]); + $lastactivity='Last activity: '.timeunits(ctime()-$post[lastactivity]); + $since='Since: '.@date($dateshort,$post[regdate]+$tzoff); + $postdate=date($dateformat,$post[date]+$tzoff); + if($set[threadlink]) $threadlink=", in $set[threadlink]"; + return " + $set[tdbg] height=1 width=100% colspan=2> + + +
$set[userlink]$smallfont
$level$bar
$quote$edit$ip +
+ + $set[tdbg] height=220 colspan=2>$post[headtext]$post[text]$post[signtext]$set[edited] + $set[tdbg] height=1 width=100% colspan=2> + + +
Posted on $postdate$threadlink
+ + "; + } +?> diff --git a/tlayouts/regular.php b/tlayouts/regular.php new file mode 100644 index 0000000..090f9ce --- /dev/null +++ b/tlayouts/regular.php @@ -0,0 +1,60 @@ +For next: $expleft"; + }else{ + $level=""; + $experience="
"; + $poststext="
"; + $postnum=""; + $posttotal=""; + $totalwidth=56; + $barwidth=$totalwidth-round(@($expleft/totallvlexp($lvl))*$totalwidth); + if($barwidth<1) $barwidth=0; + if($barwidth>0) $baron=""; + if($barwidth<$totalwidth) $baroff="'; + $bar="
$baron$baroff'; + } + if(!$post[num]){ + $postnum=''; + if($postlayout==1) $posttotal=""; + } + if($post[icq]) $icqicon=""; + if($post[imood]) $imood=""; + $reinf=syndrome($post[act]); + $sincelastpost='Since last post: '.timeunits(ctime()-$post[lastposttime]); + $lastactivity='Last activity: '.timeunits(ctime()-$post[lastactivity]); + $since='Since: '.@date($dateshort,$post[regdate]+$tzoff); + $postdate=date($dateformat,$post[date]+$tzoff); + if($set[threadlink]) $threadlink=", in $set[threadlink]"; + return " + $set[tdbg] rowspan=2> + $set[userlink]$smallfont
+ $set[userrank]$reinf
+ $level$bar
+ $set[userpic]
+ $poststext$postnum$posttotal
+ $experience

+ $since$set[location]

+ $sincelastpost
$lastactivity
+ $icqicon$imood
+ + $set[tdbg] height=1 width=80%> + + +
Posted on $postdate$threadlink$quote$edit$ip +
+ $set[tdbg] height=220>$post[headtext]$post[text]$post[signtext]$set[edited] + "; + } +?> \ No newline at end of file diff --git a/tlayouts/rpg.php b/tlayouts/rpg.php new file mode 100644 index 0000000..5318bb4 --- /dev/null +++ b/tlayouts/rpg.php @@ -0,0 +1,43 @@ +"; + $postdate=date($dateformat,$post[date]+$tzoff); + $exp=calcexp($post[posts],(ctime()-$post[regdate])/86400); + $mp=calcexpgainpost($post[posts],(ctime()-$post[regdate])/86400); + $lvl=calclvl($exp); + $expleft=calcexpleft($exp); + $barwidth=100-round(@($expleft/totallvlexp($lvl))*100); + if($barwidth<1) $barwidth=0; + if($barwidth>0) $baron=""; + if($barwidth<100) $baroff="'; + if($set[threadlink]) $threadlink=", in $set[threadlink]"; + return " + $tccell1l valign=top rowspan=2> + $set[userlink]$smallfont
+ $set[userrank] + + +
$userpicture + + +
LV

HP
MP
$lvl

$post[posts]
$mp
+
+
+ + + +
EXP points
For next LV
$exp
$expleft
$baron$baroff +
+
+ $tccell1l width=80%> + + +
Posted on $postdate$threadlink$quote$edit$ip +
+ $tccell2l valign=top height=220>$post[headtext]$post[text]$post[signtext]$edited + "; + } +?> \ No newline at end of file diff --git a/tlayouts/ubb.php b/tlayouts/ubb.php new file mode 100644 index 0000000..c324538 --- /dev/null +++ b/tlayouts/ubb.php @@ -0,0 +1,25 @@ +Registered: '.date('M Y',$post[regdate]+$tzoff); + $postdate=date('m-d-Y h:i A',$post[date]+$tzoff); + if($set[threadlink]) $threadlink=" in $set[threadlink]"; + return " + $set[tdbg]> + $set[userlink]$smallfont
+ $set[userrank]
+ $set[userpic]

+ Posts: $post[posts] + $set[location]$since + $set[tdbg] width=80%> + + +
posted $postdate$threadlink$quote$edit$ip +

+ $post[headtext]$post[text]$post[signtext]$set[edited] + "; + } +?> \ No newline at end of file diff --git a/tlayouts/vbb.php b/tlayouts/vbb.php new file mode 100644 index 0000000..e8b0a5e --- /dev/null +++ b/tlayouts/vbb.php @@ -0,0 +1,35 @@ +','a>] ',$edit); + $edit=str_replace(' + $set[userlink]$smallfont
+ $set[userrank]
+ $set[userpic]

+ $since$location
+ Posts: $post[posts] + $set[tdbg] width=80%>$post[headtext]$post[text]$post[signtext]$set[edited] + $set[tdbg]>
$postdate
+ $set[tdbg]> + + +
[Profile] [Send PM]$homepage [Search]$threadlink$quote $edit $ip +
+ "; + } +?> \ No newline at end of file diff --git a/tlayouts/vertical.php b/tlayouts/vertical.php new file mode 100644 index 0000000..7df57fd --- /dev/null +++ b/tlayouts/vertical.php @@ -0,0 +1,54 @@ + "; + else $set[userpic] = " "; + + if($quote) $quote='['.$quote.']'; + $edit=str_replace(' | ','',$edit); + $edit=str_replace('><','> | <',$edit); + if($edit != null) $edit='['. $edit .']'; + +$ip=str_replace('| I','I',$ip); + + $level=$lvl; + $postnum="$post[num]/"; + $posttotal=$post[posts]; + $experience="EXP: $exp ($expleft for next)"; + $totalwidth=96; + $barwidth=$totalwidth-round(@($expleft/totallvlexp($lvl))*$totalwidth); + + if($barwidth<1) $barwidth=0; + if($barwidth>0) $baron=""; + if($barwidth<$totalwidth) $baroff="'; + $bar="$baron$baroff'; + + $numgfx = " + +
$set[userpic] $set[userlink]
$numgfx$lvl&l=8&f=$numfil height=8>
$bar
$numgfx$postnum$posttotal&l=9&f=$numfil height=8>
$numgfx$exp&l=10&f=$numfil height=8>
$numgfx$expleft&l=7&f=$numfil height=8>
+ $set[tdbg] align=right>$smallfont +
Posted: $postdate +

$threadlink $quote +
$edit +
$ip
+ + $set[tdbg] colspan=2 height=50>$post[headtext]$post[text]$post[signtext]$set[edited]
  + "; + } + +?> \ No newline at end of file diff --git a/userpic.php b/userpic.php new file mode 100644 index 0000000..1ce89a1 --- /dev/null +++ b/userpic.php @@ -0,0 +1,52 @@ + +
+ $tblstart + "; + if(!$page) $page=1; + $userpiccategs=mysql_query("SELECT id,name FROM userpiccateg WHERE page=$page"); + while($categ=mysql_fetch_array($userpiccategs)){ + print "$tccellc>$categ[name]$tccell2>"; + $userpics=mysql_query("SELECT id,url FROM userpic WHERE categ=$categ[id]"); + while($pic=mysql_fetch_array($userpics)) + print "$radio=pic value=$pic[id]>   "; + } + $categpages=mysql_query('SELECT page FROM userpiccateg ORDER BY page'); + $lpage=0; + $pagelinks='Pages:'; + while($p=mysql_fetch_array($categpages)){ + $p=$p[page]; + if($p!=$lpage){ + $lpage=$p; + if($p!=$page) $pagelinks.=" $p"; + else $pagelinks.=" $p"; + } + } + print " + $tccell1s>$pagelinks + $tccell1> + $inph=action VALUE=setpicture> + $inps=submit VALUE=\"Change picture\"> +
$tblend + "; + } + if($_POST[action]=='setpicture'){ + print $tblstart; + $pic=mysql_query("SELECT url FROM userpic WHERE id=$pic"); + $pic=mysql_fetch_array($pic); + $pic=$pic[url]; + mysql_query("UPDATE users SET picture='".addslashes($pic)."' WHERE id=$loguserid"); + print " + $tccell1>Thank you, $loguser[name], for selecting a new user picture. +
".redirect('index.php','return to the board',0).$tblend; + } + print $footer; + printtimedif($startingtime); +?> \ No newline at end of file