set_file('menu1file',$menu1file); $tpl->set_var('relative_path', $relative_path); $menu1file=$tpl->process('out','menu1file',0,1); $tpl->set_file('menu2file','menu_newestmodels.html'); $tpl->set_var('relative_path', $relative_path); $tpl->set_var('latestmembers',latestmembers_bit()); $tpl->set_var('most_viewed',mostviewed_bit()); $menu2file=$tpl->process('out','menu2file',0,1); $tpl->set_var('relative_path', $relative_path); $tpl->set_file('menu3file','menu_mostviewed.html'); $tpl->set_var('relative_path', $relative_path); $tpl->set_var('latestmembers',latestmembers_bit()); $tpl->set_var('most_viewed',mostviewed_bit()); $menu3file=$tpl->process('out','menu3file',0,1); if (get_site_option('use_ratings')) { $tpl->set_file('menu4file','menu_toprated.html'); $tpl->set_var('relative_path', $relative_path); $menu4file=$tpl->process('out','menu4file',0,1); } $tpl->set_file('menu5file','menu_lookupmodel.html'); $tpl->set_var('relative_path', $relative_path); $menu5file=$tpl->process('out','menu5file',0,1); if(!isset($myuser_id) || empty ($myuser_id)){ $tpl->set_file('menu_login','menu_login.html'); $menu_login=$tpl->process('out','menu_login',0,1);} else{$tpl->set_file('menu_login','menu_logout.html'); $menu_login=$tpl->process('out','menu_login',0,1);} $tpl->set_file('leftcontent',$theleftframe); $tpl->set_var('menu1file',$menu1file); $tpl->set_var('menu2file',$menu2file); $tpl->set_var('menu3file',$menu3file); if (get_site_option('use_ratings')) { $tpl->set_var('menu4file',$menu4file);} $tpl->set_var('menu5file',$menu5file); $tpl->set_var('most_viewed',mostviewed_bit()); $tpl->set_var('menulogin',$menu_login); $left_content=$tpl->process('out','leftcontent',0,1); $tpl = new phemplate(_TPLPATH_,'remove_nonjs'); $allow=true; //$allow=false; //$skip=false; $user_id=0; $name=''; //$key=''; if (isset($_GET['user_id']) && !empty($_GET['user_id'])) { $user_id=addslashes_mq($_GET['user_id']); $name=get_name($user_id); } if (!isset($user_id) || empty($user_id) || ($user_id==$_SESSION['user_id'])) { $user_id=$_SESSION['user_id']; $name="MY"; //$allow=true; } //if (isset($_GET['key']) && !empty($_GET['key'])) { //$key=addslashes_mq($_GET['key']); //if ($key==get_key($user_id)) { //$allow=true; //} //} //if (!is_public_album($user_id) && (!$allow)) { //$tpl->set_file('middlecontent','bits/enteraccesskey.html'); //$tpl->set_var('user_id',$user_id); //$tpl->set_var('name',htmlentities(stripslashes($name))); //$skip=true; //} else { //$allow=true; //} $topass=array(); $links_menu=""; if ($user_id==$myuser_id) { $titlename="my"; $editlink_mydetails="Edit"; $links_menu.=""; } else { $titlename=$name."'s"; $editlink_mydetails=""; $links_menu.=""; if(is_buddy($user_id)){ $links_menu.=""; }else {$links_menu.="";} } $links_menu.="
 
