本文整理汇总了PHP中get_position_list函数的典型用法代码示例。如果您正苦于以下问题:PHP get_position_list函数的具体用法?PHP get_position_list怎么用?PHP get_position_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_position_list函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
$smarty->assign('src', $src);
}
if ($ads_arr['media_type'] == 0) {
$smarty->assign('media_type', $_LANG['ad_img']);
} elseif ($ads_arr['media_type'] == 1) {
$smarty->assign('media_type', $_LANG['ad_flash']);
} elseif ($ads_arr['media_type'] == 2) {
$smarty->assign('media_type', $_LANG['ad_html']);
} elseif ($ads_arr['media_type'] == 3) {
$smarty->assign('media_type', $_LANG['ad_text']);
}
$smarty->assign('ur_here', $_LANG['ads_edit']);
$smarty->assign('action_link', array('href' => 'ads.php?act=list', 'text' => $_LANG['ad_list']));
$smarty->assign('form_act', 'update');
$smarty->assign('action', 'edit');
$smarty->assign('position_list', get_position_list());
$smarty->assign('ads', $ads_arr);
assign_query_info();
$smarty->display('ads_info.htm');
} elseif ($_REQUEST['act'] == 'update') {
admin_priv('ad_manage');
/* 初始化变量 */
$id = !empty($_POST['id']) ? intval($_POST['id']) : 0;
$type = !empty($_POST['media_type']) ? intval($_POST['media_type']) : 0;
if ($_POST['media_type'] == '0') {
$ad_link = !empty($_POST['ad_link']) ? trim($_POST['ad_link']) : '';
} else {
$ad_link = !empty($_POST['ad_link2']) ? trim($_POST['ad_link2']) : '';
}
/* 获得广告的开始时期与结束日期 */
$start_time = local_strtotime($_POST['start_time']);
示例2: assign_query_info
}
}
}
assign_query_info();
$smarty->assign('ur_here', $_LANG['03_template_setup']);
$smarty->assign('curr_template_file', $curr_template);
$smarty->assign('temp_options', $temp_options);
$smarty->assign('temp_regions', $temp_regions);
$smarty->assign('cate_goods', $cate_goods);
$smarty->assign('brand_goods', $brand_goods);
$smarty->assign('cat_articles', $cat_articles);
$smarty->assign('ad_positions', $ad_positions);
$smarty->assign('arr_cates', cat_list(0, 0, true));
$smarty->assign('arr_brands', get_brand_list());
$smarty->assign('arr_article_cats', article_cat_list(0, 0, true));
$smarty->assign('arr_ad_positions', get_position_list());
$smarty->display('template_setup.htm');
}
/*------------------------------------------------------ */
//-- 提交模板内容设置
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'setting') {
admin_priv('template_setup');
$curr_template = $_CFG['template'];
$db->query("DELETE FROM " . $ecs->table('template') . " WHERE remarks = '' AND filename = '{$_POST['template_file']}' AND theme = '{$curr_template}'");
/* 先处理固定内容 */
foreach ($_POST['regions'] as $key => $val) {
$number = isset($_POST['number'][$key]) ? intval($_POST['number'][$key]) : 0;
if (!in_array($key, $GLOBALS['dyna_libs']) and (isset($_POST['display'][$key]) and $_POST['display'][$key] == 1 or $number > 0)) {
$sql = "INSERT INTO " . $ecs->table('template') . "(theme, filename, region, library, sort_order, number)" . " VALUES " . "('{$curr_template}', '{$_POST['template_file']}', '{$val}', '" . $_POST['map'][$key] . "', '" . @$_POST['sort_order'][$key] . "', '{$number}')";
$db->query($sql);