Lavalair Vault Update Xhtml ?

Started on the old forum in January 2008 · view the original in the archive · old links redirect here

5 replies · 798 views · started 18 years ago · 1 min read

5 participants
amylee Principal · 1,092 posts #4

my new vault wont work on the lava script you lot use totally different coding and database structure plus never bothered updating the old script at all except for few security fixes and what not so i dont have anything regarding xhtml with the lava scripts available here

jayasanka Developer · 128 posts #5

i have sme coding but i get errors download not be catagrized all goto others.. plz help me to fix that.

in index.php

//////////////////////////////////////////add vault

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

if(!getplusses(getuid_sid($sid))>25)
    {
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
        echo "<card id=\"main\" title=\"Methos\">";
      echo "<p align=\"center\">";
      echo "At least you should have 25 Credits to add an item to your vault

";
      echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
      echo "</p>";
      echo "</card>";
      echo "</wml>";
      exit();
    }
    addonline(getuid_sid($sid),"Adding a vault item","");

   echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "<card id=\"main\" title=\"Add vault item\">";
    echo "<onevent type=\"onenterforward\">";
  echo "<refresh>
        <setvar name=\"viname\" value=\"\"/>
        <setvar name=\"vilink\" value=\"\"/>
   ";
  echo "</refresh></onevent>";

    echo "<p align=\"center\">";
    echo "[size="1"]The vault is used to store your downloadable links,like images, mp3's, games  etc...
WARNING: if you used it to wapsites links they will got deleted and you'll lose some Credits, if you used it for ranking sites links like 2wap, mradar, you'll be banned[/size]

";
   
    echo "<form name=\"input\"
action=\"genproc.php?action=addvlt&sid=$sid\" method=\"post\"/>";
echo "Item name: <input
type=\"text\"
name=\"viname\"/>
";
echo "Item Url: <input
type=\"text\"
name=\"vilink\"/>
";
echo "<input
type=\"submit\"
value=\"ADD\">
";
echo "</form>";
    
         

         echo "

<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
    echo "</p>";
    echo "</card>";
}
else if($action=="clmop")
{
    $clid = $_GET["clid"];
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Moderating Club Member","");
      echo "<head>";
      echo "<title>Moderate Member</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
    echo "<p align=\"center\">";
    $whnick = getnick_uid($who);
    echo "[b]$whnick[/b]";
    echo "</p>";
    echo "

";
    $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$who."' AND clid=".$clid.""));
$cow = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."' AND id=".$clid.""));
if($exs[0]>0 && $cow[0]>0)
{
    echo "[b]7 [/b]<a accesskey=\"7\" href=\"genproc.php?action=dcm&sid=$sid&who=$who&clid=$clid\">»Kick $whnick out</a>
";
    echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=gcp&sid=$sid&who=$who&clid=$clid\">»$whnick's Club Points</a>
";
    echo "[b]9 [/b]<a accesskey=\"9\" href=\"index.php?action=gpl&sid=$sid&who=$who&clid=$clid\">»Give $whnick Plusses</a>
";
    }else{
      echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Missing Info!";
    }
    echo "</p>";

    echo "<p align=\"center\">";

  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
    echo "</body>";
}

in genporc.php

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

  $viname = $_POST["viname"];
  $vilink = $_POST["vilink"];
  $qut = $_POST["qut"];
  addonline(getuid_sid($sid),"Adding a vault item","");
  echo "<card id=\"main\" title=\"Methos\">";
      echo "<p align=\"center\">";
      $crdate = time();
     $uid = getuid_sid($sid);
      $res = false;
      
      $ext = getext($vilink);
      if ($ext=="mp3" or $ext=="amr" or $ext=="wav") {
      $type = 1;
      }
      if ($ext=="jpg" or $ext=="gif" or $ext=="png" or $ext=="bmp") {
      $type = 2;
      }
      if ($ext=="jad" or $ext=="jar") {
      $type = 3;
      }
      if ($ext=="mpg" or $ext=="3gp") {
      $type = 4;
      }
      if((trim($vilink)!="")&&(trim($viname)!=""))
      {
      $res = mysql_query("INSERT INTO ibwf_vault SET uid='".$uid."', title='".mysql_escape_string($viname)."', pudt='".time()."', itemurl='".$vilink."', type='".$type."'");
      }
      if($res)
      {
        echo "<img src=\"images/ok.gif\" alt=\"O\"/>Item added Successfully";
      }else{
        echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error adding an item";
      }

      echo "

