Upload & Gallery
Started on the old forum in July 2007 · view the original in the archive · old links redirect here
Put This In List.php
//////////////////////////////////gallery :) else if($action=="gal") { addonline(getuid_sid($sid),"viewing pics List",""); echo "<card id=\"main\" title=\"Gallery\">"; //////ALL LISTS SCRIPT << if($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_gallery")); $num_items = $noi[0]; //changable $items_per_page= 5; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; //changable sql $sql = "SELECT id, gcode, imgsrc FROM ibwf_gallery ORDER BY id DESC LIMIT $limit_start, $items_per_page"; echo " "; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { if(ismod(getuid_sid($sid))) { $delsl = "<a href=\"galcp.php?action=deluser&sid=$sid&smid=$item[0]\">[x]</a>"; }else{ $delsl = ""; } echo "$item[1] » "; echo "<img src=\"$item[2]\" alt=\"$item[1]\"/> $delsl "; } } echo "</p>"; echo "<p align=\"center\">"; if($page>1) { $ppage = $page-1; echo "<a href=\"lists.php?action=gal&page=$ppage&sid=$sid&view=$view\">«PREV</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"lists.php?action=gal&page=$npage&sid=$sid&view=$view\">Next»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>"; $rets .= "<anchor>[GO]"; $rets .= "<go href=\"lists.php\" method=\"get\">"; $rets .= "<postfield name=\"action\" value=\"$action\"/>"; $rets .= "<postfield name=\"sid\" value=\"$sid\"/>"; $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>"; $rets .= "</go></anchor>"; echo $rets; } echo "</p>"; ////// UNTILL HERE >> echo "<p align=\"center\">"; if(ismod(getuid_sid($sid))) { echo "<a href=\"galcp.php?action=addu&sid=$sid\">[Add Pics]</a> "; } echo "<a href=\"index.php?action=extra&sid=$sid\">"; echo "Extras</a> "; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "©fonomatrix "; echo "Script By: spiderwebs "; echo "</p>"; echo "</card>"; }Add This Link In Index.php In Ur Admin/Owner Cp
galcp.php?action=main&sid=$sid I Think This Is The Ryt Link
Run This Sql In PhpMyAdmin
-- -- Table structure for table
ibwf_galleryCREATE TABLE
ibwf_gallery(idint(100) NOT NULL auto_increment,gcodevarchar(15) NOT NULL default '',imgsrcvarchar(200) NOT NULL default '',hiddenchar(1) NOT NULL default '0', PRIMARY KEY (id), UNIQUE KEYgcode(gcode) ) TYPE=MyISAM AUTO_INCREMENT=1 ;-- -- Dumping data for table
ibwf_galleryTell Me If Netn I Rote Is Rong Il Fix It
can u tel me how to write this codings in mysql.whenever i click on sql and when i try to paste any codes then it says error that already exist.thats why i cant put gallery in my site.
WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!