Beispiel #1
0
        foreach ($rank_id_arr as $key => $val) {
            if (is_numeric($val)) {
                $rank_id_tt[] = $val;
            }
        }
        //print_r($rank_id_tt);
        //		if(strpos($rank_id,"article") || strpos($rank_id,"article") == 0){
        //			$rank_id_arr = explode(',', $rank_id);
        //
        //			foreach($rank_id_arr as $val){
        //				$id_arr = explode('_', $val);
        //				$rank_id_res[] = $id_arr['1'];
        //			}
        //			//print_r($rank_id_res);
        //		}
        $smarty->assign('cat_select', article_cat_list_dan($rank_id_tt));
    } else {
        $smarty->assign('cat_select', article_cat_list(0));
    }
    //$smarty->assign('cat_select',  article_cat_list_dan($rank_id_res));
    //echo (article_cat_list_dan($rank_id_res));
    $smarty->assign('article', $article);
    $smarty->assign('ur_here', $_LANG['article_add']);
    $smarty->assign('action_link', array('text' => $_LANG['03_article_list'], 'href' => 'article.php?act=list'));
    $smarty->assign('form_action', 'insert');
    assign_query_info();
    $smarty->display('article_info.htm');
}
/*------------------------------------------------------ */
//-- 添加服务商
/*------------------------------------------------------ */
Beispiel #2
0
    //处理权限
    $rank_id = $_SESSION['rank_id'];
    print_r($_SESSION);
    if ($rank_id) {
        if (strpos($rank_id, "article") || strpos($rank_id, "article") == 0) {
            $rank_id_arr = explode(',', $rank_id);
            foreach ($rank_id_arr as $val) {
                $id_arr = explode('_', $val);
                $rank_id_res[] = $id_arr['1'];
            }
        }
        $smarty->assign('cat_select', article_cat_list_dan($rank_id_res));
    } else {
        $smarty->assign('cat_select', article_cat_list(0));
    }
    echo article_cat_list_dan($rank_id_res);
    $smarty->assign('article', $article);
    $smarty->assign('ur_here', $_LANG['article_add']);
    $smarty->assign('action_link', array('text' => $_LANG['03_article_list'], 'href' => 'article.php?act=list'));
    $smarty->assign('form_action', 'insert');
    assign_query_info();
    $smarty->display('article_info.htm');
}
/*------------------------------------------------------ */
//-- 添加服务商
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'add0') {
    /* 权限判断 */
    admin_priv('article_manage');
    /* 创建 html editor */
    create_html_editor('FCKeditor1');