Photo Gallery

Started on the old forum in April 2008 · view the original in the archive · old links redirect here

53 replies · 5,550 views · started 18 years ago · 1 min read

TL;DR · summary of 53 replies
  • - The max.php script is not working with the gallery script and needs to be replaced.
  • - Users are facing issues viewing uploaded images on their mobile devices when using a form input type "file".
  • - To resolve the image upload issue for mobile users, a different code snippet was provided by Guest: [code]
  • - The solution involves adding specific PHP configuration settings in php.ini or global scope to allow all types of mobile phones to upload photos.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

13 participants
Guest #41

No Sweetangel 😉 I have my own host wich i pay....not freehost

Guest #43

this is my code:

 echo " <form name=\"form2\" enctype=\"multipart/form-data\" method=\"post\" action=\"upload.php?action=upload&sid=$sid\" />";
            echo "<input type=\"file\" size=\"32\" name=\"my_field\" value=\"\" />";
            echo "<input type=\"hidden\" name=\"action\" value=\"image\" />
";
            echo "<input type=\"submit\" name=\"Submit\" value=\"upload\" />";
            echo "</form>";

With computer everything working fine and corectly but users with mobile cant view upload(like hidden) just back to the gallery and home 😉

Guest #44

whit this code only SE mobile phones can upload photos:

<?php
/*
IrisBlaze wap forum
by Ra'ed Shabana
*/
//>> »
//<< «
include("config.php");
include("core.php");
include("xhtmlfunctions.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html"/>
<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
<title>Modus foto upload</title></head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080">
<?php

$action = $_GET["action"];
$sid = $_GET["sid"];
$whoimage = $_GET["whoimage"];
$bcon = connectdb();
    if(islogged($sid)==false)
    {
      $pstyle = gettheme($sid);
      echo xhtmlhead("ModuS",$pstyle);
      echo "<p align=\"center\">";
      echo "Niste Ulogovani
";
      echo "ili vam je isteklo login vreme!

";
      echo "<a href=\"index.php\">Udji Ponovo;)</a>";
      echo "</p>";
      exit();
    }
$uid = getuid_sid($sid);
if(isbanned($uid))
    {
      $pstyle = gettheme($sid);
      echo xhtmlhead("ModuS",$pstyle);
      echo "<p align=\"center\">";
      echo "<img src=\"images/notok.gif\" alt=\"x\"/>
";
      echo "Vi ste [b]Banovani ! ! ![/b]
";
      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE uid='".$uid."' AND penalty='1'"));
      $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));

      $remain = $banto[0]- (time() - $timeadjust);
      $rmsg = gettimemsg($remain);
      echo "Vreme Do isteka Ban Kazne je : $rmsg

";
      echo "Razlog Bana je : $banres[0]";
      //echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
      exit();
    }

if($action=="upload")
{
   addonline(getuid_sid($sid),"Upload-uje Sliku","");
   $rate = $_POST["rate"];
   $comment = $_POST["comment"];
  set_time_limit(0);
   echo "

[size="1"]";

           echo "<form method=\"post\" enctype=\"multipart/form-data\" action=\"upload.php?action=upload&sid=$sid\" />";
 ?>
[b]Izaberite sliku:[/b]

<input align="center" type="file" name="superdat">
<input align="center" type="hidden" name="action" value="image"/>
<INPUT align="center" TYPE=SUBMIT NAME="submit" VALUE="Upload">

[/size]
</FORM>
<?php

    echo "</small></p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
   echo "

<a href=\"gallery.php?action=main&sid=$sid\">«Nazad u Galeriju</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "ModuS</a>";
  echo "</p>";
}else

{
  addonline(getuid_sid($sid),"Izgubljen u Galeriji !","");
  $pstyle = gettheme($sid);
  echo xhtmlhead("Gallery",$pstyle);
  echo "<p align=\"center\">";
  echo "Ovde nema nichega,proverite adresu koju ste uneli;)

";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "ModuS</a>";
  echo "</p>";
}

?>
</body>
</html>

