get_files(e_IMAGE."banners/","",$reject); if (isset($_POST['update_menu'])) { foreach($_POST as $k => $v) { if (strpos($k, "banner_") === 0) { $menu_pref[$k] = $v; } } if (isset($_POST['catid'])) { $array_cat = explode("-", $_POST['catid']); for($i = 0; $i < count($array_cat); $i++) { $cat .= $array_cat[$i]."|"; } $cat = substr($cat, 0, -1); $menu_pref['banner_campaign'] = $cat; } $sysprefs->setArray('menu_pref'); $message = BANNER_MENU_L2; } if ($_POST['createbanner'] || $_POST['updatebanner']) { $start_date = (!$_POST['startmonth'] || !$_POST['startday'] || !$_POST['startyear'] ? 0 : mktime (0, 0, 0, $_POST['startmonth'], $_POST['startday'], $_POST['startyear'])); $end_date = (!$_POST['endmonth'] || !$_POST['endday'] || !$_POST['endyear'] ? 0 : mktime (0, 0, 0, $_POST['endmonth'], $_POST['endday'], $_POST['endyear'])); $cli = ($_POST['client_name'] ? $_POST['client_name'] : $_POST['banner_client_sel']); if ($_POST['banner_pages']) { $postcampaign = ($_POST['banner_campaign'] ? $_POST['banner_campaign'] : $_POST['banner_campaign_sel']); $pagelist = explode("\r\n", $_POST['banner_pages']); for($i = 0 ; $i < count($pagelist) ; $i++) { $pagelist[$i] = trim($pagelist[$i]); } $plist = implode("|", $pagelist); $pageparms = $postcampaign."^".$_POST['banner_listtype']."-".$plist; $pageparms = preg_replace("#\|$#", "", $pageparms); $pageparms = (trim($_POST['banner_pages']) == '') ? '' : $pageparms; $cam = $pageparms; } else { $cam = ($_POST['banner_campaign'] ? $_POST['banner_campaign'] : $_POST['banner_campaign_sel']); } if ($_POST['createbanner']) { admin_update($sql->db_Insert("banner", "0, '".$cli."', '".$_POST['client_login']."', '".$_POST['client_password']."', '".$_POST['banner_image']."', '".$_POST['click_url']."', '".intval($_POST['impressions_purchased'])."', '$start_date', '$end_date', '".$_POST['banner_class']."', 0, 0, '', '".$cam."'"), 'insert', BNRLAN_63); } else { admin_update($sql->db_Update("banner", "banner_clientname='".$cli."', banner_clientlogin='".$_POST['client_login']."', banner_clientpassword='".$_POST['client_password']."', banner_image='".$_POST['banner_image']."', banner_clickurl='".$_POST['click_url']."', banner_impurchased='".intval($_POST['impressions_purchased'])."', banner_startdate='$start_date', banner_enddate='$end_date', banner_active='".$_POST['banner_class']."', banner_campaign='".$cam."' WHERE banner_id='".$_POST['eid']."'"), 'update', BNRLAN_64); } unset($_POST['client_name'], $_POST['client_login'], $_POST['client_password'], $_POST['banner_image'], $_POST['click_url'], $_POST['impressions_purchased'], $start_date, $end_date, $_POST['banner_enabled'], $_POST['startday'], $_POST['startmonth'], $_POST['startyear'], $_POST['endday'], $_POST['endmonth'], $_POST['endyear'], $_POST['banner_class'], $_POST['banner_pages'], $_POST['banner_listtype']); } if (isset($_POST['confirm'])) { admin_update($sql->db_Delete("banner", "banner_id='".$_POST['id']."' "), 'delete', BNRLAN_1); } if ($action == "delete" && $sub_action) { $text = "
".BNRLAN_7." | |||||||
".BNRLAN_8." | ".BNRLAN_9." | ".BNRLAN_10." | ".BNRLAN_11." | ".BNRLAN_12." | ".BNRLAN_13." | ".LAN_OPTIONS." | |
".BNRLAN_15." | |||||||
".$banner_id." | ".$banner_clientname." | ".$banner_clicks." | ".$clickpercentage." | ".$impressions_purchased." | ".$impressions_left." | ".ADMIN_EDIT_ICON." ".ADMIN_DELETE_ICON." | |
".$banner_campaign." | ".r_userclass_name($banner_active)." ".$textvisivilitychanged." | ".BNRLAN_45.": ".$start_date." <> ".BNRLAN_21.": ".$end_date." | |||||