upload login with

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    upload login with

    Hello friends in the upload you can upload files without being logged, I would like a login, so that those wishing to use the upload to login
    PHP Code:
    <?php
    include("../web/core.php");
    include(
    "../web/config.php");
    connectdb();
    $uip getip();
    $action $_GET["action"];
    $sid $_GET["sid"];
    $page $_GET["page"];
    $who $_GET["who"];
    $uid getuid_sid($sid);
    $sid $_GET["sid"];
    $site $_GET["site"];
    $theme mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
    $sitename mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
    $sitename $sitename[0];
    echo 
    '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html"/>
    <meta http-equiv="Cache-Control" content="no-cache" forua="true"/>'
    ;
    echo 
    "<title>$sitename Upload Files</title>";
    echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo 
    "</head>";
    echo 
    "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#0000FF\" vlink=\"#800080\">";
    if (
    $upload="upload"&&$superdat_name){
    if (!
    eregi("\.(mid|gif|bmp|mid|midi|3gp|mp3|wav|jar|jad|jpeg|jpg|sis|mmf|amr|png|wbmp)$",$superdat_name)){
    print 
    "<b>Unsupported File Extention!</b>";
    }else{
    $superdat_name preg_replace(
                 
    '/[^a-zA-Z0-9\.\$\%\'\`\-\@\{\}\~\!\#\(\)\&\_\^]/'
                 
    ,'',str_replace(array(' ','%20',"'"),array('_','_'""),$superdat_name));
    if(
    strlen($superdat_name)>53){ print "<b>File Name Is Too Long!</b>";
    }else{
    if (empty(
    $superdat)) {
    print 
    "<b>No input file specified!!!</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>$superdat_name</b> has been successfully uploaded";
    }
    }
    }
    }
    ?>
    <?php
    echo "<FORM align=\"center\" ACTION=\"upload.php?sid=$sid&amp;site=$site\" METHOD=\"POST\" ENCTYPE=\"multipart/form-data\">";
    ?>
    <b>Select File To Be Uploaded :</b><br/>
    <input align="center" type="file" name="superdat"><br/>
    <input align="center" type="hidden" name="upload" value="upload"/>
    <INPUT align="center" TYPE=SUBMIT NAME="submit" VALUE="Upload File!"><br/><br/></small><br/> <b><u>You can only upload files with folowing extentions:</u></b><br/>
    .jpg, .jpeg, .gif, .png, .bmp, wbmp, .mid, .midi, .mpg, .mmf, .amr, .mp3, .wav, .wmv , .avi, .3gp, .sis, .jar, .jad, .zip, .rar, .txt<br/>
    ----------
    <?php echo "<br/><small><a href=\"index.php?sid=$sid&amp;site=$site\">Uploaded Files</a></small>"?>
    </FORM>
    <?php
    if($site=="wap"){
     echo 
    "<br/><br/><a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    }else{
     echo 
    "<br/><br/><a href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    }
    ?>
    </body>
    </html>

    #2
    inbox ori this looks like more likes his coding...
    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #3
      you have some code to suggest?

      Comment


        #4
        PHP Code:
        if(($action != "") && ($action!="terms"))
        {
            
        $uid getuid_sid($sid);
            if((
        islogged($sid)==false)||($uid==0))
            {
                echo 
        '<card id="main" title="wapaa.lv">';
              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">Home</a>';
              echo 
        '</p>';
              echo 
        '</card>';
              echo 
        '</wml>';
              exit();
            }

        Nous Ne Dansos Pas, Nous Sommes Le Danse.!

        Comment


          #5
          thank you vayne

          Comment

          Working...
          X