-download category-

Started on the old forum in August 2009 · view the original in the archive · old links redirect here

46 replies · 2,542 views · started 17 years ago · 11 min read

TL;DR · summary of 46 replies
  • The problem is that dead links are appearing when adding download URLs via genproc.php.
  • The solution might involve checking the validity of the URLs before saving them in the database, ensuring they are not broken but also not external to prevent security risks.
  • There was no specific code approach or fix provided; it remained unresolved.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

8 participants
huwad Developer · 215 posts #21

kiLLeR-eyEd_14 wrote: im juz saying my opini0n that upl0ading via url is also n0t safe.,but u! You're full of pride..You d0n't want to be defeated..You laughed at me and said to name what are those dummy things..so if u think i were the one made the first m0ve, you're wr0ng..And not only in url noobs can be phished, also in uploading via f0rm..they maybe didn't know how to pr0tect their script..

I dont laugh at you.. Im asking what makes your site hacked in uploading via url? its just like using bbcodes in linking urls, so how come my site can get hack in opening external link? thats my point.. just be wise in opening links..

hacking is like sex. you get in, you get out and you pray you left nothing behind.

kiLLeR-eyEd_14 Senior · 382 posts #22

huwad wrote: I dont laugh at you.. Im asking what makes your site hacked in uploading via url? its just like using bbcodes in linking urls, so how come my site can get hack in opening external link? thats my point.. just be wise in opening links..

but that's true..and yeh it's juz lyk bbcodes.,you can't say bbcodes are also safe..Why i can say this?Coz i sometimes try phishing using my links..But d0n't think i try that for cracking..

huwad Developer · 215 posts #23

kiLLeR-eyEd_14 wrote: but that's true..and yeh it's juz lyk bbcodes.,you can't say bbcodes are also safe..Why i can say this?Coz i sometimes try phishing using my links..But d0n't think i try that for cracking..

you cant say it unless you can pr0ve it.. you can phish session ids but you cant hack d site in phishing..

hacking is like sex. you get in, you get out and you pray you left nothing behind.

kiLLeR-eyEd_14 Senior · 382 posts #24

huwad wrote: you cant say it unless you can pr0ve it.. you can phish session ids but you cant hack d site in phishing..

can phish sids but cant hack d site in phishing.,d0n't u kn0w the meaning of phishing.,wat if the admin's acct. were accessed by some crackers..

huwad Developer · 215 posts #25
"Walang msmang mgyabang kung my ipagma2yabang nmn..Tnt..Pero ang magmayabang o ipagmayabang ang kgalingan na dpat ay para sa iba..Aba'y mhiya hiya nmn kau..Tmaan, sapul ciempre..Ang nde, wg mgreact.."
"ahaha dinugtungan muh pa pla.. plgay m0 b an site m0 pur0ng script na galing xe0? lolz.. methoswapv3"

even though u fixed some errors, but still, your METHOSWAPv3 editted script is bugy.. can you say that ur script is n0t from a crap? only the owner of lavalair has d rights to say that..

hacking is like sex. you get in, you get out and you pray you left nothing behind.

huwad Developer · 215 posts #26

kiLLeR-eyEd_14 wrote: can phish sids but cant hack d site in phishing.,d0n't u kn0w the meaning of phishing.,wat if the admin's acct. were accessed by some crackers..

oh c0m'on? what kind of admin he is? ahaha.. an admin that can be phish? wiw.. i t0ld u, only n0obz can be phished..

BE WISE IN OPENNING LINKS

hacking is like sex. you get in, you get out and you pray you left nothing behind.

kiLLeR-eyEd_14 Senior · 382 posts #27

huwad wrote:

"ahaha dinugtungan muh pa pla.. plgay m0 b an site m0 pur0ng script na galing xe0? lolz.. methoswapv3"

even though u fixed some errors, but still, your METHOSWAPv3 editted script is bugy.. can you say that ur script is n0t from a crap? only the owner of lavalair has d rights to say that..