\"ContactContact $name
\"LeaveLeave $titlename fan club
\"JoinJoin $titlename fan club
"; $skip=''; $mpwidth=''; $nextlink=''; if ($allow && !$skip) { if (is_empty_album2($user_id)) { $photo="no-pict.gif"; $imginfo=getimagesize(_IMAGESPATH_."/$photo"); $mpwidth=$imginfo[0]; $mpheight=$imginfo[1]; if($mpwidth > 300){ $mpwidth=300;} $photo=_IMAGESURL_."/".'no-pict.gif'; $picstable="
"; } else { $max_user_pics=get_site_option('max_user_pics'); $photos=array(); $photos=get_album_pic2($user_id); if (isset($_GET['picno']) && !empty($_GET['picno']) && ($_GET['picno']>=1) && ($_GET['picno']<=$max_user_pics)) { $startwith=addslashes_mq($_GET['picno']); } else { $startwith=1; } $numbers=array_keys($photos); $picno=0; for ($i=$startwith;$i<=$max_user_pics;$i++) { if (in_array($i,$numbers)) { //read the first available picture starting with $startwith $picno=$i; break; } } if (empty($picno)) { for ($i=1;$i<=$max_user_pics;$i++) { if (in_array($i,$numbers)) { //read the first available picture from the begining $picno=$i; break; } } } $nextlink="Next"; if (!empty($picno)) { $photo=$photos[$picno]; if (!file_exists(_IMAGESPATH_."/$photo")) { $photo='no-pict.gif'; } } else { $photo='no-pict.gif'; } $imginfo=getimagesize(_IMAGESPATH_."/$photo"); $mpwidth=$imginfo[0]; $mpheight=$imginfo[1]; if($mpwidth > 300){ $mpwidth=300;} $photo=_IMAGESURL_."/".$photo; $table_cols=3; $imgurl=_IMAGESURL_; $bphotos=array(); $bphotos=get_album_pic2($user_id); $picstable=""; if (!empty($bphotos)) { $picstable="\n"; $i=1; while (list($k,$v)=each($bphotos)) { if (($i%$table_cols)==1) {$picstable.="\n";} $picstable.="\t\n"; if ($i%$table_cols==0) {$picstable.="\n";} $i++; } $rest=($i-1)%$table_cols; if ($rest!=0) { $colspan=$table_cols-$rest; $picstable.="\t\n\n"; } $picstable.="
\n"; $picstable.="\t\t"; $picstable.="\t
\n"; } } $query="SELECT firstname,lastname,name,gender,(YEAR(NOW())-YEAR(birthdate)),DAYOFYEAR(birthdate),ethnic,country,country_residing,us_state,city,zip,addr,phone1,phone2,my_diz,work_interest,hairlength,hairtype,haircolor,hairpiece,eyeshape,eyecolor,eyebrows,eyelashes,eyewear,faceshape,bodytype,waist,chest,hips_inseam,height,weight,shoes,dress_shirt,membership,show_in_random,views FROM users WHERE user_id='$user_id'"; if (!($res=mysql_query($query))) {error(mysql_error(),__LINE__,__FILE__);} list($firstname,$lastname,$name,$gender,$age,$zodiac,$ethnic,$country,$country_residing,$us_state,$city,$zip,$addr,$phone1,$phone2,$my_diz,$work_interest,$hairlength,$hairtype,$haircolor,$hairpiece,$eyeshape,$eyecolor,$eyebrows,$eyelashes,$eyewear,$faceshape,$bodytype,$waist,$chest,$hips_inseam,$height,$weight,$shoes,$dress_shirt,$membership,$showinrand,$views)=mysql_fetch_row($res); if (isset($_GET['user_id']) && !empty($_GET['user_id'])) { $user_id=addslashes_mq($_GET['user_id']); } else { $user_id=$_SESSION['user_id']; } $tpl->set_file('middlecontent','album_view.html'); if(!isset($city)||empty($city)){ $city="Not Listed";} if(!isset($state)||empty($state)){ $state="Not Listed";} if(!isset($country)||empty($country)){ $country="Not Listed";} if(!isset($phone1)||empty($phone1)){ $phone1="Not Listed";} if(!isset($phone2)||empty($phone2)){ $phone2="Not Listed";} if (isset($_GET['offset']) && !empty($_GET['offset'])) { $offset=addslashes_mq($_GET['offset'],true); } else { $offset=0; } if (isset($_GET['backto']) && !empty($_GET['backto'])) { $backto=addslashes_mq($_GET['backto'],true); } else { $backto="album_view.php&user_id=$user_id";} if($admin == 1){ if(($showinrand == 0)||(empty($showinrand))){ $addtrl="Add to random showcase";} elseif($showinrand == 1){ $addtrl="Remove from random showcase";} } else{$addtrl="";} $tpl->set_var('addtrl',$addtrl); // add link for viewing comments if check_allow_comments returns true for user if(get_site_option('use_comments_portfolios') && (check_allow_portfolio_comments($user_id))){ $total_comments=count_comments($user_id); $commentslink="Viewer Feedback (${total_comments})";} else {$commentslink="";} $tpl->set_var('comments',$commentslink); // end add link for viewing comments //add table for viewing/adding per photo comment if(get_site_option('use_comments_photos') && (check_allow_photo_comments($user_id)) && (!empty($bphotos))){ $total_photo_comments=count_photo_comments($user_id,$photo); $table_photo_comments="
View Photo Comments (${total_photo_comments} total)Add a comment
"; } else {$table_photo_comments="";} $tpl->set_var('photocomment_table',$table_photo_comments); $tpl->set_var('links_menu',$links_menu); $tpl->set_var('relative_path',$relative_path); $tpl->set_var('name',htmlentities(stripslashes($name))); $tpl->set_var('titlename',htmlentities(stripslashes($titlename))); $tpl->set_var('photo',$photo); $tpl->set_var('mpwidth',$mpwidth); $tpl->set_var('country',$accepted_countries[$country_residing]); $tpl->set_var('state',$accepted_states[$us_state]); $tpl->set_var('city',$city); $tpl->set_var('user_id',$user_id); $tpl->set_var('phone1',$phone1); $tpl->set_var('phone2',$phone2); $tpl->set_var('my_diz',nl2br(htmlentities(stripslashes($my_diz)))); $tpl->set_var('picstable',$picstable); //$tpl->set_var('prevlink',$prevlink); $tpl->set_var('nextlink',$nextlink); } elseif (!$skip) { error("You are not allowed to view this user's portfolio pics.",__LINE__,__FILE__); } if ($myuser_id!=$user_id) { $tpl->set_var('views',"Viewed: $views times"); $query="UPDATE users SET views=views+1 WHERE user_id='$user_id'"; @mysql_query($query); } $middle_content=$tpl->process('out','middlecontent',0,true); $title="View Photographer Portfolio"; include('block_main_frame.php'); ?>