$ad_obj->setListorder(intval($listorder)); $ad_obj->setIs_allow(intval($rdn_is_allow)); $ad_url = str_replace("union ", "union", $ad_url); $ad_obj->setAd_url($ad_url); $ad_obj->setOn_time(time()); if ($ac == 'edit') { if ($ad_type == 'text' || $ad_type == 'code') { $ad_obj->setWidth(''); $ad_obj->setHeight(''); } $ad_obj->setWhere('ad_id=' . intval($ad_id)); $result = $ad_obj->edit_keke_witkey_ad(); kekezu::admin_system_log($_lang['edit_ads_data'] . $ad_id); kekezu::admin_show_msg($result ? $_lang['edit_ads_success_jump_adslist'] : $_lang['not_make_changes_return_again'], 'index.php?do=tpl&view=ad_add&ac=edit&ad_id=' . $ad_id, 3, '', $result ? 'success' : 'warning'); } else { $result = $ad_obj->create_keke_witkey_ad(); } kekezu::admin_system_log($_lang['add_ads_data']); kekezu::admin_show_msg($result ? $_lang['add_ads_success'] : $_lang['add_fail_return_again'], 'index.php?do=tpl&view=ad_list&target_id=' . $hdn_target_id, 3, '', $result ? 'success' : 'warning'); } $page_tips = $_lang['add']; $ad_data = array(); if ($ac && $ac == 'edit') { empty($ad_id) && kekezu::admin_show_msg($_lang['edit_parameter_error_jump_listpage'], 'index.php?do=tpl&view=ad_list', 3, '', 'warning'); $page_tips = $_lang['edit']; unset($ad_data); $ad_id = intval($ad_id); $ad_obj->setWhere('ad_id="' . $ad_id . '"'); $ad_data = $ad_obj->query_keke_witkey_ad(); $ad_data = $ad_data['0']; $ad_data['tpl_type'] = explode(',', $ad_data['tpl_type']);