예제 #1
0
파일: Edit.php 프로젝트: sinfocol/gwf3
 private function getParentSelect(GWF_Category $cat)
 {
     $id = $cat->getID();
     $group = $cat->getEscaped('cat_group');
     $data = array(array('0', $this->module->lang('sel_parent')));
     $table = GDO::table('GWF_Category');
     if (false !== ($result = $table->select('cat_tree_id, cat_tree_key', "cat_group='{$group}' AND cat_tree_id != {$id}"))) {
         while (false !== ($row = $table->fetch($result, GDO::ARRAY_N))) {
             $data[] = $row;
         }
         $table->free($result);
     }
     return GWF_Select::display('parent', $data, Common::getPostString('parent', $cat->getParentID()));
 }