PHP Classes

File: viewCompany.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Kamran Shahid Butt  >  Grid  >  viewCompany.php  >  Download  
File: viewCompany.php
Role: Example script
Content type: text/plain
Description: This is the example of the view page
Class: Grid
Display database query results in an HTML table
Author: By
Last change: I miss creating object of CompanyClass
Date: 5 years ago
Size: 1,883 bytes


Class file image Download

GenerateGrid($pageNo, $footerPage, $page, $primaryKey, $columns, $add=false, $edit=false, $delete=false, $view=false, $viewPage="", $status=false, $statusField="")
$sql = "SELECT * FROM company";
$MyGrid = new Grid();
$MyGrid->GenrateGrid($sql, $pageNo, $footerPage, $page, $primaryKey, $columns, $add, $edit, $delete, $view, $viewPage, $status, $statusField);


$Company = new CompanyClass();

$_GET['page_no'], //need to pass the pagging for the pagination
"viewContract", //this is the link of the footer page
"addCompany", //this is the main page when user click on add, edit, delete, active/inactive then this page will open
"ID", //this is the primary key of that grid table
"center=Company ID=ID=8%,
                        center=Company Name=CompanyName=15%,
, //This is the grid column format align=coulmn heading=coulmn database name=coulmn width
true, //To display Add link pass true else false.
true, //To display Edit link pass true else false.
true, //To display Delete link pass true else false.
false, //To display View link pass true else false.
"addContract", //Pass the view page link to take the user when click on view page
false, //To display status link pass true else false.
"", //Enter the status database field name like company_status
"" //Enter the format of the status column mean, to display on 0 show inactive, on 1 show active, on 2 show pending.
                                                                //Format need to use to display is 0,Active=>1,Inactive=>2,Pending as many status you can add on this rule.