Gallery

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

    Gallery

    GALLERY.php

    Code:
    else if($action=="gallery")
    {
      addonline(getuid_sid($sid),"Adding Photo","");
      
      echo "<head>";
         echo "<title>user gallery</title>";
         echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"/themes/$theme[0]\">";
         echo "</head>";
         echo "<body>";
         
      
      echo "<p align=\"center\">";
    echo "If you have a url to ur photo u may add it to the gallery below
    Please note that only .jpeg/.jpg files will showed in gallery.
    All other file formats will be removed by staff!
    
    ";
    echo "<form action=\"genproc.php?action=addgal&amp;sid=$sid\" method=\"post\">";  
    
    echo "[size="1"]Image URL:[/size] <input name=\"itemurl\" maxlength=\"100\" value=\"http://\"/>
    ";
    echo "<anchor>Add Photo";
    echo "<go href=\"genproc.php?action=addgal&amp;sid=$sid\" method=\"post\">";
    echo "<postfield name=\"itemurl\" value=\"$(itemurl)\"/>";
    
    
    echo "<input type=\"file\" size=\"20\" name=\"file\" value=\"\" />
    ";
    echo "
    <input type=\"submit\" value=\"Add Photo\"/>";
    echo "</form>"; 
    
    
    //  set_time_limit(0);
      
    
      echo "
    
    ";
    echo "<a href=\"gallery.php?action=main&amp;sid=$sid\">User Gallery</a>
    ";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"/images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
      echo "</p>";
      echo "</body>";
    GENPROC.php

    Code:
    else if($action=="addgal")
    {
        
      $itemurl = $_POST["itemurl"];
      $description = $_POST["description"];
       $uid = getuid_sid($sid);
      $nopl = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
      if($nopl[0]==&#39;M&#39;)
      {
        $usex = "M";
      }else if($nopl[0]==&#39;F&#39;){
        $usex = "F";
      }else{
        $usex = "M";
      }
           
            echo "<head>";
      echo "<title>AddGal</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
     
          echo "<p align=\"center\">";
          
          
          $res = mysql_query("INSERT INTO ibwf_gallery SET uid=&#39;".$uid."&#39;, itemurl=&#39;".$itemurl."&#39;, sex=&#39;".$usex."&#39;, description=&#39;".$description."&#39;");
          
          $res = mysql_query("INSERT INTO ibwf_gallery SET uid=&#39;".$uid."&#39;, file=&#39;".$file."&#39;, sex=&#39;".$usex."&#39;");
          if($res)
          {
            echo "<img src=\"../images/ok.gif\" alt=\"O\"/>User Photo Added
    ";
          }else{
            echo "<img src=\"../images/ok.gif\" alt=\"X\"/>User Photo Added
    ";
          }
          
          echo "<a href=\"gallery.php?action=main&amp;sid=$sid\">User Gallery</a>
    ";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
      echo "</p>";
      echo "</body>";
    }
    please need help when i try to upload pictures via pc it just give error

    #2
    <div class='quotetop'>QUOTE (Numb @ Jan 4 2009, 10:07 PM) <{POST_SNAPBACK}></div>
    GALLERY.php

    Code:
    else if($action=="gallery")
    {
      addonline(getuid_sid($sid),"Adding Photo","");
      
      echo "<head>";
         echo "<title>user gallery</title>";
         echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"/themes/$theme[0]\">";
         echo "</head>";
         echo "<body>";
         
      
      echo "<p align=\"center\">";
    echo "If you have a url to ur photo u may add it to the gallery below
    Please note that only .jpeg/.jpg files will showed in gallery.
    All other file formats will be removed by staff!
    
    ";
    echo "<form action=\"genproc.php?action=addgal&amp;sid=$sid\" method=\"post\">";  
    
    echo "[size="1"]Image URL:[/size] <input name=\"itemurl\" maxlength=\"100\" value=\"http://\"/>
    ";
    echo "<anchor>Add Photo";
    echo "<go href=\"genproc.php?action=addgal&amp;sid=$sid\" method=\"post\">";
    echo "<postfield name=\"itemurl\" value=\"$(itemurl)\"/>";
    
    
    echo "<input type=\"file\" size=\"20\" name=\"file\" value=\"\" />
    ";
    echo "
    <input type=\"submit\" value=\"Add Photo\"/>";
    echo "</form>"; 
    
    
    //  set_time_limit(0);
      
    
      echo "
    
    ";
    echo "<a href=\"gallery.php?action=main&amp;sid=$sid\">User Gallery</a>
    ";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"/images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
      echo "</p>";
      echo "</body>";
    GENPROC.php

    Code:
    else if($action=="addgal")
    {
        
      $itemurl = $_POST["itemurl"];
      $description = $_POST["description"];
       $uid = getuid_sid($sid);
      $nopl = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
      if($nopl[0]==&#39;M&#39;)
      {
        $usex = "M";
      }else if($nopl[0]==&#39;F&#39;){
        $usex = "F";
      }else{
        $usex = "M";
      }
           
            echo "<head>";
      echo "<title>AddGal</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
     
          echo "<p align=\"center\">";
          
          
          $res = mysql_query("INSERT INTO ibwf_gallery SET uid=&#39;".$uid."&#39;, itemurl=&#39;".$itemurl."&#39;, sex=&#39;".$usex."&#39;, description=&#39;".$description."&#39;");
          
          $res = mysql_query("INSERT INTO ibwf_gallery SET uid=&#39;".$uid."&#39;, file=&#39;".$file."&#39;, sex=&#39;".$usex."&#39;");
          if($res)
          {
            echo "<img src=\"../images/ok.gif\" alt=\"O\"/>User Photo Added
    ";
          }else{
            echo "<img src=\"../images/ok.gif\" alt=\"X\"/>User Photo Added
    ";
          }
          
          echo "<a href=\"gallery.php?action=main&amp;sid=$sid\">User Gallery</a>
    ";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
      echo "</p>";
      echo "</body>";
    }
    please need help when i try to upload pictures via pc it just give error[/b]
    You have to mention error type.

    Comment


      #3
      when i try to upload it dont upload pic to site dnt know if something are wrong ive cmoded my gallery folder to 777

      Comment


        #4
        <div class='quotetop'>QUOTE (Numb @ Jan 6 2009, 08:43 AM) <{POST_SNAPBACK}></div>
        when i try to upload it dont upload pic to site dnt know if something are wrong ive cmoded my gallery folder to 777[/b]
        there is no code to upload a file in it

        Comment


          #5
          can u help me code a file uploader for gallery that work corectly please

          Comment

          Working...
          X