\n";
-echo "";
+ {
+ echo "\n";
+ echo "";
-$USERlink='stage=USERIDDOWN';
-$NAMElink='stage=NAMEDOWN';
-$LEVELlink='stage=LEVELDOWN';
-$GROUPlink='stage=GROUPDOWN';
-$SQLorder='order by full_name';
-if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';}
-if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';}
-if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';}
-if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';}
-if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';}
-if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';}
-if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';}
-if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';}
- $stmt="SELECT * from vicidial_users $SQLorder";
+ $USERlink='stage=USERIDDOWN';
+ $NAMElink='stage=NAMEDOWN';
+ $LEVELlink='stage=LEVELDOWN';
+ $GROUPlink='stage=GROUPDOWN';
+ $SQLorder='order by full_name';
+ if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';}
+ if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';}
+ if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';}
+ if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';}
+ if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';}
+ if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';}
+ if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';}
+ if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';}
+ $stmt="SELECT user,full_name,user_level,user_group from vicidial_users $SQLorder";
$rslt=mysql_query($stmt, $link);
$people_to_print = mysql_num_rows($rslt);
-echo " USER LISTINGS:\n";
-echo "\n";
-echo "";
-echo "| USER ID | ";
-echo "FULL NAME | ";
-echo "LEVEL | ";
-echo "GROUP | ";
-echo "LINKS | \n";
+ echo " USER LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| USER ID | ";
+ echo "FULL NAME | ";
+ echo "LEVEL | ";
+ echo "GROUP | ";
+ echo "LINKS | \n";
$o=0;
- while ($people_to_print > $o) {
+ while ($people_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
- echo "| $row[1] | $row[3] | $row[4] | $row[5] | ";
- echo "MODIFY | STATS | STATUS | TIME | \n";
+ echo "| $row[0] | ";
+ echo "$row[1] | ";
+ echo "$row[2] | ";
+ echo "$row[3] | ";
+ echo "MODIFY | STATS | STATUS | TIME | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=10 display all campaigns
######################
if ($ADD==10)
-{
-echo "\n";
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from vicidial_campaigns order by campaign_id";
+ $stmt="SELECT campaign_id,campaign_name,active,dial_method,auto_dial_level,lead_order,dial_statuses from vicidial_campaigns order by campaign_id";
$rslt=mysql_query($stmt, $link);
- $people_to_print = mysql_num_rows($rslt);
+ $campaigns_to_print = mysql_num_rows($rslt);
-echo " CAMPAIGN LISTINGS:\n";
-echo "\n";
+ echo " CAMPAIGN LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| CAMPAIGN ID | ";
+ echo "NAME | ";
+ echo "ACTIVE | ";
+ echo "DIAL METHOD | ";
+ echo " LEVEL | ";
+ echo "LEAD ORDER | ";
+ echo "DIAL STATUSES | ";
+ echo "MODIFY | \n";
$o=0;
- while ($people_to_print > $o) {
+ while ($campaigns_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
- echo "| $row[0] | ";
- echo " $row[1] | ";
- echo " $row[2] | ";
- echo " $row[3] | $row[4] | $row[5] | ";
- echo " $row[6] | $row[7] | | ";
+ echo " | $row[0] | ";
+ echo "$row[1] | ";
+ echo "$row[2] | ";
+ echo "$row[3] | ";
+ echo "$row[4] | ";
+ echo "$row[5] | ";
+ echo "$row[6] | ";
echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=100 display all lists
######################
if ($ADD==100)
-{
-echo "\n";
+ {
+ echo "\n";
echo "";
-$LISTlink='stage=LISTIDDOWN';
-$TALLYlink='stage=TALLYDOWN';
-$ACTIVElink='stage=ACTIVEDOWN';
-$CAMPAIGNlink='stage=CAMPAIGNDOWN';
-$CALLDATElink='stage=CALLDATEDOWN';
-$SQLorder='order by list_id';
-if (eregi("LISTIDUP",$stage)) {$SQLorder='order by list_id asc'; $LISTlink='stage=LISTIDDOWN';}
-if (eregi("LISTIDDOWN",$stage)) {$SQLorder='order by list_id desc'; $LISTlink='stage=LISTIDUP';}
-if (eregi("TALLYUP",$stage)) {$SQLorder='order by tally asc'; $TALLYlink='stage=TALLYDOWN';}
-if (eregi("TALLYDOWN",$stage)) {$SQLorder='order by tally desc'; $TALLYlink='stage=TALLYUP';}
-if (eregi("ACTIVEUP",$stage)) {$SQLorder='order by active asc'; $ACTIVElink='stage=ACTIVEDOWN';}
-if (eregi("ACTIVEDOWN",$stage)) {$SQLorder='order by active desc'; $ACTIVElink='stage=ACTIVEUP';}
-if (eregi("CAMPAIGNUP",$stage)) {$SQLorder='order by campaign_id asc'; $CAMPAIGNlink='stage=CAMPAIGNDOWN';}
-if (eregi("CAMPAIGNDOWN",$stage)) {$SQLorder='order by campaign_id desc'; $CAMPAIGNlink='stage=CAMPAIGNUP';}
-if (eregi("CALLDATEUP",$stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';}
-if (eregi("CALLDATEDOWN",$stage)) {$SQLorder='order by list_lastcalldate desc'; $CALLDATElink='stage=CALLDATEUP';}
+ $LISTlink='stage=LISTIDDOWN';
+ $TALLYlink='stage=TALLYDOWN';
+ $ACTIVElink='stage=ACTIVEDOWN';
+ $CAMPAIGNlink='stage=CAMPAIGNDOWN';
+ $CALLDATElink='stage=CALLDATEDOWN';
+ $SQLorder='order by list_id';
+ if (eregi("LISTIDUP",$stage)) {$SQLorder='order by list_id asc'; $LISTlink='stage=LISTIDDOWN';}
+ if (eregi("LISTIDDOWN",$stage)) {$SQLorder='order by list_id desc'; $LISTlink='stage=LISTIDUP';}
+ if (eregi("TALLYUP",$stage)) {$SQLorder='order by tally asc'; $TALLYlink='stage=TALLYDOWN';}
+ if (eregi("TALLYDOWN",$stage)) {$SQLorder='order by tally desc'; $TALLYlink='stage=TALLYUP';}
+ if (eregi("ACTIVEUP",$stage)) {$SQLorder='order by active asc'; $ACTIVElink='stage=ACTIVEDOWN';}
+ if (eregi("ACTIVEDOWN",$stage)) {$SQLorder='order by active desc'; $ACTIVElink='stage=ACTIVEUP';}
+ if (eregi("CAMPAIGNUP",$stage)) {$SQLorder='order by campaign_id asc'; $CAMPAIGNlink='stage=CAMPAIGNDOWN';}
+ if (eregi("CAMPAIGNDOWN",$stage)) {$SQLorder='order by campaign_id desc'; $CAMPAIGNlink='stage=CAMPAIGNUP';}
+ if (eregi("CALLDATEUP",$stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';}
+ if (eregi("CALLDATEDOWN",$stage)) {$SQLorder='order by list_lastcalldate desc'; $CALLDATElink='stage=CALLDATEUP';}
$stmt="SELECT vls.list_id,list_name,list_description,count(*) as tally,active,list_lastcalldate,campaign_id from vicidial_lists vls,vicidial_list vl where vls.list_id=vl.list_id group by list_id $SQLorder";
$rslt=mysql_query($stmt, $link);
$lists_to_print = mysql_num_rows($rslt);
-echo " LIST LISTINGS:\n";
-echo "\n";
-echo "";
-echo "| LIST ID | ";
-echo "LIST NAME | ";
-echo "DESCRIPTION | \n";
-echo "LEADS COUNT | \n";
-echo "ACTIVE | ";
-echo "LAST CALL DATE | ";
-echo "CAMPAIGN | \n";
-echo "MODIFY | \n";
-echo " \n";
+ echo " LIST LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| LIST ID | ";
+ echo "LIST NAME | ";
+ echo "DESCRIPTION | \n";
+ echo "LEADS COUNT | \n";
+ echo "ACTIVE | ";
+ echo "LAST CALL DATE | ";
+ echo "CAMPAIGN | \n";
+ echo "MODIFY | \n";
+ echo " \n";
-$o=0;
-while ($lists_to_print > $o)
- {
- $row=mysql_fetch_row($rslt);
- if (eregi("1$|3$|5$|7$|9$", $o))
- {$bgcolor='bgcolor="#B9CBFD"';}
- else
- {$bgcolor='bgcolor="#9BB9FB"';}
- echo "| $row[0] | ";
- echo " $row[1] | ";
- echo " $row[2] | ";
- echo " $row[3] | ";
- echo " $row[4] | ";
- echo " $row[5] | ";
- echo " $row[6] | ";
- echo "MODIFY | \n";
- $o++;
+ $lists_printed = '';
+ $o=0;
+ while ($lists_to_print > $o)
+ {
+ $row=mysql_fetch_row($rslt);
+ if (eregi("1$|3$|5$|7$|9$", $o))
+ {$bgcolor='bgcolor="#B9CBFD"';}
+ else
+ {$bgcolor='bgcolor="#9BB9FB"';}
+ echo "| $row[0] | ";
+ echo " $row[1] | ";
+ echo " $row[2] | ";
+ echo " $row[3] | ";
+ echo " $row[4] | ";
+ echo " $row[5] | ";
+ echo " $row[6] | ";
+ echo "MODIFY | \n";
+ $lists_printed .= "'$row[0]',";
+ $o++;
+ }
+
+ $stmt="SELECT list_id,list_name,list_description,0,active,list_lastcalldate,campaign_id from vicidial_lists where list_id NOT IN($lists_printed'');";
+ $rslt=mysql_query($stmt, $link);
+ $lists_to_print = mysql_num_rows($rslt);
+ $o=0;
+ while ($lists_to_print > $o)
+ {
+ $row=mysql_fetch_row($rslt);
+ if (eregi("1$|3$|5$|7$|9$", $o))
+ {$bgcolor='bgcolor="#B9CBFD"';}
+ else
+ {$bgcolor='bgcolor="#9BB9FB"';}
+ echo "| $row[0] | ";
+ echo " $row[1] | ";
+ echo " $row[2] | ";
+ echo " $row[3] | ";
+ echo " $row[4] | ";
+ echo " $row[5] | ";
+ echo " $row[6] | ";
+ echo "MODIFY | \n";
+ $o++;
+ }
+
+ echo " \n";
}
-echo " \n";
-}
-
######################
# ADD=1000 display all inbound groups
######################
if ($ADD==1000)
-{
-echo "\n";
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from vicidial_inbound_groups order by group_id";
+ $stmt="SELECT group_id,group_name,queue_priority,active,call_time_id,group_color from vicidial_inbound_groups order by group_id";
$rslt=mysql_query($stmt, $link);
- $people_to_print = mysql_num_rows($rslt);
+ $ingroups_to_print = mysql_num_rows($rslt);
-echo " INBOUND GROUP LISTINGS:\n";
-echo "\n";
-echo "";
-echo "| IN-GROUP | ";
-echo "NAME | ";
-echo "PRIORITY | \n";
-echo "ACTIVE | ";
-echo "TIME | ";
-echo "COLOR | \n";
-echo "MODIFY | \n";
-echo " \n";
+ echo " INBOUND GROUP LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| IN-GROUP | ";
+ echo "NAME | ";
+ echo "PRIORITY | \n";
+ echo "ACTIVE | ";
+ echo "TIME | ";
+ echo "COLOR | \n";
+ echo "MODIFY | \n";
+ echo " \n";
$o=0;
- while ($people_to_print > $o) {
+ while ($ingroups_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
@@ -16204,43 +16246,44 @@ echo "\n";
{$bgcolor='bgcolor="#9BB9FB"';}
echo "| $row[0] | ";
echo " $row[1] | ";
- echo " $row[29] | ";
+ echo " $row[2] | ";
echo " $row[3] | ";
- echo " $row[17] | ";
- echo " | ";
+ echo " $row[4] | ";
+ echo " | ";
echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=1300 display all inbound dids
######################
if ($ADD==1300)
-{
-echo "\n";
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from vicidial_inbound_dids order by did_pattern";
+ $stmt="SELECT did_id,did_pattern,did_description,did_active,did_route from vicidial_inbound_dids order by did_pattern";
$rslt=mysql_query($stmt, $link);
$dids_to_print = mysql_num_rows($rslt);
-echo " INBOUND GROUP LISTINGS:\n";
-echo "\n";
-echo "";
-echo "| # | ";
-echo "DID | ";
-echo "DESCRIPTION | \n";
-echo "ACTIVE | ";
-echo "ROUTE | ";
-echo "MODIFY | \n";
-echo " \n";
+ echo " INBOUND GROUP LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| # | ";
+ echo "DID | ";
+ echo "DESCRIPTION | \n";
+ echo "ACTIVE | ";
+ echo "ROUTE | ";
+ echo "MODIFY | \n";
+ echo " \n";
$o=0;
- while ($dids_to_print > $o) {
+ while ($dids_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
@@ -16253,29 +16296,38 @@ echo "\n";
echo " $row[4] | ";
echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=10000 display all remote agents
######################
if ($ADD==10000)
-{
-echo "\n";
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from vicidial_remote_agents order by server_ip,campaign_id,user_start";
+ $stmt="SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,status,campaign_id from vicidial_remote_agents order by server_ip,campaign_id,user_start";
$rslt=mysql_query($stmt, $link);
- $people_to_print = mysql_num_rows($rslt);
+ $remoteagents_to_print = mysql_num_rows($rslt);
-echo " REMOTE AGENTS LISTINGS:\n";
-echo "\n";
+ echo " REMOTE AGENTS LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| USER | ";
+ echo "LINES | ";
+ echo "SERVER | ";
+ echo "CONF-EXTEN | ";
+ echo "STATUS | ";
+ echo "CAMPAIGN | ";
+ echo "MODIFY | \n";
$o=0;
- while ($people_to_print > $o) {
+ while ($remoteagents_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
@@ -16287,31 +16339,37 @@ echo "\n";
echo "| $row[4] | ";
echo " $row[5] | ";
echo " $row[6] | ";
- echo "MODIFY | \n";
+ echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=100000 display all user groups
######################
if ($ADD==100000)
-{
-echo "\n";
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from vicidial_user_groups order by user_group";
+ $stmt="SELECT user_group,group_name,forced_timeclock_login from vicidial_user_groups order by user_group";
$rslt=mysql_query($stmt, $link);
- $people_to_print = mysql_num_rows($rslt);
+ $usergroups_to_print = mysql_num_rows($rslt);
-echo " USER GROUPS LISTINGS:\n";
-echo "\n";
+ echo " USER GROUPS LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| USER GROUP | ";
+ echo "GROUP NAME | ";
+ echo "FORCE TIMECLOCK | ";
+ echo "MODIFY | \n";
$o=0;
- while ($people_to_print > $o) {
+ while ($usergroups_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
@@ -16319,31 +16377,38 @@ echo "\n";
{$bgcolor='bgcolor="#9BB9FB"';}
echo "| $row[0] | ";
echo " $row[1] | ";
- echo "MODIFY | \n";
+ echo " $row[2] | ";
+ echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=1000000 display all scripts
######################
if ($ADD==1000000)
-{
-echo "\n";
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from vicidial_scripts order by script_id";
+ $stmt="SELECT script_id,script_name,active from vicidial_scripts order by script_id";
$rslt=mysql_query($stmt, $link);
- $people_to_print = mysql_num_rows($rslt);
+ $scripts_to_print = mysql_num_rows($rslt);
-echo " SCRIPTS LISTINGS:\n";
-echo "\n";
+ echo " SCRIPTS LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| SCRIPT ID | ";
+ echo "SCRIPT NAME | ";
+ echo "ACTIVE | ";
+ echo "MODIFY | \n";
$o=0;
- while ($people_to_print > $o) {
+ while ($scripts_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
@@ -16351,32 +16416,37 @@ echo "\n";
{$bgcolor='bgcolor="#9BB9FB"';}
echo "| $row[0] | ";
echo " $row[1] | ";
- echo "MODIFY | \n";
+ echo " $row[2] | ";
+ echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=10000000 display all filters
######################
if ($ADD==10000000)
-{
-echo "\n";
-
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from vicidial_lead_filters order by lead_filter_id";
+ $stmt="SELECT lead_filter_id,lead_filter_name from vicidial_lead_filters order by lead_filter_id";
$rslt=mysql_query($stmt, $link);
$filters_to_print = mysql_num_rows($rslt);
-echo " LEAD FILTER LISTINGS:\n";
-echo "\n";
+ echo " LEAD FILTER LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| SCRIPT ID | ";
+ echo "SCRIPT NAME | ";
+ echo "MODIFY | \n";
$o=0;
- while ($filters_to_print > $o) {
+ while ($filters_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
@@ -16384,32 +16454,38 @@ echo "\n";
{$bgcolor='bgcolor="#9BB9FB"';}
echo "| $row[0] | ";
echo " $row[1] | ";
- echo "MODIFY | \n";
+ echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=100000000 display all call times
######################
if ($ADD==100000000)
-{
-echo "\n";
-
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from vicidial_call_times order by call_time_id";
+ $stmt="SELECT call_time_id,call_time_name,ct_default_start,ct_default_stop from vicidial_call_times order by call_time_id";
$rslt=mysql_query($stmt, $link);
- $filters_to_print = mysql_num_rows($rslt);
+ $calltimes_to_print = mysql_num_rows($rslt);
-echo " CALL TIME LISTINGS:\n";
-echo "\n";
+ echo " CALL TIME LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| CALLTIME ID | ";
+ echo "CALLTIME NAME | ";
+ echo "DEFAULT START | ";
+ echo "DEFAULT STOP | ";
+ echo "MODIFY | \n";
$o=0;
- while ($filters_to_print > $o) {
+ while ($calltimes_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
@@ -16417,33 +16493,41 @@ echo "\n";
{$bgcolor='bgcolor="#9BB9FB"';}
echo "| $row[0] | ";
echo " $row[1] | ";
+ echo " $row[2] | ";
echo " $row[3] | ";
- echo " $row[4] | ";
- echo "MODIFY | \n";
+ echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=1000000000 display all state call times
######################
if ($ADD==1000000000)
-{
-echo "\n";
-
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from vicidial_state_call_times order by state_call_time_id";
+ $stmt="SELECT state_call_time_id,state_call_time_state,state_call_time_name,sct_default_start,sct_default_stop from vicidial_state_call_times order by state_call_time_id";
$rslt=mysql_query($stmt, $link);
- $filters_to_print = mysql_num_rows($rslt);
+ $statecalltimes_to_print = mysql_num_rows($rslt);
+
+ echo " STATE CALL TIME LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| CALLTIME ID | ";
+ echo "CALLTIME STATE | ";
+ echo "CALLTIME NAME | ";
+ echo "DEFAULT START | ";
+ echo "DEFAULT STOP | ";
+ echo "MODIFY | \n";
-echo " STATE CALL TIME LISTINGS:\n";
-echo "\n";
$o=0;
- while ($filters_to_print > $o) {
+ while ($statecalltimes_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
@@ -16454,31 +16538,38 @@ echo "\n";
echo "| $row[2] | ";
echo " $row[3] | ";
echo " $row[4] | ";
- echo "MODIFY | \n";
+ echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=130000000 display all shifts
######################
if ($ADD==130000000)
-{
-echo "\n";
-
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from vicidial_shifts order by shift_id";
+ $stmt="SELECT shift_id,shift_name,shift_start_time,shift_length,shift_weekdays from vicidial_shifts order by shift_id";
$rslt=mysql_query($stmt, $link);
- $filters_to_print = mysql_num_rows($rslt);
+ $shifts_to_print = mysql_num_rows($rslt);
-echo " SHIFT LISTINGS:\n";
-echo "\n";
+ echo " SHIFT LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| SHIFT ID | ";
+ echo "SHIFT NAME | ";
+ echo "SHIFT START | ";
+ echo "SHIFT LENGTH | ";
+ echo "WEEKDAYS | ";
+ echo "MODIFY | \n";
$o=0;
- while ($filters_to_print > $o) {
+ while ($shifts_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
@@ -16489,182 +16580,219 @@ echo "\n";
echo "| $row[2] | ";
echo " $row[3] | ";
echo " $row[4] | ";
- echo "MODIFY | \n";
+ echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=10000000000 display all phones
######################
if ($ADD==10000000000)
-{
-echo "\n";
-echo "";
+ {
+ echo "\n";
+ echo "";
-$EXTENlink='stage=EXTENDOWN';
-$PROTOlink='stage=PROTODOWN';
-$SERVERlink='stage=SERVERDOWN';
-$STATUSlink='stage=STATUSDOWN';
-$SQLorder='order by extension,server_ip';
-if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';}
-if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';}
-if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';}
-if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';}
-if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';}
-if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';}
-if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';}
-if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';}
- $stmt="SELECT * from phones $SQLorder";
+ $EXTENlink='stage=EXTENDOWN';
+ $PROTOlink='stage=PROTODOWN';
+ $SERVERlink='stage=SERVERDOWN';
+ $STATUSlink='stage=STATUSDOWN';
+ $SQLorder='order by extension,server_ip';
+ if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';}
+ if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';}
+ if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';}
+ if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';}
+ if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';}
+ if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';}
+ if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';}
+ if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';}
+ $stmt="SELECT extension,protocol,server_ip,dialplan_number,voicemail_id,status,fullname,messages,old_messages from phones $SQLorder";
$rslt=mysql_query($stmt, $link);
$phones_to_print = mysql_num_rows($rslt);
-echo " PHONE LISTINGS:\n";
-echo "\n";
-echo "";
-echo "| EXTEN | ";
-echo "PROTO | ";
-echo "SERVER | ";
-echo "DIAL PLAN | ";
-echo "STATUS | ";
-echo "NAME | ";
-echo "VMAIL | ";
-echo "LINKS | \n";
+ echo " PHONE LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| EXTEN | ";
+ echo "PROTO | ";
+ echo "SERVER | ";
+ echo "DIAL PLAN | ";
+ echo "STATUS | ";
+ echo "NAME | ";
+ echo "VMAIL | ";
+ echo "LINKS | \n";
$o=0;
- while ($phones_to_print > $o) {
+ while ($phones_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
- echo "| $row[0] | $row[16] | $row[5] | $row[1] | $row[2] | $row[8] | $row[11] | $row[14] | $row[15] | ";
- echo "MODIFY | STATS | \n";
+ echo "| $row[0] |
+ $row[1] |
+ $row[2] |
+ $row[3] |
+ $row[4] |
+ $row[5] |
+ $row[6] |
+ $row[7] |
+ $row[8] | ";
+ echo "MODIFY | STATS | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=12000000000 display all phones alias
######################
if ($ADD==12000000000)
-{
-echo "\n";
-echo "";
+ {
+ echo "\n";
+ echo "";
- $stmt="SELECT * from phones_alias order by alias_id;";
+ $stmt="SELECT alias_id,alias_name,logins_list from phones_alias order by alias_id;";
$rslt=mysql_query($stmt, $link);
- $phones_to_print = mysql_num_rows($rslt);
+ $phonealias_to_print = mysql_num_rows($rslt);
-echo " PHONE ALIAS LISTINGS:\n";
-echo "\n";
-echo "";
-echo "| ALIAS ID | ";
-echo "ALIAS NAME | ";
-echo "PHONE LOGINS LIST | ";
-echo "MODIFY | \n";
+ echo " PHONE ALIAS LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| ALIAS ID | ";
+ echo "ALIAS NAME | ";
+ echo "PHONE LOGINS LIST | ";
+ echo "MODIFY | \n";
$o=0;
- while ($phones_to_print > $o) {
+ while ($phonealias_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
- echo "| $row[0] | $row[1] | $row[2] | ";
- echo "MODIFY | \n";
+ echo "| $row[0] | ";
+ echo "$row[1] | ";
+ echo "$row[2] | ";
+ echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=100000000000 display all servers
######################
if ($ADD==100000000000)
-{
-echo "\n";
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from servers order by server_id";
+ $stmt="SELECT server_id,server_description,server_ip,active,asterisk_version,max_vicidial_trunks,local_gmt from servers order by server_id";
$rslt=mysql_query($stmt, $link);
- $phones_to_print = mysql_num_rows($rslt);
+ $servers_to_print = mysql_num_rows($rslt);
-echo " SERVER LISTINGS:\n";
-echo "\n";
+ echo " SERVER LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| SERVER ID | ";
+ echo "NAME | ";
+ echo "SERVER IP | ";
+ echo "ACTIVE | ";
+ echo "ASTERISK | ";
+ echo "TRUNKS | ";
+ echo "GMT | ";
+ echo "MODIFY | \n";
$o=0;
- while ($phones_to_print > $o) {
+ while ($servers_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
- echo "| $row[0] | $row[1] | ";
- echo " $row[2] | ";
- echo " $row[4] | ";
- echo " $row[3] | | ";
- echo "MODIFY | \n";
+ echo "| $row[0] | ";
+ echo "$row[1] | ";
+ echo "$row[2] | ";
+ echo "$row[3] | ";
+ echo "$row[4] | ";
+ echo "$row[5] | ";
+ echo "$row[6] | ";
+ echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=1000000000000 display all conferences
######################
if ($ADD==1000000000000)
-{
-echo "\n";
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from conferences order by conf_exten";
+ $stmt="SELECT conf_exten,server_ip,extension from conferences order by conf_exten";
$rslt=mysql_query($stmt, $link);
- $phones_to_print = mysql_num_rows($rslt);
+ $conferences_to_print = mysql_num_rows($rslt);
-echo " CONFERENCE LISTINGS:\n";
-echo "\n";
+ echo " CONFERENCE LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| CONFERENCE | ";
+ echo "SERVER IP | ";
+ echo "EXTENSION | ";
+ echo "MODIFY | \n";
$o=0;
- while ($phones_to_print > $o) {
+ while ($conferences_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
echo "| $row[0] | ";
- echo " $row[1] | ";
- echo " $row[2] | $row[4] | | ";
- echo "MODIFY | \n";
+ echo "$row[1] | ";
+ echo "$row[2] | ";
+ echo "MODIFY | \n";
$o++;
- }
+ }
-echo " \n";
-}
+ echo " \n";
+ }
######################
# ADD=10000000000000 display all vicidial conferences
######################
if ($ADD==10000000000000)
-{
-echo "\n";
+ {
+ echo "\n";
echo "";
- $stmt="SELECT * from vicidial_conferences order by conf_exten";
+ $stmt="SELECT conf_exten,server_ip,extension from vicidial_conferences order by conf_exten";
$rslt=mysql_query($stmt, $link);
- $phones_to_print = mysql_num_rows($rslt);
+ $vicidialconf_to_print = mysql_num_rows($rslt);
-echo " CONFERENCE LISTINGS:\n";
-echo "\n";
+ echo " VICIDIAL CONFERENCE LISTINGS:\n";
+ echo "\n";
+ echo "";
+ echo "| CONFERENCE | ";
+ echo "SERVER IP | ";
+ echo "EXTENSION | ";
+ echo "MODIFY | \n";
$o=0;
- while ($phones_to_print > $o) {
+ while ($vicidialconf_to_print > $o)
+ {
$row=mysql_fetch_row($rslt);
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
@@ -16672,13 +16800,18 @@ echo "\n";
{$bgcolor='bgcolor="#9BB9FB"';}
echo "| $row[0] | ";
echo " $row[1] | ";
- echo " $row[2] | $row[4] | | ";
- echo "MODIFY | \n";
+ echo " $row[2] | ";
+ echo "MODIFY | \n";
$o++;
+ }
+
+ echo " \n";
}
-echo " \n";
-}
+
+
+
+
######################
# ADD=999999 display reports section
@@ -16690,10 +16823,6 @@ if ($ADD==999999)
echo "| \n";
echo "";
- $stmt="SELECT * from vicidial_conferences order by conf_exten";
- $rslt=mysql_query($stmt, $link);
- $phones_to_print = mysql_num_rows($rslt);
-
$stmt="select * from servers;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|