profile gallery

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

    profile gallery

    hi all can some one help me sort this out so it shows the image please i got it working ok just need it so the image will show
    Code:
    //////////////////////////////////Gallery :)
    if($action=="gallery"){
    $nick=getnick_uid($who);
    $who = $_GET["who"];
    $user = getnick_uid($who);
    addonline(getuid_sid($sid),"Viewing $nick Gallery","");
    echo "<head>";
          echo "<title>viewing $nick gallery</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
          echo "<body>";
        echo "<p align=\"center\">";
    //////ALL LISTS SCRIPT <<
    
    if($page=="" || $page<=0)$page=1;
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_gallery where uid='".$uid."'"));
    $num_items = $noi[0]; //changable
    $items_per_page= 3;$num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;$limit_start = ($page-1)*$items_per_page;
    
    //changable sql
    $sql = "SELECT id, coment, imgsrc FROM ibwf_gallery WHERE uid = $who ORDER BY id DESC LIMIT $limit_start, $items_per_page";
      echo "<body>";
        
    echo "<p><b>$user's Personal Gallery</b></p>";
    echo "<p>";
    $items = mysql_query($sql);echo mysql_error();
    if(mysql_num_rows($items)>0){while ($item = mysql_fetch_array($items)){if(isowner(getuid_sid($sid))){
    $delpic = "<a href=\"progallery.php?action=delpic&amp;who=$who&amp;sid=$sid&amp;smid=$item[0]\"><img src=\"phpThumb.php?src=images/notok.gif\" alt=\"[x]\"/></a>";
    }else{$delpic = "";}
    echo "<img src=\"phpThumb.php?src=$item[2]\" width=\"100\" height=\"100\" alt=\"$item[1]\"/><br/>$item[1] $delpic<br/>";}
    }else{
    	echo "No Images Uploaded<br/>"; 
    }echo "</p>";
    
    echo "<p>";
    if($page>1){$ppage = $page-1;
    echo "<a href=\"progallery.php?action=gallery&amp;page=$ppage&amp;sid=$sid&amp;who=$uid\">&#171;Prev</a> ";}
    if($page<$num_pages){$npage = $page+1;
    echo "<a href=\"progallery.php?action=gallery&amp;page=$npage&amp;sid=$sid&amp;who=$uid\">Next&#187;</a>";}
    if($num_pages==0){
    }else{
    echo "<br/>$page/$num_pages<br/>";
    }
    echo "</p>";
    
    ////// UNTILL HERE >>
    echo "<p>";
    if($uid=="$who"){echo "<a href=\"progallery.php?action=addpic&amp;who=$who&amp;sid=$sid\">Add pic</a><br/>"; }
    echo "<a accesskey=\"8\" href=\"index.php?action=viewuser&amp;who=$who&amp;sid=$sid\">$user's Profile</a><br/>";
    echo "<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"phpThumb.php?src=images/home.gif\" alt=\"\"/>Main Menu</a></p>";
      
    echo "</html>";
    exit();
    }
    
    //////////////////////////////////////ADD SMILIES////////////////////////////////////
    else if($action=="addpic"){
    $who = $_GET["who"];
     echo "<head>";
          echo "<title>adding gallery pic</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
          echo "<body>";
        echo "<p align=\"center\">"; 
     echo "<p>";
     echo "You Can Add your Current gallery images to this gallery by getting the filename from the gallery , the filename is between the first - and the second - - eg<br/>";
     echo "-<b>headphonesdeliver.gif</b>-angelic_demise- the bold part (headphonesdeliver.gif) is the filename. <br/> once you have this simply enter the Pic URL as /gallery/filename</p>";
    echo "<form action=\"progallery.php?action=addpi&amp;who=$who&amp;sid=$sid\" method=\"post\">";
    echo "<p>";
    echo "Comment: <input name=\"coment\" maxlength=\"30\"/><br/>";
    echo "Image URL: <input name=\"itemurl\" type=\"text\" value=\"http://\"/><br/>";
    echo "<br/><input type=\"submit\" value=\"Add Photo\"/>";
    echo "</form>";
    
    echo "<p><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"phpThumb.php?src=images/home.gif\" alt=\"\"/>Main Menu</a></p>";
    
    echo "</html>";
    
    exit();}
    
    /////////////////////////////////////ADD SMILIES//////////////////////////////////
    else if($action=="addpi"){
    $coment = $_POST["coment"];
    $imgsrc = $_POST["imgsrc"];
    $who = $_GET["who"];
     echo "<head>";
          echo "<title>adding gallery pic</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
          echo "<body>";
        echo "<p align=\"center\">";
    echo "<p>";
    $scode="pergal";
    $res = mysql_query("INSERT INTO ibwf_gallery SET scode='".$scode."', coment='".$coment."', imgsrc='".$imgsrc."', uid='".$who."'");
    if($res){
    echo "<img src=\"phpThumb.php?src=images/ok.gif\" alt=\"O\"/>Gallery Pic  Added Successfully";}else{
    echo "<img src=\"phpThumb.php?src=images/notok.gif\" alt=\"X\"/>Error Adding Gallery Pic <br/>".mysql_error();}
    echo "</p>";
    
    echo "<p>";
    $who = $_GET["who"];
    $user = getnick_uid($who);
    echo "<a accesskey=\"8\" href=\"progallery.php?action=gallery&amp;who=$who&amp;sid=$sid\">Back</a><br/>";
    echo "<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"phpThumb.php?src=images/home.gif\" alt=\"\"/>Main Menu</a></p>";
    
    echo "</html>";
    exit();}
    
    /////////////////////////////////////DELETE SMILIES///////////////////////////////
    else if($action=="delpic"){
    $smid = $_GET["smid"];
      echo "<body>";
    
    echo "<p>";
    echo "<meta http-equiv=Refresh content=1;url=progallery.php?action=gallery&amp;who=$who&amp;sid=$sid>";
    
    $res = mysql_query("DELETE FROM ibwf_gallery WHERE id='".$smid."'");
    $imgsrc = mysql_fetch_array(mysql_query("SELECT imgsrc, FROM ibwf_gallery WHERE id='".$smid."'"));
    if($res){
    echo "<img src=\"phpThumb.php?src=images/ok.gif\" alt=\"O\"/>Gallery Pic Deleted Successfully";}else{
    echo "<img src=\"phpThumb.php?src=images/notok.gif\" alt=\"X\"/>Error Deleting Gallery Pic";}
    echo "</p>";
    
    echo "<p>";
    $who = $_GET["who"];
    $user = getnick_uid($who);
    echo "<a accesskey=\"8\" href=\"progallery.php?action=gallery&amp;who=$who&amp;sid=$sid\">Back</a><br/>";
    echo "<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"phpThumb.php?src=images/home.gif\" alt=\"\"/>Main Menu</a></p>";
     
    echo "</html>";
    exit();}
    ?>
    HELP THEM WHO HELPS YOU



    i only work on wapdesire v_2 coding only

    #2
    ...................oops
    Last edited by something else; 14.07.09, 14:45.

    Comment


      #3
      whats with the oops
      HELP THEM WHO HELPS YOU



      i only work on wapdesire v_2 coding only

      Comment

      Working...
      X