PHP Classes

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Mohammad Keramatifar  >  PHP TreeView  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: sample of treeview using
Class: PHP TreeView
Display a collapsible tree from a MySQL query
Author: By
Last change:
Date: 4 years ago
Size: 995 bytes


Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Keramatifar Treeview Right-To-Left Sample</title>
<link rel="stylesheet" type="text/css" href="ltr.css">
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="funcs.js"></script>
//include the treeview class
include 'class.treeview.php';
//create an instant of Treeview Class
$treeSample = new Treeview('localhost','username','password','database','table', 'primaryKeyField', 'titleField', 'parent_idField', 'perfixForJqueryIDs');
//Calling the method to generate tree view and set the queryArray public member for Input Parameter
//echo the public member of object names treeResult (Contain the treeview html and jquery codes)
echo $treeSample->treeResult;