Gallery For Lava Script Wml And Xhtml

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

23 replies · 2,533 views · started 19 years ago · 3 min read

TL;DR · summary of 23 replies
  • alesh needs to create a new config.php file for the gallery script.
  • The warning messages suggest that there might be an issue with the MySQL result resource not being valid, which could be due to incorrect database connection settings or permissions.
  • It is unclear why the gallery still shows warnings about headers already sent when using either WML or XHTML links.

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

3 participants
linkrx7 #1

this is my gallery script it has uploader tha resizes all pics to aspect of 150 pixels u can change the aspect easily it also renames the pics to persons username with a prefix of (1) to (5) also has del option so users can del only there pic and headadmin and owner can also delete all pics but u will need those levels if not del that section or it wont work

the link 4 this gallery to add will be for wml:

echo "<a href="../pics/index.php?action=gallery&sid=$sid&script=wml">Gallery</a> ";

and xhtml link is

echo "<a href="../pics/index.php?action=gallery&sid=$sid&script=xhtml">Gallery</a> ";

<?php include("../wap/config.php"); include("../wap/core.php"); connectdb(); $brw = $HTTP_USER_AGENT; $brws = explode("/",$HTTP_USER_AGENT); $ubr = $brws[0]; $uip = getip(); $action = $_GET["action"]; $sid = $_GET["sid"]; $page = $_GET["page"]; $who = $_GET["who"]; $uid = getuid_sid($sid); $nick = getnick_uid($uid); $upload = $_GET["upload"]; $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'")); $bcon = connectdb(); $script = $_GET["script"]; if($script=="wml"){ header("Content-type: text/vnd.wap.wml"); header("Cache-Control: no-store, no-cache, must-revalidate"); echo '<?xml version="1.0"?' . '>'; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; }else{ header("Content-type: text/html; charset=ISO-8859-1"); header("Cache-Control: no-cache, must-revalidate, max-age=0"); header("Pragma: no-cache"); echo '<?xml version="1.0"?' . '>'; echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">"; } if($script=="wml"){ echo "<wml>"; }else{ echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">"; } /////////////////////////////Database Error///////////////////////////// if (!$bcon) { if($script=="wml"){ echo "<card id=\"main\" title=\"Error!!!\">"; }else{ echo "<head>"; echo "<title>Error!!!</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white.css\">"; echo "</head>"; echo "<body>"; } echo " "; echo "<img src=\"images/exit.gif\" alt=\"*\"/> "; echo "**Error!!! Cannot Connect To Database...** "; echo "This error happens usually when backing up the database, please be patient, The site will be up any minute "; echo "**THANK YOU VERY MUCH**"; echo " "; if($script=="wml"){ echo "</card>"; echo "</wml>"; }else{ echo "</body>"; echo "</html>"; } exit(); } cleardata(); /////////////////////////////Ip Banned///////////////////////////// if(isipbanned($uip,$ubr)) { if(!isshield(getuid_sid($sid))) { echo "<head>"; echo "<title>Ip Block!</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; echo " "; echo "<img src=\"images/notok.gif\" alt=\"x\"/> "; echo "**This IP address is blocked!!!** "; echo " "; echo "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over "; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 ")); //echo mysql_error(); $remain = $banto[0] - time(); $rmsg = gettimemsg($remain); echo " IP: $rmsg "; echo " "; echo " "; echo "<form action=\"../web/login.php\" method=\"get\">"; echo "**UserID:** <input name=\"loguid\" format=\"*x\" maxlength=\"30\"/> "; echo "**Password:** <input type=\"password\" name=\"logpwd\" maxlength=\"30\"/> "; echo " <input name=\"LOGIN\" type=\"submit\" value=\"Submit\"></form>"; echo "<img src=\"../images/banner.gif\" alt=\"\"/> "; echo " Not registered yet? <a href=\"../web/register.php\">SignUp</a> "; echo "<a href=\"../web/index.php?action=terms&amp;sid=$sid\">Site Rules</a> "; echo " "; echo "</body>"; echo "</html>"; exit(); } } /////////////////////////////Session Expired///////////////////////////// if(($action != "") && ($action!="terms")) { $uid = getuid_sid($sid); if((islogged($sid)==false)||($uid==0)) { if($script=="wml"){ echo "<card id=\"main\" title=\"Error!!!\">"; }else{ echo "<head>"; echo "<title>Error!!!</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/whte.css\">"; echo "</head>"; echo "<body>"; } echo " "; echo "You are not logged in "; echo "Or Your session has been expired "; if($script=="wml"){ echo "<a href=\"../wap/index.php\">Login</a>"; }else{ echo "<a href=\"../web/index.php\">Login</a>"; } echo " "; if($script=="wml"){ echo "</card>"; echo "</wml>"; }else{ echo "</body>"; echo "</html>"; } exit(); } } /////////////////////////////Banned///////////////////////////// if(isbanned($uid)) { if($script=="wml"){ echo "<card id=\"main\" title=\"Error!!!\">"; }else{ echo "<head>"; echo "<title>Error!!!</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "<head>"; echo "<body>"; } echo " "; echo "<img src=\"images/notok.gif\" alt=\"x\"/> "; echo "**You are Banned** "; $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'")); $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "**Time Left:**$rmsg "; $nick = getnick_uid($banto[2]); echo "**By:**$nick "; echo "**Reason:**$banto[1]"; //echo "<a href=\"../web/index.php\">Login</a>"; echo " "; if($script=="wml"){ echo "</card>"; echo "</wml>"; }else{ echo "</body>"; echo "</html>"; } exit(); } /////////////////////////////Gallery///////////////////////////// else if($action=="gallery") { addonline(getuid_sid($sid),"Viewing Gallery",""); if($script=="wml"){ echo "<card id=\"main\" title=\"Gallery Pics\">"; echo " "; echo "<img src=\"../images/logo.gif\" alt=\"\"/> "; echo "***Gallery Pics*** "; }else{ echo "<head>"; echo "<title>Gallery Pics</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; echo ""; echo "<img src=\"../images/logo.gif\" alt=\"\"/> "; echo "***Gallery Pics***"; } echo "<img src=\"../images/point.gif\" alt=\"!\"/>If ur browser cannot use the uploader email ur pics to **afta_drk@hotmail.com** dnt 4get 2 include ur username"; echo " <img src=\"../images/banner.gif\" alt=\"\"/> "; if(!($dp = opendir("./"))) die ("Cannot open ./"); $file_array = array(); while ($file = readdir ($dp)) { if(substr($file,0,1) != '.' and $file != "index.php") { $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); echo "<a href=\"index.php?action=pics&amp;sid=$sid&amp;script=$script\">Gallery Pics</a>($file_count) "; echo "<img src=\"../images/banner.gif\" alt=\"\"/> "; echo " "; if($script=="wml"){ echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; echo " "; echo "</card>"; }else{ echo "**0**<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; echo ""; echo "</body>"; } } /////////////////////////////pics///////////////////////////// else if($action=="pics") { addonline(getuid_sid($sid),"Viewing Gallery",""); if($script=="wml"){ echo "<card id=\"main\" title=\"Gallery Pics\">"; echo " "; }else{ echo "<head>"; echo "<title>Gallery Pics</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; echo ""; } $items_per_page = "5"; if (!isset($page)) {$page = 0;} $total = 0; if(!($dp = opendir("./"))) die ("Cannot open ./"); $file_array = array(); while ($file = readdir ($dp)) { if(substr($file,0,1) != '.' and $file != "index.php") { $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); echo "<img src=\"../images/male.gif\" alt=\"\"/><img src=\"../images/female.gif\" alt=\"\"/> ***Gallery Pics*** "; if ($file_count > 0) { $first_record = $page * $items_per_page; $last_record = $first_record + $items_per_page; while (list($fileIndexValue, $file_name) = each ($file_array)) { if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record)) { $userpic2=explode("(", $file_name); $userpic=explode(".", $file_name); $sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE name='$userpic2[0]'")); if($sex[0]=="M"){$usersex = "<img src=\"../images/male.gif\" alt=\"M\"/>";} if($sex[0]=="F"){$usersex = "<img src=\"../images/female.gif\" alt=\"F\"/>";} if((getnick_uid($uid)==$userpic2[0])||(isowner(getuid_sid($sid)))||(isheadadmin(getuid_sid($sid)))) { $delpic=" <a href=\"index.php?action=pics&amp;page=$page&amp;sid=$sid&amp;script=$script&amp;delete=$file_name\"><img src=\"../images/notok.gif\" alt=\"[x]\"/></a> "; } echo "<img src=\"$file_name\" alt=\"$userpic[0]\"/> $usersex<a href=\"$file_name\">$userpic[0]</a> ". round(filesize($file_name)/1024,1) . "kb$delpic "; $delete = $_GET["delete"]; if($delete=="$file_name"){ if((getnick_uid($uid)==$userpic2[0])||(isowner(getuid_sid($sid)))||(isheadadmin(getuid_sid($sid)))) { unlink("./$file_name"); echo " $file_name deleted successfully "; if($script=="wml"){ echo "<card id=\"refresh\" title=\"refresh\" ontimer=\"index.php?action=pics&amp;page=$page&amp;sid=$sid&amp;script=$script\">"; echo "<timer value=\"1\"/>pls wait while browser redirects</card> </card></wml>"; exit; }else{ echo "<meta http-equiv=Refresh content=1;url=index.php?action=pics&amp;page=$page&amp;sid=$sid&amp;script=$script>"; echo " </body></html>"; exit; } } } $total = $total + filesize($file_name); } } echo " "; $pages =(int) ceil($file_count / $items_per_page); $pages = ($pages -1); if (($file_count > 0) AND ($page != 0)) { $prev_page = $page -1; echo "<a href=\"".$_SERVER["PHP_SELF"]."?action=pics&amp;page=$prev_page&amp;sid=$sid&amp;script=$script\"><img src=\"../images/prev.gif\" alt=\"Prev\"/></a> |"; } if (($file_count > 0) AND ($last_record < $file_count)) { $next_page = $page + 1; echo " <a href=\"".$_SERVER["PHP_SELF"]."?action=pics&amp;page=$next_page&amp;sid=$sid&amp;script=$script\"><img src=\"../images/next.gif\" alt=\"Next\"/></a>"; } if ($file_count > 10) { if($script=="wml"){ $rets = " Jump (0-$pages/$page) <input name=\"pg\" format=\"*N\" size=\"2\"/>"; $rets .= "<anchor>goto page"; $rets .= "<go href=\"index.php\" method=\"get\">"; $rets .= "<postfield name=\"action\" value=\"$action\"/>"; $rets .= "<postfield name=\"sid\" value=\"$sid\"/>"; $rets .= "<postfield name=\"script\" value=\"$script\"/>"; $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>"; $rets .= "</go></anchor> "; echo $rets; }else{ $rets = "<form action=\"index.php\" method=\"get\">"; $rets .= "Jump (0-$pages/$page) <input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>"; $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\">"; $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\">"; $rets .= "<input type=\"hidden\" name=\"script\" value=\"$script\">"; $rets .= "<input type=\"Submit\" name=\"Submit\" Value=\"goto page\"></form>"; echo $rets; } echo " "; } echo " Directory: $file_count "; if ($file_count == 1) {echo "file";} else {echo "files";} } echo " "; echo " <a href=\"index.php?action=gallery&amp;sid=$sid&amp;script=$script\">Back</a> "; if(strpos(strtoupper($HTTP_ACCEPT),"VND.WAP.XHTML+XML") > 0|| strpos(strtoupper($HTTP_ACCEPT),"XHTML+XML") > 0||$ubr=="Mozilla") { echo "<a href=\"index.php?action=upload&amp;sid=$sid&amp;script=xhtml&amp;prevscript=$script\">Upload</a> "; } closedir($dp); if($script=="wml"){ echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; echo " "; echo "</card>"; }else{ echo "**0**<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; echo ""; echo "</body>"; } } /////////////////////////////upload////////////////////////////// else if($action=="upload") { $script2 = $_GET["prevscript"]; addonline(getuid_sid($sid),"Uploading Gallery Pic",""); if($script=="wml"){ echo "<card id=\"main\" title=\"Gallery Pics\">"; }else{ echo "<head>"; echo "<title>Gallery Pics</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; } echo " "; echo "***Upload*** "; echo "Image Files "; $size_bytes = 2048000; $kb = $size_bytes / 1024; $mb = $kb / 1024; echo "Max **$mb** Mb "; echo "<img src=\"../images/point.gif\" alt=\"!\"/>If u wish to have ur pic removed inbox owner "; if($script=="wml"){ echo "<img src=\"../images/point.gif\" alt=\"!\"/>Browser not compatible wif xhtml uploader email ur pic to **afta_drk@hotmail.com** wif ur username attached"; }else{ echo "<form method=\"post\" enctype=\"multipart/form-data\" action=\"index.php?action=upload&amp;sid=$sid&amp;upload=add&amp;script=$script&amp;prevscript=$script2\">"; echo "<input type=\"file\" name=\"filetoupload\"> "; echo "<input type=\"Submit\" name=\"uploadform\" value=\"Upload\">"; echo "</form>"; } $upload_dir = "./"; $filename = $_FILES['filetoupload']['name']; $size = $_FILES['filetoupload']['size']; $extlimit = "yes"; $limitedext = array(".jpeg",".jpg",".JPEG",".JPG",".gif",".GIF",".png",".PNG"); $ext = strrchr($_FILES['filetoupload'][name],'.'); $file_type = $_FILES['filetoupload']['type']; $file_name = $_FILES['filetoupload']['name']; $file_size = $_FILES['filetoupload']['size']; $file_tmp = $_FILES['filetoupload']['tmp_name']; $img_thumb_width = 150; // in pixcel $ThumbWidth = $img_thumb_width; if($upload=="add"){ if (!is_uploaded_file($_FILES['filetoupload']['tmp_name'])) { echo "<img src=\"../images/notok.gif\" alt=\"(error)\"/>No file selected! "; echo " "; echo "<a href=\"index.php?action=gallery&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; }else{ echo "**0**<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit(); } if (($extlimit == "yes") && (!in_array($ext,$limitedext))) { echo("<img src=\"../images/notok.gif\" alt=\"(error)\"/>Invalid file type! "); echo " "; echo "<a href=\"index.php?action=gallery&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; }else{ echo "**0**<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit(); } if ($size > $size_bytes) { echo "<img src=\"../images/notok.gif\" alt=\"(error)\"/>Exceeded File size limit! Maximum **$kb** Kb. "; echo " "; echo "<a href=\"index.php?action=gallery&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; }else{ echo "**0**<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit(); } if (file_exists("$upload_dir/$filename")) { echo("<img src=\"../images/notok.gif\" alt=\"(error)\"/>Filename already exists! "); echo " "; echo "<a href=\"index.php?action=gallery&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; }else{ echo "**0**<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit(); } $ext = getext($filename); $picname ="$nick.$ext"; if($file_size) { if($file_type == "image/pjpeg" || $file_type == "image/jpeg") {$new_img = imagecreatefromjpeg($file_tmp);} elseif($file_type == "image/x-png" || $file_type == "image/png") {$new_img = imagecreatefrompng($file_tmp);} elseif($file_type == "image/gif") {$new_img = imagecreatefromgif($file_tmp);} /* list($width, $height) = getimagesize($file_tmp); $imgratio=$width/$height; if ($imgratio>1){ $newwidth = $ThumbWidth; $newheight = $ThumbWidth/$imgratio; }else{ $newheight = $ThumbWidth; $newwidth = $ThumbWidth*$imgratio; } */ $height = 128; $filesize = getimagesize($file_tmp); $aspect_ratio = $filesize[1]/$filesize[0]; if($filesize[1] <= $height) { $newwidth = $filesize[0]; $newheight = $filesize[1]; }else{ $newheight = $height; $newwidth = abs($newheight/$aspect_ratio); } if (function_exists(imagecreatetruecolor)){ $resized_img = imagecreatetruecolor($newwidth,$newheight); }else{ die("Error: Please make sure you have GD library ver 2+"); } imagecopyresized($resized_img, $new_img, 0, 0, 0, 0, $newwidth, $newheight, $filesize[0], $filesize[1]); $path_big = "../pics_original"; $path_thumbs = "./"; if (!file_exists("$upload_dir/$picname")) {$pic ="$nick(1).$ext";} if (file_exists("$upload_dir/$pic")) {$pic ="$nick(2).$ext";} if (file_exists("$upload_dir/$pic")) {$pic ="$nick(3).$ext";} if (file_exists("$upload_dir/$pic")) {$pic ="$nick(4).$ext";} if (file_exists("$upload_dir/$pic")) {$pic ="$nick(5).$ext";} if (file_exists("$upload_dir/$nick(5).$ext")) {echo "<img src=\"../images/notok.gif\" alt=\"(error)\"/> **Error!!!** 5 pics hav already been uploaded... "; echo " "; echo "<a href=\"index.php?action=gallery&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; }else{ echo "**0**<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit();} move_uploaded_file ($file_tmp, "$path_big/$pic"); ImageJpeg ($resized_img,"$path_thumbs/$pic",60); ImageDestroy ($resized_img); ImageDestroy ($new_img); echo " <img src=\"$pic\" alt=\"$pic\"/> "; echo "<img src=\"../images/ok.gif\" alt=\":o)\"/>$filename sucessfully uploaded! "; echo " "; echo "<a href=\"index.php?action=gallery&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; }else{ echo "**0**<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit(); } else { echo "<img src=\"../images/notok.gif\" alt=\"(error)\"/>Unknown error! Pls try again... "; echo " "; echo "<a href=\"index.php?action=gallery&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; }else{ echo "**0**<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit(); } } echo " "; echo "<a href=\"index.php?action=gallery&amp;sid=$sid&amp;script=$script2\">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; }else{ echo "**0**<a accesskey=\"0\" href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } } /////////////////////////////Error///////////////////////////// else { if($script=="wml"){ echo "<card id=\"main\" title=\"Error!!!\">"; }else{ echo "<head>"; echo "<title>Error!!!</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white.css\">"; echo "</head>"; echo "<body>"; } echo " "; echo "You are not logged in "; echo "Or Your session has been expired "; if($script=="wml"){ echo "<a href=\"../wap/index.php\">Login</a>"; }else{ echo "<a href=\"../web/index.php\">Login</a>"; } echo " "; if($script=="wml"){ echo "</card>"; echo "</wml>"; }else{ echo "</body>"; echo "</html>"; } exit(); } if($script=="wml"){ echo "</wml>"; }else{ echo "</html>"; } ?>
Guest #2

