Help With Gallery Uploader Script

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

    Help With Gallery Uploader Script

    can someone plz help me out this. whats wrong in this script
    Code:
    <?
    
    include("config.php");
    include("core.php");
    
    
    if($mime== WEB)
    {
        echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
    
        echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
    
        }else{
        echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
    
        echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    }
        $bcon = connectdb();
        if (!$bcon)
        {
    if($mime== WEB)
    {
        echo dberror($mime);
    
    }else{
        echo dberror($mime);
    }
        }
    $getuthm = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
    $uth = $getuthm[0];
    if(!$uth=="")
    {
    $uthm = "$uth";
    }else{
    $uthm = "default.css";
    }
    $brws = explode(" ",$HTTP_USER_AGENT);
    $ubr = $brws[0];
    $uip = getip();
    
    $img1 = $_POST["img1"];
    
            if((islogged($ses)==false)||($uid==0))
            {
    if($mime== WEB)
    {
        echo notlogged($mime);
    
    }else{
        echo notlogged($mime);
    }
    
            } 
    
     
    
        if(isipbanned($uip,$ubr))
            {
    
          if(!isshield(getuid_ses($ses)))
          {
    if($mime== WEB)
    {
        echo useripbanned($mime,$uip,$ubr);
    
    }else{
        echo useripbanned($mime,$uip,$ubr);
    }
    
          }
            }
    
        //echo isbanned($uid);
        if(isbanned($uid))
            {
    if($mime== WEB)
    {
        echo userbanned($mime,$uid);
    
    }else{
        echo userbanned($mime,$uid);
    }
    
            }
    
    $abpath = "/home/funmobil/public_html/gallery"; 
    $sizelim = "yes"; 
    $size = "10000";
    
    
    $cert1 = "image/pjpeg"; 
    $cert2 = "image/jpeg"; 
    $cert3 = "image/gif"; 
    $cert4 = "image/png";
    $uid = getuid_ses($ses);
    $log = "";
    $random1 = rand(1, 9999999999);
    
    
    //checks if file exists
    if ($img1_name == "") {
    $log .= "<img src=\"images/notok.gif\" alt=\"x\"/> You must select a file to upload
    ";
    }
    
    if ($img1_name != "") {
    //checks if file exists
    if (file_exists("$abpath/$img1_name")) {
    $log .= "<img src=\"images/notok.gif\" alt=\"x\"/> A file with this name already exists. please try again
    ";
    } else {
    
    //checks if files to big
    if ($sizelim == "yes") {
    if ($img1_size > $size) {
    $log .= "<img src=\"images/notok.gif\" alt=\"x\"/> File is too large. your file must not exceed $size Kbs
    ";
    }
    }
    
    //Checks if file is an image
    if (($img1_type == $cert1) or ($img1_type == $cert2) or ($img1_type == $cert3) or ($img1_type == $cert4)) {
    if (($img1_type == $cert1) or ($img1_type == $cert2)) {
    $img1_name = $random1 . ".jpeg";
    }
    if ($img1_type == $cert3) {
    $img1_name = $random1 . ".gif";
    }
    if ($img1_type == $cert4) {
    $img1_name = $random1 . ".png";
    }
     
    $res = copy($img1, "$abpath/$img1_name");
    if(!$res) { 
    $log .= "<img src=\"images/notok.gif\" alt=\"x\"/> Could not upload image. please Contact admin
    ";
    }else{
    if (file_exists("$abpath/$img1_name")) {
    $usex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
    $sex = $usex[0];
    $res = mysql_query("INSERT INTO ibwf_gallery SET uid=&#39;".$uid."&#39;, sex=&#39;".$sex."&#39;, imgurl=&#39;".$img1_name."&#39;");
    $log .= "<img src=\"images/ok.gif\" alt=\"o\"/> Your Photo was successfully uploaded to the user gallery
    ";
    }
    }
    
    } else {
    $log .= "<img src=\"images/notok.gif\" alt=\"x\"/> The file you tried to upload is not an image. are you trying to hack me???
    ";
    }
    }
    }
    
    
      addonline(getuid_ses($ses),"Uploading Photo","");
        if($mime== WEB)
        {
            echo webhead($uthm,$stitle);
              echo "<p align=\"center\">";
    echo "$log";
    echo "
    
    <a href=\"index.php?action=ugal&amp;ses=$ses\"><img src=\"images/gallery.gif\" alt=\"*\"/>Gallery</a>
    ";
    echo "<a href=\"index.php?action=main&amp;ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
              echo "</p>";
            echo webfoot();
    
        }else{
            echo waphead($stitle);
    
              echo "<p align=\"center\">";
    echo "$log";
    echo "
    
    <a href=\"index.php?action=ugal&amp;ses=$ses\"><img src=\"images/gallery.gif\" alt=\"*\"/>Gallery</a>
    ";
    echo "<a href=\"index.php?action=main&amp;ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
              echo "</p>";
            echo wapfoot();
    
        }
    
    
    ?>
    AND FORM IS
    Code:
    else if($action=="form")
    {
        if($mime== WEB)
        {
            echo webhead($uthm,$stitle);
              echo "<p align=\"center\">";
       echo "<form action=\"upload.php?ses=$ses\" enctype=\"multipart/form-data\" method=\"post\">";
    echo "Files to upload:
    ";
    echo "<input type=\"file\" name=\"img1\" size=\"30\"/>
    ";
    echo "<input type=\"submit\" value=\"Upload\"/>"; 
    echo "</form>";
    
    echo "
    
    <a href=\"index.php?action=ugal&amp;ses=$ses\"><img src=\"images/gallery.gif\" alt=\"*\"/>Gallery</a>
    ";
    echo "<a href=\"index.php?action=main&amp;ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
            echo "</p>";
            echo webfoot();
    
        }else{
            echo waphead($stitle);
              echo "<p align=\"center\">";
      echo "WML VERSION DOES NOT SUPPORT FORM UPLOAD. PLEAST SWITCH TO XHTML";
     
    echo "
    
    <a href=\"index.php?action=ugal&amp;ses=$ses\"><img src=\"images/gallery.gif\" alt=\"*\"/>Gallery</a>
    ";
    echo "<a href=\"index.php?action=main&amp;ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
            echo "</p>";
            echo wapfoot();
    
        }
    }

    #2
    you want it to pick a xhtml phone to a wml ?

    so users got a xhtml phone can upload that works gets to see upload ?


    then wml phone will say no sorry you dont have xhtml upload ?
    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 want it to pick a xhtml phone to a wml ?

      so users got a xhtml phone can upload that works gets to see upload ?
      then wml phone will say no sorry you dont have xhtml upload ?[/b]
      nope lol. the image wont upload when i try. it says couldnt upload image. please contact admin

      Comment


        #4
        are you on free hosting ?
        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


          #5
          are you on free hosting ?[/b]
          yes im on a free host. y?

          Comment


            #6
            Some free host close upload script to main /home/ username / www / file.z
            i can stop users having uploads sites on my server lol
            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


              #7
              mmhm. can u try my upload script on ur host plz n tell me if it works?

              Comment


                #8
                what script you like bro
                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


                  #9
                  the one here

                  Comment


                    #10
                    how about you test it bro ??

                    +===================================+
                    | New Account Info |
                    +===================================+
                    | Domain: demo.oz-au.info
                    | Ip: 216.16.250.201 (n)
                    | HasCgi: y
                    | UserName: demo
                    | PassWord: password
                    | CpanelMod: x
                    | HomeRoot: /home
                    | Quota: 500 Meg
                    | NameServer1: ns1.oz-au.net
                    | NameServer2: ns2.oz-au.net
                    | NameServer3:
                    | NameServer4:
                    | Contact Email:
                    +===================================+
                    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


                      #11
                      mmhm. gimme a few mins

                      Comment


                        #12
                        take your time thats to test if anything works
                        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


                          #13
                          works ?
                          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

                          Working...
                          X