public function __construct()
 {
     if (self::$instance) {
         return self::$instance;
     } else {
         self::$instance = $this;
     }
 }
Ejemplo n.º 2
0
<?php

include_once '../Connections/connHm.php';
include_once 'Home_Product_Management_Detail.php';
$home = new Home_Product_Management_Detail();
$siteId = 1;
$userId = 1;
$catId = $_GET['catId'];
if (!$catId) {
    $catId = 0;
}
$id = $_GET['id'];
if (!$id) {
    $id = 1;
}
$arrHome = $home->getArray($id, $siteId, $userId);
include "dhtmlgoodies_tree.class.php";
$tree = new dhtmlgoodies_tree();
if ($arrHome) {
    foreach ($arrHome as $rec) {
        $tree->addToArray($rec['detail_id'], $rec['name'], $rec['pid'], "");
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="js/ajax.js"></script>
	<script type="text/javascript" src="js/context-menu.js"></script><!-- IMPORTANT! INCLUDE THE context-menu.js FILE BEFORE drag-drop-folder-tree.js -->