this is my gallery script it has uploader tha resizes all pics to aspect of 150 pixels u can change the aspect easily it also renames the pics to persons username with a prefix of (1) to (5) also has del option so users can del only there pic and headadmin and owner can also delete all pics but u will need those levels if not del that section or it wont work

the link 4 this gallery to add will be for wml:

echo "<a href="../pics/index.php?action=gallery&sid=$sid&script=wml">Gallery</a> ";

and xhtml link is

echo "<a href="../pics/index.php?action=gallery&sid=$sid&script=xhtml">Gallery</a> ";

<?php include("../wap/config.php"); include("../wap/core.php"); connectdb(); $brw = $HTTP_USER_AGENT; $brws = explode("/",$HTTP_USER_AGENT); $ubr = $brws[0]; $uip = getip(); $action = $_GET["action"]; $sid = $_GET["sid"]; $page = $_GET["page"]; $who = $_GET["who"]; $uid = getuid_sid($sid); $nick = getnick_uid($uid); $upload = $_GET["upload"]; $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'")); $bcon = connectdb(); $script = $_GET["script"]; if($script=="wml"){ header("Content-type: text/vnd.wap.wml"); header("Cache-Control: no-store, no-cache, must-revalidate"); echo '<?xml version="1.0"?' . '>'; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; }else{ header("Content-type: text/html; charset=ISO-8859-1"); header("Cache-Control: no-cache, must-revalidate, max-age=0"); header("Pragma: no-cache"); echo '<?xml version="1.0"?' . '>'; echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">"; } if($script=="wml"){ echo "<wml>"; }else{ echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">"; } /////////////////////////////Database Error///////////////////////////// if (!$bcon) { if($script=="wml"){ echo "<card id=\"main\" title=\"Error!!!\">"; }else{ echo "<head>"; echo "<title>Error!!!</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white.css\">"; echo "</head>"; echo "<body>"; } echo " "; echo "<img src=\"images/exit.gif\" alt=\"*\"/> "; echo "**Error!!! Cannot Connect To Database...** "; echo "This error happens usually when backing up the database, please be patient, The site will be up any minute "; echo "**THANK YOU VERY MUCH**"; echo " "; if($script=="wml"){ echo "</card>"; echo "</wml>"; }else{ echo "</body>"; echo "</html>"; } exit(); } cleardata(); /////////////////////////////Ip Banned///////////////////////////// if(isipbanned($uip,$ubr)) { if(!isshield(getuid_sid($sid))) { echo "<head>"; echo "<title>Ip Block!</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; echo " "; echo "<img src=\"images/notok.gif\" alt=\"x\"/> "; echo "**This IP address is blocked!!!** "; echo " "; echo "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over "; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 ")); //echo mysql_error(); $remain = $banto[0] - time(); $rmsg = gettimemsg($remain); echo " IP: $rmsg "; echo " "; echo " "; echo "<form action=\"../web/login.php\" method=\"get\">"; echo "**UserID:** <input name=\"loguid\" format=\"*x\" maxlength=\"30\"/> "; echo "**Password:** <input type=\"password\" name=\"logpwd\" maxlength=\"30\"/> "; echo " <input name=\"LOGIN\" type=\"submit\" value=\"Submit\"></form>"; echo "<img src=\"../images/banner.gif\" alt=\"\"/> "; echo " Not registered yet? <a href=\"../web/register.php\">SignUp</a> "; echo "<a href=\"../web/index.php?action=terms&amp;sid=$sid\">Site Rules</a> "; echo " "; echo "</body>"; echo "</html>"; exit(); } } /////////////////////////////Session Expired///////////////////////////// if(($action != "") && ($action!="terms")) { $uid = getuid_sid($sid); if((islogged($sid)==false)||($uid==0)) { if($script=="wml"){ echo "<card id=\"main\" title=\"Error!!!\">"; }else{ echo "<head>"; echo "<title>Error!!!</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/whte.css\">"; echo "</head>"; echo "<body>"; } echo " "; echo "You are not logged in "; echo "Or Your session has been expired "; if($script=="wml"){ echo "<a href=\"../wap/index.php\">Login</a>"; }else{ echo "<a href=\"../web/index.php\">Login</a>"; } echo " "; if($script=="wml"){ echo "</card>"; echo "</wml>"; }else{ echo "</body>"; echo "</html>"; } exit(); } } /////////////////////////////Banned///////////////////////////// if(isbanned($uid)) { if($script=="wml"){ echo "<card id=\"main\" title=\"Error!!!\">"; }else{ echo "<head>"; echo "<title>Error!!!</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "<head>"; echo "<body>"; } echo " "; echo "<img src=\"images/notok.gif\" alt=\"x\"/> "; echo "**You are Banned** "; $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'")); $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "**Time Left:**$rmsg "; $nick = getnick_uid($banto[2]); echo "**By:**$nick "; echo "**Reason:**$banto[1]"; //echo "<a href=\"../web/index.php\">Login</a>"; echo " "; if($script=="wml"){ echo "</card>"; echo "</wml>"; }else{ echo "</body>"; echo "</html>"; } exit(); } /////////////////////////////Gallery///////////////////////////// else if($action=="gallery") { addonline(getuid_sid($sid),"Viewing Gallery",""); if($script=="wml"){ echo "<card id=\"main\" title=\"Gallery Pics\">"; echo " "; echo "<img src=\"../images/logo.gif\" alt=\"\"/> "; echo "***Gallery Pics*** "; }else{ echo "<head>"; echo "<title>Gallery Pics</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; echo ""; echo "<img src=\"../images/logo.gif\" alt=\"\"/> "; echo "***Gallery Pics***

