打开admin\article.php文件,修改如下(新增红色部分):
/*------------------------------------------------------ */
//-- 添加文章
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'add')
{
/* 权限判断 */
admin_priv('article_manage');
/* 创建 html editor */
create_html_editor('FCKeditor1');
/*初始化*/
$article = array();
$article['is_open'] = 1;
[color=Red]$article['author'] = $_SESSION['admin_name'];[/color]
/* 取得分类、品牌 */
$smarty->assign('goods_cat_list', cat_list());
$smarty->assign('brand_list', get_brand_list());
/* 清理关联商品 */
$sql = "Delete FROM " . $ecs->table('goods_article') . " Where article_id = 0";
$db->query($sql);
if (isset($_GET['id']))
{
$smarty->assign('cur_id', $_GET['id']);
}
$smarty->assign('article', $article);
$smarty->assign('cat_select', article_cat_list(0));
$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');
}
评论(0)
暂无评论。