";
      echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
      echo "</p>";
      echo "</card>";

}

in list.php

////////////////////////////////////////////VAULT MAIN
else if($action=="vault")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Browsing Downloads","");
    echo "<card id=\"main\" title=\"Vault\">";
    $uid = getuid_sid($sid);
        echo "

[size="1"]";
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE type='1'"));
        echo "<a href=\"lists.php?action=vaultmusic&sid=$sid\"><img src=\"images/music.gif\" alt=\"*\"/> Music($noi[0])</a>
";
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE type='4'"));
        echo "<a href=\"lists.php?action=vaultvideos&sid=$sid\"><img src=\"images/video.gif\" alt=\"*\"/> Videos($noi[0])</a>
";
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE type='2'"));
        echo "<a href=\"lists.php?action=vaultpics&sid=$sid\"><img src=\"images/image.gif\" alt=\"*\"/> Pics($noi[0])</a>
";
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE type='3'"));
        echo "<a href=\"lists.php?action=vaultgames&sid=$sid\"><img src=\"images/game.gif\" alt=\"*\"/> Games($noi[0])</a>
";
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE type='0'"));
        echo "<a href=\"lists.php?action=vaultother&sid=$sid\"><img src=\"images/other.gif\" alt=\"*\"/> Other($noi[0])</a>
";
        echo "[/size]</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    if($uid==$who && getplusses($uid)>25)
    {
    echo "<a href=\"index.php?action=addvlt&sid=$sid\">";
echo "Add Item</a>
";
}
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}

////////////////////////////////////////VAULT MUSIC
else if($action=="vaultmusic")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Browsing Downloads","");
    echo "<card id=\"main\" title=\"Vault\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($who!="")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."' AND type='1'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE type='1'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 5;
    $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, uid, downloads, pudt FROM ibwf_vault WHERE uid='".$who."' AND type='1' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, downloads, pudt FROM ibwf_vault WHERE type='1' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }

    echo "

[size="1"]";
    $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=\"download.php?id=$item[0]\">$ime".htmlspecialchars($item[1])."</a>";
        $downloads = "Downloads: [b]$item[4][/b]";
        $dateadded = date("d/m/y", $item[5]);
        $dateadded1 = "Date Added: [b]$dateadded[/b]";
        
        
      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&vid=$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 = "Added By: $ulnk";
      }
      echo "$lnk 
$byusr $delnk
$dateadded1
$downloads

";
      
    }
    }
    echo "[/size]</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">«Prev</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "
$page/$num_pages
";
    if($num_pages>2)
    {
      $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"lists.php\" 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=\"index.php?action=addvlt&sid=$sid\">";
echo "Add Item</a>
";
}
    echo "<a href=\"lists.php?action=vault&sid=$sid&who=$who\">«Back to Vault</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}

////////////////////////////////////////VAULT MUSIC
else if($action=="vaultpics")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Browsing Downloads","");
    echo "<card id=\"main\" title=\"Vault\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($who!="")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."' AND type='2'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE type='2'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 5;
    $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, uid, downloads, pudt FROM ibwf_vault WHERE uid='".$who."' AND type='2' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
        $sql = "SELECT id, title, itemurl, uid, downloads, pudt FROM ibwf_vault WHERE type='2' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }

    echo "

[size="1"]";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $ext = getext($item[2]);
        $mysock = getimagesize("$item[2]"); 
        $imagesizeWH = imageResize($mysock[0], $mysock[1], 120);
        $ime = "<img src=\"$item[2]\" $imagesizeWH alt=\"*\"/>";
        $lnk = "<a href=\"download.php?id=$item[0]\">$ime
$item[1] - Download</a>";
        $downloads = "Downloads: [b]$item[4][/b]";
        $dateadded = date("d/m/y", $item[5]);
        $dateadded1 = "Date Added: [b]$dateadded[/b]";
        
      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&vid=$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 = "Added By: $ulnk";
      }
      echo "$lnk 
$byusr $delnk
$dateadded1
$downloads

";
      
    }
    }
    echo "[/size]</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">«Prev</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "
