require("dbconnect.php"); require_once("htglobalize.php"); ### If you have globals turned off uncomment these lines //$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; //$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; ##//$ADD=$_GET["ADD"]; # don't uncomment this line ### AST GUI database administration ### admin.php ### ### CHANGES ### 50315-1110 - Added Custom Campaign Statuses ### 50317-1438 - Added Fronter Display var to inbound groups ### 50322-1355 - Added custom callerID per campaign ### 50517-1356 - Added user_groups sections and user_group to vicidial_users ### 50517-1440 - Added ability to logout (must click OK with empty user/pass) ### 50602-1622 - Added lead loader pages to load new files into vicidial_list ### 50620-1351 - Added custom vdad transfer AGI extension per campaign ### 50810-1414 - modified in groups to kick out spaces and dashes ### 50908-2136 - Added Custom Campaign HotKeys ### ### make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time $version = '1.1.7'; $build = '50908-2136'; $STARTtime = date("U"); if ($force_logout) { if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); } echo "You have now logged out. Thank you\n"; exit; } $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; $fp = fopen ("./project_auth_entries.txt", "a"); $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; exit; } else { if($auth>0) { $office_no=strtoupper($PHP_AUTH_USER); $password=strtoupper($PHP_AUTH_PW); $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); fclose($fp); } else { fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); fclose($fp); } } echo "\n"; echo "
\n"; echo "\n"; echo "| VICIDIAL ADMIN - Logout | echo date("l F j, Y G:i:s A") ?> |
| LIST USERS | ADD NEW USER | SEARCH FOR A USER | ADD USER GROUP | LIST USER GROUPS | |
| ADD CAMPAIGN | LIST CAMPAIGNS | SHOW LISTS | ADD NEW LIST | | LOAD NEW LEADS | |
| SHOW IN-GROUPS | ADD NEW IN-GROUP | SHOW REMOTE AGENTS | ADD NEW REMOTE AGENTS | |
| SERVER STATS | PARK REPORT | VDAD REPORT | CLOSER REPORT | | SEARCH FOR A LEAD | GROUP HOURLY | |
|
######################
# ADD=1 display the ADD NEW USER FORM SCREEN
######################
if ($ADD==1)
{
echo "";
echo " ADD A NEW USER | |
| User ID Start: | (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE |
| Number of Lines: | (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE |
| Server IP: | $NWB#vicidial_remote_agents-server_ip$NWE |
| External Extension: | (dialplan number dialed to reach agents)$NWB#vicidial_remote_agents-conf_exten$NWE |
| Status: | $NWB#vicidial_remote_agents-status$NWE |
| Campaign: | $NWB#vicidial_remote_agents-campaign_id$NWE |
| Inbound Groups: | \n"; echo "$groups_list"; echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE |
| Group: | (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE |
| Description: | (description of group)$NWB#vicidial_user_groups-group_name$NWE |
| User Number: | |
| Full Name: | |
| User Level: | |
| User Group: | |
| $row[1] | $row[3] | $row[4] | $row[5] | "; echo "MODIFY | STATS |
| $row[1] | $row[3] | $row[4] | $row[5] | "; echo "MODIFY | STATS |
| $row[0] | $row[1] | "; echo "$row[2] | "; echo "$row[3] | $row[4] | $row[5] | "; echo "$row[6] | $row[7] | "; echo " | MODIFY |
| $row[0] | "; echo "$row[1] | "; echo "$row[2] | $row[4] | $row[5] | "; echo "$row[3] | $row[7] | "; echo " | MODIFY |
| $row[0] | "; echo "$row[1] | "; echo "$row[3] | "; echo "$row[5] | "; echo ""; echo " | MODIFY |
| $row[1] | "; echo "$row[2] | "; echo "$row[3] | "; echo "$row[4] | "; echo "$row[5] | "; echo "$row[6] | "; echo "MODIFY |
| $row[0] | "; echo "$row[1] | "; echo "MODIFY |