with this anyone mobile phones can`t upload photos:

<?php
/*
IrisBlaze wap forum
by Ra'ed Shabana
*/
//>> »
//<< «
include("config.php");
include("core.php");
include("xhtmlfunctions.php");
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
?>

<?php

if($action=="upload")
{
   addonline(getuid_sid($sid),"Uploading a Photo","");
   $rate = $_POST["rate"];
   $comment = $_POST["comment"];
   $pstyle = gettheme($sid);
  echo xhtmlhead("Uploading",$pstyle);
  set_time_limit(0);
   echo "

[size="1"]";
   
 
            echo "
Izaberi sliku:
";
            echo " <form name=\"form2\" enctype=\"multipart/form-data\" method=\"post\" action=\"upload.php?action=upload&sid=$sid\" />";
            echo "<input type=\"file\" size=\"32\" name=\"my_field\" value=\"\" />";
            echo "<input type=\"hidden\" name=\"action\" value=\"image\" />
";
            echo "<input type=\"submit\" name=\"Submit\" value=\"upload\" />";
            echo "</form>";
   
    echo "[/size]</p>"; 
  ////// UNTILL HERE >> 
    echo "<p align=\"center\">";
   echo "

<a href=\"usergallery.php?action=main&sid=$sid\">«Back to Gallery</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
  echo xhtmlfoot();
}

?>

Where is the problem?how to set that all type of mobile phones can upload photos?

Guest #45

whit this code only SE mobile phones can upload photos:

<?php
/*
IrisBlaze wap forum
by Ra'ed Shabana
*/
//>> »
//<< «
include("config.php");
include("core.php");
include("xhtmlfunctions.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html"/>
<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
<title>Modus foto upload</title></head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080">
<?php

$action = $_GET["action"];
$sid = $_GET["sid"];
$whoimage = $_GET["whoimage"];
$bcon = connectdb();
    if(islogged($sid)==false)
    {
      $pstyle = gettheme($sid);
      echo xhtmlhead("ModuS",$pstyle);
      echo "<p align=\"center\">";
      echo "Niste Ulogovani
";
      echo "ili vam je isteklo login vreme!

";
      echo "<a href=\"index.php\">Udji Ponovo;)</a>";
      echo "</p>";
      exit();
    }
$uid = getuid_sid($sid);
if(isbanned($uid))
    {
      $pstyle = gettheme($sid);
      echo xhtmlhead("ModuS",$pstyle);
      echo "<p align=\"center\">";
      echo "<img src=\"images/notok.gif\" alt=\"x\"/>
";
      echo "Vi ste Banovani ! ! !
";
      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE uid='".$uid."' AND penalty='1'"));
      $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));

      $remain = $banto[0]- (time() - $timeadjust);
      $rmsg = gettimemsg($remain);
      echo "Vreme Do isteka Ban Kazne je : $rmsg

";
      echo "Razlog Bana je : $banres[0]";
      //echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
      exit();
    }
if($action=="upload")
{
   addonline(getuid_sid($sid),"Upload-uje Sliku","");
   $rate = $_POST["rate"];
   $comment = $_POST["comment"];
  set_time_limit(0);
   echo "

";

           echo "<form method=\"post\" enctype=\"multipart/form-data\" action=\"upload.php?action=upload&sid=$sid\" />";
 ?>
Izaberite sliku:

<input align="center" type="file" name="superdat">
<input align="center" type="hidden" name="action" value="image"/>
<INPUT align="center" TYPE=SUBMIT NAME="submit" VALUE="Upload">


</FORM>
<?php

    echo "</small></p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
   echo "

<a href=\"gallery.php?action=main&sid=$sid\">«Nazad u Galeriju</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "ModuS</a>";
  echo "</p>";
}else

{
  addonline(getuid_sid($sid),"Izgubljen u Galeriji !","");
  $pstyle = gettheme($sid);
  echo xhtmlhead("Gallery",$pstyle);
  echo "<p align=\"center\">";
  echo "Ovde nema nichega,proverite adresu koju ste uneli;)

";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "ModuS</a>";
  echo "</p>";
}

?>
</body>
</html>

with this anyone mobile phones can`t upload photos:

<?php
/*
IrisBlaze wap forum
by Ra'ed Shabana
*/
//>> »
//<< «
include("config.php");
include("core.php");
include("xhtmlfunctions.php");
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
?>

<?php

if($action=="upload")
{
   addonline(getuid_sid($sid),"Uploading a Photo","");
   $rate = $_POST["rate"];
   $comment = $_POST["comment"];
   $pstyle = gettheme($sid);
  echo xhtmlhead("Uploading",$pstyle);
  set_time_limit(0);
   echo "

";
   
 
            echo "
Izaberi sliku:
";
            echo " <form name=\"form2\" enctype=\"multipart/form-data\" method=\"post\" action=\"upload.php?action=upload&sid=$sid\" />";
            echo "<input type=\"file\" size=\"32\" name=\"my_field\" value=\"\" />";
            echo "<input type=\"hidden\" name=\"action\" value=\"image\" />
";
            echo "<input type=\"submit\" name=\"Submit\" value=\"upload\" />";
            echo "</form>";
   
    echo "</p>"; 
  ////// UNTILL HERE >> 
    echo "<p align=\"center\">";
   echo "

<a href=\"usergallery.php?action=main&sid=$sid\">«Back to Gallery</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
  echo xhtmlfoot();
}

?>

Where is the problem?how to set that all type of mobile phones can upload photos?

try to put php.ini code or glabal on lol

Blythe Newbie · 4 posts #47

I COULDNT GET IT DOWNLOWDED!!! 😢

mr_lash Junior · 21 posts #48

😢 same problem here! i did the changes in max.php but still cant see the image! also if i click comments! sends me to user gallery just need help to see the pics.... 🙂

muzza345 Junior · 41 posts #50

did anyone fine out how to show the pics

Mysterio Lead · 630 posts #51

i will check for the errors, thanks for posting

mysterio.al - programming is a functional art

muzza345 Junior · 41 posts #52

The only problem with it is its not showing the pic after uploaded.

kei_ki7 Senior · 431 posts #53

..where is the updated of this ?? is it working ??

Did I help you? You can help me too Your donations will help me finance my studies.

Mysterio Lead · 630 posts #54

you have to change the code where is written <img src="... it works ok for me

mysterio.al - programming is a functional art

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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