} if ($per == "" || $subject == "" || $body == "" || $name == "" || $email == "") { header("Location:goback.php?action=goback"); exit(0); } if (!is_valid_email($email)) { include "admin.header.inc.php"; echo "<br>The email you have entered is not valid.<br><br><a href=\"javascript:history.back(-1);\">Go Back</a> "; include "admin.footer.inc.php"; exit(0); } $id = $_POST['id']; if ($id == "") { $id = -1; } if (!isValidAccess($id, $CST_MLM_CAMPAIGN, $table_prefix, $mysql)) { if ($log_enabled == 1) { $aid = getAdminId($mysql); $adminname = $mysql->echo_one("select username from " . $table_prefix . "subadmin_details where id={$aid}"); $entityname = $mysql->echo_one("select cname from " . $table_prefix . "email_advt_curr_run where id={$id}"); if ($entityname != "") { mysql_query("insert into " . $table_prefix . "admin_log_info values('','{$aid}','{$adminname} attempted unauthorized access to edit the campaign {$entityname}(id:" . $id . ")','" . time() . "','{$CST_MLM_ADMIN_MANAGEMENT}')"); } } include_once "admin.header.inc.php"; ?> <br><span class="already"> You dont have access to this campaign. <a href="javascript:history.back(-1);">Go Back</a></span><br><br> <?php include_once "admin.footer.inc.php"; exit(0); }
$invalid = ""; $valid = ""; $day = date("l_dS_F_Y_h_i_A"); //echo $day; $i = 0; $resultstring = ""; $getListSql = "select * from " . $table_prefix . "email_advt_category order by name"; if (isset($_COOKIE['inout_sub_admin'])) { $subAdminId = getAdminId($mysql); $getListSql = "SELECT a.*\tFROM " . $table_prefix . "email_advt_category a inner join \n\t( SELECT eid FROM " . $table_prefix . "admin_access_control where aid={$subAdminId} ) b\n\ton a.id=b.eid order by a.name"; } $result = mysql_query($getListSql); while ($row = mysql_fetch_row($result)) { if (isset($_POST["List" . $i])) { $lid = $_POST["List" . $i]; if (!isValidAccess($lid, $CST_MLM_LIST, $table_prefix, $mysql)) { $n = $_REQUEST['ListName' . $i]; if ($invalid == "") { $invalid .= "[" . $n; } else { $invalid .= ", " . $n; } } else { $str = ""; $status = $_POST['status' . $i]; if ($status == 2) { $str = "and b.unsubstatus=0"; } if ($status == 3) { $str = "and b.unsubstatus=1"; }
function addEmailToList($mysql, $eid, $table_prefix, $arraycount) { include "constants.php"; $t = time(); //echo "CST_MLM_LIST".$CST_MLM_LIST; if ($mysql->total("" . $table_prefix . "ea_em_n_cat", "eid='{$eid}' and cid='{$_POST['category']}'") == 0 && isValidAccess($_POST['category'], $CST_MLM_LIST, $table_prefix, $mysql)) { mysql_query("insert into " . $table_prefix . "ea_em_n_cat values('','{$eid}','{$_POST['category']}',0,'{$t}')"); $arraycount[1] += 1; } if ($_POST['category2'] != $_POST['category'] && $_POST['category2'] != "") { if ($mysql->total("" . $table_prefix . "ea_em_n_cat", "eid='{$eid}' and cid='{$_POST['category2']}'") == 0 && isValidAccess($_POST['category2'], $CST_MLM_LIST, $table_prefix, $mysql)) { mysql_query("insert into " . $table_prefix . "ea_em_n_cat values('','{$eid}','{$_POST['category2']}',0,'{$t}')"); $arraycount[2] += 1; } } if ($_POST['category3'] != $_POST['category2'] && $_POST['category3'] != $_POST['category'] && $_POST['category3'] != "") { if ($mysql->total("" . $table_prefix . "ea_em_n_cat", "eid='{$eid}' and cid='{$_POST['category3']}'") == 0 && isValidAccess($_POST['category3'], $CST_MLM_LIST, $table_prefix, $mysql)) { $arraycount[3] += 1; //echo $eid." ".$_POST[category3]; mysql_query("insert into " . $table_prefix . "ea_em_n_cat values('','{$eid}','{$_POST['category3']}',0,'{$t}')"); //echo mysql_error(); } } return $arraycount; }