INT, 'totalrows' => INT)); authenticate(); if ( $Globals['ppboards'] == "closed" && $User['adminedit'] != 1 ) { diewell( $Globals['closedmsg'] ); } if ( !isset($page) ) { $page = 0; } $startRow_comview = $page * 10; $query_comview = "SELECT * FROM {$Globals['pp_db_prefix']}comments WHERE comment != '' ORDER BY date DESC LIMIT $startRow_comview,10"; $comview = ppmysql_query($query_comview, $link); $row_comview = mysql_fetch_assoc($comview); if ( empty($totalrows) ) { $all_comview = ppmysql_query("SELECT id FROM {$Globals['pp_db_prefix']}comments WHERE comment != ''", $link); $totalrows = mysql_num_rows($all_comview); } $totalpages = ceil($totalrows/10)-1; $qscomview = null; $comrow = array(); $x = 0; topmenu(); do { $cclock = formatpptime( $row_comview['date'] ); $ccdate = formatppdate( $row_comview['date'] ); $result = ppmysql_query("SELECT bigimage,approved,cat,storecat,title,userid,width,height,date,filesize,rating,views,user FROM {$Globals['pp_db_prefix']}photos WHERE id={$row_comview['photo']} LIMIT 1", $link); list( $bigimage, $approved, $cat, $storecat, $title, $theuser, $width, $height, $date, $filesize, $imgrating, $views, $user ) = mysql_fetch_row($result); if ( $CatPerms['ugview'][$cat] == 0 && $CatPerms['catpass'][$cat] == "" ) { if ( $storecat != 0 ) { $cat = $storecat; } $ppdate = formatppdate( $date ); $filesize = $filesize/1024; $filesize = sprintf("%1.1f", $filesize); $filesize = number_format($filesize)."kb"; if ( $imgrating && $Globals['allowrate'] == "yes" ) { $rating = number_format( $imgrating, 2 ); $ratingicon = " - {$Globals['pp_lang']['rating']}: "; for ( $ri = 0; $ri < round($rating); $ri++ ) { $ratingicon .= "\"*\""; } } else { $ratingicon = " - {$Globals['pp_lang']['rating']}: "; $rating = $Globals['pp_lang']['na']; } $imgtag = get_imagethumb( $bigimage, $cat, $theuser, $approved ); $thumb = "$imgtag"; $post ="{$Globals['pp_lang']['post']}"; $rowcomments = un_htmlspecialchars($row_comview['comment']); if ( VB3_ENHANCEDINT == "on" ) { $rowcomments = convert_markups($rowcomments); } else { $rowcomments = convert_returns(convert_markups($rowcomments)); } if ( $row_comview['rating'] > 0 ) { $rowcomments .= "

{$Globals['pp_lang']['rating']}: {$row_comview['rating']}"; } $comrow['width'][$x] = $width; $comrow['height'][$x] = $height; $comrow['views'][$x] = $views; $comrow['filesize'][$x] = $filesize; $comrow['thumb'][$x] = $thumb; $comrow['rowcomments'][$x] = $rowcomments; $comrow['title'][$x] = $title; $comrow['user'][$x] = $user; $comrow['rating'][$x] = $rating; $comrow['ppdate'][$x] = $ppdate; $comrow['ratingicon'][$x] = $ratingicon; $comrow['post'][$x] = $post; $comrow['ccdate'][$x] = $ccdate; $comrow['cclock'][$x] = $cclock; $comrow['username'][$x] = $row_comview['username']; $x++; } } while ( $row_comview = mysql_fetch_assoc($comview) ); $prevlink = null; if ( $page > 0 ) { $prevurl = max(0, $page - 1); $prevlink = "« {$Globals['pp_lang']['prevpage']}"; } $nextlink = null; if ( $page < $totalpages ) { if ( $prevlink ) { $prevlink .= " · "; } $nexturl = min($totalpages, $page + 1); $nextlink = "{$Globals['pp_lang']['nextpage']} »"; } printheader( $cat, $Globals['pp_lang']['comments'] ); include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/menubar.tmpl" ); include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/comshow.tmpl" ); printfooter(); ?>