File Sharing

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

10 replies · 1,281 views · started 18 years ago · 1 min read

5 participants
phpfan Newbie · 4 posts #1

Can any 1 give me file sharing code ?

metulj Super moderator Principal · 1,726 posts #2

Can any 1 give me file sharing code ?

why dont you share your time with us and use search here? 🤔

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

acrylicimo Newbie · 3 posts #3
<?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 "<title>$sitename</title>";
   echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/white_.css\" />";
   echo "
      <meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
      <meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
      <meta name=\"description\" content=\"music49 mobile :)\">
      <meta name=\"keywords\" content=\"free, community, forums, chat, wap, communicate\">
      ";
   echo "</head>";
   echo "<body>";
   connectdb();
   $action = $_GET["action"];
   $sid = $_GET["sid"];
   $page = $_GET["page"];
   $who = $_GET["who"];
   $uid = getuid_sid($sid);
   $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
   if (islogged($sid) == false) {
      echo "<p align=\"center\">";
      echo "You are not logged in
";
      echo "Or Your session has been expired

";
      echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
      exit();
   }
   $uid = getuid_sid($sid);
   if (isbanned($uid)) {
      echo "<p align=\"center\">";
      echo "<img src=\"../images/notok.gif\" alt=\"x\"/>
";
      echo "You are [b]Banned[/b]
";
      $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

";
      //echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
      exit();
   }
   if ($action == "main") {
      addonline(getuid_sid($sid), "Sharing", "");
       echo "<head>";
    echo "<title>$sitename sharing</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
echo "<p align=\"center\">";
echo "<div class=\"ahblock2\">\n";
echo "[b][u]$sitename File Share[/u][/b]
";
echo "</div>\n";
   $limit          = 10;               
    $query_count    = "SELECT id, COUNT(*) FROM ibwf_uploads GROUP BY id";    
    $result_count   = mysql_query($query_count);    
    $totalrows      = mysql_num_rows($result_count); 

        if(empty($page)){
        $page = 1;
    }
        

    $limitvalue = $page * $limit - ($limit); 
    $query  = "SELECT * FROM ibwf_uploads ORDER BY id DESC LIMIT $limitvalue, $limit";        
    $result = mysql_query($query) or die("Error: " . mysql_error()); 

    if(mysql_num_rows($result) == 0){
        echo("kosong lg la!
");
    }

    $bgcolor = "#E0E0E0"; // light gray

 
    while($row = mysql_fetch_array($result)){
        if ($bgcolor == "#E0E0E0"){
            $bgcolor = "#FFFFFF";
        }else{
            $bgcolor = "#E0E0E0";
        }
                        
$sid = $_GET["sid"];        
$usr = getnick_uid($row[uid]);
$ext = getext($row[filename]);
$ime = getextimg2($ext);
?>
<table border="0" width="100%" cellspacing="1" cellpadding="2" id="table55" bgcolor="#F7F7F7" class="texti">
<tr><td rowspan="4" width="55" bgcolor="#FFFFFF"><p align="center">                        
<?
echo "<a href=\"files/$row[filename]\">$ime</a>
";
?>
</tr></td>
<td bgcolor="#F4FBFF"> 
<font class="b">                       
<?
echo "$row[filename]
";
echo "Size ($row[filesize])
";
echo " By :<a href=\"index.php?action=viewuser&who=$row[uid]&sid=$sid\">$usr</a>
";
?>

</td></tr></table>
<?
    }
     if($page != 1){ 
        $pageprev = $page-1;
        
        echo("<a href=\"share.php?action=main&sid=$sid&page=$pageprev\">PREV ".$limit."</a> "); 
    }else{
        echo("PREV ".$limit." ");
    }

    $numofpages = $totalrows / $limit; 
    
    for($i = 1; $i <= $numofpages; $i++){
        if($i == $page){
            echo($i." ");
        }else{
           echo("<a href=\"share.php?action=main&sid=$sid&page=$i\">$i</a> ");
        }
    }

    if(($totalrows % $limit) != 0){
        if($i == $page){
            echo($i." ");
        }else{
            //echo("<a href=\"share.php?action=main&sid=$sid&page=$i\">$i</a> ");
        }
    }

    if(($totalrows - ($limit * $page)) > 0){
        $pagenext = $page+1;
         
        echo("<a href=\"share.php?action=main&sid=$sid&page=$pagenext\">NEXT ".$limit."</a>"); 
    }else{
        echo("NEXT ".$limit); 
    }
    
    mysql_free_result($result); 
echo "
";
echo "Page(s) [b]$page[/b] of [b]$numofpages[/b]
";
echo "<a href=\"share.php?action=up&sid=$sid\">Upload</a>
";
echo "";
echo "</p>";
echo "

";
   echo "

<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
   echo "</p>";
   echo "</body>";
   echo "</html>";
}
   if ($action == "up") {
      addonline(getuid_sid($sid), "upload", "");
       echo "<head>";
    echo "<title>$sitename upload</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
?>
<table border="0" width="100%" cellspacing="1" cellpadding="2" id="table55" bgcolor="#F7F7F7" class="texti">
<tr><td rowspan="4" width="55" bgcolor="#FFFFFF"><p align="left">                        
<?
echo "[b][u]uploader[/u][/b]
";
echo "upload your stuff and start sharing with others

";
?>
</tr></td>
<td bgcolor="#F4FBFF"> 
<font class="b">                        
<?
if ($upload="upload"&&$superdat_name){

if (!eregi("\.(mid|gif|bmp|mid|midi|3gp|mp3|wav|jar|jad|jpeg|jpg|sis|mmf|amr|png|wbmp|zip|a
i)$",$superdat_name)){
print "[b]Xsapot la![/b]";
}else{
$superdat_name = preg_replace(
             '/[^a-zA-Z0-9\.\$\%\'\`\-\@\{\}\~\!\#\(\)\&\_\^]/'
             ,'',str_replace(array(' ','%20',"'"),array('_','_', ""),$superdat_name));
if(strlen($superdat_name)>15){ print "[b]Nama file pjg sgt da![/b]";
}else{
if (empty($superdat)) {
print "[b]Xdpt dikesan!!![/b]";
}else{
copy("$superdat", "files/$superdat_name") or
die("Couldn't copy file.");

$date=(date("D, j F Y"));
$fsize=round($superdat_size/1024,1);
$text = "&&$superdat_name&&$fsize KB&&$date&&$REMOTE_ADDR&&";
$fz = "$fsize KB";
if("$text"!="$check[1]"){
$mysql=mysql_query("INSERT INTO ibwf_uploads SET id='', uid='".$uid."', filename='".$superdat_name."', filesize='".$fsize." KB', date='".$date."', uip='".$REMOTE_ADDR."'");
echo mysql_error();
}
echo "[b]ok bereh !";
}
}
}
}
?>
<?php
echo "<FORM align=\"center\" ACTION=\"share.php?action=up&sid=$sid\" METHOD=\"POST\" ENCTYPE=\"multipart/form-data\">";
?>
<input align="center" type="file" name="superdat">

<input align="center" type="hidden" name="upload" value="upload"/>
<INPUT align="center" TYPE=SUBMIT NAME="submit" VALUE="Upload">
</small>
 
----------
<?php echo "
[size="1"]<a href=\"share.php?action=main&sid=$sid\">Files Menu</a>[/size]"; 
?>
</FORM>

</td></tr></table>
<?php
   echo "

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

}
?>
</body>
</html>

my eDiteD filesharing for wapdesire. .

by the end the oNe who think thy so great fall down and cry like a bAby who wana his lil m0mmy. . .Fcuk up magGot

acrylicimo Newbie · 3 posts #4

Do still a lil modification mate. .Wonder who can teach me to puT soMe search file function and some other stuff like most downloaded file or maybe most recent uploaded file and file comment. .I do work with it buT not work. .Im still a noob

by the end the oNe who think thy so great fall down and cry like a bAby who wana his lil m0mmy. . .Fcuk up magGot

BoYzONe Developer · 88 posts #5

Nama file panjang sgt da. .Xdpt dikesan. .Ok bereh. .Haha. .Yes its true. .Malay people is stupid, noob and stuck up. .Hahaha..

metulj Super moderator Principal · 1,726 posts #7

Nama file panjang sgt da. .Xdpt dikesan. .Ok bereh. .Haha. .Yes its true. .Malay people is stupid, noob and stuck up. .Hahaha..

dont insult ppl and use english only!

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

BoYzONe Developer · 88 posts #8

dont insult ppl and use english only!

"Nama file panjang sgt" , "xdapat dikesan" and "bereh doh" is the language that he use at the sharing file code that he edit. .U are true learner. .He lying about his sex and country. . .Liar will not get help here moron.

metulj Super moderator Principal · 1,726 posts #9

"Nama file panjang sgt" , "xdapat dikesan" and "bereh doh" is the language that he use at the sharing file code that he edit. .U are true learner. .He lying about his sex and country. . .Liar will not get help here moron.

stop insulting other users! and follow topic title.. else topic will be locked

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

BoYzONe Developer · 88 posts #10

Metulji u delete all his post that insulting all people here and just allways use my post as quote?Do u have problem with me ha maggot?Fucking idiot.

metulj Super moderator Principal · 1,726 posts #11

Metulji u delete all his post that insulting all people here and just allways use my post as quote?Do u have problem with me ha maggot?Fucking idiot.

no i dont have any problem with you.. i asked you before to NOT insult ppl.. but you just dont listen.. so it is you who have the problems!

btw... yes i've deleted few replies... cos we dont need crap replies with full of insults on this forum!

anything else i can do for you?

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

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