Gallery

Started on the old forum in January 2009 · view the original in the archive · old links redirect here

4 replies · 443 views · started 17 years ago · 1 min read

2 participants
Rider Developer · 128 posts #1

GALLERY.php

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

GENPROC.php

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='".$uid."'"));
  if($nopl[0]=='M')
  {
    $usex = "M";
  }else if($nopl[0]=='F'){
    $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='".$uid."', itemurl='".$itemurl."', sex='".$usex."', description='".$description."'");
      
      $res = mysql_query("INSERT INTO ibwf_gallery SET uid='".$uid."', file='".$file."', sex='".$usex."'");
      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&sid=$sid\">User Gallery</a>
";
  echo "<a href=\"index.php?action=main&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

rukiya Lead · 569 posts #2

QUOTE (Numb @ Jan 4 2009, 10:07 PM) <{POST_SNAPBACK}>

GALLERY.php

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&sid=$sid\" method=\"post\">";  

echo "Image URL: <input name=\"itemurl\" maxlength=\"100\" value=\"http://\"/>
";
echo "<anchor>Add Photo";
echo "<go href=\"genproc.php?action=addgal&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&sid=$sid\">User Gallery</a>
";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"/images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
  echo "</body>";

GENPROC.php

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='".$uid."'"));
  if($nopl[0]=='M')
  {
    $usex = "M";
  }else if($nopl[0]=='F'){
    $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='".$uid."', itemurl='".$itemurl."', sex='".$usex."', description='".$description."'");
      
      $res = mysql_query("INSERT INTO ibwf_gallery SET uid='".$uid."', file='".$file."', sex='".$usex."'");
      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&sid=$sid\">User Gallery</a>
";
  echo "<a href=\"index.php?action=main&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

You have to mention error type.

Rider Developer · 128 posts #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

Rider Developer · 128 posts #5

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

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