shage Posted November 27, 2007 Share Posted November 27, 2007 Why am i getting a error on this any idea? <?php $j = 0; $x = 0; $page = basename($_SERVER['PATH_TRANSLATED']); $site = basename($_SERVER['PATH_TRANSLATED'],"/t1/".$page); $handle = opendir("images/updates"); while (false !== ($set = readdir($handle))) { if($set != '.' && $set != '..'){ list($date, $setname) = explode("&",$set); $site = str_replace('_',' ',$site); $setname = str_replace('.jpg','',$setname); $setname = str_replace('_',' ',$setname); $year = substr($date, 0, 4); $month = substr($date, 4, 2); $day = substr($date, 6, 2); $clipdate = mktime(0, 0, 0, $month , $day + 2, $year); $clipdate = date("Ymd", $clipdate); $moviedate = mktime(0, 0, 0, $month , $day + 4, $year); $moviedate = date("Ymd", $moviedate); $limitdate = mktime(0, 0, 0, $month , $day - 14, $year); $limitdate = date("Ymd", $limitdate); if($date > date(Ymd)&& $limitdate < date(Ymd)){ $ondeck['site'][$j] = $site; $ondeck['setname'][$j] = $setname; $ondeck['date'][$j] = $date; $j++; } if($date > date(Ymd)){ $update['site'][$x] = $site; $update['setname'][$x] = $setname; $update['date'][$x] = $date; $update['clip'][$x] = FALSE; $update['movie'][$x] = FALSE; $x++; } if($clipdate > date(Ymd)){ $update['date'][$x] = $clipdate; $update['clip'][$x] = TRUE; $update['movie'][$x] = FALSE; $update['site'][$x] = $site; $update['setname'][$x] = $setname; $x++; } if($moviedate > date(Ymd)){ $update['date'][$x] = $moviedate; $update['clip'][$x] = FALSE; $update['movie'][$x] = TRUE; $update['site'][$x] = $site; $update['setname'][$x] = $setname; $x++; } } } if(count($date) >= 1){ //build the coming soon table array_multisort($ondeck['date'], SORT_ASC, $ondeck['setname'], $ondeck['site']); echo('<table width = "750" border = "0" cellspacing = "0" cellpadding = "0" CLASS = "updatetable">'); echo('<tr><td align = "center"><span CLASS="updateheadline"> COMING SOON </span></td>'); echo('<td align = "center"><span CLASS="updateheadline"> DO NOT MISS THESE UPDATES </span></td></tr>'); echo('<tr>'); $thumbsite = str_replace(' ','',$ondeck['site'][$n]); $pos = strrpos($ondeck['setname'][0], " "); if($pos > 0){ $thumbset = substr($ondeck['setname'][0], 0, $pos); }else{ $thumbset = $ondeck['setname'][0]; } $thumbsrc = 'http://picgalleries.' . $thumbsite . '.com/' . $thumbset . '/' . $thumbset . '_150x150.jpg'; if(@fopen($thumbsrc,'r')){ $thumbsrc = $thumbsrc; }else{ $thumbsite = str_replace(' ','',$ondeck['site'][0]); $thumbset = str_replace(' ','_',$ondeck['setname'][0]); $thumbsrc = 'http://picgalleries.' . $thumbsite . '.com/' . $thumbset . '/' . $thumbset . '_150x150.jpg'; } $year = substr($ondeck['date'][0], 0, 4); $month = substr($ondeck['date'][0], 4, 2); $day = substr($ondeck['date'][0], 6, 2); $soondate = $month . '-' . $day . '-' . $year; echo('<td align = "center" rowspan = 5><table><tr><td><a href = "join.htm?sender="' . $sender . '" onMouseover = "joinstatus();return true" onMouseout = "clearstatus();return true" style = "text-decoration:none"><img src = "' . $thumbsrc . '" style = "border:none"></a></td></tr><tr><td align = "center"><span CLASS="updatetext">' . ucwords($ondeck['setname'][0]) . '<br>' . $soondate . '</span></td></tr></table></td>'); echo('<td align = "left" style = "padding-left:100px">'); //build the latest updates array_multisort($update['date'], SORT_ASC, $update['setname'], $update['site'], $update['clip'], $update['movie']); for($p = 0; $p < 5; $p++){ $thumbsite = str_replace(' ','',$update['site'][$p]); $pos = strrpos($update['setname'][$p], " "); if($pos > 0){ $thumbset = substr($update['setname'][$p], 0, $pos); }else{ $thumbset = $update['setname'][$p]; } $thumbsrc = 'http://picgalleries.' . $thumbsite . '.com/' . $thumbset . '/' . $thumbset . '_150x150.jpg'; if(@fopen($thumbsrc,'r')){ $thumbsrc = $thumbsrc; }else{ $thumbsite = str_replace(' ','',$update['site'][$n]); $thumbset = str_replace(' ','_',$update['setname'][$n]); $thumbsrc = 'http://picgalleries.' . $thumbsite . '.com/' . $thumbset . '/' . $thumbset . '_150x150.jpg'; } if($update['clip'][$p]){ ?> <span CLASS="updatedate"><?=date('m/d/Y',strtotime($update['date'][$p]))?></span> <a href = "join.htm?sender=<?=$sender?>" onMouseover = "joinstatus();return true" onMouseout = "clearstatus();return true"><span CLASS="updatehighlight">Update:<br></span></a> <span CLASS="updatetext">Adding <?=ucwords($update['setname'][$p])?> movie clips.</span><br> <? } if($update['movie'][$p]){ ?> <span CLASS="updatedate"><?=date('m/d/Y',strtotime($update['date'][$p]))?></span> <a href = "join.htm?sender=<?=$sender?>" onMouseover = "joinstatus();return true" onMouseout = "clearstatus();return true"><span CLASS="updatehighlight">Update:<br></span></a> <span CLASS="updatetext">Adding <?=ucwords($update['setname'][$p])?> full length movies.</span><br> <? } if(!$update['movie'][$p] && !$update['clip'][$p]){ ?> <span CLASS="updatedate"><?=date('m/d/Y',strtotime($update['date'][$p]))?></span> <a href = "join.htm?sender=<?=$sender?>" onMouseover = "joinstatus();return true" onMouseout = "clearstatus();return true"><span CLASS="updatehighlight">Update:<br></span></a> <span CLASS="updatetext">Adding <?=ucwords($update['setname'][$p])?> photo content.</span><br> <? } } echo('</td></tr></table>'); } ?> It prints updates where its suppose to just no image preview, maybe somthing around there thanks Quote Link to comment Share on other sites More sharing options...
Psycho Posted November 27, 2007 Share Posted November 27, 2007 And ther error message is??? It should state the namture of the error and the line number. You have two instances of array_multisort() in that code. Quote Link to comment Share on other sites More sharing options...
shage Posted November 27, 2007 Author Share Posted November 27, 2007 sorry line 79 Quote Link to comment Share on other sites More sharing options...
Psycho Posted November 27, 2007 Share Posted November 27, 2007 And the error message? C'mon this isn't 20 questions. You say that the array_multisort() is the problem and that you are not getting a preview image. I don't see how the two are related. Having the array in the worng order might cause the images not to be displayed to the corresponding data, but it should prevent them from being displayed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.