diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index e690cc3c..782a0e1d 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -135,10 +135,11 @@ # 71029-1855 - removed campaign_id naming restrictions for CLOSER-type campaigns # 71030-2047 - added hopper priority for auto alt dial entries # 71116-1011 - added calls_today count updating of the vicidial_live_agents upon INCALL +# 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login # -$version = '2.0.4-62'; -$build = '71116-1011'; +$version = '2.0.4-63'; +$build = '71120-1520'; require("dbconnect.php"); @@ -294,40 +295,46 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $MT[0]=''; $agents='@agents'; -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) -{ -echo "Invalid Username/Password: |$user|$pass|\n"; -exit; -} -else -{ - -if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) +if ($ACTION == 'LogiNCamPaigns') { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; + $skip_user_validation=1; } else { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; + $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) + $auth=$row[0]; + + if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) + { + echo "Invalid Username/Password: |$user|$pass|\n"; + exit; + } + else + { + if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Invalid session_name: |$session_name|$server_ip|\n"; + echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; exit; } - else + else { - # do nothing for now + $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $SNauth=$row[0]; + if($SNauth==0) + { + echo "Invalid session_name: |$session_name|$server_ip|\n"; + exit; + } + else + { + # do nothing for now + } } } } @@ -344,6 +351,63 @@ echo "
} + +################################################################################ +### LogiNCamPaigns - generates an HTML SELECT list of allowed campaigns for a +### specific agent on the login screen +################################################################################ +if ($ACTION == 'LogiNCamPaigns') +{ + if ( (strlen($user)<1) ) + { + echo "\n"; + exit; + } + else + { + echo "\n"; + exit; + } +} + + + ################################################################################ ### regCLOSER - update the vicidial_live_agents table to reflect the closer ### inbound choices made upon login diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 248eb31b..b534f46a 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -166,10 +166,11 @@ # 71029-1848 - Changed CLOSER-type campaign to not use campaign_id restrictions # 71101-1204 - Fixed bug in callback calendar with DST # 71116-0957 - Added campaign_weight and calls_today to the vla table insertion +# 71120-1719 - Added XMLHTPRequest lookup of allowable campaigns for agents during login # -$version = '2.0.4-137'; -$build = '71116-0957'; +$version = '2.0.4-138'; +$build = '71120-1719'; require("dbconnect.php"); @@ -249,6 +250,7 @@ $clientDST = '1'; # set to 1 to check for DST on server for agent time $no_delete_sessions = '0'; # set to 1 to not delete sessions at logout $volumecontrol_active = '1'; # set to 1 to allow agents to alter volume of channels $PreseT_DiaL_LinKs = '1'; # set to 1 to show a DIAL link for Dial Presets +$LogiNAJAX = '1'; # set to 1 to do lookups $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -284,10 +286,31 @@ echo "\n"; if ($campaign_login_list > 0) { -$camp_form_code = "