i use xhtml wapdesire script..n i try coded a script to make user can see their own pic..but i didnt succes..somebody help me plz..
PHP Code:
<?php
define('WCS',true);
include('../core/main.inc');
header_type();
cleardata();
if(ipbanned(ip(),browser())){
if(!shield(getuid_sid($sid))){
echo head_tag("Ip Blocked!!!",0,0);
echo ipbanned_msg();
echo foot_tag();
exit();
}
}
if(!islogged($sid)){
echo head_tag("Error!!!",0,0);
echo session_expired();
echo foot_tag();
exit();
}
if(banned(getuid_sid($sid))){
echo head_tag("Error!!!",1,getnick_sid($sid));
echo banned_msg($sid);
echo foot_tag();
exit();
}
mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
/////////////////////////OWN PICS/////////////////////////
addonline(getuid_sid($sid),"My Pics","");
echo head_tag(getnick_sid($sid)."@My Pics",1,getnick_sid($sid));
$title="<b><i>My Pics</i></b>";
$main="<p align=".align().">
Welcome To $sitename Gallery<br/><br/>
Here Are Your Pic in $sitename Gallery <br/>\n";
$pics=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM gallery_files WHERE id='".$id."'"));
$who=$pics[uid];
$active=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM gallery_files WHERE uid='".$who."'"));
if($active[0]==0){
$main.="<p align=".align().">No Pics Hav Been uploaded Yet.</p>\n";
$main.="<p align=".align().">$fivekey<a $key5 href=\"./gallery.php?sid=$sid\">Back</a></p>\n";
$L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
$L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
$L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
$L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
$L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
$pics=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM gallery_files WHERE id='".$id."'"));
$who=$pics[uid];
$sql="SELECT id, filename, path, hits FROM gallery_files WHERE uid='".$who."' ORDER BY id DESC LIMIT 10";
$items=mysql_query($sql);
$main.=mysql_error();
while($item=mysql_fetch_array($items))
{
$file=explode("gallery/",$item[2]);
if(filesize($file[1])>1048575){
$size=round(filesize($file[1])/1048576,1)." Mb";
}else if(filesize($file[1])>1023){
$size=round(filesize($file[1])/1024,1)." Kb";
}else{
$size=filesize($file[1])." Bytes";
}
$main.="<br/>$item[1]-$size<br/>
<small>$item[3] Downloads</small><br/>\n";
}
$main.="<p align=".align().">$fivekey<a $key5 href=\"./gallery.php?sid=$sid\">Back</a></p>\n";
$L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
$L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
$L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
$L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
$L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
?>
Comment