"; } echo "<img src="../images/point.gif" alt="!"/>If ur browser cannot use the uploader email ur pics to afta_drk@hotmail.com dnt 4get 2 include ur username"; echo " <img src="../images/banner.gif" alt=""/> "; if(!($dp = opendir("./"))) die ("Cannot open ./"); $file_array = array(); while ($file = readdir ($dp)) { if(substr($file,0,1) != '.' and $file != "index.php") { $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); echo "<a href="index.php?action=pics&sid=$sid&script=$script">Gallery Pics</a>($file_count) ";

echo "<img src="../images/banner.gif" alt=""/> "; echo " "; if($script=="wml"){ echo "<a href="../wap/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo " "; echo "</card>"; }else{ echo "0<a accesskey="0" href="../web/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo ""; echo "</body>"; } } /////////////////////////////pics/////////////////////////////

else if($action=="pics") { addonline(getuid_sid($sid),"Viewing Gallery",""); if($script=="wml"){ echo "<card id="main" title="Gallery Pics">"; echo " "; }else{ echo "<head>"; echo "<title>Gallery Pics</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">"; echo "</head>"; echo "<body>"; echo ""; } $items_per_page = "5"; if (!isset($page)) {$page = 0;} $total = 0; if(!($dp = opendir("./"))) die ("Cannot open ./"); $file_array = array();

while ($file = readdir ($dp)) { if(substr($file,0,1) != '.' and $file != "index.php") { $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); echo "<img src="../images/male.gif" alt=""/><img src="../images/female.gif" alt=""/> Gallery Pics "; if ($file_count > 0) { $first_record = $page * $items_per_page; $last_record = $first_record + $items_per_page; while (list($fileIndexValue, $file_name) = each ($file_array)) { if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record)) {

$userpic2=explode("(", $file_name); $userpic=explode(".", $file_name);

$sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE name='$userpic2[0]'")); if($sex[0]=="M"){$usersex = "<img src="../images/male.gif" alt="M"/>";} if($sex[0]=="F"){$usersex = "<img src="../images/female.gif" alt="F"/>";} if((getnick_uid($uid)==$userpic2[0])||(isowner(getuid_sid($sid)))||(isheadadmin(getuid_sid($sid)))) { $delpic=" <a href="index.php?action=pics&page=$page&sid=$sid&script=$script&delete=$file_name"><img src="../images/notok.gif" alt="[x]"/></a> "; } echo "<img src="$file_name" alt="$userpic[0]"/> $usersex<a href="$file_name">$userpic[0]</a> ". round(filesize($file_name)/1024,1) . "kb$delpic "; $delete = $_GET["delete"]; if($delete=="$file_name"){ if((getnick_uid($uid)==$userpic2[0])||(isowner(getuid_sid($sid)))||(isheadadmin(getuid_sid($sid)))) { unlink("./$file_name"); echo " $file_name deleted successfully "; if($script=="wml"){ echo "<card id="refresh" title="refresh" ontimer="index.php?action=pics&page=$page&sid=$sid&script=$script">"; echo "<timer value="1"/>pls wait while browser redirects</card> </card></wml>"; exit; }else{ echo "<meta http-equiv=Refresh content=1;url=index.php?action=pics&page=$page&sid=$sid&script=$script>"; echo "

</body></html>"; exit; } } } $total = $total + filesize($file_name); } } echo " "; $pages =(int) ceil($file_count / $items_per_page); $pages = ($pages -1);

if (($file_count > 0) AND ($page != 0)) { $prev_page = $page -1; echo "<a href="".$_SERVER["PHP_SELF"]."?action=pics&page=$prev_page&sid=$sid&script=$script"><img src="../images/prev.gif" alt="Prev"/></a> |"; } if (($file_count > 0) AND ($last_record < $file_count)) { $next_page = $page + 1; echo " <a href="".$_SERVER["PHP_SELF"]."?action=pics&page=$next_page&sid=$sid&script=$script"><img src="../images/next.gif" alt="Next"/></a>"; } if ($file_count > 10) { if($script=="wml"){ $rets = " Jump (0-$pages/$page) <input name="pg" format="*N" size="2"/>"; $rets .= "<anchor>goto page"; $rets .= "<go href="index.php" method="get">"; $rets .= "<postfield name="action" value="$action"/>"; $rets .= "<postfield name="sid" value="$sid"/>"; $rets .= "<postfield name="script" value="$script"/>"; $rets .= "<postfield name="page" value="$(pg)"/>"; $rets .= "</go></anchor> "; echo $rets; }else{ $rets = "<form action="index.php" method="get">"; $rets .= "Jump (0-$pages/$page) <input name="page" style="-wap-input-format: '*N'" size="2"/>"; $rets .= "<input type="hidden" name="action" value="$action">"; $rets .= "<input type="hidden" name="sid" value="$sid">"; $rets .= "<input type="hidden" name="script" value="$script">"; $rets .= "<input type="Submit" name="Submit" Value="goto page"></form>"; echo $rets; } echo " "; } echo " Directory: $file_count "; if ($file_count == 1) {echo "file";} else {echo "files";} }

echo " "; echo " <a href="index.php?action=gallery&sid=$sid&script=$script">Back</a> "; if(strpos(strtoupper($HTTP_ACCEPT),"VND.WAP.XHTML+XML") > 0|| strpos(strtoupper($HTTP_ACCEPT),"XHTML+XML") > 0||$ubr=="Mozilla") { echo "<a href="index.php?action=upload&sid=$sid&script=xhtml&prevscript=$script">Upload</a> "; } closedir($dp); if($script=="wml"){ echo "<a href="../wap/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo " "; echo "</card>"; }else{ echo "0<a accesskey="0" href="../web/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo ""; echo "</body>"; } } /////////////////////////////upload//////////////////////////////

else if($action=="upload") { $script2 = $_GET["prevscript"]; addonline(getuid_sid($sid),"Uploading Gallery Pic",""); if($script=="wml"){ echo "<card id="main" title="Gallery Pics">"; }else{ echo "<head>"; echo "<title>Gallery Pics</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">"; echo "</head>"; echo "<body>"; } echo " "; echo "Upload "; echo "Image Files "; $size_bytes = 2048000; $kb = $size_bytes / 1024; $mb = $kb / 1024; echo "Max $mb Mb "; echo "<img src="../images/point.gif" alt="!"/>If u wish to have ur pic removed inbox owner "; if($script=="wml"){ echo "<img src="../images/point.gif" alt="!"/>Browser not compatible wif xhtml uploader email ur pic to afta_drk@hotmail.com wif ur username attached"; }else{ echo "<form method="post" enctype="multipart/form-data" action="index.php?action=upload&sid=$sid&upload=add&script=$script&prevscript=$script2">"; echo "<input type="file" name="filetoupload"> "; echo "<input type="Submit" name="uploadform" value="Upload">"; echo "</form>"; } $upload_dir = "./"; $filename = $_FILES['filetoupload']['name']; $size = $_FILES['filetoupload']['size']; $extlimit = "yes"; $limitedext = array(".jpeg",".jpg",".JPEG",".JPG",".gif",".GIF",".png",".PNG"); $ext = strrchr($_FILES['filetoupload'][name],'.'); $file_type = $_FILES['filetoupload']['type']; $file_name = $_FILES['filetoupload']['name']; $file_size = $_FILES['filetoupload']['size']; $file_tmp = $_FILES['filetoupload']['tmp_name']; $img_thumb_width = 150; // in pixcel $ThumbWidth = $img_thumb_width;

if($upload=="add"){ if (!is_uploaded_file($_FILES['filetoupload']['tmp_name'])) { echo "<img src="../images/notok.gif" alt="(error)"/>No file selected! "; echo " "; echo "<a href="index.php?action=gallery&sid=$sid&script=$script2">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href="../wap/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; }else{ echo "0<a accesskey="0" href="../web/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit(); }

if (($extlimit == "yes") && (!in_array($ext,$limitedext))) { echo("<img src="../images/notok.gif" alt="(error)"/>Invalid file type! "); echo " "; echo "<a href="index.php?action=gallery&sid=$sid&script=$script2">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href="../wap/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; }else{ echo "0<a accesskey="0" href="../web/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit(); }

if ($size > $size_bytes) { echo "<img src="../images/notok.gif" alt="(error)"/>Exceeded File size limit! Maximum $kb Kb. "; echo " "; echo "<a href="index.php?action=gallery&sid=$sid&script=$script2">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href="../wap/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; }else{ echo "0<a accesskey="0" href="../web/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit(); }

if (file_exists("$upload_dir/$filename")) { echo("<img src="../images/notok.gif" alt="(error)"/>Filename already exists! "); echo " "; echo "<a href="index.php?action=gallery&sid=$sid&script=$script2">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href="../wap/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; }else{ echo "0<a accesskey="0" href="../web/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit(); }

$ext = getext($filename); $picname ="$nick.$ext"; if($file_size) { if($file_type == "image/pjpeg" || $file_type == "image/jpeg") {$new_img = imagecreatefromjpeg($file_tmp);} elseif($file_type == "image/x-png" || $file_type == "image/png") {$new_img = imagecreatefrompng($file_tmp);} elseif($file_type == "image/gif") {$new_img = imagecreatefromgif($file_tmp);}

/* list($width, $height) = getimagesize($file_tmp); $imgratio=$width/$height; if ($imgratio>1){ $newwidth = $ThumbWidth; $newheight = $ThumbWidth/$imgratio; }else{ $newheight = $ThumbWidth; $newwidth = $ThumbWidth*$imgratio; } */

$height = 128; $filesize = getimagesize($file_tmp); $aspect_ratio = $filesize[1]/$filesize[0]; if($filesize[1] <= $height) { $newwidth = $filesize[0]; $newheight = $filesize[1]; }else{ $newheight = $height; $newwidth = abs($newheight/$aspect_ratio); }

if (function_exists(imagecreatetruecolor)){ $resized_img = imagecreatetruecolor($newwidth,$newheight); }else{ die("Error: Please make sure you have GD library ver 2+"); } imagecopyresized($resized_img, $new_img, 0, 0, 0, 0, $newwidth, $newheight, $filesize[0], $filesize[1]); $path_big = "../pics_original";

$path_thumbs = "./"; if (!file_exists("$upload_dir/$picname")) {$pic ="$nick(1).$ext";} if (file_exists("$upload_dir/$pic")) {$pic ="$nick(2).$ext";} if (file_exists("$upload_dir/$pic")) {$pic ="$nick(3).$ext";} if (file_exists("$upload_dir/$pic")) {$pic ="$nick(4).$ext";} if (file_exists("$upload_dir/$pic")) {$pic ="$nick(5).$ext";} if (file_exists("$upload_dir/$nick(5).$ext")) {echo "<img src="../images/notok.gif" alt="(error)"/> Error!!! 5 pics hav already been uploaded... "; echo " "; echo "<a href="index.php?action=gallery&sid=$sid&script=$script2">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href="../wap/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; }else{ echo "0<a accesskey="0" href="../web/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit();} move_uploaded_file ($file_tmp, "$path_big/$pic");

ImageJpeg ($resized_img,"$path_thumbs/$pic",60); ImageDestroy ($resized_img); ImageDestroy ($new_img); echo " <img src="$pic" alt="$pic"/> "; echo "<img src="../images/ok.gif" alt=":o)"/>$filename sucessfully uploaded! "; echo " "; echo "<a href="index.php?action=gallery&sid=$sid&script=$script2">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href="../wap/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; }else{ echo "0<a accesskey="0" href="../web/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit(); } else { echo "<img src="../images/notok.gif" alt="(error)"/>Unknown error! Pls try again... "; echo " "; echo "<a href="index.php?action=gallery&sid=$sid&script=$script2">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href="../wap/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; }else{ echo "0<a accesskey="0" href="../web/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } exit(); } } echo " "; echo "<a href="index.php?action=gallery&sid=$sid&script=$script2">Gallery Pics</a> "; if($script2=="wml"){ echo "<a href="../wap/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; }else{ echo "0<a accesskey="0" href="../web/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; } echo " "; if($script=="wml"){ echo "</card>"; }else{ echo "</body>"; } } /////////////////////////////Error/////////////////////////////

else { if($script=="wml"){ echo "<card id="main" title="Error!!!">"; }else{ echo "<head>"; echo "<title>Error!!!</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/white.css">"; echo "</head>"; echo "<body>"; } echo " "; echo "You are not logged in "; echo "Or Your session has been expired

"; if($script=="wml"){ echo "<a href="../wap/index.php">Login</a>"; }else{ echo "<a href="../web/index.php">Login</a>"; } echo " "; if($script=="wml"){ echo "</card>"; echo "</wml>"; }else{ echo "</body>"; echo "</html>"; } exit(); }

if($script=="wml"){ echo "</wml>"; }else{ echo "</html>"; } ?>

ineed everything in xhtml pls

Guest #3

cant the file be uploaded as an attachment ??

linkrx7 #4

cant the file be uploaded as an attachment ??

u want me to upload it?

it requires some work 4 most scrits as mine has had lot changes redid most the lava script

if u cant get it 2 work take out

echo "<link rel="stylesheet" type="text/css" href="../themes/$theme">";

and replace

if((getnick_uid($uid)==$userpic2[0])||(isowner(getuid_sid($sid)))||(isheadadmin(getuid_sid($sid))))

with

if((getnick_uid($uid)==$userpic2[0])||(isadmin(getuid_sid($sid))))

subzero Super moderator Fellow · 3,954 posts #5

checked its safe formated so ppl you can use it cσpy嫑

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

thanatos Senior · 261 posts #6

checked its safe formated so ppl you can use it cσpy嫑

ok copy that.. tnx man..

linkrx7 #7

it also depends on where u put the file what u call it and where ur scripts are too

alesh Lead · 604 posts #8

so wht i have 2 remove if i dnt have that owner stuff? im confused about that! i got regular admin nd mod cp!

eeeeerrr....

linkrx7 #9

so wht i have 2 remove if i dnt have that owner stuff? im confused about that! i got regular admin nd mod cp!

if u dnt hav isowner() then remove that bit from it

alesh Lead · 604 posts #10

okay thanx!!! i get tht BUT why im always gettin this

this is when i click xhtml link

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/blabla/public_html/pics/index.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 26

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 27

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 28

and this when i click on wml link

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/blabla/public_html/pics/index.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 22

what i done wrong????

i named that file index.php and i put it in pics folder and i also changed this

<?php include("../wap/config.php"); include("../wap/core.php"); connectdb(); into this <?php include("../config.php"); include("../core.php"); connectdb(); cuz my script is just in public_html SO whr i screw thngs??? or i dont c sumthng??? Sum1 pls!!!

eeeeerrr....

thanatos Senior · 261 posts #11

okay thanx!!! i get tht BUT why im always gettin this

this is when i click xhtml link Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/blabla/public_html/pics/index.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 26

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 27

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 28 and this when i click on wml link Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/blabla/public_html/pics/index.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 22
what i done wrong????

i named that file index.php and i put it in pics folder and i also changed this

<?php include("../wap/config.php"); include("../wap/core.php"); connectdb(); into this <?php include("../config.php"); include("../core.php"); connectdb(); cuz my script is just in public_html SO whr i screw thngs??? or i dont c sumthng??? Sum1 pls!!!

make a new config.php

alesh Lead · 604 posts #12

why would i need new config.php file? u mean i should copy config file and put it in pics folder with this galery index?

eeeeerrr....

thanatos Senior · 261 posts #13

why would i need new config.php file? u mean i should copy config file and put it in pics folder with this galery index?

huh? i've also encountered this in my paid hosting..

i made a new config.php then it worked fine..

<?php
$dbname = "my_sql"; //change to your mysql database name
$dbhost = "localhost"; //database host name
$dbuser = "me_sql";
$dbpass = "123456789";

$max_buds=100; //maximum number of buds
$topic_af = 120; //topic antiflood
$post_af = 45; //post antiflood
$onver = true; //isonline versoion
?>
alesh Lead · 604 posts #14

huh? i've also encountered this in my paid hosting..

i made a new config.php then it worked fine..

<?php
$dbname = "my_sql"; //change to your mysql database name
$dbhost = "localhost"; //database host name
$dbuser = "me_sql";
$dbpass = "123456789";
$max_buds=100; //maximum number of buds
$topic_af = 120; //topic antiflood
$post_af = 45; //post antiflood
$onver = true; //isonline versoion
?>

WEEEEEEEEEEEEEEEEEEEEEEEEELL I GOT THE SAME CONFIG FILE AS THIS ONE!!!!!!!!!!!!!!

so any wanna tell me how excatly 2 name this file .... where 2 put in ... etc please!!!

eeeeerrr....

alesh Lead · 604 posts #15

thanx.... aha... 4 all the help! pheh

okay tht was sarcastic if no1 notice....

cn sum1 tell me why it wont work at my site?

i have the same confing file....

eeeeerrr....

alesh Lead · 604 posts #16

OKAY WILL SUM1 HELP ME AND SAY WHY I ALWAYS GET THIS?????

I REMOVED THT OWNER THING... AND I CAN UPLOAD PICS... BUT IT ALWAYS SHOW ME THIS ON THE TOP OF THE PAGE:

this is when i click xhtml link

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/blabla/public_html/pics/index.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 26

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 27

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 28

and this when i click on wml link

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/blabla/public_html/pics/index.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/public_html/pics/index.php:17) in /home/blabla/public_html/pics/index.php on line 22

SUM1 PLEASE! ! ! ! ! ! ! !

eeeeerrr....

subzero Super moderator Fellow · 3,954 posts #17

You are missing sql headers and put off file.

chris you got to fix it your script lol

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

alesh Lead · 604 posts #18

dnt know what u even said just now lol

i thought i dnt need sql tables 4 this script???

and i should put file off?

this galery gives me a headache lol

i manage to run it but only with opera... default mobile browsers cant open this page lol

eeeeerrr....

linkrx7 #19

dnt know what u even said just now lol

i thought i dnt need sql tables 4 this script???

and i should put file off?

this galery gives me a headache lol

i manage to run it but only with opera... default mobile browsers cant open this page lol

ill upload scripts and explain in more detail how to install it u can view it at http://wapdesire.com

linkrx7 #20

heres the script the instructions are in the rar file

Attachments: gallery.rar

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