-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
riderz Lead · 975 posts #43

yea i think so coz it get uploaded but when i try to download there are no action taken place and i dnt know whats the prob with the url uploader there are no action after u click on upload when u type in the url of the item it go to a blank page in genproc


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 #44

My files work now i can download the stuff hehe now i have a prob with the delt option


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 #45
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"];
  $vid = $_POST["vid"];
 //$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>";

}

add this in the genproc now the file get uploaded but it dnt display on the downloads lists anyone please help


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 #46

lists.php

else if($action=="vault") { $who = $_GET["who"]; addonline(getuid_sid($sid),"U Galeriji!",""); echo "<card id="main" title="Galerija">"; $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."'"));
}else{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault"));
}
$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 FROM ibwf_vault WHERE uid='".$who."' ORDER BY pudt DESC LIMIT $limit_start, $items_per_page";
    }else{

$sql = "SELECT id, title, itemurl, uid FROM ibwf_vault ORDER BY pudt DESC LIMIT $limit_start, $items_per_page"; }

echo "

"; $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="$item[2]">$ime".htmlspecialchars($item[1])."</a>";

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

";

}
}
echo "

"; echo " "; if($page>1) { $ppage = $page-1; echo "<a href="lists.php?action=$action&page=$ppage&sid=$sid&who=$who">«Nazad</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href="lists.php?action=$action&page=$npage&sid=$sid&who=$who">Napred»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { $rets = "Na stranu: <input name="pg" format="*N" size="3"/>"; $rets .= "<anchor>IDI"; $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 "

"; ////// UNTILL HERE >> echo " "; if($uid==$who && getplusses($uid)>25) { echo "<a href="index.php?action=addvlt&sid=$sid">"; echo "Dodaj Sliku</a> "; } if($who!="") { echo "<a href="index.php?action=viewuser&sid=$sid&who=$who">"; $whonick = getnick_uid($who); echo "$whonick Profil</a> "; }else{ echo "<a href="index.php?action=stats&sid=$sid">"; echo "<img src="images/stat.gif" alt=""/>Statistika</a> "; } echo "<img src="images/home.gif" alt=""/> <a href="index.php?action=main&sid=$sid">"; echo "HAPPY</a>"; echo " "; echo "</card>"; }

Customize your needs...I think you do this part of the file lists.php

riderz Lead · 975 posts #47

i dnt have anything of this vault in lists.php


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