Help With Gallery Uploader Script

Started on the old forum in April 2007 · view the original in the archive · old links redirect here

12 replies · 895 views · started 19 years ago · 1 min read

2 participants
wizard Senior · 493 posts #1

can someone plz help me out this. whats wrong in this script

<?

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='".$uid."'"));
$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='".$uid."'"));
$sex = $usex[0];
$res = mysql_query("INSERT INTO ibwf_gallery SET uid='".$uid."', sex='".$sex."', imgurl='".$img1_name."'");
$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&ses=$ses\"><img src=\"images/gallery.gif\" alt=\"*\"/>Gallery</a>
";
echo "<a href=\"index.php?action=main&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&ses=$ses\"><img src=\"images/gallery.gif\" alt=\"*\"/>Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
          echo "</p>";
        echo wapfoot();

    }

?>

AND FORM IS

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&ses=$ses\"><img src=\"images/gallery.gif\" alt=\"*\"/>Gallery</a>
";
echo "<a href=\"index.php?action=main&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&ses=$ses\"><img src=\"images/gallery.gif\" alt=\"*\"/>Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
        echo "</p>";
        echo wapfoot();

    }
}
subzero Super moderator Fellow · 3,954 posts #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... _______…

wizard Senior · 493 posts #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 ?

nope lol. the image wont upload when i try. it says couldnt upload image. please contact admin

subzero Super moderator Fellow · 3,954 posts #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... _______…

subzero Super moderator Fellow · 3,954 posts #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... _______…

subzero Super moderator Fellow · 3,954 posts #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... _______…

subzero Super moderator Fellow · 3,954 posts #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... _______…

subzero Super moderator Fellow · 3,954 posts #12

take your time thats to test if anything works External image (may be gone)

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... _______…

subzero Super moderator Fellow · 3,954 posts #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... _______…

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