Login   Register  
PHP Classes
elePHPant
Icontem

File: ExampleGallery.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Md. Aminul Islam  >  Image Gallery  >  ExampleGallery.php  >  Download  
File: ExampleGallery.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: Image Gallery
Show a gallery of pictures defined in a database
Author: By
Last change: Few files were missing. Now it's perfect.
Date: 7 years ago
Size: 762 bytes
 

Contents

Class file image Download
<?
    
include "ImgGallery.cls.php";
    
    
// Host and  Database Connection.
    
$Host="localhost";
    
$User="root";
    
$Password="";
    
$DbName="aminul";
    
mysql_connect($Host,$User,$Password)or die(mysql_error());
    
mysql_select_db($DbName)or die(mysql_error());
    
    
$DbTableName="image_gallery";    // Table Name Used
    
$DisplayPageNo=1;    // Page number you want to display.
    
$NoOfRow=3;            // Number of rows to display
    
$NoOfCol=4;            // Number of column to display
    
$ImgLoc="Imgs";        // Image folder location from current location.

    // Object instance.
    
$Gallery=new ImageGallery($DbTableName,$DisplayPageNo,$NoOfRow,$NoOfCol,$ImgLoc);    

    
// Draw Table of Banner including Paging.
    
$Gallery->DisplayImageGallery();
    
    
// Destroy Object.
    
unset($Gallery);
?>