$page/$num_pages
";
    if($num_pages>2)
    {
      $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"lists.php\" 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=\"index.php?action=addvlt&sid=$sid\">";
echo "Add Item</a>
";
}
    echo "<a href=\"lists.php?action=vault&sid=$sid&who=$who\">«Back to Vault</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////VAULT GAMES
else if($action=="vaultgames")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Browsing Downloads","");
    echo "<card id=\"main\" title=\"Vault\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($who!="")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."' AND type='3'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE type='3'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 5;
    $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, uid, downloads, pudt FROM ibwf_vault WHERE uid='".$who."' AND type='3' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, downloads, pudt FROM ibwf_vault WHERE type='3' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }

    echo "

[size="1"]";
    $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=\"download.php?id=$item[0]\">$ime".htmlspecialchars($item[1])."</a>";
        $downloads = "Downloads: [b]$item[4][/b]";
        $dateadded = date("d/m/y", $item[5]);
        $dateadded1 = "Date Added: [b]$dateadded[/b]";
        
      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&vid=$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 = "Added By: $ulnk";
      }
      echo "$lnk 
$byusr $delnk
$dateadded1
$downloads

";
      
    }
    }
    echo "[/size]</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">«Prev</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "
$page/$num_pages
";
    if($num_pages>2)
    {
      $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"lists.php\" 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=\"index.php?action=addvlt&sid=$sid\">";
echo "Add Item</a>
";
}
    echo "<a href=\"lists.php?action=vault&sid=$sid&who=$who\">«Back to Vault</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////VAULT Videos
else if($action=="vaultvideos")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Browsing Downloads","");
    echo "<card id=\"main\" title=\"Vault\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($who!="")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."' AND type='4'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE type='4'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 5;
    $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, uid, downloads, pudt FROM ibwf_vault WHERE uid='".$who."' AND type='4' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, downloads, pudt FROM ibwf_vault WHERE type='4' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }

    echo "

[size="1"]";
    $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=\"download.php?id=$item[0]\">$ime".htmlspecialchars($item[1])."</a>";
        $downloads = "Downloads: [b]$item[4][/b]";
        $dateadded = date("d/m/y", $item[5]);
        $dateadded1 = "Date Added: [b]$dateadded[/b]";
        
      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&vid=$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 = "Added By: $ulnk";
      }
      echo "$lnk 
$byusr $delnk
$dateadded1
$downloads

";
      
    }
    }
    echo "[/size]</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">«Prev</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "
$page/$num_pages
";
    if($num_pages>2)
    {
      $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"lists.php\" 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=\"index.php?action=addvlt&sid=$sid\">";
echo "Add Item</a>
";
}
    echo "<a href=\"lists.php?action=vault&sid=$sid&who=$who\">«Back to Vault</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}

//////////////////////////VAULT OTHER
else if($action=="vaultother")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Browsing Downloads","");
    echo "<card id=\"main\" title=\"Vault\">";
    $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($who!="")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."' AND type='0'"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE type='0'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 5;
    $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, uid, downloads, pudt FROM ibwf_vault WHERE uid='".$who."' AND type='0' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }else{
$sql = "SELECT id, title, itemurl, uid, downloads, pudt FROM ibwf_vault WHERE type='0' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
        }

    echo "

[size="1"]";
    $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=\"download.php?id=$item[0]\">$ime".htmlspecialchars($item[1])."</a>";
        $downloads = "Downloads: [b]$item[4][/b]";
        $dateadded = date("d/m/y", $item[5]);
        $dateadded1 = "Date Added: [b]$dateadded[/b]";
        
      if(candelvl($uid, $item[0]))
      {
        $delnk = "<a href=\"genproc.php?action=delvlt&sid=$sid&vid=$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 = "Added By: $ulnk";
      }
      echo "$lnk 
$byusr $delnk
$dateadded1
$downloads

";
      
    }
    }
    echo "[/size]</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">«Prev</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "
$page/$num_pages
";
    if($num_pages>2)
    {
      $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"lists.php\" 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=\"index.php?action=addvlt&sid=$sid\">";
echo "Add Item</a>
";
}
    echo "<a href=\"lists.php?action=vault&sid=$sid&who=$who\">«Back to Vault</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}

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