Przedszkolak
Postów: 22 Pomógł: 1 Ostrzeżeń: 4
Data rejestracji: 26.03.2009 16:03
Złamana licencja
|
Ostatnie fotki użytkowników jest taki panel ? Bardzo potrzebuję.
Ostatnie fotki userów oczywiscie z ich albumów w Amazing User Panel. Chyba z tego pliku można wyciągnąc kod?
<?php
/*---------------------------------------------------+
| Extreme-Fusion IV 4.09
+----------------------------------------------------+
| MOD - Amazing User Panel v2
| by: Seba0p
| |
|http://extreme-fusion.pl
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
include LANGUAGEAUP.$userdata['aup_lang']."/user.php";
include LANGUAGEAUP.$userdata['aup_lang']."/admin.php";
include INCLUDES."user_comments_include.php";
include INCLUDES."user_ratings_include.php";
require_once INCLUDES."user_photo_functions_include.php";
if (!iMEMBER) fallback("../../index.php");
$settings2 = dbarray(dbquery("SELECT * FROM ".$db_prefix."user_panel_settings"));
$stan = $settings2['aup_stan'];
$view1 = $settings2['view1'];
$view2 = $settings2['view2'];
$view3 = $settings2['view3'];
$view4 = $settings2['view4'];
if(iSUPERADMIN || $stan == 0 && $view1 == 1){
$wygl = 1;
require_once "../inw.php";
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if (isset($photo) && !isNum($photo)) fallback(USER."index.php");
if (isset($userid) && !isNum($userid)) fallback(USER."index.php");
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
opentable($locale['uipaup_880']);
echo"<center><b><font color=red>".$locale['uipaup_881']."</font></b></center>";
closetable();
tablebreak();
}
if(isset($photo) && $userid != ''){
$ogladano=dbquery("UPDATE ".$db_prefix."user_panel_photos SET photo_views=(photo_views+1) WHERE photo_id='".$photo."'");
$zapytanie=dbquery("SELECT tp.*, user_name FROM ".$db_prefix."user_panel_photos AS tp INNER JOIN ".$db_prefix."users USING (user_id) WHERE photo_id='".$photo."' AND album_id='$userid'");
$photodata=dbarray($zapytanie);
if(dbrows($zapytanie)!=1){
opentable($locale['uipaup_882']);
echo "<center><br>".$locale['uipaup_882']."!<br><br><a href='view_galleries.php?userid=$userid'><b>".$locale['uipaup_883']."</b></a><br><br></center>\n";
closetable();
}else{
opentable($locale['uipaup_884'].$photodata['photo_title']);
$img_filename = $photo.".jpg";
$imgsize=@getimagesize(USERGALLERYAUP.$img_filename);
$maximgwidth = $settings2['g_max_width'];
$maximgheight = $settings2['g_max_height'];
if($imgsize[0] >= $maximgwidth){
$setimgwidth = $maximgwidth;
}else{
$setimgwidth = $imgsize[0];
}
if($imgsize[1] >= $maximgheight){
$setimgheight = $maximgheigh;
}else{
$setimgheigh = $imgsize[1];
}
$back=@dbresult(@dbquery("SELECT t2.photo_id FROM ".$db_prefix."user_panel_photos t1 JOIN ".$db_prefix."user_panel_photos t2 WHERE t1.photo_order=t2.photo_order+1 AND t1.album_id=t2.album_id AND t1.photo_id='".$photo."' ORDER BY t1.photo_order"),0);
$maxback=@dbarray(@dbquery("SELECT MIN(photo_order) as min_order FROM ".$db_prefix."user_panel_photos WHERE album_id='".$userid."'"),0);
$maxback1 = @dbresult(@dbquery("SELECT photo_id FROM ".$db_prefix."user_panel_photos WHERE album_id='".$userid."' AND photo_order='".$maxback['min_order']."'"),0);
$next=@dbresult(@dbquery("SELECT t2.photo_id FROM ".$db_prefix."user_panel_photos t1 JOIN ".$db_prefix."user_panel_photos t2 WHERE t1.photo_order=t2.photo_order-1 AND t1.album_id=t2.album_id AND t1.photo_id='".$photo."' ORDER BY t1.photo_order"),0);
$maxnext=@dbarray(@dbquery("SELECT MAX(photo_order) as max_order FROM ".$db_prefix."user_panel_photos WHERE album_id='".$userid."'"),0);
$maxnext1 = @dbresult(@dbquery("SELECT photo_id FROM ".$db_prefix."user_panel_photos WHERE album_id='".$userid."' AND photo_order='".$maxnext['max_order']."'"),0);
echo "<div align='center' style='margin:5px 0px;'>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>";
if($maxback1 != $photo){echo"<td class='tbl1'><span class='small'><a href='view_galleries.php?userid=".$photodata['album_id']."&photo=$maxback1'><b><<".$locale['uipaup_885']."</b></a></span></td>";}
if(!empty($back)){echo"<td class='tbl1'><span class='small'><a href='view_galleries.php?userid=".$photodata['album_id']."&photo=$back'><b><".$locale['uipaup_886']."</b></a></span></td>";}
echo"<td class='tbl2'><span class='small'><a href='view_galleries.php?userid=".$photodata['album_id']."'><u><b>".$locale['uipaup_887'].$photodata['user_name']."</b></a></span></td>";
if(!empty($next)){echo"<td class='tbl1'><span class='small'><a href='view_galleries.php?userid=".$photodata['album_id']."&photo=$next'><b>".$locale['uipaup_888']."></b></a></span></td>";}
if($maxnext1 != $photo){echo"<td class='tbl1'><span class='small'><a href='view_galleries.php?userid=".$photodata['album_id']."&photo=$maxnext1'><b>".$locale['uipaup_889'].">></b></a></span></td>";}
echo"</tr>\n</table>\n</div>
<div align='center' style='margin:5px 0px;'>";
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
echo"<img src='".image_exists(USERGALLERYAUP.$img_filename)."' border='1' title='".$photodata['photo_title']."' title='".$photodata['photo_title']."' width='600' height='480'>";
}else{
echo"<img src='".image_exists(USERGALLERYAUP.$img_filename)."' border='1' title='".$photodata['photo_title']."' title='".$photodata['photo_title']."' width='$setimgwidth' height='$setimgheight'>";
}
echo"<br><i>".$photodata['photo_descritpion']."</i></div><br>
<script type=\"text/javascript\" src=\"files/prototype.js\"></script>
<script type=\"text/javascript\" src=\"files/scriptaculous.js?load=effects\"></script>
<script type=\"text/javascript\" src=\"files/lightbox.js\"></script>
<link rel=\"stylesheet\" href=\"files/lightbox.css\" type=\"text/css\" media=\"screen\" />
<center><b><a href='".USERGALLERYAUP.$img_filename."' rel='lightbox' title='".$locale['uipaup_890'].$photodata['user_name']."<br>".$locale['uipaup_891'].$photodata['photo_title']."<br>".$locale['uipaup_892'].showdate("%d.%m.%Yr. %H:%M", $photodata['photo_date'])."'>".$locale['uipaup_893']."</a></b></center><br>
<div align='center' style='margin:5px 0px;'>
".$locale['uipaup_894']."<b>".$photodata['user_name']."</b> |
".$locale['uipaup_895']."<b>".$photodata['photo_title']."<br></b>
".$locale['uipaup_896']."<b>".$imgsize[0]." x ".$imgsize[1]." px |</b>
".$locale['uipaup_897']."<b>".parsebytesize(filesize(USERGALLERYAUP.$img_filename), 0)."<br></b>
".$locale['uipaup_898']."<b>".showdate("%d.%m.%Yr. %H:%M", $photodata['photo_date'])."<br></b>
".$locale['uipaup_899']."<b>".$photodata['photo_views'].($photodata['photo_views'] == 1 ? $locale['uipaup_900'] : $locale['uipaup_901'])."
</b></div>";
$checkcommrat = dbarray(dbquery("SELECT album_comments,album_ratings FROM ".$db_prefix."user_panel_albums WHERE album_id='$userid'"));
if($checkcommrat['album_ratings']=="1") showratings("AUPP",$photo,FUSION_SELF."?userid=".$photodata['album_id']."&photo=$photo");
closetable();
if($checkcommrat['album_comments']=="1") showcomments("AUPP",$db_prefix,"user_panel_photos","photo_id",$photo,FUSION_SELF."?userid=".$photodata['album_id']."&photo=$photo");
}
}elseif(isset($userid)){
$result=dbquery("UPDATE ".$db_prefix."user_panel_albums SET album_views=(album_views+1) WHERE album_id='".$_GET['userid']."'");
$data=dbarray(dbquery(
"SELECT ta.*, COUNT(photo_id) as photo_count, MAX(photo_date) as max_date, user_name
FROM ".$db_prefix."user_panel_albums AS ta
LEFT JOIN ".$db_prefix."user_panel_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['uipaup_902'].$data['album_title']);
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td width='100%'>".$locale['uipaup_903']."<b>".$data['album_info']."</b><br><br>
".$locale['uipaup_904']."<b>".showdate("%d %B %Yr. %H:%M", $data['album_create_date'])."</b></td>
</tr>
<tr>
<td width='100%'><hr>
".$locale['uipaup_905']."<b>".$data['photo_count']."</b><br>";
if($data['max_date'] != 0){
echo $locale['uipaup_906']."<b>".strftime("%d.%m.%Yr. %H:%M", $data['max_date']+($settings['timeoffset']*3600))."</b><br>";}
echo $locale['uipaup_907']."<b>".$data['album_views']."</b></td>
</tr>
</table>";
closetable();
tablebreak();
opentable($locale['uipaup_908']);
$thumbperpage = $settings2['g_max_thumbs'];
$widththumb = $settings2['t_width'];
$heightthumb = $settings2['t_height'];
$thumbperrow = $settings2['g_thumb_per_row'];
$result=dbquery(
"SELECT tp.*, COUNT(comment_item_id) AS comment_count
FROM ".$db_prefix."user_panel_photos AS tp LEFT JOIN ".$db_prefix."user_panel_comments
ON photo_id = comment_item_id AND comment_type='AUPP'
WHERE album_id='".$userid."' GROUP BY photo_id
ORDER BY photo_order LIMIT ".$rowstart.",$thumbperpage"
);
if(dbrows($result)>0){
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
$img_cnt=0;
while($data=dbarray($result)){
echo "<td class='gallery' width='".round(100/$thumbperrow)."%' align='center' valign='top'>
<a href='".FUSION_SELF."?userid=".$data['album_id']."&photo=$data[photo_id]' class='gallery'>
<img src='".image_exists(USERGALLERYAUP.$data['photo_id']."t.jpg")."' width='$widththumb' height='$heightthumb' title='".$data['photo_title']."'>
</a><br />
".$data['photo_title']."<br>
<span class='small2'>".$locale['uipaup_909']." <b>".$data['photo_views']." ".($data['photo_views']==1 ? $locale['uipaup_900'] : $locale['uipaup_901'])."</b>";
$infalcora = dbarray(dbquery("SELECT * FROM ".$db_prefix."user_panel_albums WHERE album_id='$userid'"));
if($infalcora['album_comments'] == 1){echo"<br>".$locale['uipaup_910']."<b>".$data['comment_count']."</b>";
}
$ratingpho = "SELECT AVG(rating_vote) FROM ".$db_prefix."user_panel_ratings WHERE rating_item_id='".$data['photo_id']."' AND rating_type='AUPP'";
$ratingphowyk = mysql_query($ratingpho);
$ratingphoile = mysql_result($ratingphowyk,0);
$ratingphoile1 = round($ratingphoile,1);
if($ratingphoile1 != 0 && $infalcora['album_ratings'] == 1){
echo"<br>".$locale['uipaup_911']."<b> $ratingphoile1</b>";
}
echo"</span>";
if(++$img_cnt%$thumbperrow==0) echo "</tr>\n<tr>\n";
}
echo "</tr>\n</table>\n";
}else{
echo "<center><br>".$locale['uipaup_912']."<br><br></center>";
}
closetable();
if ($piccnt != 0) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,$thumbperpage,$piccnt,3,FUSION_SELF."?userid=$userid&")."</div>\n";
}else{
opentable($locale['uipaup_913']);
echo "<center>".$locale['uipaup_914']."<br><br><a href='".USER."index.php'><b>".$locale['uipaup_883']."</b></a></center><br>";
closetable();
}}
}
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?> Kliknij i zaczekaj na załadowanie kodu ...
PW od moderatora:
- Brak Stopki! - Pieka 13.12 - 23:50
Edytowane przez Chemikpil dnia 28.03.2009 00:29:43
|
Przedszkolak
Postów: 98 Pomógł: 11 Ostrzeżeń: 3
Data rejestracji: 13.03.2008 15:16
Złamana licencja
|
$result = dbquery("SELECT user_id, photo_id FROM ".$db_prefix."user_panel_photos ORDER BY photo_date DESC LIMIT 3 ");
while($data = dbarray($result)){
echo"<a href='".BASEDIR."user/gallery/view_galleries.php?userid=".$data['user_id']."&photo=".$data['photo_id']."'><img src='".BASEDIR."user/gallery/photos/".$data['photo_id']."t.jpg' width='74' height='74'></a>";
}
|
Przedszkolak
Postów: 22 Pomógł: 1 Ostrzeżeń: 4
Data rejestracji: 26.03.2009 16:03
Złamana licencja
|
Taki błąd:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /var/www/sites/yoyo.pl/b/l/bloggers/infusions/galeria/zlecenie_grafa2.php on line 112
Oto linijka 112:
while($data = dbarray($result)){;
Edytowane przez Pieka dnia 13.12.2009 23:46:49
|