lol.,you're wr0ng mate.,that's not methos script..It's actually still the old one which is the xhtml_wml_chat_script or a wapdesire script..I just borr0wed the themes fr0m blingy or meth0s wap and the tables style..And why is it buggy now unlike b4?C0z i'm stil m0difying it til n0w..I kn0w u've seen it b4 c0z u pm me b4..And fyi, I'm n0t claiming the credits that was for the owner of the originally lavalair script..stil i say it's a wapdesire edit..but i say it's to0 far n0w from the script where i started..

capofret Developer · 225 posts #30

not again with those "its me who made it" claims. cant people make something original (which means not an edit or mod (add/delete) thing) and then maybe you can claim its yours

this forum is supposed to help others and share our knowledge. not a forum to make yourself great (if you are not)!😠

posts are out of topic.

LDSWAPWORLD site closed. im busy with other things in life like facebook , send me PM so i can add you 🙂 www.pinoySG.com

don't ask for help if you're not even helping yourself! i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.

External image (may be gone)

riderz Lead · 975 posts #31

i got this uploader right with device uploader but when i try to download the file it dont wona it dnt do anything when i click on the file


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

riderz Lead · 975 posts #32

downloads.php

<?php
include("config.php");
include("core.php");

header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";

	echo "<head>";

	echo "<title>pinoyaztig.net</title>";
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
	echo "</head>";

	echo "<body>";
connectdb();

$action = $_GET["action"];
$sid = $_GET["sid"];
$page = $_GET["page"];
$did = $_GET["did"];
if($action != "")
{
    if(islogged($sid)==false)
    {
      echo "<card id=\"main\" title=\"pinoyaztig.net\">";
      echo "<p align=\"center\">";
      echo "You are not logged in<br/>";
      echo "Or<br/>Your session has been expired<br/><br/>";
      echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
      echo "</card>";
      echo "</wml>";
      exit();
    }
}
if(isbanned($uid))
    {
        echo "<card id=\"main\" title=\"pinoyaztig.net\">";
      echo "<p align=\"center\">";
      echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/><br/>";
      echo "You are <b>Banned</b><br/>";
      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'"));
      $remain = $banto[0]- time();
      $rmsg = gettimemsg($remain);
      echo "Time to finish your penalty: $rmsg<br/><br/>";
      //echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
      echo "</card>";
      echo "</wml>";
      exit();
    }

//////////////////////////////////Buddies

else if($action=="symbian")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Symbian Application","");
    echo "<card id=\"main\" title=\"Symbian Application\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="1")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='1'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
      $sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=themes&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="java")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Java Application","");
    echo "<card id=\"main\" title=\"Java Application\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="2")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='2'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
      $sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=themes&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="antivirus")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Anti Vitus","");
    echo "<card id=\"main\" title=\"Anti Virus\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="3")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='3'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
      $sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=themes&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="themes")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"s40v2/s40v3 Themes","");
    echo "<card id=\"main\" title=\"s40v2/s40v3 Themes\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="4")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='4'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
      $sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=themes&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="themes1")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"s60/s60v3/Nseries-Themes","");
    echo "<card id=\"main\" title=\"s60/s60v3/Nseries-Themes\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="5")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='5'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
      $sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=themes&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="sethemes")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"SE Themes","");
    echo "<card id=\"main\" title=\"SE Themes\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="6")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='6'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY did DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=apps&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="games1")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"s30/s40/s40v2 Games","");
    echo "<card id=\"main\" title=\"s30/s40/s40v2 Games\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="7")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='7'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY did DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=games1&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="games2")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"s60/s60v3 Games","");
    echo "<card id=\"main\" title=\"s60/s60v3 Games\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="8")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='8'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY did DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=games2&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="games3")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Eseries/Ngage/Nseries Games","");
    echo "<card id=\"main\" title=\"s60/Ngage/Nseries Games\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="9")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='9'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY did DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=videos&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="segames")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"SE Games","");
    echo "<card id=\"main\" title=\"SE Games\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="10")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='10'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY did DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=audio&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="mp3")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Full MP3","");
    echo "<card id=\"main\" title=\"Full MP3\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="11")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='11'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY did DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=wall&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="3gp")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"3GP Videos","");
    echo "<card id=\"main\" title=\"3GP Videos\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="12")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='12'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=others&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="scandal")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Scandal","");
    echo "<card id=\"main\" title=\"Scandal\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="13")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='13'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY did DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=wall&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="gameboy")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Gameboy Games","");
    echo "<card id=\"main\" title=\"Gameboy Games\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="14")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='14'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY did DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=wall&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="naruto")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Naruto-Themes/Poly/MP3 ","");
    echo "<card id=\"main\" title=\"Naruto-Themes/Poly/MP3 \">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="15")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='15'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY did DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=wall&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="poly")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"MP3/MIDI/WAV/POLY/AMR/RAR ($noi[0])","");
    echo "<card id=\"main\" title=\"MP3/MIDI/WAV/POLY/AMR/RAR ($noi[0])\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="16")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='16'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY did DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=wall&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="logo")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Opera Software","");
    echo "<card id=\"main\" title=\"Opera Software\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($did="17")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='17'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    if($who!="")
    {
        $sql = "SELECT id, title, itemurl, did FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, did FROM ibwf_vault WHERE did='".$did."' ORDER BY did DESC LIMIT $limit_start, $items_per_page";
        }

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $ime = getextimg($ext);
        $lnk = "<a href=\"downloads.php?action=download&sid=$sid&did=$item[0]\">$ime".htmlspecialchars($item[2])."</a>";

      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">[x]</a>";
      }else{
        $delnk = "";
      }
      if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";
        $byusr = "<br/>By: $ulnk";
      }
      echo "$lnk $byusr $delnk<br/>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"downloads.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"downloads.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"downloads.php?type=send\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"up.php?action=wall&sid=$sid\">";
