예제 #1
0
 public function view_updateInput()
 {
     $id = $_GET['id'];
     if (intval($id) == 0) {
         $status = "系统id错误";
         header("Location:index.php?mod=property&act=getInputList&status={$status}");
         exit;
     }
     $tName = 'pc_archive_input';
     $select = '*';
     $where = "WHERE id='{$id}'";
     $inputList = OmAvailableModel::getTNameList($tName, $select, $where);
     if (empty($inputList)) {
         $status = "错误,不存在该文本属性";
         header("Location:index.php?mod=property&act=getInputList&status={$status}");
         exit;
     }
     $categoryStr = '';
     if (!empty($inputList[0]['categoryPath'])) {
         $tmpCateNameArr = array();
         $tmpCategoryArr = explode('-', $inputList[0]['categoryPath']);
         foreach ($tmpCategoryArr as $value) {
             $tmpCateNameArr[] = CategoryModel::getCategoryNameById($value);
         }
         $categoryStr = implode('->', $tmpCateNameArr);
     }
     $navlist = array(array('url' => 'index.php?mod=category&act=getCategoryList', 'title' => '类别管理'), array('url' => 'index.php?mod=property&act=getInputList', 'title' => '文本属性列表'), array('url' => "index.php?mod=property&act=updateInput&id={$id}", 'title' => '修改文本属性'));
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('onevar', 4);
     $this->smarty->assign('twovar', 43);
     $this->smarty->assign('title', '修改属性');
     $this->smarty->assign('id', $id);
     $this->smarty->assign('inputName', $inputList[0]['inputName']);
     $this->smarty->assign('categoryStr', $categoryStr);
     $this->smarty->display("updateInput.htm");
 }
예제 #2
0
파일: functions.php 프로젝트: ohjack/newErp
function getAllCateNameByPath($pid)
{
    $categorySearch = '';
    if (!empty($pid)) {
        $tmpCateNameArr = array();
        $tmpCategoryArr = array_filter(explode('-', $pid));
        foreach ($tmpCategoryArr as $value) {
            if (!empty($value)) {
                $tmpCateNameArr[] = CategoryModel::getCategoryNameById($value);
            }
        }
        $categorySearch = implode('->', $tmpCateNameArr);
    }
    return $categorySearch;
}