0 )
{
$r = ppmysql_query_one("SELECT cat,title FROM {$Globals['pp_db_prefix']}photos WHERE id=$id", $link);
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: '. construct_newppurl( "showphoto.php", array('photo' => $id, 'title' => $r['title'], 'cat' => $r['cat']) ) );
exit;
}
}
typecast($_REQUEST, array('photo' => INT, 'perpage' => INT, 'cpage' => INT, 'cat' => STRING, 'nocache' => INT,
'sortby' => STRING, 'sortdir' => STRING, 'limit' => STRING, 'way' => STRING,' sorttime' => INT,
'page' => INT, 'date' => INT, 'ppuser' => INT));
typecast($_COOKIE, array('catp' => STRING, 'poptions' => STRING));
// Init some variables
if ( $size != "big" ) $size = "medium";
if ( isset($_GET['catp']) )
{
@setcookie( "catp", $_GET['catp'], 0, "{$Globals['cookie_path']}", $Globals['domain_path'] );
$GLOBALS['catp'] = $_GET['catp'];
}
elseif ( isset($_POST['catp']) )
{
@setcookie( "catp", $_POST['catp'], 0, "{$Globals['cookie_path']}", $Globals['domain_path'] );
$GLOBALS['catp'] = $_POST['catp'];
}
if ( isset($perpage) && is_numeric($perpage) )
{
if ( $perpage != $ppperpage )
{
@setcookie( "ppperpage", $perpage, time()+2592000 );
$page = 1;
}
}
authenticate();
if ( $Globals['ppboards'] == "closed" && $User['adminedit'] != 1 )
{
diewell( $Globals['closedmsg'] );
}
if ( !$photo )
{
diewell( $Globals['pp_lang']['nophoto'] );
}
if ( ($User['username'] == "" || $User['username'] == $Globals['pp_lang']['unreg']) && $Globals['reqregister'] == "yes" )
{
diewell( $Globals['pp_lang']['noregview'] );
}
if ( $perpage < 1 )
{
$perpage = $Globals['defaultposts'];
}
$rows = ppmysql_query("SELECT id,user,userid,cat,storecat,storeid,date,title,description,ismature,keywords,bigimage,width,height,filesize,views,medwidth,medheight,medsize,approved,rating,extra1,extra2,extra3,extra4,extra5,extra6,disporder,ipaddress,allowprint,allowrate,allowcoms,tags,exifinfo FROM {$Globals['pp_db_prefix']}photos WHERE id=$photo", $link);
list( $id, $photouser, $iuserid, $dbcat, $storecat, $storeid, $pdate, $title, $desc, $ismature, $keywords, $bigimage, $width, $height, $photosize, $views, $medwidth, $medheight, $medsize, $approved, $imgrating, $extra1, $extra2, $extra3, $extra4, $extra5, $extra6, $issticky, $ipaddr, $allowprint, $allowrate, $allowcoms, $tags, $exifinfo ) = mysql_fetch_row($rows);
ppmysql_free_result( $rows );
if ( $photo != $id || !$dbcat )
{
diewell( $Globals['pp_lang']['nophoto'] );
}
if ( $Globals['mature'] == "yes" && $ismature && !$User['mature'] )
{
diewell( $Globals['pp_lang']['maturewarn'] );
}
if ( !$cat && $limit )
{
$cat = $limit;
}
if ( !$cat )
{
$cat = $dbcat;
}
$extra1 = convert_markups($extra1);
$extra2 = convert_markups($extra2);
$extra3 = convert_markups($extra3);
$extra4 = convert_markups($extra4);
$extra5 = convert_markups($extra5);
$extra6 = convert_markups($extra6);
list( $phuid, $phuhomep, $numposts, $phutitle, $phureg, $phuloc, $phuavatar, $phusig ) = get_profiledata( $iuserid );
$photouser = htmlspecialchars( $photouser );
if ( $phuavatar && $Globals['showavatar'] == "yes" )
{
$phuavatar = htmlspecialchars( $photouser ) . "
$phuavatar";
}
else
{
$phuavatar = htmlspecialchars( $photouser );
}
if ( $phureg )
{
$phureg = "
{$Globals['pp_lang']['registered']}: " . formatppdate($phureg, "month yyyy");
}
if ( $numposts )
{
$phuposts = "
{$Globals['pp_lang']['posts']}: ". number_format($numposts);
}
if ( $phuloc )
{
$phuloc = "
{$Globals['pp_lang']['location']}: $phuloc";
}
if ( $phutitle )
{
$phutitle = "
$phutitle";
}
if ( $storecat == 0 )
{
$storecat = $dbcat;
}
if ( $allowrate == 0 && $Globals['allowrate'] == "yes" )
{
// User doesn't want any ratings on their image
$Globals['allowrate'] = "no";
}
if ( $allowcoms == 0 && $Globals['allowpost'] == "yes" )
{
// User doesn't want any comments on their image
$Globals['allowpost'] = "no";
}
elseif ( $allowcoms == 2 && $Globals['allowpost'] == "yes" )
{
// Photo is "closed" for new topics
$User['comments'] = 0;
}
$resulta = ppmysql_query("SELECT catname,cattype,theme,frames,sortorder,extra1,extra2,extra3,extra4,extra5,extra6,thumbnail,numextra,ratingtype,ugnopost,ugnovote FROM {$Globals['pp_db_prefix']}categories WHERE id=$dbcat", $link);
list( $thecatname, $cattype, $cattheme, $frames, $sortorder, $Globals['extra1name'], $Globals['extra2name'], $Globals['extra3name'], $Globals['extra4name'], $Globals['extra5name'], $Globals['extra6name'], $catthumb, $numextra, $ratingtype, $ugnopost, $ugnovote ) = mysql_fetch_row($resulta);
ppmysql_free_result($resulta);
// We need these here
$CatPerms['ugpost'][$dbcat] = $CatPerms['ugvote'][$dbcat] = 1;
foreach( $User['usergroups'] AS $usergroup )
{
$allnopost = explode( ",", $ugnopost );
if ( !in_array( $usergroup, $allnopost ) )
{
$CatPerms['ugpost'][$dbcat] = 0;
}
$allnovote = explode( ",", $ugnopost );
if ( !in_array( $usergroup, $allnovote ) )
{
$CatPerms['ugvote'][$dbcat] = 0;
}
}
if ( $cattheme && $Globals['forumstyle'] == "no" )
{
$Globals['theme'] = $cattheme;
if ( is_dir( "{$Globals['PP_PATH']}/stylesheets/{$Globals['theme']}" ) )
{
$Globals['idir'] = "{$Globals['maindir']}/stylesheets/{$Globals['theme']}";
}
}
// Non standard frames
if ( !empty($frames) )
{
unset( $Globals['thumbstd'] );
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/$frames.tmpl" );
}
is_cat_protected( $dbcat, $catp, $cattype );
// Need to grab any custom fields for this category
$numcustom = 0;
if ( $numextra > 0 )
{
$catextras = ppmysql_query("SELECT e.id,e.fieldname,e.fieldtype,e.fieldoptions,p.selection FROM {$Globals['pp_db_prefix']}extrafields e
LEFT JOIN {$Globals['pp_db_prefix']}photoextras p ON (p.extraid=e.id AND p.photo=$id)
WHERE e.cat=$dbcat", $link);
$customboxes = array();
$numcustom = 0;
while ( list( $exid, $exname, $extype, $exoptions, $extrasel ) = mysql_fetch_row($catextras) )
{
$extrase1 = un_htmlspecialchars( $extrase1 );
if ( $extype == "c" )
{
// Checkboxes are different, because we display each of the selections indexed by number
$exselection = null;
$exselects = explode( "||", $exoptions );
$exmysel = explode( ",", $extrasel );
$y = 0;
foreach( $exselects as $exextra )
{
$checked = null;
if ( $extrasel != null && in_array($y, $exmysel) )
{
// This is one they selected
$checked = "checked=\"checked\"";
}
$exselection .= " $exextra
";
$y++;
}
$customboxes['title'][$numcustom] = $exname;
$customboxes['value'][$numcustom] = $exselection;
}
else
{
// Everything else is only a one-item display
$customboxes['title'][$numcustom] = $exname;
$customboxes['value'][$numcustom] = $extrasel;
}
$numcustom++;
}
ppmysql_free_result( $catextras );
}
if ( $User['userid'] > 0 && $Globals['displaynew'] == "yes" )
{
$resultb = ppmysql_query("REPLACE INTO {$Globals['pp_db_prefix']}laston VALUES('$dbcat',{$User['userid']},$lasttimeon)", $link);
}
//
// Next and Previous images for display
//
if ( !isset($sortby) && $sortorder > 0 && empty($limit) )
{
$resultc = ppmysql_query("SELECT * FROM {$Globals['pp_db_prefix']}sort WHERE sortid=$sortorder", $link);
list($sortid, $sortname, $sortcode) = mysql_fetch_row($resultc);
ppmysql_free_result( $resultc );
}
elseif ( isset($sortby) )
{
// Timeframe
$searchq = null;
if ( $sorttime > 0 )
{
$searchq = "AND date > ". time() - (($sorttime * 24) * 3600);
}
// Sortname?
if ( !empty($sortby) )
{
if ( $sortby == "s" )
{
$sortvar = "filesize";
}
elseif ( $sortby == "r" )
{
$sortvar = "rating";
}
elseif ( $sortby == "l" )
{
$sortvar = "lastpost";
}
elseif ( $sortby == "d" )
{
$sortvar = "date";
}
elseif ( $sortby == "v" )
{
$sortvar = "views";
}
else
{
$sortvar = "bigimage";
}
$sortdir = ( $way == "asc" ? "ASC" : "DESC" );
$sortcode = "$searchq ORDER BY $sortvar $sortdir";
if ( $sortby == "r" )
{
$sortcode = "$searchq AND rating > 0 $sortcode";
}
}
}
else
{
if ( !empty($limit) )
{
$sortcode = "ORDER BY date DESC";
}
}
if ( $cat == 500 )
{
if ( $Globals['memformat'] == "yes" )
{
$query = "SELECT id,cat,title,bigimage,userid,approved,storecat,height,width,ismature FROM {$Globals['pp_db_prefix']}photos WHERE userid='$iuserid' AND approved=1 $sortcode";
}
else
{
$query = "SELECT id,cat,title,bigimage,userid,approved,storecat,height,width,ismature FROM {$Globals['pp_db_prefix']}photos WHERE cat=500 AND userid='$iuserid' AND approved=1 $sortcode";
}
}
elseif ( $cat == MOBILE_CAT || $dbcat == MOBILE_CAT )
{
$query = "SELECT id,cat,title,bigimage,userid,approved,storecat,height,width,ismature FROM {$Globals['pp_db_prefix']}photos WHERE cat='".MOBILE_CAT."' AND userid='$iuserid' AND approved=1 $sortcode";
}
elseif ( $cat == "recent" || $limit == "recent" )
{
$query = "SELECT id,cat,title,bigimage,userid,approved,storecat,height,width,ismature FROM {$Globals['pp_db_prefix']}photos WHERE approved=1 AND storecat=0 ORDER BY date DESC";
}
elseif ( $cat == "views" || $limit == "views" )
{
$query = "SELECT id,cat,title,bigimage,userid,approved,storecat,height,width,ismature FROM {$Globals['pp_db_prefix']}photos WHERE approved=1 AND storecat=0 ORDER BY views DESC";
}
elseif ( $cat == "all" || $limit == "all" )
{
$query = "SELECT id,cat,title,bigimage,userid,approved,storecat,height,width,ismature FROM {$Globals['pp_db_prefix']}photos WHERE approved=1 $sortcode";
}
elseif ( strstr($limit,"last") )
{
// Last xx days
if ( $limit == "last14" )
{
$days = 14;
}
elseif ( $limit == "last7" )
{
$days = 7;
}
else
{
$days = 1;
}
$searchdate = time() - (($days * 24) * 3600);
$whichcat = ( is_numeric($cat) ? "AND cat=$cat" : null );
$query = "SELECT id,cat,title,bigimage,userid,approved,storecat,height,width,ismature FROM {$Globals['pp_db_prefix']}photos WHERE date > $searchdate AND approved=1 $whichcat ORDER BY date DESC";
}
elseif( !empty($date) )
{
$thisdate = getdate($date);
$thismonth = $thisdate["mon"];
$thisyear = $thisdate["year"];
$thisday = $thisdate["mday"];
$lowdate = mktime(0, 0, 0, $thismonth, $thisday, $thisyear);
$highdate = mktime(0, 0, 0, $thismonth, $thisday+1, $thisyear);
$whichcat = ( is_numeric($cat) ? "AND cat=$cat" : "" );
$query = "SELECT id,cat,title,bigimage,userid,approved,storecat,height,width,ismature FROM {$Globals['pp_db_prefix']}photos WHERE date >= $lowdate AND date < $highdate AND approved=1 $whichcat ORDER BY date DESC";
}
elseif ( $ppuser )
{
$query = "SELECT id,cat,title,bigimage,userid,approved,storecat,height,width,ismature FROM {$Globals['pp_db_prefix']}photos WHERE cat=$dbcat AND userid=$ppuser AND approved=1 $sortcode";
}
else
{
$query = "SELECT id,cat,title,bigimage,userid,approved,storecat,height,width,ismature FROM {$Globals['pp_db_prefix']}photos WHERE cat=$dbcat AND approved=1 $sortcode";
}
$rows = ppmysql_query($query, $link);
$stripimgs = array();
$lessphotos = $morephotos = false;
if ( $Globals['previewcols'] == 1 )
{
$highf = 7;
$lowf = 6;
$middlef = 4;
if ( $Globals['filmstrip'] == "top" || $Globals['filmstrip'] == "bottom" )
{
$splitf = 7;
}
else
{
$splitf = 1;
}
$previewwidth = $Globals['previewwidth'] + 10;
}
else
{
$highf = 21;
$lowf = 20;
$middlef = 11;
if ( $Globals['filmstrip'] == "top" || $Globals['filmstrip'] == "bottom" )
{
$splitf = 7;
}
else
{
$splitf = 3;
}
$previewwidth = ($Globals['previewwidth'] + 3) * 3;
}
while ( $thisrec = mysql_fetch_row($rows) )
{
if ( $thisrec[9] == 1 && (!$User['userid'] || !$User['mature'] ) )
{
continue;
}
if ( is_image_private($thisrec[1]) == "no" )
{
if ( $thisrec[0] == $photo )
{
$stripimgs[] = $thisrec;
// Grab more (if there)
$exc = 0;
while ( $nextrec = mysql_fetch_row($rows) )
{
if ( $nextrec[9] == 1 && (!$User['userid'] || !$User['mature']) )
{
continue;
}
if ( is_image_private($nextrec[1]) == "no" )
{
$stripimgs[] = $nextrec;
if ( count($stripimgs) == $highf )
{
$morephotos = true;
break;
}
}
}
break;
}
else
{
$stripimgs[] = $thisrec;
if ( count($stripimgs) == $middlef )
{
array_shift($stripimgs);
$lessphotos = true;
}
}
}
}
ppmysql_free_result($rows);
$filmstrips = array_fill( 0, $highf, null );
$nextlink = $prevlink = $slidecode = $nextajax = $prevajax = null;
$init = 1;
foreach( $stripimgs AS $ids => $strip )
{
if ( $strip[0] > 0 )
{
list($npid, $npcat, $xtitle, $npbig, $npuserid, $npapp, $npstore, $npheight, $npwidth, $ismature) = $strip;
if ( !$npstore )
{
$npstore = $npcat;
}
$pimgtag = get_imagethumb( $npbig, $npstore, $npuserid, $npapp );
$boxcolor = $Globals['framecolor'];
if ( $ids == 0 && $lessphotos )
{
$prevajax = "« {$Globals['pp_lang']['more']}";
}
elseif ( $npid == $photo )
{
$previd = $ids - 1;
$nextid = $ids + 1;
list($pnpid,$pcat,$ptitle) = $stripimgs[$previd];
list($nnpid,$ncat,$ntitle) = $stripimgs[$nextid];
if ( $pnpid )
{
$conurl = construct_newppurl( "showphoto.php", array('photo' => $pnpid, 'title' => $ptitle, 'cat' => $pcat) );
$prevlink = "« {$Globals['pp_lang']['prev']}";
}
if ( $nnpid )
{
$conurl = construct_newppurl( "showphoto.php", array('photo' => $nnpid, 'title' => $ntitle, 'cat' => $ncat) );
$nextlink = " · {$Globals['pp_lang']['next']} »";
}
$boxcolor = $Globals['selectcolor'];
}
elseif ( $ids == $lowf && $morephotos )
{
if ( $prevajax )
{
$nextajax .= " · ";
}
$nextajax .= "{$Globals['pp_lang']['more']} »";
}
$savecat = $cat;
$cat = $npcat;
$filmstrips[$ids] = get_thumbtmpl( $npid, $pimgtag, $npheight, $npwidth, $thumbtag, -1, null, $xtitle, $boxcolor );
$cat = $savecat;
}
else
{
$filmstrips[$ids] = null;
}
}
foreach ($filmstrips as $key => $value)
{
if (is_null($value))
{
unset($filmstrips[$key]);
}
}
reset($filmstrips);
// Let's get their preference
if ( $Globals['filmstrip'] == "bottom" )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/filmstrip-hor.tmpl" );
$filmstrip = "
$prevajax | $filmstrip | $nextajax |
";
}
elseif ( $Globals['filmstrip'] == "left" )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/filmstrip-ver.tmpl" );
$filmstrip = "$prevajax$filmstrip$nextajax";
}
elseif ( $Globals['filmstrip'] == "right" )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/filmstrip-ver.tmpl" );
$filmstrip = "$prevajax$filmstrip$nextajax";
}
else
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/filmstrip-hor.tmpl" );
$filmstrip = "$prevajax | $filmstrip | $nextajax |
";
}
unset($stripimgs);
// End to get Next and Previous images for display
if ( $nextlink && $Globals['slideshow'] == "yes" )
{
$slideurl = "{$Globals['maindir']}/slideshow.php?photo=$photo";
if ( !empty($limit) )
{
$slideurl .= "&limit=$limit";
}
if ( !empty($cat) )
{
$slideurl .= "&cat=$cat";
}
$slidecode = " · {$Globals['pp_lang']['slideshow']}";
}
$exifdata = null;
if ( $exifinfo && $Globals['showexif'] == "yes" )
{
$row = ppmysql_query("SELECT exifinfo FROM {$Globals['pp_db_prefix']}exif WHERE photoid=$photo", $link);
if ( $row )
{
list( $exifinfo ) = mysql_fetch_row($row);
}
ppmysql_free_result( $row );
$restexif = unserialize($exifinfo);
$exifdata = <<
EXIFINFO;
$col = 1;
while( list($k,$v) = each($restexif) )
{
if ( !empty($v) )
{
if ( is_numeric($v) )
{
if ( strlen($v) == 10 )
{
$v = formatppdate( $v );
}
else
{
$v = number_format( $v );
}
}
else
{
$v = htmlentities(strip_tags(trim($v)));
}
if ( $k == "IsColor" )
{
if ( $v == 1 ) {
$v = $Globals['pp_lang']['yes'];
}
else
{
$v = $Globals['pp_lang']['no'];
}
}
if ( $col == 1 )
{
$exifdata .= "";
}
$exifdata .= "$k: |
$v | \n";
if ( $col == 1 )
{
$col = 2;
}
else
{
$col = 1;
$exifdata .= "
";
}
}
}
if ( $col == 2 )
{
$exifdata .= " | | ";
}
$exifdata .= "$ppclose
";
}
// for childsub, we need to set these globals
$ppuser = $iuserid;
$uploadquery = "?cat=$dbcat";
if ( $width && $height )
{
$sizecode = "$width x $height";
}
else
{
$Globals['dispdims'] = "no";
}
$count = 0;
$theext = get_ext($bigimage);
$filename = $bigimage;
$filename = str_replace( $theext, "", $filename);
$altlink = null;
if ( $imgrating && $Globals['allowrate'] == "yes" )
{
$rating = number_format( $imgrating, 2 );
$ratingicon = null;
for ( $x = 0; $x < round($rating); $x++ )
{
$ratingicon .= "";
}
}
else
{
$rating = $Globals['pp_lang']['none'];
}
$extracat = null;
if ( $Globals['optcats'] == "yes" )
{
// Additional categories?
$result2 = ppmysql_query("SELECT p.id,p.title,p.cat,c.catname FROM {$Globals['pp_db_prefix']}photos p
LEFT JOIN {$Globals['pp_db_prefix']}categories c ON c.id=p.cat
WHERE p.storeid=$id OR p.id=$storeid", $link);
while ( list( $exid, $ptitle, $pcatid, $excat ) = mysql_fetch_row($result2) )
{
if ( $exid != $photo )
{
$otherlink = " $exid, 'title' => $ptitle, 'cat' => $pcatid) ) ."\">$excat";
$extracat .= ( empty($extracat) ? "$otherlink" : ", $otherlink" );
}
}
ppmysql_free_result( $result2 );
}
$rand = ( $nocache == 1 ? "?".rand(0,9999) : null );
if ( $approved != 0 || $User['moderator'] == 1 || $User['adminedit'] == 1 )
{
$filesize = sprintf("%1.1f", ($photosize/1024))."{$Globals['pp_lang']['kb']}";
$dispmed = 0;
if ( $medsize > 0 )
{
$medsize = sprintf("%1.1f", ($medsize/1024))."{$Globals['pp_lang']['kb']}";
if ( $Globals['bigpopup'] == "yes" )
{
if ( $Globals['lightbox'] == "yes" && ($width < $Globals['lbwidth'] || $height < $Globals['lbheight']) )
{
$useimglink = "";
}
else
{
$useimglink = "";
}
}
else
{
$useimagelink = construct_newppurl( "showphoto.php", array('photo' => $id, 'title' => $title, 'cat' => $dbcat) );
}
if ( $size != "big" )
{
$dispmed = 1;
$altlink = "
{$Globals['pp_lang']['viewlarger']}
";
}
else
{
$altlink = "
{$Globals['pp_lang']['viewsmaller']}
";
}
$filesize = "$medsize, $filesize";
}
$videodisp = $imgurl = null;
$seotitle = htmlspecialchars($bigimage);
if ( !empty($title) )
{
$seotitle = htmlspecialchars($title);
}
if ($Globals['bigsave'] == "yes")
{
if ( $dispmed == 1 )
{
if ( $Globals['onthefly'] == "yes" )
{
$imgdisp = "$useimglink";
$imgurl = "{$Globals['datadir']}/$storecat/medium/$bigimage";
}
else
{
if ( $Globals['zoom'] == "no" )
{
$imgdisp = "$useimglink";
}
else
{
$imgdisp = "$useimglink";
}
$imgurl = "{$Globals['datadir']}/$storecat/medium/$bigimage";
}
}
else
{
if ( is_multimedia($bigimage) == 1 )
{
$mmthumb = "{$Globals['datadir']}/$storecat/thumbs/$filename.jpg";
$dirthumb = "{$Globals['datafull']}/$storecat/thumbs/$filename.jpg";
$imgurl = "{$Globals['datadir']}/$storecat/$bigimage";
if ( !file_exists($dirthumb) )
{
$mmthumb = "{$Globals['idir']}/video.gif";
}
$imgdisp = "";
$videodisp = "{$Globals['pp_lang']['video']}
";
if ( $Globals['embededmm'] == "yes" )
{
if ( stristr($bigimage, ".mov") )
{
$mmthumb = "{$Globals['idir']}/mm-qt.gif";
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/embed-qt.tmpl" );
$videodisp = null;
}
elseif ( stristr($bigimage, ".wmv") || stristr($bigimage, ".mpg") || stristr($bigimage, ".mpeg") || stristr($bigimage, ".avi") )
{
$mmthumb = "{$Globals['idir']}/video.gif";
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/embed-ms.tmpl" );
}
elseif( stristr($bigimage, ".fla") || stristr($bigimage, ".swf") )
{
$mmthumb = "{$Globals['idir']}/mm-fla.gif";
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/embed-fla.tmpl" );
}
elseif( stristr($bigimage, ".mp3") || stristr($bigimage, ".wav") || stristr($bigimage, ".mid") || stristr($bigimage, ".aiff") )
{
$mmthumb = "{$Globals['idir']}/mm-audio.gif";
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/embed-audio.tmpl" );
}
elseif( stristr($bigimage, ".rm") )
{
$mmthumb = "{$Globals['idir']}/mm-rm.gif";
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/embed-rm.tmpl" );
}
}
}
else
{
if ( $Globals['onthefly'] == "yes" )
{
$imgdisp = "";
$imgurl = "{$Globals['origdir']}/$storecat/$bigimage";
}
else
{
$imgsrc = "{$Globals['origdir']}/$storecat/$bigimage$rand";
$imgdisp = "";
$imgurl = "{$Globals['origdir']}/$storecat/$bigimage";
}
if ( $altlink )
{
$imgdisp = " $photo, 'title' => $title) ) . "\">$imgdisp";
}
}
}
}
else
{
$imgdisp = "";
}
}
else
{
$imgdisp = "";
}
$userip = null;
$ratedisplay = null;
$rateperms = ( $cattype == "a" ? $CatPerms['ugvote'][500] : $CatPerms['ugvote'][$dbcat] );
if ( $Globals['allowrate'] == "yes" && $rateperms == 0 && $ratingtype != 1 )
{
$alreadyrated = 0;
if ( $User['userid'] > 0 )
{
$resultb = ppmysql_query("SELECT rating FROM {$Globals['pp_db_prefix']}comments WHERE photo=$photo AND userid={$User['userid']} AND rating > 0 LIMIT 1", $link);
while( list( $checkrating ) = mysql_fetch_row($resultb) )
{
$alreadyrated = 1;
$ratedisplay = "{$Globals['pp_lang']['rated']}$checkrating";
}
ppmysql_free_result($resultb);
}
else
{
// Let's check their IP address for unregistered
$ipaddress = findenv("REMOTE_ADDR");
$result = ppmysql_query("SELECT rating FROM {$Globals['pp_db_prefix']}comments WHERE photo=$photo AND ipaddress='$ipaddress' AND rating > 0 LIMIT 1", $link);
$numfound = mysql_num_rows($result);
if ( $numfound > 0 )
{
$ratedisplay = "{$Globals['pp_lang']['unregrated']}";
$alreadyrated = 1;
}
}
if ( $alreadyrated == 0 )
{
if ( $User['userid'] != $iuserid )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/quickrate.tmpl" );
}
}
}
$ppdate = formatppdate( $pdate );
if ( VB3_ENHANCEDINT == "on" )
{
$desc = un_htmlspecialchars(convert_markups($desc));
}
else
{
$desc = convert_returns(convert_markups($desc));
}
$pmenuitem = array();
$vbppmenu = null;
$vb4ppmenu = null;
if ( $User['userid'] > 0 )
{
$resultf = ppmysql_query("SELECT id FROM {$Globals['pp_db_prefix']}favorites WHERE photo=$id AND userid={$User['userid']}", $link);
$isfav = mysql_num_rows($resultf);
if ( $isfav == 0 )
{
$menuitem = "{$Globals['pp_lang']['addfav']}";
}
else
{
$menuitem = "{$Globals['pp_lang']['delfav']}";
}
$pmenuitem[] = $menuitem;
$vbppmenu = "
";
$vb4ppmenu = "$menuitem\n";
}
if ( ($Globals['allowpost'] == "yes" && $User['comments'] == 1) && $CatPerms['ugpost'][$dbcat] == 0 )
{
$newid = 0;
if ( $User['userid'] < 1 )
{
if ( $Globals['usecaptcha'] == "yes" )
{
// Let's generate a totally random string using md5
$md5 = md5(rand(0,999));
// We don't need a 32 character long string so we trim it down to 5
$pass = substr($md5, 10, 5);
$r = ppmysql_query( "INSERT INTO {$Globals['pp_db_prefix']}captcha (id,code) VALUES (NULL,'$pass')", $link );
$newid = mysql_insert_id($link);
if ( !$newid )
{
diewell( $Globals['pp_lang']['caperror'] );
}
}
}
if ( $Globals['imgmenu'] == "yes" )
{
$buttonlink = "";
}
else
{
$buttonlink = $Globals['pp_lang']['post'];
}
$menuitem = "$buttonlink";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
if ( $User['userid'] > 0 )
{
if ( $Globals['imgmenu'] == "yes" )
{
$buttonlink = "";
}
else
{
$buttonlink = $Globals['pp_lang']['reportphoto'];
}
$menuitem = "$buttonlink";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
if ( $Globals['enablecard'] == "yes" && ($Globals['cardreg'] == "no" || $User['userid'] > 0) )
{
if ( $Globals['imgmenu'] == "yes" )
{
$buttonlink = "";
}
else
{
$buttonlink = $Globals['pp_lang']['sendecard'];
}
$menuitem = "$buttonlink";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
if ( $Globals['usenotify'] == "yes" && $User['userid'] > 0 )
{
$results = ppmysql_query("SELECT id FROM {$Globals['pp_db_prefix']}notify WHERE userid={$User['userid']} AND photo=$photo LIMIT 1", $link);
list( $notifyid ) = mysql_fetch_row($results);
ppmysql_free_result($results);
if ( $notifyid )
{
if ( $Globals['imgmenu'] == "yes" )
{
$buttonlink = "";
}
else
{
$buttonlink = $Globals['pp_lang']['disable'];
}
$menuitem = "$buttonlink";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
else
{
if ( $Globals['imgmenu'] == "yes" )
{
$buttonlink = "";
}
else
{
$buttonlink = $Globals['pp_lang']['enable'];
}
$menuitem = "$buttonlink";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
}
if ( is_image($bigimage) )
{
if ( $Globals['imgmenu'] == "yes" )
{
$buttonlink = "";
}
else
{
$buttonlink = $Globals['pp_lang']['printview'];
}
$menuitem = "$buttonlink";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
if ( $exifinfo )
{
if ( $Globals['imgmenu'] == "yes" )
{
$buttonlink = "";
}
else
{
$buttonlink = $Globals['pp_lang']['showexif'];
}
$menuitem = "$buttonlink";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
$userip = null;
if ( $User['adminedit'] == 1 || $User['moderator'] == 1 || ($User['userid'] == $iuserid && $ueditpho == 1) )
{
if ( !isset($ismod) )
{
$ismod = ( $User['adminedit'] == 1 ? true : false );
if ( $User['moderator'] == 1 )
{
$ismod = is_moderator($dbcat);
}
}
if ( $ismod || ($User['userid'] == $iuserid && $ueditpho == 1) )
{
$vbppmenu .= "{$Globals['pp_lang']['adminopts']} |
";
$menuitem = "{$Globals['pp_lang']['editphoto']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
if ( $Globals['allowpost'] == "yes" && $CatPerms['ugpost'][$dbcat] == 0 )
{
if ( $allowcoms == 1 )
{
$menuitem = "{$Globals['pp_lang']['closecoms']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
else
{
$menuitem = "{$Globals['pp_lang']['opencoms']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
}
}
if ( $ismod || $User['adminedit'] == 1 )
{
$userip = " $ipaddr";
}
if ( $User['adminedit'] == 1 )
{
if ( $approved == 0 )
{
$menuitem = " {$Globals['pp_lang']['approve']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
elseif ( $approved == 2 )
{
$menuitem = "{$Globals['pp_lang']['unhide']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
else
{
$menuitem = "{$Globals['pp_lang']['hide']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
$menuitem = "{$Globals['pp_lang']['movedel']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
if ( $cattype == "a" )
{
if ( $photo == $catthumb )
{
$menuitem = "{$Globals['pp_lang']['removealbum']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
else
{
$menuitem = "{$Globals['pp_lang']['makethumb']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
}
if ( $issticky == 99999 )
{
$menuitem = "{$Globals['pp_lang']['stick']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
else
{
$menuitem = "{$Globals['pp_lang']['unstick']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
if ( $cattype == "c" )
{
if ( $photo == $catthumb )
{
$menuitem = "{$Globals['pp_lang']['removeindex']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
else
{
$menuitem = "{$Globals['pp_lang']['makeindex']}";
$pmenuitem[] = $menuitem;
$vbppmenu .= "
";
$vb4ppmenu .= "$menuitem\n";
}
}
}
}
// Now format the menu
$rowcount = round(count($pmenuitem) / 3);
if ( $rowcount )
{
$pmenu = <<
PPPRINT;
foreach( $pmenuitem AS $x => $menuitem)
{
if ( $x % $rowcount == 0 && $rowcount > 0 )
{
$pmenu .= " | ";
}
$pmenu .= "$menuitem ";
}
$pmenu .= " |
";
}
// find similiar posts
if ( empty($keywords) )
{
$keywords = $title;
}
$keylinks = null;
$keys = explode( " ", $keywords );
$keys = array_unique($keys);
foreach( $keys as $si )
{
$si = un_htmlspecialchars($si);
$ignorew = array( "the", "a", "but", "are", "and" );
if ( $si && !in_array($si, $ignorew) )
{
$keylinks .= "$si ";
}
}
if ( $Globals['allowpost'] == "yes" )
{
$cc = $ckcolor = 0;
$posts = null;
$comq = "
";
if ( $Globals['dispempty'] == "yes" )
{
$query = "SELECT id,username,userid,date,rating,comment,approved,ipaddress FROM {$Globals['pp_db_prefix']}comments WHERE photo=$photo ORDER BY date ASC";
}
else
{
$query = "SELECT id,username,userid,date,rating,comment,approved,ipaddress FROM {$Globals['pp_db_prefix']}comments WHERE photo=$photo AND LENGTH(comment) > 0 ORDER BY date ASC";
}
$rows = ppmysql_query($query, $link);
$comcount = mysql_num_rows($rows);
if ( $comcount == 0 )
{
$compages = 0;
}
else
{
if ( $perpage > 0 )
{
$compages = ($comcount/$perpage);
}
else
{
$perpage = $Globals['defaultposts'];
$compages = ($comcount/$perpage);
}
}
if (intval($compages) < $compages)
{
$compages = intval($compages)+1;
}
else
{
$compages = intval($compages);
}
if ( isset($cpage) )
{
$cstartnumb=($cpage*$perpage)-$perpage+1;
}
else
{
$cpage = 1;
$cstartnumb = 1;
}
if ($Globals['vbversion'] == 'dcfplus')
{
// need some admin preferences from DCF+, but don't want to call for them inside
// the loop, since they incur a sql query.
$allow_disable_email = dcfp_auth_get_setup_param("allow_disable_email");
$allow_disable_inbox = dcfp_auth_get_setup_param("allow_disable_inbox");
$allow_disable_profile = dcfp_auth_get_setup_param("allow_disable_profile");
}
$itemnum = 0;
while ( list( $id, $cuser, $cuserid, $cdate, $crating, $commenttextline, $approved, $comip ) = mysql_fetch_row($rows) )
{
if ( ($crating > 0 && $ratingtype != 1) && $Globals['allowrate'] == "yes" )
{
$ratingdisp[$itemnum] = "{$Globals['pp_lang']['rating']}: $crating ";
}
else
{
$ratingdisp[$itemnum] = null;
}
if ( ($Globals['dispempty'] == "no" && trim($commenttextline) == "") || ($Globals['moderatecoms'] == "no" && $approved == 0) )
{
// Do not print anything under these condition; placeholder
}
else
{
$cc++;
if ($cc >= $cstartnumb)
{
if ($cc < ($cstartnumb+$perpage))
{
$profilelink = get_profilelink( $cuserid, $cuser );
$imgtime[$itemnum] = formatpptime( $cdate );
$imgdate[$itemnum] = formatppdate( $cdate );
$commentnum[$itemnum] = $id;
$cowner[$itemnum] = $cuserid;
$ucuser[$itemnum] = $Globals['pp_lang']['unreg'];
$uclocation[$itemnum] = $uctitle[$itemnum] = $ucposts[$itemnum] = null;
$uregdate[$itemnum] = $uugallery[$itemnum] = $uisonline[$itemnum] = $uhpage[$itemnum] = null;
$ucedit[$itemnum] = false;
// call get_profiledata to get all the links possible
unset($postline);
list( $cuname, $cuhomep, $cuposts, $cutitle, $cureg, $culoc, $cuavatar, $usig ) = get_profiledata( $cuserid );
if ( $cureg )
{
$uregdate[$itemnum] = "
{$Globals['pp_lang']['registered']}: " . formatppdate($cureg, "month yyyy");
}
if ( $cuposts )
{
$ucposts[$itemnum] = "
{$Globals['pp_lang']['posts']}: ". number_format($cuposts);
}
if ( $culoc )
{
$uclocation[$itemnum] = "
{$Globals['pp_lang']['location']}: $culoc";
}
if ( $cutitle )
{
$uctitle[$itemnum] = "
$cutitle";
}
if ( ($User['adminedit'] == 1 || $User['moderator'] == 1) && $comip )
{
$uctitle[$itemnum] .= "
$comip";
}
$uugallery[$itemnum] = $ugallery;
$uisonline[$itemnum] = $isonline;
$uhpage[$itemnum] = $cuhomep;
if ( $cuavatar && $Globals['showavatar'] == "yes" )
{
$cuname .= "
$cuavatar";
}
$ucuser[$itemnum] = $cuname;
if ( $cuserid > 0 )
{
$upostline[$itemnum] = $postline;
}
if ( $ckcolor == 1 )
{
$fillcolor[$itemnum] = "{$Style['tdbackground']}";
$ckcolor = 0;
}
else
{
$fillcolor[$itemnum] = "{$Style['tddetails']}";
$ckcolor = 1;
}
$commenttextline = un_htmlspecialchars($commenttextline);
if ( VB3_ENHANCEDINT == "on" )
{
$commenttextline = convert_markups($commenttextline);
}
else
{
$commenttextline = convert_returns(convert_markups($commenttextline));
}
$commenttext[$itemnum] = $commenttextline;
if ( $usig && $Globals['showsigs'] == "yes" )
{
$usigline = convert_markups($usig);
$usigline = un_htmlspecialchars($usigline);
$commenttext[$itemnum] .= "
------------------------------
$usigline";
}
if ( ($User['userid'] == $cowner[$itemnum] && $ueditposts == 1) || $ismod )
{
if ( $Globals['comtimeout'] > 0 && !$ismod )
{
$julian = time();
$timediff = $julian - $cdate;
if ( $timediff < $Globals['comtimeout'] )
{
$ucedit[$itemnum] = true;
}
}
else
{
$ucedit[$itemnum] = true;
}
}
$itemnum++;
}
}
}
}
ppmysql_free_result( $rows );
if ( ($Globals['allowpost'] == "yes" && $User['comments'] == 1) && $CatPerms['ugpost'][$dbcat] == 0 )
{
if ( $ratingtype != 1 )
{
$ratecode .= get_rate_code(0);
}
if ( VB40 == "on" && VB3_ENHANCEDINT == "on" )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/quickcom40.tmpl" );
}
elseif ( SIMPLE_VERSION > 366 && VB40 == "off" && VB3_ENHANCEDINT == "on" )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/quickcom367.tmpl" );
}
else
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/quickcom.tmpl" );
}
}
}
// begin pages/nav system ##
$comnav = null;
if ( $compages > 1 )
{
$comnav .= "
|
{$Globals['pp_lang']['page']}: ";
$thestart = null;
if ( $cpage < 11 )
{
$thestart = 1;
}
if ( $cpage > 10 )
{
$thestart = ($cpage / 10);
$thestart = (int)$thestart;
$thestart = ($thestart * 10);
}
$theend = $thestart + 9;
for ( $p = $thestart; $p <= $compages; $p++ )
{
if ($p != $thestart)
{
$comnav .= " · ";
}
if ( $cpage != $p )
{
if ( $p == ($theend+1) )
{
$thispage = "$p >";
}
else
{
$thispage = "$p";
}
$conurl = construct_newppurl( "showphoto.php", array('photo' => $photo, 'cpage' => $p, 'title' => $title, 'cat' => $cat) );
$comnav .= "$thispage";
}
if ( $p > $theend )
{
break;
}
if ( $cpage == $p )
{
$comnav .= "$p";
}
}
if ( $cpage < $compages )
{
$nextpage = $cpage + 1;
$conurl = construct_newppurl( "showphoto.php", array('photo' => $photo, 'cpage' => $nextpage, 'title' => $title, 'cat' => $cat) );
$more = "";
}
else
{
$more = " ";
}
$comnav .= " | $more |
";
}
// end pages/nav ###
if ( $Globals['ipcache'] != 0 )
{
$ipaddress = findenv("REMOTE_ADDR");
$result = ppmysql_query("SELECT userid,date,photo FROM {$Globals['pp_db_prefix']}ipcache WHERE ipaddr='$ipaddress' AND type='view' AND photo=$photo LIMIT 1", $link);
$numfound = mysql_num_rows($result);
$mytime = time();
if ( $numfound > 0 )
{
list( $tuserid, $lastdate, $photo ) = mysql_fetch_row($result);
if ( $lastdate < $timeout )
{
inc_photoviews( $photo );
if ( $User['userid'] > 0 && $Globals['vbversion'] == "photopost" )
{
ppmysql_query("UPDATE {$Globals['pp_db_prefix']}users SET views=views+1 WHERE userid={$User['userid']}", $db_link);
}
$timeout = time() - ($Globals['ipcache'] * 3600);
ppmysql_query("DELETE FROM {$Globals['pp_db_prefix']}ipcache WHERE date < $timeout", $link);
ppmysql_query("INSERT INTO {$Globals['pp_db_prefix']}ipcache (userid,ipaddr,date,type,photo) VALUES ('$tuserid', '$ipaddress', '$mytime', 'view', $photo)", $link);
}
}
else
{
ppmysql_query("INSERT INTO {$Globals['pp_db_prefix']}ipcache (userid,ipaddr,date,type,photo) VALUES ('$tuserid', '$ipaddress', '$mytime', 'view', $photo)", $link);
inc_photoviews( $photo );
if ( $User['userid'] > 0 && $Globals['vbversion'] == "photopost" )
{
ppmysql_query("UPDATE {$Globals['pp_db_prefix']}users SET views=views+1 WHERE userid={$User['userid']}",$db_link);
}
}
}
else {
inc_photoviews( $photo );
if ( $User['userid'] > 0 && $Globals['vbversion'] == "photopost" )
{
ppmysql_query("UPDATE {$Globals['pp_db_prefix']}users SET views=views+1 WHERE userid={$User['userid']}", $link);
}
}
if ( $Globals['sidebar_global'] == "yes" )
{
if ( $Globals['statspal'] == "yes" )
{
get_statscache();
}
if ( $Globals['topposterspal'] == "yes" )
{
get_posterscache();
}
if ( $Globals['ratingspal'] == "yes" )
{
get_ratingcache();
}
}
$metadesc = $desc;
$metadesc = strip_tags(htmlspecialchars($metadesc));
$metakey = $keywords;
if ( !empty($title) )
{
printheader( $dbcat, $title, "", "yes", $bigimage );
}
else
{
printheader( $dbcat, $bigimage, "", "yes" , $bigimage );
}
topmenu();
childsub($dbcat, $cattype);
$childnav = "{$Globals['pp_lang']['home']} $childnav";
// Make the display codes (just in case)
if ( is_multimedia($bigimage) )
{
$showbbcode = "[media]{$imgurl}[/media]";
}
else
{
$showbbcode = "[img]{$imgurl}[/img]";
}
$showhtmlcode = "<img src="$imgurl" />";
$showdirectcode = "$imgurl";
$phulink = construct_newppurl( "showgallery.php", array('ppuser' => $iuserid, 'username' => $photouser ) );
$phumemlink = construct_newppurl( "member.php", array('uid' => $iuserid, 'username' => $photouser) );
$views = number_format($views);
if ( is_multimedia($bigimage) == 1 )
{
$showbbthumb = "[url=". construct_newppurl( "showphoto.php", array( 'photo' => $photo, 'title' => $title, 'cat' => $storecat ) ) ."][img]{$mmthumb}[/img][/url]";
}
else
{
$showbbthumb = "[url=". construct_newppurl( "showphoto.php", array( 'photo' => $photo, 'title' => $title, 'cat' => $storecat ) ) ."][img]{$Globals['datadir']}/{$storecat}/thumbs/{$bigimage}[/img][/url]";
}
$showbbmed = "[url=". construct_newppurl( "showphoto.php", array( 'photo' => $photo, 'title' => $title, 'cat' => $storecat ) ) ."][img]{$Globals['datadir']}/{$storecat}/medium/{$bigimage}[/img][/url]";
$showbbfull = "[url=". construct_newppurl( "showphoto.php", array( 'photo' => $photo, 'title' => $title, 'cat' => $storecat ) ) ."][img]{$Globals['datadir']}/{$storecat}/{$bigimage}[/img][/url]";
$filmstrip_top = $filmstrip_bottom = $filmstrip_left = $filmstrip_right = null;
$colspan1 = 5;
$colspan2 = 5;
if ( $Globals['nextbox'] == "yes" )
{
// Let's get their preference
if ( $Globals['filmstrip'] == "bottom" )
{
$filmstrip_bottom = "$filmstrip |
";
}
elseif ( $Globals['filmstrip'] == "left" )
{
$filmstrip_left = "$filmstrip | ";
$colspan1 = 2;
$colspan2 = 1;
}
elseif ( $Globals['filmstrip'] == "right" )
{
$filmstrip_right = "$filmstrip | ";
$colspan1 = 2;
$colspan2 = 1;
}
else
{
$filmstrip_top = "$filmstrip |
";
}
}
// Start printing the page..
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/menubar.tmpl" );
if ( $Globals['sidebar'] == "left" && $Globals['sidebar_global'] == "yes" )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/sidebar_leftopen.tmpl" );
}
if ( $Globals['sidebar'] == "right" && $Globals['sidebar_global'] == "yes" )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/sidebar_rightopen.tmpl" );
}
if ( VB3_ENHANCEDINT == "on" )
{
$stylepath = ( $stylevar[imgdir_button][0] == "/" || $stylevar[imgdir_button][0] == "h" ? "" : "{$Globals['vbulletin']}/" );
}
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/showphoto.tmpl" );
if ( $Globals['sidebar'] == "left" && $Globals['sidebar_global'] == "yes" )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/sidebar_leftclose.tmpl" );
}
if ( $Globals['sidebar'] == "right" && $Globals['sidebar_global'] == "yes" )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/sidebar_rightclose.tmpl" );
}
printfooter();
?>