echo "Add Item</a><br/>";
}
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a><br/>";
}else{
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////////////Buddies

else if($action=="download")
{
    $did = $_GET["did"];
 $uid = getuid_sid($sid);
    addonline(getuid_sid($sid),"Downloading..","");
    echo "<card id=\"main\" title=\"Downloading...\">";
echo "<p align=\"left\">";
    $uid = getuid_sid($sid);
$item = mysql_fetch_array(mysql_query("SELECT id, title, itemurl, uid, did, downloads, pudt, filesize, mime, info FROM ibwf_vault WHERE id='".$did."'"));

       $name = "Name: $item[1]";
$desc= "Description: $item[9]";
 $downloads = "Download Times: $item[5]";
        $filesize = "File Size: $item[7]";
 $mime = "File Type: $item[8]";
$tmstamp = $item[6];
  $tmdt = date("d m Y - H:i:s", $tmstamp);
$earns2 = "Download Cost: 5 plusses";

        $dateadded1 = "Date Added: $dateadded";

    if($who!="")
      {
        $byusr="";
      }else{
        $unick = getnick_uid($item[3]);
        $ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$item[3]\">$unick</a>";

      }
       echo "$name<br/>$desc<br/>$filesize<br/>$mime<br/>Date Uploaded: $tmdt<br/>$earns2<br/>$downloads<br/>Uploaded by by: $ulnk<br/>";
      echo "----<br/><a href=\"getnow.php?sid=$sid&did=$item[0]\">Download now!</a><br/>";

  if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&did=$item[0]\">Delete</a><br/>";
      }else{
        $delnk = "";
      }
echo "$delnk";
echo "<a href=\"index.php?action=vault&sid=$sid\">";
echo "Downloads</a><br/>";
    echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";

  echo "</p>";
    echo "</card>";
}
?>

</HTML>

getnow.php

