GALLERY.php
GENPROC.php
please need help when i try to upload pictures via pc it just give error
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&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>";
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='".$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>";
}
Comment