Upload & Gallery

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

44 replies · 2,194 views · started 19 years ago · 1 min read

3 participants
thunderwap Developer · 169 posts #42

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_gallery

CREATE TABLE ibwf_gallery ( id int(100) NOT NULL auto_increment, gcode varchar(15) NOT NULL default '', imgsrc varchar(200) NOT NULL default '', hidden char(1) NOT NULL default '0', PRIMARY KEY (id), UNIQUE KEY gcode (gcode) ) TYPE=MyISAM AUTO_INCREMENT=1 ;

-- -- Dumping data for table ibwf_gallery

Tell 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!!

FlareX #43

Go2 The ibwf_gallery U Already Have And Drop/Delete It Then Try Agen

Guest #44

the script upl have problem in xhtml up, speak "File already exists" and script of gallery not load the page :S

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