<?php
include("core.php");
include("config.php");
connectdb();
$sid = $_GET["sid"];
$did = $_GET["did"];
$agent = $_SERVER['HTTP_USER_AGENT'];
$uid = getuid_sid($sid);
if (eregi("mozilla", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("anonymouse.org", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("winwap", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("gecko", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("omniweb", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("msie", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("konqueror", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("safari", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("netpositive", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("lynx", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("elinks", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("links", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("w3m", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("webtv", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("amaya", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("ibrowse", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("icab", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("crazy browser", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
if (eregi("internet browser", $agent))
 {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error Browser</title>";
      echo "<p align=\"center\">";
      echo "Your browser is not a mobile phone<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
}
$uid = getuid_sid($sid);
 if(islogged($sid)==false)
    {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Session error</title>";
      echo "<p align=\"center\">";
      echo "You are not logged in<br/>";
      echo "Or<br/>Your session has been expired<br/><br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
    }
$tid = getfile($did);
  if($tid==0)
    {
echo "<head>";

	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error File</title>";
      echo "<p align=\"center\">";
      echo "File has been deleted or not in our database.<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
    }
$res = mysql_fetch_array(mysql_query("SELECT itemurl, title, id, mime FROM ibwf_vault WHERE id='".$did."'"));
if (file_exists("./pkfiles/".$res[0])) {
	$fh = fopen ("./pkfiles/".$res[0],r);
	$thisline= explode('|', fgets($fh));
		$validdownload=$thisline;
	fclose($fh);
}
if($validdownload==0) 
{
echo "<head>";	
	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\" />";
	echo "</head>";

	echo "<body>";
      echo "<title>Error file</title>";
      echo "<p align=\"center\">";
      echo "File has been deleted or not in our database.<br/>";
      echo "<a href=\"index.php\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
    }
mysql_query("UPDATE ibwf_vault SET downloads=downloads+'1' WHERE id='".$did."'");
$res = mysql_fetch_array(mysql_query("SELECT itemurl, title, id, mime, uid FROM ibwf_vault WHERE id='".$did."'"));
$res2 = $res[0];
mysql_query("UPDATE ibwf_users SET plusses=plusses+'5' WHERE id='".$res[4]."'");
mysql_query("UPDATE ibwf_users SET plusses=plusses-'5' WHERE id='".$uid."'");
header("Location: http://wap.net.ph/pkfiles/$res2");
?>

genproc.php

else if($action=="addvlt")
{

if(!getplusses(getuid_sid($sid))>25)
    {
      echo "<title>pinoykindat.net</title>";
      echo "<p align=\"center\">";
      echo "Only the user of 25+ plusses can add a vault item<br/><br/>";
      echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
    }
  $viname = $_POST["viname"];
  $vilink = $_POST["vilink"];
$videsc = $_POST["videsc"];
  $did = $_POST["did"];
 //$qut = $_POST["qut"];

 $fname= array_reverse(explode("/",$vilink));
  addonline(getuid_sid($sid),"Adding A Vault Item","index.php?action=main");

error_reporting(0);
 if(strlen($viname)<5)
{
      echo "<title>pinoykindat.net</title>";
      echo "<p align=\"center\">";
        echo "5 minimum letters for the title!";
  echo "<br/><a href=\"index.php?action=main&sid=$sid\">";
  echo "Main menu</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
    }
 if(strlen($vilink)<5)
{
      echo "<title>pinoykindat.net</title>";
      echo "<p align=\"center\">";
        echo "5 minimum letters for the link!";
  echo "<br/><a href=\"index.php?action=main&sid=$sid\">";
  echo "Main menu</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
    }
 if(strlen($videsc)<5)
{
      echo "<title>pinoykindat.net</title>";
      echo "<p align=\"center\">";
        echo "5 minimum letters for the description!";
  echo "<br/><a href=\"index.php?action=main&sid=$sid\">";
  echo "Main menu</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
    }
if(spacesin($vilink))
{
      echo "<card id=\"main\" title=\"Error adding\">";
      echo "<p align=\"center\">";
      echo "No space input!<br/>";
      echo "<a href=\"index.php?action=main&sid=$sid\">Main menu</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
    }
$fname= array_reverse(explode("/",$vilink));

if (!eregi("\.(mid|gif|bmp|mid|midi|3gp|mp3|mp4|wav|mpn|nth|mpc|jar|jad|jpeg|jpg|sis|mmf|amr|thm|png|wbmp|rar|zip)$",$fname[0]))
{
echo "<card id=\"main\" title=\"Error adding\">";
      echo "<p align=\"center\">";
echo "<b>Unsuported File extention!</b><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Main menu</a>";
                  echo "</p></card></wml>";
			exit();
			}
echo "<title>pinoykindat.net</title>";
      echo "<p align=\"center\">";
      $crdate = time();
      //$uid = getuid_sid($sid);

   $res = false;

$defaultDest = "$dir";
$slash       = "/";

$dest        = "./pkfiles/";
 $fname= array_reverse(explode("/",$vilink));
$ds = array($dest, $slash, $fname[0]);
		$ds = implode("", $ds);
  if (!copy($vilink, $ds))
{
 echo "Dead link is not allowed!(<br/>"; 
}else{       
  $fname= array_reverse(explode("/",$vilink));
$ext = getext($fname[0]);
        $mime = getextfile($ext);
$fname= array_reverse(explode("/",$vilink));
   $filesize = filesize($ds);
$filesize = $filesize / 1048576;
$fsize = 0;
$fsizetxt = "";
  if ($filesize < 1)
  {
     $fsize = round($filesize*1024,0);
     $fsizetxt = "".$fsize."KB";
    $check1 = "KB";
  }else{
     $fsize = round($filesize,2);
     $fsizetxt = "".$fsize." MB";
$check1 = "MB";
  }
  $res = mysql_query("INSERT INTO ibwf_vault SET uid='".$uid."', title='".mysql_escape_string($viname)."', pudt='".$crdate."', did='".$did."', info='".$videsc."',filesize='".$fsizetxt."', mime='".$mime."', itemurl='".$fname[0]."'");
 if($res)
      {
mysql_query("UPDATE ibwf_users SET plusses=plusses-'5' WHERE id='".$uid."'");
 echo "File added successfully!";
      }else{
        
      }
}
      echo "<br/><br/>";
      echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
      echo "</p>";
      echo "</body>";

}
else if($action=="delvlt")
{
    $vid = $_GET["vid"];
  addonline(getuid_sid($sid),"Deleting Vault Item","");
  echo "<p align=\"center\">";
  $itemowner = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_vault WHERE id='".$vid."'"));
  if(ismod(getuid_sid($sid))||getuid_sid($sid)==$itemowner[0])
  {
    $res = mysql_query("DELETE FROM ibwf_vault WHERE id='".$vid."'");
    if($res)
        {
            echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Item Deleted From Vault<br/>";
        }else{
          echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!<br/>";
        }
  }else{
    echo "<img src=\"../images/notok.gif\" alt=\"X\"/>You can't delete this item";
  }
  echo "<br/><br/>";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p></body>";
}

usage main page

$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault"));
    echo "<a href=\"index.php?action=vault&sid=$sid\">Downloads($noi[0])</a><br/>";

index.php

//////////////////////////////////vaultren

else if($action=="vault")
{
    addonline(getuid_sid($sid),"Downloads!","index.php?action=$action");
  
    echo "<p align=\"left\">";
    echo "Select Category:<br/>";
 $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='1'"));
    echo "<a href=\"downloads.php?action=symbian&sid=$sid\">Symbian Software($noi[0])</a><br/>";
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='2'"));
    echo "<a href=\"downloads.php?action=java&sid=$sid\">Java Software($noi[0])</a><br/>";
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='3'"));
    echo "<a href=\"downloads.php?action=anti&sid=$sid\">Anti Virus($noi[0])</a><br/>";
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='4'"));
    echo "<a href=\"downloads.php?action=themes&sid=$sid\">s40v2/s40v3-Themes ($noi[0])</a><br/>";
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='5'"));
    echo "<a href=\"downloads.php?action=themes1&sid=$sid\">s60/s60v3/Nseries-Themes ($noi[0])</a><br/>";
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='6'"));
    echo "<a href=\"downloads.php?action=sethemes&sid=$sid\">Sony Ericsson-Themes ($noi[0])</a><br/>";
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='7'"));
    echo "<a href=\"downloads.php?action=games1&sid=$sid\"> s30/s40/s40v2-Games($noi[0])</a><br/>";
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='8'"));
    echo "<a href=\"downloads.php?action=games2&sid=$sid\">s60/s60v3-Games($noi[0])</a><br/>";
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='9'"));
    echo "<a href=\"downloads.php?action=games3&sid=$sid\">Nseries/Eseries/Ngage-Games($noi[0])</a><br/>";
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='10'"));
    echo "<a href=\"downloads.php?action=segames&sid=$sid\">Sony Ericsson-Games($noi[0])</a><br/>";
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='11'"));
    echo "<a href=\"downloads.php?action=mp3&sid=$sid\">Full MP3 ($noi[0])</a><br/>";
     $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='12'"));
    echo "<a href=\"downloads.php?action=3gp&sid=$sid\">3GP Videos ($noi[0])</a><br/>";
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='13'"));
    echo "<a href=\"downloads.php?action=scandal&sid=$sid\">Scandal ($noi[0])</a><br/>";
 
   $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='14'"));
    echo "<a href=\"downloads.php?action=gameboy&sid=$sid\">Gameboy-Games ($noi[0])</a><br/>";
   
 $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='15'"));
    echo "<a href=\"downloads.php?action=naruto&sid=$sid\">Naruto-Themes/Poly/MP3 ($noi[0])</a><br/>";
    
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='16'"));
    echo "<a href=\"downloads.php?action=poly&sid=$sid\">MP3/MIDI/WAV/POLY/AMR/RAR ($noi[0])</a><br/>";
      
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE did='17'"));
    echo "<a href=\"downloads.php?action=logo&sid=$sid\">Opera Software ($noi[0])</a>";

    echo "</p>";
    echo "<p align=\"center\">";
    echo "<a href=\"http://wap.net.ph/upload.php?sid=$sid&ver=html\">Upload via Phone/PC</a><br/>";
     echo "<a href=\"index.php?action=addvlt&sid=$sid\">";
    echo "Add vault via URL</a><br/>";
     echo "<a href=\"index.php?action=main&sid=$sid\">";
    echo "Main menu</a>";
    
    echo "</p>";
    echo "</body>";
}

upload.php

<?php

include("core.php");
include("config.php");

header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";

	echo "<head>";

	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
	echo "</head>";

	echo "<body>";

connectdb();
$did = $_POST["did"];

$sid = $_GET["sid"];
$ver = $_GET["ver"];
$did = $_POST["did"];
$file = $_POST["file"];
$uid = getuid_sid($sid);
if((islogged($sid)==false)||($uid==0))
    {
        
      echo "<p align=\"center\">";
      echo "You are not logged in<br/>";
      echo "Or Your session has been expired<br/><br/>";
      echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
      exit();
    }
echo "<p align=\"left\">";
echo "<title>PINOY AZTIG SA UPLOADER</title>";

// Upload Directory [ No trailing slash.. ]. CHMOD it to 777. 
$uploaddir = ".";

// No. of File Upload fields.
$fields = 5;

// File accept filter: Set 1 for ON, 0 for OFF.
$acceptfilter = 0;
// Acceptable File Types [ If Filter is set.. ]:
$acceptabletypes = array("image/jpeg", "image/pjpeg", "image/JPEG", "image/JPG","image/jpg","image/PJPEG","image/GIF","image/gif");

// File size limit: Set 1 for ON, 0 for OFF.
$limitsize = 1;
// Maximum File size [ In KB.. ]:
$maxsize = 5555;

// Over-Writing: Set 1 to ALLOW, 0 to DISALLOW.
$overwriting = 0;

// Time Offset [ If required ( in hours ).. ]:
$timeoffset = +0;

include("uploader.php");

echo "</body>";
	echo "</html>\n";
?>

uploader.php

<?

function get_files($dirstr)
  {
   $scanfiles = array();
   $fh = opendir($dirstr);
   while (false !== ($filename = readdir($fh)))
   {
if (is_file("$dirstr/$filename")) {
     array_push($scanfiles, $filename); }
   }
   closedir($fh);
   sort($scanfiles);
   return $scanfiles;
}

$count = count($_FILES['userfile']['name']);
if ($count > 0) {

$i=0;
$f=0;
while ($i < $count) {

$kbsize = (round($_FILES['userfile']['size'][$i]/5000));
$date = date("j M Y g:ia", time()+($timeoffset*3600));
$userip = $_SERVER['REMOTE_ADDR'];

if ($limitsize == 1) {
if ($_FILES['userfile']['size'][$i] > (1024*$maxsize) ) {
$toobig[$i] = "{$_FILES['userfile']['name'][$i]} is too large! the maximum file size is $maxsize kb.";
} }

if ($acceptfilter == 1) {
if (!in_array($_FILES['userfile']['type'][$i], $acceptabletypes)) {
$rejectstring = "{$_FILES['userfile']['name'][$i]} is not of the type ";
foreach ($acceptabletypes as $acceptabletype) {
$rejectstring .= "$acceptabletype or "; }
$rejectstring = substr($rejectstring, 0, -4);
$notacceptable[$i] = "$rejectstring.";
} }

if ($overwriting !== 1) {
if(file_exists("pkfiles/{$_FILES['userfile']['name'][$i]}")) {
$alreadyexists[$i] = "a file of the name {$_FILES['userfile']['name'][$i]} already exists! overwriting is not permitted.";
} }

if (!isset($toobig[$i]) && !isset($notacceptable[$i]) && !isset($alreadyexists[$i])) {
$file="{$_FILES['userfile']['name'][$i]}";
$videsc = $_POST["videsc"];
if(spacesin($file))
{
        echo "No input space!.<br/>";
 }else{
if (!eregi("\.(mid|gif|bmp|mid|midi|3gp|mp3|mp4|wav|mpn|nth|mpc|jar|jad|jpeg|jpg|sis|mmf|amr|thm|png|wbmp|rar|zip)$",$file))
{
 echo "Unsupported file extension!<br/>";
 }else{

copy($_FILES['userfile']['tmp_name'][$i], "pkfiles/{$_FILES['userfile']['name'][$i]}");
echo "{$_FILES['userfile']['name'][$i]}<br>";
$ext = getext($file);
        $mime = getextfile($ext);
$file = "{$_FILES['userfile']['name'][$i]}";
$filesize = filesize("./pkfiles/".$file);
$filesize = $filesize / 50000;
$fsize = 0;
$fsizetxt = "";
  if ($filesize < 1)
  {
     $fsize = round($filesize*50000);
     $fsizetxt = "".$fsize." KB";
    $check1 = "KB";
  }else{
     $fsize = round($filesize,2);
     $fsizetxt = "".$fsize." MB";
$check1 = "MB";
  }
 $info = "<br/>Name<br/>".$file." Type<br/>".$mime." Size<br/>".$fsizetxt."";
$res = mysql_query("INSERT INTO ibwf_vault SET uid='".$uid."', title='".$file."', pudt='".time()."', did='".$did."', info='".$info."', filesize='".$fsizetxt."', mime='".$mime."', itemurl='".$file."'");
      if($res)
      {
        echo "File successfully uploaded!<br/>";
      }else{
        echo "Invalid or already in our database!<br/>";
      }
}

}
$f++;
$content .= "$date $userip uploads pkfiles/{$_FILES['userfile']['name'][$i]} ($kbsize kb)\n";
}

elseif ($_FILES['userfile']['size'][$i] !== 0) { 
echo "$toobig[$i] $notacceptable[$i] $alreadyexists[$i]<br>"; 
$content .= "$date $userip fails to upload $uploaddir/{$_FILES['userfile']['name'][$i]} ($kbsize kb) - $toobig[$i] $notacceptable[$i] $alreadyexists[$i]\n";
}

$i++;   
}

if ($makelog == 1) {
$handle = fopen("$logfile", "a");
fwrite ($handle, $content);
fclose ($handle); }

}

?>

<form action="<?= $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']; ?>" method="post" enctype="multipart/form-data">
  Add files and Get 5 Plusses for Every Downloads :)
<br>

<?
for($d=0; $d < $fields; $d++) {

echo "<input name=\"userfile[]\" type=\"file\" size=\"30\"><br>"; 

}
?>
  Category:<br/><select name="did">
  <option value="1">Symbian Software</option>
 <option value="2">Java Software</option>
 <option value="3">Anti Virus</option>
<option value="4">s40v2/s40v3 Themes</option>";
  <option value="5">s60/s60v3/Nseries Themes </option>
 <option value="6">Sony Ericsson Themes </option>
  <option value="7">s30/40/s40v2 Games </option>";
  <option value="8">s60/s60v3 Games </option>";
  <option value="9">Eseries/Nseries/Ngage Games </option>
 <option value="10">Sony Ericsson Games</option>
 <option value="11">Full MP3</option>
  <option value="12">3GP Videos</option>
 <option value="13">Scandal</option>
<option value="14">Gameboy Games</option>
 <option value="15">Naruto Themes/Poly/MP3</option>
 <option value="16">MP3/MIDI/WAV/POLY/AMR/RAR</option>
     <option value="17">Opera Software</option>
  </select><br/>

<input type="submit" value="Upload now">
</form>

<?

echo "<ul>";

if ($limitsize == 1) {
echo "<li><b>The Maximum File size is 5MB.</b></li>"; }

echo "</ul>";
if ($ver==wml)
{
echo "<a href=\"http://wap.net.ph/index.php?action=vault&sid=$sid\">Downloads</a><br/>";
echo "<a href=\"http://wap.net.ph/index.php?action=main&sid=$sid\">Main menu</a><br/>";
}else{ 
echo "<a href=\"http://v2.wap.net.ph/index.php?action=vault&sid=$sid\">Downloads</a><br/>";
echo "<a href=\"http://v2.wap.net.ph/index.php?action=main&sid=$sid\">Main menu</a>";
}
unset($count, $acceptabletypes, $handle, $content, $date, $kbsize);

?>

sql

--
-- Table structure for table `ibwf_vault`
--

CREATE TABLE IF NOT EXISTS `ibwf_vault` (
  `id` int(100) NOT NULL auto_increment,
  `uid` int(100) NOT NULL default '0',
  `title` varchar(50) NOT NULL default '',
  `itemurl` varchar(255) NOT NULL default '',
  `pudt` int(100) NOT NULL default '0',
  `cat` int(50) NOT NULL default '0',
  `type` int(100) NOT NULL default '0',
  `downloads` int(100) NOT NULL default '0',
  `url` varchar(200) NOT NULL,
  `filesize` varchar(60) NOT NULL,
  `did` int(10) NOT NULL,
  `time` int(100) NOT NULL default '0',
  `mime` int(100) NOT NULL,
  `info` varchar(100) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=76 ;

--
-- Dumping data for table `ibwf_vault`
--

core.php

function getextfile($ext)
{
    $ext = strtolower($ext);
    switch ($ext)
    {
      case "jpg":
      case "jpeg":
      case "jpe":
      return "image/jpeg";
        break;
      case "gif":
      return "image/x-generic";
        break;
       case "png":
      return "image/png";
        break;
       case "bmp":
        return "image/bmp";
        break;
      case "zip":
      return "application/zip";
        break;
      case "sis":
        return "application/vnd.symbian.install";
        break;
     case "rar":
        return "package/x-generic";
        break;
      case "amr":
     return "audio/amr";
        break;
     case "mpga":
      case "mp3":
      case "mp2":
        return "audio/mpeg";
        break;
      case "wav":
        return "audio/x-wav";
        break;
      case "mpg":
      case "mpeg":
      case "mpe":
      return "video/mpeg";
        break;
       case "3gp":
       case "3gpp":
        return "video/3gpp";
        break;
        case "jar":
        return "application/java-archive";
        break;
     case "jad":
        return "text/vnd.sun.j2me.app-descriptor";
        break;
        default:
        return "other";
        break;
    }
}
//////////////////////GET USER NICK FROM USERID

function getfile($id)
{
  $unick = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_vault WHERE id='".$id."'"));
  return $unick[0];
}

create a folder pkfiles and chmod it 777

Here are all the files needed anyone can help me set it up corectly


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

riderz Lead · 975 posts #34

ive posted everything that i found on the wap.net.ph i dnt think there are mising files which one are missing


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

srecnica Developer · 174 posts #36

in upload.php is not defined in thes $uploaddir ="."; where????? Try to definises $uploaddir ="$pkfiles"; and add to config.php (as we did for the MMS inbox)

$pkfiles = "./pkfiles";

P.S Not I tested this, but can be ok

riderz Lead · 975 posts #37

and what bout the url uploader i have error in genproc after i click upload it just give a blank page

the uploader work in the upload.php file there i dnt have a prob the prob i have i cant download the file or delete it

it get upload to the folder but i cant download the file or delete it


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

riderz Lead · 975 posts #39

when i click on the file to download there are no action taken place im using opera atm


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close