LICENSE: AGPLv2 # # This page manages the inbound email accounts in ViciDial # # changes: # 121214-2245 - First Build # 130102-1131 - Small admin log change # 130221-1754 - Added level 8 disable add feature # 130610-1041 - Changed all ereg to preg # 130621-2001 - Added filtering of input to prevent SQL injection attacks and new user auth # 130902-0754 - Changed to mysqli PHP functions # 141007-1125 - Finalized adding QXZ translation to all admin files # 141230-0021 - Added code for on-the-fly language translations display # 150421-2255 - Fixed links to default list ID and default_list_id issue # 150422-1229 - Changed Default List ID # 150513-2310 - Added POP3 Auth Mode # 160330-1552 - navigation changes and fixes # 160404-0936 - design changes # 160429-1123 - Added admin_row_click option # 160508-0139 - Added screen colors feature # 170409-1540 - Added IP List validation code # 180219-1233 - Fixed translation issue #1069 # 180502-2215 - Added new help display # 220222-0906 - Added allow_web_debug system setting # $admin_version = '2.14-19'; $build = '220222-0906'; $sh="emails"; require("dbconnect_mysqli.php"); require("functions.php"); $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; $PHP_SELF=$_SERVER['PHP_SELF']; $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); if (isset($_GET["DB"])) {$DB=$_GET["DB"];} elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} if (isset($_GET["action"])) {$action=$_GET["action"];} elseif (isset($_POST["action"])) {$action=$_POST["action"];} if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} if (isset($_GET["eact"])) {$eact=$_GET["eact"];} elseif (isset($_POST["eact"])) {$eact=$_POST["eact"];} if (isset($_GET["email_account_id"])) {$email_account_id=$_GET["email_account_id"];} elseif (isset($_POST["email_account_id"])) {$email_account_id=$_POST["email_account_id"];} if (isset($_GET["email_account_name"])) {$email_account_name=$_GET["email_account_name"];} elseif (isset($_POST["email_account_name"])) {$email_account_name=$_POST["email_account_name"];} if (isset($_GET["email_account_description"])) {$email_account_description=$_GET["email_account_description"];} elseif (isset($_POST["email_account_description"])) {$email_account_description=$_POST["email_account_description"];} if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} if (isset($_GET["email_account_server"])) {$email_account_server=$_GET["email_account_server"];} elseif (isset($_POST["email_account_server"])) {$email_account_server=$_POST["email_account_server"];} if (isset($_GET["email_account_user"])) {$email_account_user=$_GET["email_account_user"];} elseif (isset($_POST["email_account_user"])) {$email_account_user=$_POST["email_account_user"];} if (isset($_GET["email_account_pass"])) {$email_account_pass=$_GET["email_account_pass"];} elseif (isset($_POST["email_account_pass"])) {$email_account_pass=$_POST["email_account_pass"];} if (isset($_GET["pop3_auth_mode"])) {$pop3_auth_mode=$_GET["pop3_auth_mode"];} elseif (isset($_POST["pop3_auth_mode"])) {$pop3_auth_mode=$_POST["pop3_auth_mode"];} if (isset($_GET["active"])) {$active=$_GET["active"];} elseif (isset($_POST["active"])) {$active=$_POST["active"];} if (isset($_GET["email_frequency_check_mins"])) {$email_frequency_check_mins=$_GET["email_frequency_check_mins"];} elseif (isset($_POST["email_frequency_check_mins"])) {$email_frequency_check_mins=$_POST["email_frequency_check_mins"];} if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} if (isset($_GET["default_list_id"])) {$default_list_id=$_GET["default_list_id"];} elseif (isset($_POST["default_list_id"])) {$default_list_id=$_POST["default_list_id"];} if (isset($_GET["group_id"])) {$group_id=$_GET["group_id"];} elseif (isset($_POST["group_id"])) {$group_id=$_POST["group_id"];} if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} if (isset($_GET["new_account_id"])) {$new_account_id=$_GET["new_account_id"];} elseif (isset($_POST["new_account_id"])) {$new_account_id=$_POST["new_account_id"];} if (isset($_GET["source_email_account"])) {$source_email_account=$_GET["source_email_account"];} elseif (isset($_POST["source_email_account"])) {$source_email_account=$_POST["source_email_account"];} if (isset($_GET["confirm_deletion"])) {$confirm_deletion=$_GET["confirm_deletion"];} elseif (isset($_POST["confirm_deletion"])) {$confirm_deletion=$_POST["confirm_deletion"];} if (isset($_GET["email_replyto_address"])) {$email_replyto_address=$_GET["email_replyto_address"];} elseif (isset($_POST["email_replyto_address"])) {$email_replyto_address=$_POST["email_replyto_address"];} if (isset($_GET["email_replyto_address"])) {$email_replyto_address=$_GET["email_replyto_address"];} elseif (isset($_POST["email_replyto_address"])) {$email_replyto_address=$_POST["email_replyto_address"];} if (isset($_GET["email_account_type"])) {$email_account_type=$_GET["email_account_type"];} elseif (isset($_POST["email_account_type"])) {$email_account_type=$_POST["email_account_type"];} if (isset($_GET["call_handle_method"])) {$call_handle_method=$_GET["call_handle_method"];} elseif (isset($_POST["call_handle_method"])) {$call_handle_method=$_POST["call_handle_method"];} if (isset($_GET["agent_search_method"])) {$agent_search_method=$_GET["agent_search_method"];} elseif (isset($_POST["agent_search_method"])) {$agent_search_method=$_POST["agent_search_method"];} $DB=preg_replace("/[^0-9a-zA-Z]/","",$DB); ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### $stmt = "SELECT use_non_latin,enable_queuemetrics_logging,enable_vtiger_integration,qc_features_active,outbound_autodial_active,sounds_central_control_active,enable_second_webform,user_territories_active,custom_fields_enabled,admin_web_directory,webphone_url,first_login_trigger,hosted_settings,default_phone_registration_password,default_phone_login_password,default_server_password,test_campaign_calls,active_voicemail_server,voicemail_timezones,default_voicemail_timezone,default_local_gmt,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,allow_emails,allow_emails,level_8_disable_add,enable_languages,language_method,active_modules,enable_auto_reports,allow_web_debug FROM system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); #if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysqli_num_rows($rslt); if ($qm_conf_ct > 0) { $row=mysqli_fetch_row($rslt); $non_latin = $row[0]; $SSenable_queuemetrics_logging = $row[1]; $SSenable_vtiger_integration = $row[2]; $SSqc_features_active = $row[3]; $SSoutbound_autodial_active = $row[4]; $SSsounds_central_control_active = $row[5]; $SSenable_second_webform = $row[6]; $SSuser_territories_active = $row[7]; $SScustom_fields_enabled = $row[8]; $SSadmin_web_directory = $row[9]; $SSwebphone_url = $row[10]; $SSfirst_login_trigger = $row[11]; $SShosted_settings = $row[12]; $SSdefault_phone_registration_password =$row[13]; $SSdefault_phone_login_password = $row[14]; $SSdefault_server_password = $row[15]; $SStest_campaign_calls = $row[16]; $SSactive_voicemail_server = $row[17]; $SSvoicemail_timezones = $row[18]; $SSdefault_voicemail_timezone = $row[19]; $SSdefault_local_gmt = $row[20]; $SScampaign_cid_areacodes_enabled = $row[21]; $SSpllb_grouping_limit = $row[22]; $SSdid_ra_extensions_enabled = $row[23]; $SSexpanded_list_stats = $row[24]; $SScontacts_enabled = $row[25]; $SSalt_log_server_ip = $row[26]; $SSalt_log_dbname = $row[27]; $SSalt_log_login = $row[28]; $SSalt_log_pass = $row[29]; $SStables_use_alt_log_db = $row[30]; $SSallow_emails = $row[31]; $SSemail_enabled = $row[32]; $SSlevel_8_disable_add = $row[33]; $SSenable_languages = $row[34]; $SSlanguage_method = $row[35]; $SSactive_modules = $row[36]; $SSenable_auto_reports = $row[37]; $SSallow_web_debug = $row[38]; } if ($SSallow_web_debug < 1) {$DB=0;} ##### END SETTINGS LOOKUP ##### ########################################### $list_id = preg_replace("/[^0-9]/","",$list_id); $default_list_id = preg_replace("/[^0-9]/","",$default_list_id); $email_frequency_check_mins = preg_replace("/[^0-9]/","",$email_frequency_check_mins); $active = preg_replace("/[^_0-9a-zA-Z]/","",$active); $protocol = preg_replace("/[^_0-9a-zA-Z]/","",$protocol); $action = preg_replace('/[^-_0-9a-zA-Z]/','',$action); $SUBMIT = preg_replace('/[^-_0-9a-zA-Z]/','',$SUBMIT); $stage = preg_replace('/[^-_0-9a-zA-Z]/','',$stage); $eact = preg_replace('/[^-_0-9a-zA-Z]/','',$eact); $email_account_user = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$email_account_user); $email_account_pass = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$email_account_pass); $pop3_auth_mode = preg_replace('/[^-_0-9a-zA-Z]/','',$pop3_auth_mode); $email_account_type = preg_replace('/[^-_0-9a-zA-Z]/','',$email_account_type); $call_handle_method = preg_replace('/[^-_0-9a-zA-Z]/','',$call_handle_method); $agent_search_method = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_search_method); $confirm_deletion = preg_replace('/[^-_0-9a-zA-Z]/','',$confirm_deletion); $new_account_id = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$new_account_id); $source_email_account = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$source_email_account); $email_replyto_address = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$email_replyto_address); if ($non_latin < 1) { $PHP_AUTH_USER = preg_replace("/[^-_0-9a-zA-Z]/", "",$PHP_AUTH_USER); $PHP_AUTH_PW = preg_replace("/[^-_0-9a-zA-Z]/", "",$PHP_AUTH_PW); $email_account_id = preg_replace("/[^_0-9a-zA-Z]/","",$email_account_id); $email_account_name = preg_replace("/[^ \.\,-\_0-9a-zA-Z]/","",$email_account_name); $email_account_description = preg_replace("/[^ \.\,-\_0-9a-zA-Z]/","",$email_account_description); $user_group = preg_replace("/[^-_0-9a-zA-Z]/","",$user_group); $email_account_server = preg_replace("/[^\.\-\_0-9a-zA-Z]/","",$email_account_server); $group_id = preg_replace("/[^-_0-9a-zA-Z]/", "",$group_id); $campaign_id = preg_replace("/[^-_0-9a-zA-Z]/", "",$campaign_id); } # end of non_latin else { $PHP_AUTH_USER = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_USER); $PHP_AUTH_PW = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_PW); $email_account_id = preg_replace("/[^_0-9\p{L}]/u","",$email_account_id); $email_account_name = preg_replace("/[^ \.\,-\_0-9\p{L}]/u","",$email_account_name); $email_account_description = preg_replace("/[^ \.\,-\_0-9\p{L}]/u","",$email_account_description); $user_group = preg_replace("/[^-_0-9\p{L}]/u","",$user_group); $email_account_server = preg_replace("/[^\.\-\_0-9\p{L}]/u","",$email_account_server); $group_id = preg_replace('/[^-_0-9\p{L}]/u', '', $group_id); $campaign_id = preg_replace('/[^-_0-9\p{L}]/u', '', $campaign_id); } $STARTtime = date("U"); $TODAY = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); $user = $PHP_AUTH_USER; $add_copy_disabled=0; $stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $sl_ct = mysqli_num_rows($rslt); if ($sl_ct > 0) { $row=mysqli_fetch_row($rslt); $VUselected_language = $row[0]; } $auth=0; $auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'',1,0); if ( ($auth_message == 'GOOD') or ($auth_message == '2FA') ) { $auth=1; if ($auth_message == '2FA') { header ("Content-type: text/html; charset=utf-8"); echo _QXZ("Your session is expired").". "._QXZ("Click here to log in").".\n"; exit; } } if ($auth < 1) { $VDdisplayMESSAGE = _QXZ("Login incorrect, please try again"); if ($auth_message == 'LOCK') { $VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes"); Header ("Content-type: text/html; charset=utf-8"); echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n"; exit; } if ($auth_message == 'IPBLOCK') { $VDdisplayMESSAGE = _QXZ("Your IP Address is not allowed") . ": $ip"; Header ("Content-type: text/html; charset=utf-8"); echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n"; exit; } Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\""); Header("HTTP/1.0 401 Unauthorized"); echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n"; exit; } $stmt="SELECT full_name,user_level,user_group,modify_email_accounts,qc_enabled from vicidial_users where user='$PHP_AUTH_USER';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $LOGfullname = $row[0]; $LOGuser_level = $row[1]; $LOGuser_group = $row[2]; $LOGemails_modify = $row[3]; $qc_auth = $row[4]; if ($LOGemails_modify < 1) { Header ("Content-type: text/html; charset=utf-8"); echo _QXZ("You do not have permissions to modify email accounts")."\n"; exit; } if (($LOGuser_level < 9) and ($SSlevel_8_disable_add > 0)) {$add_copy_disabled++;} $stmt="SELECT allowed_campaigns,allowed_reports,admin_viewable_groups,admin_viewable_call_times from vicidial_user_groups where user_group='$LOGuser_group';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $LOGallowed_campaigns = $row[0]; $LOGallowed_reports = $row[1]; $LOGadmin_viewable_groups = $row[2]; $LOGadmin_viewable_call_times = $row[3]; $admin_viewable_groupsALL=0; $LOGadmin_viewable_groupsSQL=''; $whereLOGadmin_viewable_groupsSQL=''; $valLOGadmin_viewable_groupsSQL=''; $vmLOGadmin_viewable_groupsSQL=''; if ( (!preg_match("/\-\-ALL\-\-/i",$LOGadmin_viewable_groups)) and (strlen($LOGadmin_viewable_groups) > 3) ) { $rawLOGadmin_viewable_groupsSQL = preg_replace("/ -/",'',$LOGadmin_viewable_groups); $rawLOGadmin_viewable_groupsSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_groupsSQL); $LOGadmin_viewable_groupsSQL = "and user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')"; $whereLOGadmin_viewable_groupsSQL = "where user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')"; $valLOGadmin_viewable_groupsSQL = "and val.user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')"; $vmLOGadmin_viewable_groupsSQL = "and vm.user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')"; } else {$admin_viewable_groupsALL=1;} $regexLOGadmin_viewable_groups = " $LOGadmin_viewable_groups "; $UUgroups_list=''; if ($admin_viewable_groupsALL > 0) {$UUgroups_list .= "\n";} $stmt="SELECT user_group,group_name from vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;"; $rslt=mysql_to_mysqli($stmt, $link); $UUgroups_to_print = mysqli_num_rows($rslt); $o=0; while ($UUgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $UUgroups_list .= "\n"; $o++; } $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_handling='EMAIL' $LOGadmin_viewable_groupsSQL order by group_id;"; # $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id"; $rslt=mysql_to_mysqli($stmt, $link); $Dgroups_to_print = mysqli_num_rows($rslt); $Dgroups_menu=''; $Dgroups_selected=0; $o=0; while ($Dgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Dgroups_menu .= "\n"; $o++; } if ($Dgroups_selected < 1) {$Dgroups_menu .= "\n";} else {$Dgroups_menu .= "\n";} $SSmenu_background='015B91'; $SSframe_background='D9E6FE'; $SSstd_row1_background='9BB9FB'; $SSstd_row2_background='B9CBFD'; $SSstd_row3_background='8EBCFD'; $SSstd_row4_background='B6D3FC'; $SSstd_row5_background='A3C3D6'; $SSalt_row1_background='BDFFBD'; $SSalt_row2_background='99FF99'; $SSalt_row3_background='CCFFCC'; if ($SSadmin_screen_colors != 'default') { $stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background FROM vicidial_screen_colors where colors_id='$SSadmin_screen_colors';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $colors_ct = mysqli_num_rows($rslt); if ($colors_ct > 0) { $row=mysqli_fetch_row($rslt); $SSmenu_background = $row[0]; $SSframe_background = $row[1]; $SSstd_row1_background = $row[2]; $SSstd_row2_background = $row[3]; $SSstd_row3_background = $row[4]; $SSstd_row4_background = $row[5]; $SSstd_row5_background = $row[6]; $SSalt_row1_background = $row[7]; $SSalt_row2_background = $row[8]; $SSalt_row3_background = $row[9]; } } $Mhead_color = $SSstd_row5_background; $Mmain_bgcolor = $SSmenu_background; $Mhead_color = $SSstd_row5_background; ?>
| \n";
echo "";
if ($error_msg) {echo "ACCOUNT NOT COPIED "._QXZ("The data you submitted has the following errors").": $error_msg";} echo " "._QXZ("Copy New Account from Existing Account")." |
| \n";
echo "";
echo " *** "._QXZ("There are no existing accounts to copy from")." ***\n"; echo " |
| \n";
echo "";
if ($error_msg) {echo "ACCOUNT NOT INSERTED "._QXZ("The data you submitted has the following errors").": $error_msg";} echo " "._QXZ("ADD NEW INBOUND EMAIL ACCOUNT")."\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } else if (($eact=="DELETE" || $eact=="UPDATE") && $email_account_id) { if ( ($LOGemails_modify==1) ) { $stmt="SELECT * from vicidial_email_accounts where email_account_id='$email_account_id'"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_array($rslt); $email_account_id=$row["email_account_id"]; $email_account_name=$row["email_account_name"]; $email_account_description=$row["email_account_description"]; $user_group=$row["user_group"]; $protocol=$row["protocol"]; $email_replyto_address=$row["email_replyto_address"]; $email_account_server=$row["email_account_server"]; $email_account_user=$row["email_account_user"]; $email_account_pass=$row["email_account_pass"]; $pop3_auth_mode=$row["pop3_auth_mode"]; $active=$row["active"]; $email_frequency_check_mins=$row["email_frequency_check_mins"]; $group_id=$row["group_id"]; $call_handle_method=$row["call_handle_method"]; $agent_search_method=$row["agent_search_method"]; $campaign_id=$row["campaign_id"]; $list_id=$row["list_id"]; $default_list_id=$row["default_list_id"]; $email_account_type=$row["email_account_type"]; if ($eact=="DELETE" && $email_account_id) { echo ""; echo " "._QXZ("CONFIRM DELETION OF INBOUND EMAIL ACCOUNT")." $email_account_id \n"; echo ""._QXZ("Click to delete account")." $email_account_id\n"; echo ""; } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $campaigns_list=''; $o=0; while ($campaigns_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $campaigns_list .= "\n"; $o++; } ##### get in-groups listings for dynamic pulldown $stmt="SELECT group_id,group_name from vicidial_inbound_groups $whereLOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Xgroups_to_print = mysqli_num_rows($rslt); $Xgroups_menu=''; $Xgroups_selected=0; $FXgroups_menu=''; $FXgroups_selected=0; $o=0; while ($Xgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xgroups_menu .= "\n"; $FXgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $o++; } if ($Xgroups_selected < 1) {$Xgroups_menu .= "\n";} else {$Xgroups_menu .= "\n";} if ($FXgroups_selected < 1) {$FXgroups_menu .= "\n";} else {$FXgroups_menu .= "\n";} ##### get in-groups listings for dynamic pulldown $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') $LOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Dgroups_to_print = mysqli_num_rows($rslt); $Dgroups_menu=''; $Dgroups_selected=0; $FDgroups_menu=''; $FDgroups_selected=0; $o=0; while ($Dgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Dgroups_menu .= "\n"; $FDgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $o++; } if ($Dgroups_selected < 1) {$Dgroups_menu .= "\n";} else {$Dgroups_menu .= "\n";} if ($FDgroups_selected < 1) {$FDgroups_menu .= "\n";} else {$FDgroups_menu .= "\n";} ## Get unhandled count $stmt="select count(*) From vicidial_email_list where status='NEW' and email_account_id='$email_account_id'"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $unhandled_emails=$row[0]; echo "
|