Gegen Bilderklau - Das Original (https://www.gegen-bilderklau.net/index.php)
- Design, Website, Copyright (https://www.gegen-bilderklau.net/board.php?boardid=80)
--- Homepagehilfe (https://www.gegen-bilderklau.net/board.php?boardid=27)
---- Homepagehilfe - Archiv (https://www.gegen-bilderklau.net/board.php?boardid=139)
----- [PHP & MySQL] Problem mit dem Profilfelder Hack (https://www.gegen-bilderklau.net/thread.php?threadid=132549)


Geschrieben von colorless am 20.04.2008 um 18:02:

  Problem mit dem Profilfelder Hack

Hey ho,

Kleines Problem mit dem Profilfelderhack beim Lite. Irgendwie...will das nicht so ganz wie ich will. Alle Sachen funktionieren, nur thread.php verwurschtelt das ganze Forum. Im Thread wird nur noch der erste Beitrag pro Seite angezeigt...ich hab es immer wieder neu gecodet, aber es will irgendwie einfach nicht funktionieren. Hatte jemand das Problem schonmal oder weiß wie er da irgendwie helfen kann?

Würde mich freuen;
vlg & danke im vorraus
colorless.



Geschrieben von colorless am 21.04.2008 um 12:46:

 

So? xD

php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
<?php
$filename="thread.php";

require("./global.php");
require("./acp/lib/class_parse.php");

if((!isset($postid) && !isset($threadid)) || $thread['closed']==3) eval("error("".$tpl->get("error_falselink")."");");

if($wbbuserdata['canuseacp']==|| $wbbuserdata['issupermod']==|| ($wbbuserdata['ismod']==&& $modpermissions['userid'])) $visible="";
else $visible="AND visible=1";

if($_REQUEST['goto']=="lastpost") {
 $result $db->query_first("SELECT postid FROM bb".$n."_posts WHERE threadid = '$threadid$visible ORDER BY posttime DESC LIMIT 1");
 header("Location: thread.php?sid=$session[hash]&postid=$result[postid]#post$result[postid]");
 exit();
}

if(isset($_COOKIE['threadvisit'])) $threadvisit=decode_cookie($_COOKIE['threadvisit']);
else $threadvisit=array();

if(isset($_COOKIE['postvisit'])) $postvisit=decode_cookie($_COOKIE['postvisit']);
else $postvisit=array();


if($_REQUEST['goto']=="firstnew") {
if($threadvisit[$threadid]<$wbbuserdata['lastvisit']) $threadvisit[$threadid]=$wbbuserdata['lastvisit'];
$result $db->query_first("SELECT postid FROM bb".$n."_posts WHERE threadid='$threadid' AND posttime>'".intval($threadvisit[$threadid])."' $visible ORDER BY posttime ASC",1);
if($result['postid']) header("Location: thread.php?sid=$session[hash]&postid=$result[postid]#post$result[postid]");
else header("Location: thread.php?goto=lastpost&threadid=$threadid&sid=$session[hash]");
exit();
}

if($_REQUEST['goto']=="nextnewest") {
 $result $db->query_first("SELECT threadid FROM bb".$n."_threads WHERE visible = 1 AND lastposttime>'$thread[lastposttime]' AND closed <> 3 AND boardid = '$boardid' ORDER BY lastposttime ASC",1);
 if(!$result['threadid']) eval("error("".$tpl->get("error_nonextnewest")."");");
 $threadid=$result['threadid'];
 $thread $db->query_first("SELECT * FROM bb".$n."_threads WHERE threadid = '$threadid'");
}

if($_REQUEST['goto']=="nextoldest") {
 $result $db->query_first("SELECT threadid FROM bb".$n."_threads WHERE visible = 1 AND lastposttime<'$thread[lastposttime]' AND closed <> 3 AND boardid = '$boardid' ORDER BY lastposttime DESC",1);
 if(!$result['threadid']) eval("error("".$tpl->get("error_nonextoldest")."");");
 $threadid=$result['threadid'];
 $thread $db->query_first("SELECT * FROM bb".$n."_threads WHERE threadid = '$threadid'");
}


if($wbbuserdata['umaxposts']) $postsperpage=$wbbuserdata['umaxposts'];
elseif($board['postsperpage']) $postsperpage=$board['postsperpage'];
else $postsperpage=$default_postsperpage;
$postorder=$board['postorder'];

if(isset($postid)) {
 if($postorder==0$result $db->query_first("SELECT COUNT(*) AS posts FROM bb".$n."_posts WHERE threadid='$threadid' AND postid<='$postid$visible");
 else $result $db->query_first("SELECT COUNT(*) AS posts FROM bb".$n."_posts WHERE threadid='$threadid' AND postid>='$postid$visible");
 $_GET['page']=ceil($result['posts']/$postsperpage);
}

$db->unbuffered_query("UPDATE bb".$n."_threads SET views=views+1 WHERE threadid='$threadid'",1);

$boardnavcache=array();
if($showboardjump==1$boardjump=makeboardjump($boardid);
$navbar=getNavbar($board['parentlist']);
eval ("\$navbar .= "".$tpl->get("navbar_board")."";");

/* flat view */
if($threadview==0) {
 $result $db->query_first("SELECT COUNT(*) FROM bb".$n."_posts WHERE threadid = '$threadid$visible");
 $postcount $result[0];

 if(isset($_GET['page'])) {
  $page=intval($_GET['page']);
  if($page==0$page=1;
 }
 else $page=1;
 $pages ceil($postcount/$postsperpage);
 if($pages>1$pagelink=makepagelink("thread.php?threadid=$threadid&sid=$session[hash]",$page,$pages,$showpagelinks-1);

 $postids="";
 $result $db->query("SELECT postid FROM bb".$n."_posts WHERE threadid = '$threadid$visible ORDER BY posttime ".ifelse($postorder,"DESC","ASC")." LIMIT ".($postsperpage*($page-1)).",".$postsperpage);
 while($row=$db->fetch_array($result)) $postids .= ",".$row['postid'];
}

$parse = new parse($docensor,75,$board['allowsmilies'],$board['allowbbcode'],$wbbuserdata['showimages'],$usecode);

if($showuserfieldsinthread){
    $userfields=", uf.*";
    $userfieldsjoin=" LEFT JOIN bb".$n."_userfields uf ON (u.userid=uf.userid)";
    $result=$db->query("SELECT * FROM bb".$n."_profilefields WHERE showinthread=1 ".(!$wbbuserdata['canuseacp']?" AND hidden=0":"")." ORDER BY fieldorder ASC");
    while($row=$db->fetch_array($result)){
        if(!$row['group_pfexist']) continue;
        $temp=explode(",",$row['group_pfexist']);
        while(list(,$val)=each($temp)) $userfieldcache[$val][]=$row['profilefieldid'];
        $profilefieldcache[$row['profilefieldid']]=$row;
    }
} else {
    $userfields="";
    $userfieldsjoin="";
}

if($showavatar==1) {
 $avatar=", av.avatarid, av.avatarextension, av.width, av.height";
 $avatarjoin="LEFT JOIN bb".$n."_avatars av ON (u.avatarid=av.avatarid)";
}
else {
 $avatar="";
 $avatarjoin="";
}

if($board['allowicons']==1) {
 $icon=", i.iconpath, i.icontitle";
 $iconjoin="LEFT JOIN bb".$n."_icons i ON (p.iconid=i.iconid)";
}
else {
 $icon="";
 $iconjoin="";
}
$result $db->query("SELECT
p.*,
u.userposts,
u.regdate,
u.signature,
u.email,
u.homepage,
u.icq,
u.aim,
u.yim,
u.msn,
u.showemail,
u.receivepm,
u.usercanemail,
u.gender,
u.invisible,
u.title,
u.lastactivity,
u.groupid,
r.ranktitle, r.rankimages
$userfields
$icon
$avatar
FROM bb".$n."_posts p
LEFT JOIN bb".$n."_users u USING (userid)
LEFT JOIN bb".$n."_ranks r USING (rankid)
$userfieldsjoin
$iconjoin
$avatarjoin
WHERE p.postid IN (0$postids)
ORDER BY p.posttime ".ifelse($postorder,"DESC","ASC"));

$count=0;
while($posts=$db->fetch_array($result)) {
 if($userfieldcache[$posts['groupid']]) reset($userfieldcache[$posts['groupid']]);
 $signature="";
 $threadstarter="";
 $lastedit="";
 $search="";
 $homie="";
 $email="";
 $homepage="";
 $icq="";
 $aim="";
 $yim="";
 $user_online="";
 $userfields="";
 $gender="";
 $useravatar="";
 $rankimages="";
 $setvisible="";
 $pm="";
 $invisible="";

 /** mod/admin option -> set visible post **/
 if($posts['visible']==&& $posts['posttime']!=$thread['starttime']) eval ("\$invisible = "".$tpl->get("thread_invisible")."";");

 $tdbgcolor=getone($count,"{tablecolorb}","{tablecolora}");
 $tdid=getone($count,"tableb","tablea");

 $posts['message']=$parse->doparse($posts['message'],$posts['allowsmilies']*$board['allowsmilies'],$board['allowhtml'],$board['allowbbcode'],$board['allowimages']);
 $posts['posttopic']=$parse->textwrap($posts['posttopic'],30);
 if($posts['iconid'] && $board['allowicons']==1$posticon=makeimgtag($posts['iconpath'],$posts['icontitle']);
 else $posticon="";
 if($wbbuserdata['lastvisit']<=$posts['posttime'] && $postvisit[$posts['postid']]!=1) eval ("\$postsign = "".$tpl->get("thread_newpost")."";");
 else eval ("\$postsign = "".$tpl->get("thread_nonewpost")."";");
 $postdate=formatdate($dateformat,$posts['posttime'],1);
 $posttime=formatdate($timeformat,$posts['posttime']);

 if($posts['editorid']) {
  $editdate=formatdate($dateformat,$posts['edittime']);
  $edittime=formatdate($timeformat,$posts['edittime']);
  eval ("\$lastedit = "".$tpl->get("thread_lastedit")."";");
 }
 if($posts['userid']) {
  $rankimages=formatRI($posts['rankimages']);
  if($rankimages) eval ("\$rankimages = "".$tpl->get("thread_rankimages")."";");
  if($posts['title']) $posts['ranktitle']=$posts['title'];

  if($showonlineinthread==1) {
   if(($posts['invisible']==|| $wbbuserdata['canuseacp']==1) && $posts['lastactivity']>=time()-$useronlinetimeout*60) eval ("\$user_online = "".$tpl->get("thread_user_online")."";");
   else eval ("\$user_online = "".$tpl->get("thread_user_offline")."";");
  }

  if($showregdateinthread==1) {
   $posts['regdate']=formatdate($dateformat,$posts['regdate']);
   eval ("\$posts['regdate'] = "".$tpl->get("thread_regdate")."";");
  }
  else $posts['regdate']="";

if($showuserfieldsinthread==&& is_array($userfieldcache[$posts['groupid']]) && count($userfieldcache[$posts['groupid']])) {
    while(list($key,$val)= each($userfieldcache[$posts['groupid']])) {
        $fieldid="field".$val;
        if(!$posts[$fieldid]) continue;
        $fieldoptions=$profilefieldcache[$val]['fieldoptions'];
        switch ($profilefieldcache[$val]['fieldkind']){
             case "date":
                if($posts[$fieldid] && $posts[$fieldid]!="0000-00-00") {
                    $date_array explode("-",$posts[$fieldid]);
                    if($date_array[0]=="0000"$posts[$fieldid] =  $date_array[2].".".$date_array[1].".";
                    else $posts[$fieldid] =  $date_array[2].".".$date_array[1].".".$date_array[0];
                } else unset($posts[$fieldid]);
             break;
             case "multiselect":
                 if(!$posts[$fieldid]) continue;

                 $multiselect_array=explode("\n",$posts[$fieldid]);
                 $posts[$fieldid]="";
                 while(list($key,$val)=each($multiselect_array)) eval ("\$posts[$fieldid].="".$tpl->get("userfields_multiselect_show")."";");
             break;
             case "tlong" or "tshort":
                $fieldoptions=explode("\n",preg_replace("(\n|\r\n|\r)","\n",$fieldoptions));
                $posts[$fieldid]=$parse->doparse(stripslashes($posts[$fieldid]),intval($fieldoptions[0]),intval($fieldoptions[1]),intval($fieldoptions[2]),intval($fieldoptions[3]));
             break;
             default:
                  $posts['$fieldid']=parse::textwrap($posts[$fieldid],50);
            break;
        }
        $title=$profilefieldcache[$val]['title'];
         if($posts[$fieldid]) eval ("\$userfields .= "".$tpl->get("thread_userfields")."";");
    }
  }



  if($showgenderinthread==&& $posts['gender']>0) {
   if($posts['gender']==1) eval ("\$gender = "".$tpl->get("thread_gender_male")."";");
   if($posts['gender']==2) eval ("\$gender = "".$tpl->get("thread_gender_female")."";");
  }

  if($showuserpostsinthread==1) eval ("\$posts['userposts'] = "".$tpl->get("thread_userposts")."";");
  else $posts['userposts']="";

  eval ("\$search = "".$tpl->get("thread_search")."";");
  eval ("\$homie = "".$tpl->get("thread_homie")."";");
  if($posts['showemail']==1) eval ("\$email = "".$tpl->get("thread_email")."";");
  elseif($posts['usercanemail']==1) eval ("\$email = "".$tpl->get("thread_formmail")."";");
  if($posts['homepage']) eval ("\$homepage = "".$tpl->get("thread_homepage")."";");
  if($posts['receivepm']==&& $wbbuserdata['canusepms']==1) eval ("\$pm = "".$tpl->get("thread_pm")."";");
  if($posts['icq']) eval ("\$icq = "".$tpl->get("thread_icq")."";");
  if($posts['aim']) eval ("\$aim = "".$tpl->get("thread_aim")."";");
  if($posts['yim']) eval ("\$yim = "".$tpl->get("thread_yim")."";");

  if($posts['avatarid'] && $showavatar==&& $wbbuserdata['showavatars']==1) {
   $avatarname="images/avatars/avatar-$posts[avatarid].$posts[avatarextension]";
   $avatarwidth=$posts['width'];
   $avatarheight=$posts['height'];
   eval ("\$useravatar = "".$tpl->get("avatar_image")."";");
   eval ("\$useravatar = "".$tpl->get("thread_useravatar")."";");
  }
else
  {
  eval ("\$useravatar = "".$tpl->get("noavatar_image")."";");
  eval ("\$useravatar = "".$tpl->get("thread_useravatar")."";");
  }
  eval ("\$posts['username'] = "".$tpl->get("thread_username")."";");

  if($posts['showsignature']==&& $wbbuserdata['showsignatures']==&& $posts['signature']) {
   $posts['signature']=$parse->doparse($posts['signature'],$posts['allowsmilies']*$allowsigsmilies,$allowsightml,$allowsigbbcode,$maxsigimage);
   eval ("\$signature = "".$tpl->get("thread_signature")."";");
  }
 }
 else {
  eval ("\$posts[ranktitle] = "".$tpl->get("anonymous")."";");
 }

 eval ("\$postbit .= "".$tpl->get("thread_postbit")."";");
 $count++;
}

if($wbbuserdata['issupermod']==|| $modpermissions['userid']) eval ("\$modoptions = "".$tpl->get("thread_modoptions")."";");
elseif($wbbuserdata['userid'] && $wbbuserdata['userid']==$thread['starterid'] && ($wbbuserdata['cancloseowntopic']==|| $wbbuserdata['candelowntopic']==|| $wbbuserdata['caneditowntopic']==1)) eval ("\$modoptions = "".$tpl->get("thread_useroptions")."";");

if($thread['pollid']) {
 if($wbbuserdata['issupermod']==|| $modpermissions['userid']==1) eval ("\$mod_poll_edit = "".$tpl->get("mod_poll_edit")."";");

 unset($votecheck);
 $poll=$db->query_first("SELECT * FROM bb".$n."_polls WHERE pollid='$thread[pollid]'");
 if($poll['timeout']==0$timeout=time()+1;
 else $timeout=$poll['starttime']+$poll['timeout']*86400;
 if($_REQUEST['preresult']!=&& $wbbuserdata['canvotepoll'] && $timeout>=time()) {
  if($wbbuserdata['userid']) $votecheck=$db->query_first("SELECT id AS pollid FROM bb".$n."_votes WHERE id='$thread[pollid]' AND votemode=1 AND userid='$wbbuserdata[userid]'");
  else $votecheck=$db->query_first("SELECT id AS pollid FROM bb".$n."_votes WHERE id='$thread[pollid]' AND votemode=1 AND ipaddress='$REMOTE_ADDR'");
 }

 if($_REQUEST['preresult']==|| $votecheck['pollid'] || !$wbbuserdata['canvotepoll'] || $timeout<time()) { // already voted; show result
  $votes=0;
  unset($polloption);
  $totalvotes=0;
  //list($totalvotes)=$db->query_first("SELECT SUM(votes) FROM bb".$n."_polloptions WHERE pollid='$thread[pollid]'");
  $result=$db->query("SELECT * FROM bb".$n."_polloptions WHERE pollid='$thread[pollid]' ORDER BY votes DESC");
  while($row=$db->fetch_array($result)) {
   $totalvotes+=$row['votes'];
   $polloptions[]=$row;
  }

  $i=1;
  while(list($key,$row)=each($polloptions)) {
   $row['polloption']=$parse->doparse($row['polloption'],$board['allowsmilies'],$board['allowhtml'],$board['allowbbcode'],$board['allowimages']);
   if($totalvotes) {
    $percent_float $row['votes']*100/$totalvotes;
    $percent number_format($percent_float2);
    $percent_int floor($percent_float)*3;
    $percent_int += 1;
   }
   else $percent $percent_int 0;
   eval ("\$thread_poll_resultbit .= "".$tpl->get("thread_poll_resultbit")."";");
   if($i==5$i=0;
   $i++;
  }

  eval ("\$thread_poll = "".$tpl->get("thread_poll_result")."";");
 }
 else {
  if($poll['choicecount']>1$inputtype="checkbox";
  else $inputtype="radio";

  $result=$db->query("SELECT * FROM bb".$n."_polloptions WHERE pollid='$thread[pollid]' ORDER BY showorder ASC");
  while($row=$db->fetch_array($result)) {
   $row['polloption']=$parse->doparse($row['polloption'],$board['allowsmilies'],$board['allowhtml'],$board['allowbbcode'],$board['allowimages']);
   eval ("\$thread_pollbit .= "".$tpl->get("thread_pollbit")."";");
  }

  eval ("\$thread_poll = "".$tpl->get("thread_poll")."";");
 }
}

if($thread['voted']) {
 $avarage=number_format($thread['votepoints']/$thread['voted'],2);
 $threads['voted']=$thread['voted'];
 eval ("\$threadrating = "".$tpl->get("board_threadbit_rating")."";");
 $threadrating=str_repeat($threadratinground($avarage));
}
else $threadrating="";

$threadvisit[$threadid]=time();
if($wbbuserdata['usecookies']==1encode_cookie("threadvisit");

$postids explode(",",$postids);
for($i=0;$i<count($postids);$i++) $postvisit[$postids[$i]]=1;
if($wbbuserdata['usecookies']==1encode_cookie("postvisit",0,false);

if($board['closed']==0) eval ("\$newthread = "".$tpl->get("board_newthread")."";");
$addreply_link="threadid=$threadid";
if($thread['closed']!=0) eval ("\$addreply = "".$tpl->get("thread_closed")."";");
elseif($board['closed']==0) eval ("\$addreply = "".$tpl->get("thread_addreply")."";");

if(strlen($thread['topic'])>60$thread['topic']=parse::textwrap($thread['topic'],60);
eval("\$tpl->output("".$tpl->get("thread")."");");
?>


Forensoftware: Burning Board, entwickelt von WoltLab GmbH