13 protected $data=array();
19 public function __construct($name,$mysqlObject)
21 $this->sql=$mysqlObject;
30 $this->data[
'structure'][]=array(
35 'auto_increment'=>
true
53 'type'=>
'varchar(255)'
66 $this->data[
'structure'][]=array(
71 'auto_increment'=>
true
89 'type'=>
'varchar(255)'
92 'type'=>
'varchar(255)'
95 'type'=>
'varchar(255)'
123 public function add($item,$base=0,$subnav=null,$perm=1000,$link=null,$priority=null)
125 $this->data[
'add'][]=array(
130 'priority'=>$priority,
141 private function createQueries()
143 foreach($this->data[
'structure'] as $val)
145 $this->sql->dbCreateTable($val);
147 foreach($this->data[
'add'] as $val)
149 $this->sql->insert($val);
151 $this->sql->execute();
161 $structure = $this->worker();
164 foreach($structure as $key=>$val)
166 foreach($structure as $keyB=>$valB)
168 if($valB[
'subnav']==$val[
'base'])
171 unset($structure[$keyB]);
174 $arr[$val[
'base']]=$arrstrc;
185 $structure = $this->worker();
186 foreach($structure as $key=>$val)
188 if($base!=$val[
'base'])
190 unset($structure[$key]);
199 private function worker()
211 $this->sql->select($allBase);
212 $arr = $this->sql->execute();
213 $sizearr =
sizeof($arr);
214 return array(
'sqlreturn'=>$arr,
'recordsctr'=>$sizearr);
217 public function __destruct(){}