Profile Gallery Wapdesire

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

    Profile Gallery Wapdesire

    does any1 know how I can put a gallery on profile but for the persons profile?

    ex...that person can uploads there pictures and it show in gallery on profile??
    this 4 my wapdesire version web???

    tnks to help
    if like my post click:

    http://coding-talk.com/images/totall...ost_thanks.gif

    #2
    does any1 know how I can put a gallery on profile but for the persons profile?

    ex...that person can uploads there pictures and it show in gallery on profile??
    this 4 my wapdesire version web???

    tnks to help [/b]

    u seem to want want want sweetangel. have a go yourself before asking . only way u gonna learn.
    Wapchat4u


    Topsites4u

    Comment


      #3
      lol wapdesire scripts gallery doesnt use sql!!! so dont think you can do it lol

      Click here!!!

      Comment


        #4
        u seem to want want want sweetangel. have a go yourself before asking . only way u gonna learn.[/b]

        can yu even read a script yu wudv find out that id dosnt need a database and also haver you tired searching google first! yu cant keep asking for help yeh yu will get wat yu want in the end here but wudnt yu get the satisfaction of knowin yu didn it your self
        Want something coded email me at sales@webnwaphost.com for a prices.




        Comment


          #5
          to put a profile photo gallery.. on an wapdesire based script... u must put another script for photo gallery... .. just look at the methos script.. is posted somewhere in this forum... combine methos photo gallery.. with you wapdesire script.. and VOILA

          Comment


            #6
            but I have try... but not work
            if like my post click:

            http://coding-talk.com/images/totall...ost_thanks.gif

            Comment


              #7
              I have create this:

              $profileimages = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery WHERE uid='".$who."'"));
              echo "<a href=\"gallery.php?action=viewuser&who=$who&sid=$s id\">Gallery ($profileimages[0])</a>
              ";

              if like my post click:

              http://coding-talk.com/images/totall...ost_thanks.gif

              Comment


                #8
                I have create this:

                $profileimages = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery WHERE uid=&#39;".$who."&#39;"));
                echo "<a href=\"gallery.php?action=viewuser&who=$who&sid=$s id\">Gallery ($profileimages[0])</a>
                ";

                [/b]

                try this ..and say thank you
                <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'> $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery WHERE uid=&#39;".$who."&#39;"));
                if($countpics[0]>0)
                {
                echo "» <a href=\"usergallery.php?action=user&who=$who&sid=$s id\">Photos</a> ($countpics[0])
                ";
                }</div>

                Comment


                  #9
                  try this ..and say thank you
                  <div class='codetop'>CODE
                  <div class='codemain' style='height:200px;white-space:pre;overflow:auto'> $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery WHERE uid=&#39;".$who."&#39;"));
                  if($countpics[0]>0)
                  {
                  echo "» <a href=\"usergallery.php?action=user&who=$who&sid=$s id\">Photos</a> ($countpics[0])
                  ";
                  }</div>[/b][/quote]

                  I not have usergallery page...I have only page gallery.php
                  if like my post click:

                  http://coding-talk.com/images/totall...ost_thanks.gif

                  Comment


                    #10
                    and not work
                    if like my post click:

                    http://coding-talk.com/images/totall...ost_thanks.gif

                    Comment


                      #11
                      put the code of your gallery here... if u want help..otherwise we cannot help i

                      Comment


                        #12
                        in /pics/index.php

                        this is a code:

                        Code:
                        <?php
                        /*
                        (c)wapdesire.com
                        */
                        include("../wap/config.php");
                        include("../wap/core.php");
                        connectdb();
                        $brw = $HTTP_USER_AGENT;
                        $brws = explode("/",$HTTP_USER_AGENT);
                        $ubr = $brws[0];
                        $uip = getip();
                        $action = $_GET["action"];
                        $sid = $_GET["sid"];
                        $page = $_GET["page"];
                        $who = $_GET["who"];
                        $uid = getuid_sid($sid);
                        $nick = getnick_uid($uid);
                        $upload = $_GET["upload"];
                        $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                        $bcon = connectdb();
                        $script = $_GET["script"];
                        
                        if($script=="wml"){
                        header("Content-type: text/vnd.wap.wml");
                        header("Cache-Control: no-store, no-cache, must-revalidate");
                        echo &#39;<?xml version="1.0"?&#39; . &#39;>&#39;; 
                        echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
                        }else{
                        header("Content-type: text/html; charset=ISO-8859-1");
                        header("Cache-Control: no-cache, must-revalidate, max-age=0");
                        header("Pragma: no-cache");
                        echo &#39;<?xml version="1.0"?&#39; . &#39;>&#39;; 
                        echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
                        }
                        if($script=="wml"){
                        echo "<wml>";
                        }else{
                        echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
                        }
                        /////////////////////////////Database Error/////////////////////////////
                        
                        if (!$bcon)
                        {
                        if($script=="wml"){
                        echo "<card id=\"main\" title=\"Error!!!\">";
                        }else{
                        echo "<head>";
                        echo "<title>Error!!!</title>";
                        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
                        echo "</head>";
                        echo "<body>";
                        }
                        echo "<p align=\"center\">";
                        echo "<img src=\"images/exit.gif\" alt=\"!\"/>
                        ";
                        echo "[b]Error! Cannot Connect To Database...[/b]
                        
                        ";
                        echo "This error happens usually when backing up the database, please be patient...";
                        echo "</p>";
                        if($script=="wml"){
                        echo "</card>";
                        echo "</wml>";
                        }else{
                        echo "</body>";
                        echo "</html>";
                        }
                        exit();
                        }
                        
                        cleardata();
                        /////////////////////////////Ip Banned/////////////////////////////
                        
                        if(isipbanned($uip,$ubr))
                        {
                        if(!isshield(getuid_sid($sid)))
                        {
                        if($script=="wml"){
                        echo "<card id=\"main\" title=\"Ip Block!\">";
                        }else{
                        echo "<head>";
                        echo "<title>Ip Block!</title>";
                        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
                        echo "</head>";
                        echo "<body>";
                        }
                        echo "<p align=\"center\">";
                        echo "<img src=\"images/notok.gif\" alt=\"x\"/>
                        ";
                        echo "[b]This IP address is blocked!!![/b]
                        ";
                        echo "
                        ";
                        echo "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over
                        
                        ";
                        $banto = mysql_fetch_array(mysql_query("SELECT  timeto FROM ibwf_penalties WHERE  penalty=&#39;2&#39; AND ipadd=&#39;".$uip."&#39; AND browserm=&#39;".$ubr."&#39; LIMIT 1 "));
                        $remain =  $banto[0] - time();
                        $rmsg = gettimemsg($remain);
                        echo " IP: $rmsg
                        
                        ";
                        echo "</p>";
                        echo "
                        
                        ";
                        if($script=="wml"){
                        echo "[b]Username:[/b]
                        <input name=\"loguid\" format=\"*x\" maxlength=\"20\"/>
                        ";
                        echo "[b]Password:[/b]
                        <input type=\"password\" name=\"logpwd\"  maxlength=\"20\"/>
                        ";
                        echo "<anchor>Login<go href=\"login.php\" method=\"get\">";
                        echo "<postfield name=\"loguid\" value=\"$(loguid)\"/>";
                        echo "<postfield name=\"logpwd\" value=\"$(logpwd)\"/>";
                        echo "</go></anchor>";
                        }else{
                        echo "<form action=\"../web/login.php\" method=\"get\">";
                        echo "[b]UserID:[/b]
                        <input name=\"loguid\" format=\"*x\" maxlength=\"30\"/>
                        ";
                        echo "[b]Password:[/b]
                        <input type=\"password\" name=\"logpwd\"  maxlength=\"30\"/>
                        ";
                        echo "
                        <input name=\"Login\" type=\"submit\" value=\"Submit\"></form>";
                        }
                        echo "
                        
                        Not registered yet? 
                        <a href=\"../web/register.php\">SignUp</a>
                        ";
                        echo "<a href=\"../web/index.php?action=terms&amp;sid=$sid\">Site Rules</a>
                        ";
                        echo "</p>";
                        echo "<p align=\"center\">";
                        $onu = getnumonline();
                        echo "Members Inside: $onu</p>";
                        if($script=="wml"){
                        if((strpos(strtoupper($HTTP_ACCEPT),"VND.WAP.XHTML+XML") > 0)||(
                        strpos(strtoupper($HTTP_ACCEPT),"XHTML+XML") > 0)||($ubr=="Mozilla"))
                        {echo "<p align=\"center\"><a href=\"../web/index.php\">Wap 2.0(xhtml) Version</a></p>";}
                        echo mobads();
                        echo "<p align=\"center\">[b]©2006-2007
                        $sitename[/b]";
                        echo "</p>";
                        echo "</card>";
                        echo "</wml>";
                        }else{
                        echo "<a href=\"../wap/index.php\">Wap 1.0(wml) Version</a></p>";
                        echo mobads();
                        echo "<div>[b]©2006-2007
                        $sitename[/b]</div>";
                        echo "</body>";
                        echo "</html>";
                        }
                        exit();
                        }
                        }
                        /////////////////////////////Session Expired/////////////////////////////
                        
                        if(($action != "") && ($action!="terms"))
                        {
                        $uid = getuid_sid($sid);
                        if((islogged($sid)==false)||($uid==0))
                        {
                        if($script=="wml"){
                        echo "<card id=\"main\" title=\"Error!!!\">";
                        }else{
                        echo "<head>";
                        echo "<title>Error!!!</title>";
                        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
                        echo "</head>";
                        echo "<body>";
                        }
                        echo "<p align=\"center\">";
                        echo "You are not logged in
                        ";
                        echo "Or Your session has been expired
                        
                        ";
                        if($script=="wml"){
                        echo "<a href=\"../wap/index.php\">Login</a>";
                        }else{
                        echo "<a href=\"../web/index.php\">Login</a>";
                        }
                        echo "</p>";
                        if($script=="wml"){
                        echo "</card>";
                        echo "</wml>";
                        }else{
                        echo "</body>";
                        echo "</html>";
                        }
                        exit();
                        }
                        }
                        /////////////////////////////Banned/////////////////////////////
                        
                        if(isbanned($uid))
                        {
                        if($script=="wml"){
                        echo "<card id=\"main\" title=\"Error!!!\">";
                        }else{
                        echo "<head>";
                        echo "<title>Error!!!</title>";
                        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                        echo "</head>";
                        echo "<body>";
                        }
                        echo "<p align=\"center\">";
                        echo "<img src=\"images/notok.gif\" alt=\"x\"/>
                        ";
                        echo "[b]You are Banned[/b]
                        
                        ";
                        $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#39; OR uid=&#39;".$uid."&#39; AND penalty=&#39;2&#39;"));
                        $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                        $remain = $banto[0]- time();
                        $rmsg = gettimemsg($remain);
                        echo "[b]Time Left: [/b]$rmsg
                        ";
                        $nick = getnick_uid($banto[2]);
                        echo "[b]By: [/b]$nick
                        ";
                        echo "[b]Reason: [/b]$banto[1]";
                        //echo "<a href=\"../web/index.php\">Login</a>";
                        echo "</p>";
                        if($script=="wml"){
                        echo "</card>";
                        echo "</wml>";
                        }else{
                        echo "</body>";
                        echo "</html>";
                        }
                        exit();
                        }
                        /////////////////////////////pics/////////////////////////////
                        
                        else if($action=="pics")
                        {
                        addonline(getuid_sid($sid),"Viewing Gallery","");
                        if($script=="wml"){
                        echo "<card id=\"main\" title=\"Gallery Pics\">";
                        echo "<p align=\"center\">";
                        }else{
                        echo "<head>";
                        echo "<title>Gallery Pics</title>";
                        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                        echo "</head>";
                        echo "<body>";
                        echo "<center>";
                        }
                        $items_per_page = "5";
                        if (!isset($page)) {$page = 0;}
                        $total = 0;
                        if(!($dp = opendir("./"))) die ("Cannot open ./");
                        $file_array = array();
                         
                        while ($file = readdir ($dp))
                        {
                        if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
                        {
                        $file_array[] =  $file;
                        }
                        }
                        $file_count = count ($file_array);
                        sort ($file_array);
                        echo "<img src=\"../images/male.gif\" alt=\"\"/><img src=\"../images/female.gif\" alt=\"\"/>
                        [u][i][b]Gallery Pics[/b][/i][/u]
                        ";    
                        if ($file_count > 0)
                        {
                        $first_record = $page * $items_per_page;
                        $last_record = $first_record + $items_per_page;
                        while (list($fileIndexValue, $file_name) = each ($file_array))
                        {
                        if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
                        {
                        
                        $userpic2=explode("(", $file_name);
                        $userpic=explode(".", $file_name);
                        
                        $sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE name=&#39;$userpic2[0]&#39;"));
                        if($sex[0]=="M"){$usersex = "<img src=\"../images/male.gif\" alt=\"M\"/>";}
                        if($sex[0]=="F"){$usersex = "<img src=\"../images/female.gif\" alt=\"F\"/>";}
                        if((getnick_uid($uid)==$userpic2[0])||(isowner(getuid_sid($sid)))||(isheadadmin(getuid_sid($sid))))
                        {
                        echo "<img src=\"$file_name\" alt=\"$userpic[0]\"/>
                        $usersex<a href=\"$file_name\">$userpic[0]</a> ". round(filesize($file_name)/1024,1) . "kb
                        <a href=\"index.php?action=pics&amp;page=$page&amp;sid=$sid&amp;script=$script&amp;delete=$file_name\"><img src=\"../images/notok.gif\" alt=\"[x]\"/></a>
                        
                        ";
                        }else{
                        echo "<img src=\"$file_name\" alt=\"$userpic[0]\"/>
                        $usersex<a href=\"$file_name\">$userpic[0]</a> ". round(filesize($file_name)/1024,1) . "kb
                        ";
                        }
                        $delete = $_GET["delete"];
                        if($delete=="$file_name"){
                        if((getnick_uid($uid)==$userpic2[0])||(isowner(getuid_sid($sid)))||(isheadadmin(getuid_sid($sid))))
                        {
                        unlink("./$file_name");
                        echo "
                        $file_name deleted successfully
                        ";
                        if($script=="wml"){
                        echo "<card id=\"refresh\" title=\"refresh\" ontimer=\"index.php?action=pics&amp;page=$page&amp;sid=$sid&amp;script=$script\">";
                        echo "<timer value=\"1\"/>pls wait while browser redirects</card></p></card></wml>";
                        exit();
                        }else{
                        echo "<meta http-equiv=Refresh content=1;url=index.php?action=pics&amp;page=$page&amp;sid=$sid&amp;script=$script>";
                        echo "</p></body></html>";
                        exit();
                        }
                        }
                        }
                        $total = $total + filesize($file_name);
                        }
                        }
                        echo "
                        ";
                        $pages =(int) ceil($file_count / $items_per_page);
                        $pages = ($pages -1);
                        
                        if (($file_count > 0) AND ($page != 0))
                        {
                        $prev_page = $page -1;
                        echo "<a href=\"".$_SERVER["PHP_SELF"]."?action=pics&amp;page=$prev_page&amp;sid=$sid&amp;script=$script\"><img src=\"../images/prev.gif\" alt=\"Prev\"/></a> |";
                        }
                        if (($file_count > 0) AND ($last_record < $file_count))
                        {
                        $next_page = $page + 1;
                        echo " <a href=\"".$_SERVER["PHP_SELF"]."?action=pics&amp;page=$next_page&amp;sid=$sid&amp;script=$script\"><img src=\"../images/next.gif\" alt=\"Next\"/></a>";
                        }
                        if ($file_count > 10)
                        {
                        if($script=="wml"){
                        $rets = "
                        Jump (0-$pages/$page)
                        <input name=\"pg\" format=\"*N\" size=\"2\"/>";
                        $rets .= "<anchor>goto page";
                        $rets .= "<go href=\"index.php\" method=\"get\">";
                        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
                        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
                        $rets .= "<postfield name=\"script\" value=\"$script\"/>";
                        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
                        $rets .= "</go></anchor>
                        ";
                        echo $rets;
                        }else{
                        $rets = "<form action=\"index.php\" method=\"get\">";
                        $rets .= "Jump (0-$pages/$page)
                        <input name=\"page\" style=\"-wap-input-format: &#39;*N&#39;\" size=\"2\"/>";
                        $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\">";
                        $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\">";
                        $rets .= "<input type=\"hidden\" name=\"script\" value=\"$script\">";
                        $rets .= "<input type=\"Submit\" name=\"Submit\" Value=\"goto page\"></form>";
                        echo $rets;
                        }
                        echo "
                        ";
                        }
                        echo "
                        Directory: $file_count ";
                        if ($file_count == 1)
                        {echo "file";}
                        else
                        {echo "files";}
                        }
                        
                        echo "
                        ";
                        if((strpos(strtoupper($HTTP_ACCEPT),"VND.WAP.XHTML+XML") > 0)||(
                        strpos(strtoupper($HTTP_ACCEPT),"XHTML+XML") > 0)||($ubr=="Mozilla"))
                        {
                        echo "<a href=\"index.php?action=upload&amp;sid=$sid&amp;script=xhtml&amp;prevscript=$script\">Upload</a>
                        ";
                        }
                        closedir($dp);
                        if($script=="wml"){
                        echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        echo "</p>";
                        echo "</card>";
                        }else{
                        echo "[b]0 [/b]<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        echo "</center>";
                        echo "</body>";
                        }
                        }
                        /////////////////////////////upload//////////////////////////////
                        
                        else if($action=="upload")
                        {
                        $script2 = $_GET["prevscript"];
                        addonline(getuid_sid($sid),"Uploading Gallery Pic","");
                        if($script=="wml"){
                        echo "<card id=\"main\" title=\"Gallery Pics\">";
                        }else{
                        echo "<head>";
                        echo "<title>Gallery Pics</title>";
                        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                        echo "</head>";
                        echo "<body>";
                        }
                        echo "<p align=\"center\">";
                        echo "[u][i][b]Upload[/b][/i][/u]
                        ";
                        echo "Image Files
                        ";
                        $size_bytes = 2048000;
                        $kb = $size_bytes / 1024;
                        $mb = $kb / 1024;
                        echo "Max [b]$mb[/b] Mb
                        ";
                        echo "<img src=\"../images/point.gif\" alt=\"!\"/>You can email ur pic to
                        [b]afta_drk@hotmail.com[/b]
                        wif ur username attached or use the below uploader
                        ";
                        if($script=="wml"){
                        echo "<img src=\"../images/point.gif\" alt=\"!\"/>Browser not compatible wif xhtml uploader email ur pic to [b]afta_drk@hotmail.com[/b] wif ur username attached";
                        }else{
                        echo "<form method=\"post\" enctype=\"multipart/form-data\" action=\"index.php?action=upload&amp;sid=$sid&amp;upload=add&amp;script=$script&amp;prevscript=$script2\">";
                        echo "<input type=\"file\" name=\"filetoupload\">
                        ";
                        echo "<input type=\"Submit\" name=\"uploadform\" value=\"Upload\">";
                        echo "</form>";
                        }
                        $upload_dir = "./";
                        $filename = $_FILES[&#39;filetoupload&#39;][&#39;name&#39;];
                        $size = $_FILES[&#39;filetoupload&#39;][&#39;size&#39;];
                        $extlimit = "yes";
                        $limitedext = array(".jpeg",".jpg",".JPEG",".JPG",".gif",".GIF",".png",".PNG");
                        $ext = strrchr($_FILES[&#39;filetoupload&#39;][name],&#39;.&#39;);
                        $file_type = $_FILES[&#39;filetoupload&#39;][&#39;type&#39;];
                        $file_name = $_FILES[&#39;filetoupload&#39;][&#39;name&#39;];
                        $file_size = $_FILES[&#39;filetoupload&#39;][&#39;size&#39;];
                        $file_tmp = $_FILES[&#39;filetoupload&#39;][&#39;tmp_name&#39;];
                        $img_thumb_width = 150; // in pixcel
                        $ThumbWidth = $img_thumb_width;
                        
                        if($upload=="add"){
                        if (!is_uploaded_file($_FILES[&#39;filetoupload&#39;][&#39;tmp_name&#39;]))
                        {
                        echo "<img src=\"../images/notok.gif\" alt=\"(error)\"/>No file selected!
                        ";
                        echo "
                        ";
                        echo "<a href=\"index.php?action=pics&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a>
                        ";
                        if($script2=="wml"){
                        echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }else{
                        echo "[b]0 [/b]<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }
                        echo "</p>";
                        if($script=="wml"){
                        echo "</card>";
                        }else{
                        echo "</body>";
                        }
                        exit();
                        }
                        
                        if (($extlimit == "yes") && (!in_array($ext,$limitedext)))
                        {
                        echo("<img src=\"../images/notok.gif\" alt=\"(error)\"/>Invalid file type!
                        ");
                        echo "
                        ";
                        echo "<a href=\"index.php?action=pics&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a>
                        ";
                        if($script2=="wml"){
                        echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }else{
                        echo "[b]0 [/b]<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }
                        echo "</p>";
                        if($script=="wml"){
                        echo "</card>";
                        }else{
                        echo "</body>";
                        }
                        exit();
                        }
                        
                        if ($size > $size_bytes)
                        {
                        echo "<img src=\"../images/notok.gif\" alt=\"(error)\"/>Exceeded File size limit! Maximum [b]$kb[/b] Kb.
                        ";
                        echo "
                        ";
                        echo "<a href=\"index.php?action=pics&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a>
                        ";
                        if($script2=="wml"){
                        echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }else{
                        echo "[b]0 [/b]<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }
                        echo "</p>";
                        if($script=="wml"){
                        echo "</card>";
                        }else{
                        echo "</body>";
                        }
                        exit();
                        }
                        
                        if (file_exists("$upload_dir/$filename")) 
                        {
                        echo("<img src=\"../images/notok.gif\" alt=\"(error)\"/>Filename already exists!
                        ");
                        echo "
                        ";
                        echo "<a href=\"index.php?action=pics&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a>
                        ";
                        if($script2=="wml"){
                        echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }else{
                        echo "[b]0 [/b]<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }
                        echo "</p>";
                        if($script=="wml"){
                        echo "</card>";
                        }else{
                        echo "</body>";
                        }
                        exit();
                        }
                        
                        $ext = getext($filename);
                        $picname ="$nick.$ext";
                        if($file_size)
                        {
                        if($file_type == "image/pjpeg" || $file_type == "image/jpeg")
                        {$new_img = imagecreatefromjpeg($file_tmp);}
                        elseif($file_type == "image/x-png" || $file_type == "image/png")
                        {$new_img = imagecreatefrompng($file_tmp);}
                        elseif($file_type == "image/gif")
                        {$new_img = imagecreatefromgif($file_tmp);}
                        
                        /*
                        list($width, $height) = getimagesize($file_tmp);
                        $imgratio=$width/$height;
                        if ($imgratio>1){
                        $newwidth = $ThumbWidth;
                        $newheight = $ThumbWidth/$imgratio;
                        }else{
                        $newheight = $ThumbWidth;
                        $newwidth = $ThumbWidth*$imgratio;
                        }
                        */
                        
                        $height = 128;
                        $filesize = getimagesize($file_tmp);
                        $aspect_ratio = $filesize[1]/$filesize[0]; 
                        if($filesize[1] <= $height)
                        {
                        $newwidth = $filesize[0];
                        $newheight = $filesize[1];
                        }else{
                        $newheight = $height;
                        $newwidth = abs($newheight/$aspect_ratio);
                        }
                        
                        if (function_exists(imagecreatetruecolor)){
                        $resized_img = imagecreatetruecolor($newwidth,$newheight);
                        }else{
                        die("Error: Please make sure you have GD library ver 2+");
                        }
                        imagecopyresized($resized_img, $new_img, 0, 0, 0, 0, $newwidth, $newheight, $filesize[0], $filesize[1]);
                        $path_big = "../pics_original";
                        
                        $path_thumbs = "./";
                        if (!file_exists("$upload_dir/$picname"))
                        {$pic ="$nick(1).$ext";}
                        if (file_exists("$upload_dir/$pic"))
                        {$pic ="$nick(2).$ext";}
                        if (file_exists("$upload_dir/$pic"))
                        {$pic ="$nick(3).$ext";}
                        if (file_exists("$upload_dir/$pic"))
                        {$pic ="$nick(4).$ext";}
                        if (file_exists("$upload_dir/$pic"))
                        {$pic ="$nick(5).$ext";}
                        if (file_exists("$upload_dir/$nick(5).$ext"))
                        {echo "<img src=\"../images/notok.gif\" alt=\"(error)\"/>
                        [b]Error!!![/b]
                        5 pics hav already been uploaded...
                        ";
                        echo "
                        ";
                        echo "<a href=\"index.php?action=pics&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a>
                        ";
                        if($script2=="wml"){
                        echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }else{
                        echo "[b]0 [/b]<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }
                        echo "</p>";
                        if($script=="wml"){
                        echo "</card>";
                        }else{
                        echo "</body>";
                        }
                        exit();}
                        move_uploaded_file ($file_tmp, "$path_big/$pic");
                        
                        ImageJpeg ($resized_img,"$path_thumbs/$pic",60);
                        ImageDestroy ($resized_img);
                        ImageDestroy ($new_img);
                        echo "
                        <img src=\"$pic\" alt=\"$pic\"/>
                        ";
                        echo "<img src=\"../images/ok.gif\" alt=\":o)\"/>$filename sucessfully uploaded!
                        ";
                        echo "
                        ";
                        echo "<a href=\"index.php?action=pics&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a>
                        ";
                        if($script2=="wml"){
                        echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }else{
                        echo "[b]0 [/b]<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }
                        echo "</p>";
                        if($script=="wml"){
                        echo "</card>";
                        }else{
                        echo "</body>";
                        }
                        exit();
                        }
                        else
                        {
                        echo "<img src=\"../images/notok.gif\" alt=\"(error)\"/>Unknown error! Pls try again...
                        ";
                        echo "
                        ";
                        echo "<a href=\"index.php?action=pics&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a>
                        ";
                        if($script2=="wml"){
                        echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }else{
                        echo "[b]0 [/b]<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }
                        echo "</p>";
                        if($script=="wml"){
                        echo "</card>";
                        }else{
                        echo "</body>";
                        }
                        exit();
                        }
                        }
                        echo "
                        ";
                        echo "<a href=\"index.php?action=pics&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a>
                        ";
                        if($script2=="wml"){
                        echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }else{
                        echo "[b]0 [/b]<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        }
                        echo "</p>";
                        if($script=="wml"){
                        echo "</card>";
                        }else{
                        echo "</body>";
                        }
                        }
                        /////////////////////////////Error/////////////////////////////
                        
                        else
                        {
                        if($script=="wml"){
                        echo "<card id=\"main\" title=\"Error!!!\">";
                        }else{
                        echo "<head>";
                        echo "<title>Error!!!</title>";
                        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
                        echo "</head>";
                        echo "<body>";
                        }
                        echo "<p align=\"center\">";
                        echo "You are not logged in
                        ";
                        echo "Or Your session has been expired
                        
                        ";
                        if($script=="wml"){
                        echo "<a href=\"../wap/index.php\">Login</a>";
                        }else{
                        echo "<a href=\"../web/index.php\">Login</a>";
                        }
                        echo "</p>";
                        if($script=="wml"){
                        echo "</card>";
                        echo "</wml>";
                        }else{
                        echo "</body>";
                        echo "</html>";
                        }
                        exit();
                        }
                        
                        if($script=="wml"){
                        echo "</wml>";
                        }else{
                        echo "</html>";
                        }
                        ?>
                        if like my post click:

                        http://coding-talk.com/images/totall...ost_thanks.gif

                        Comment


                          #13
                          hey.. this gallery that u use.. does`nt require any sql tables... so.. u cannot do a profile gallery....

                          Comment


                            #14
                            he was alredi told that, whats wrong with the way yu put ya pics on the profile at the min? just put the link it from ya gallery to show on the profile page, the user can just put there filename and extension thats all so yu would alredi have inserted http://yoursite.com
                            Want something coded email me at sales@webnwaphost.com for a prices.




                            Comment


                              #15
                              any1 have a good usergallery with upload comments and rate 4 wapdesire???I have try more script but not works any1
                              if like my post click:

                              http://coding-talk.com/images/totall...ost_thanks.gif

                              Comment

                              Working...
                              X