|
".$locale['u010']." |
";
if ($data['user_birthdate'] != "0000-00-00") {
$months = explode("|", $locale['months']);
$user_birthdate = explode("-", $data['user_birthdate']);
echo $months[number_format($user_birthdate['1'])]." ".number_format($user_birthdate['2'])." ".$user_birthdate['0'];
} else {
echo $locale['u048'];
}
echo " |
".$locale['u021']." |
".($data['user_aim'] ? $data['user_aim'] : $locale['u048'])." |
".$locale['u011']." |
".($data['user_icq'] ? $data['user_icq'] : $locale['u048'])." |
".$locale['u012']." |
".($data['user_msn'] ? $data['user_msn'] : $locale['u048'])." |
".$locale['u013']." |
".($data['user_yahoo'] ? $data['user_yahoo'] : $locale['u048'])." |
\n";
tablebreak();
echo "\n";
if ($data['user_groups']) {
tablebreak();
echo "\n";
echo "\n".$locale['423']." | \n\n
\n\n\n";
$user_groups = (strpos($data['user_groups'], ".") == 0 ? explode(".", substr($data['user_groups'], 1)) : explode(".", $data['user_groups']));
for ($i = 0;$i < count($user_groups);$i++) {
echo "".getgroupname($user_groups[$i])."";
if ($i != (count($user_groups)-1)) { echo ",\n"; } else { echo "\n"; }
}
echo " | \n
\n
\n";
}
} else {
if (!isNum($group_id)) fallback("index.php");
$result = dbquery("SELECT * FROM ".$db_prefix."user_groups WHERE group_id='$group_id'");
if (dbrows($result)) {
$data = dbarray($result);
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_groups REGEXP('^\\\.{$group_id}$|\\\.{$group_id}\\\.|\\\.{$group_id}$') ORDER BY user_level DESC, user_name");
opentable($locale['410']);
echo "
".$data['group_name']." (".sprintf((dbrows($result)==1?$locale['411']:$locale['412']), dbrows($result)).") |
".$locale['401']." |
".$locale['402']." |
\n";
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "\n\n".$data['user_name']." | \n";
echo "".getuserlevel($data['user_level'])." | \n
";
}
echo "
\n";
} else {
fallback(BASEDIR."index.php");
}
}
echo "[Galerie]\n";
//////////////////////////
$widththump = 100; //thumb wudth
$heightthump = 100; //thumbheight
function checkImageExists($image_file) {
if(file_exists($image_file)) {
return $image_file;
}
}
if (isset($step) && $step == "delete") {
$result = dbquery("DELETE FROM ".$db_prefix."ug_comments WHERE comment_id='$comment_id'");
redirect("comments.php?ctype=$ctype&cid=$cid");
}
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if (isset($photo) && !isNum($photo)) fallback(FUSION_SELF);
if (isset($userid) && !isNum($userid)) fallback(FUSION_SELF);
opentable("Übersicht");
echo "[ Profil ] ";
echo "[ Gästebuch ] ";
echo "[ Galerie ] ";
closetable();
if(isset($photo)){
$result=dbquery("UPDATE ".$db_prefix."ug_photos SET photo_views=(photo_views+1) WHERE photo_id='".$photo."'");
$result=dbquery("SELECT tp.*, user_name FROM ".$db_prefix."ug_photos AS tp INNER JOIN ".$db_prefix."users USING (user_id) WHERE photo_id='".$photo."'");
$data=dbarray($result);
opentable($locale['VU19'].$data['photo_title']);
if(dbrows($result)!=1){
echo "
dupa
\n";
}else{
$img_filename = USERGALERIE.$photo.".jpg";
$imgsize=@getimagesize($img_filename);
$prev=@dbresult(@dbquery("SELECT t2.photo_id FROM ".$db_prefix."ug_photos t1 JOIN ".$db_prefix."ug_photos t2 WHERE t1.photo_order=t2.photo_order+1 AND t1.album_id=t2.album_id AND t1.photo_id='".$photo."'"),0);
$next=@dbresult(@dbquery("SELECT t2.photo_id FROM ".$db_prefix."ug_photos t1 JOIN ".$db_prefix."ug_photos t2 WHERE t1.photo_order=t2.photo_order-1 AND t1.album_id=t2.album_id AND t1.photo_id='".$photo."'"),0);
echo "
".$locale['VU20'].$imgsize[0]." x ".$imgsize[1].$locale['VU21']."(".parseByteSize(filesize($img_filename)).")
".$locale['VU22']."".$data['user_name']."".$locale['VU23']."".showdate("shortdate", $data['photo_date']).".
".$locale['VU24']."".$data['photo_views']."".$locale['VU25']."
";
}
closetable();
if($settings['album_comments']=="1") showcomments("P","photos","photo_id",$photo,FUSION_SELF."?userid=".$data['album_id']."&photo=$photo");
}elseif(isset($userid)){
$data=dbarray(dbquery(
"SELECT ta.*, COUNT(photo_id) as photo_count, MAX(photo_date) as max_date, user_name
FROM ".$db_prefix."ug_photo_albums AS ta
LEFT JOIN ".$db_prefix."ug_photos USING (album_id)
LEFT JOIN ".$db_prefix."users USING (user_id)
WHERE ta.album_id='".$userid."' GROUP BY album_id"
));
if ($data['album_title'] != ""){
$piccnt=$data['photo_count'];
opentable($locale['VU08'].$data['album_title']);
echo "
".($data['album_info']==""?$data['album_title']:$data['album_info'])." |
".$locale['VU09']."".($data['photo_count']>0?"$data[photo_count] ".$locale['VU10']."".strftime($settings['shortdate'], $data['max_date']+($settings['timeoffset']*3600))."":$locale['VU12']."
")." |
".$locale['VU26']." |
";
closetable();
tablebreak();
opentable($locale['VU13']);
$result=dbquery(
"SELECT tp.*, COUNT(comment_item_id) AS comment_count
FROM ".$db_prefix."ug_photos AS tp LEFT JOIN ".$db_prefix."ug_comments
ON photo_id = comment_item_id AND comment_type='P'
WHERE album_id='".$userid."' GROUP BY photo_id
ORDER BY photo_order LIMIT ".$rowstart.",".$settings['thumbs_per_page']
);
if(dbrows($result)>0){
echo "\n\n";
$img_cnt=0;
while($data=dbarray($result)){
echo "
".$data['photo_title']."
".$locale['VU14']."".($data['photo_views']==0?$locale['VU12']:$data['photo_views'])."
".($data['comment_count']==0?$locale['VU15']:"".$data['comment_count']." ".($data['comment_count']==1?$locale['VU16']:$locale['VU17']))."";
if(++$img_cnt%$settings['thumbs_per_row']==0) echo " |
\n\n";
}
echo "
\n
\n";
}else{
echo "
".$locale['VU18']."
";
}
closetable();
if ($piccnt != 0) echo "".makePageNav($rowstart,$settings['thumbs_per_page'],$piccnt,3,FUSION_SELF."?userid=$album&")."
\n";
}else{
opentable($locale['VU00']);
echo "".$locale['VU31']."";
closetable();
}}
echo "Copyright © 2006 Andreas Niesen (qayqay)";
/////////////////////////////
closetable();
//////////////////////////////
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>