diff --git a/docs/REQUIRED_APPS_INSTALL.txt b/docs/REQUIRED_APPS_INSTALL.txt index 8f88a7f6..6e47af3c 100644 --- a/docs/REQUIRED_APPS_INSTALL.txt +++ b/docs/REQUIRED_APPS_INSTALL.txt @@ -510,11 +510,11 @@ rm -f /usr/lib/asterisk/modules/res_speech.so mkdir /usr/src/asterisk-1.4 cd /usr/src/asterisk-1.4 -wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.4.22.tar.gz +wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.4.21.2.tar.gz wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.4.12.1.tar.gz wget http://ftp.digium.com/pub/libpri/releases/libpri-1.4.7.tar.gz -gunzip asterisk-1.4.22.tar.gz -tar xvf asterisk-1.4.22.tar +gunzip asterisk-1.4.21.2.tar.gz +tar xvf asterisk-1.4.21.2.tar gunzip zaptel-1.4.12.1.tar.gz tar xvf zaptel-1.4.12.1.tar gunzip libpri-1.4.7.tar.gz @@ -527,7 +527,7 @@ cd ../libpri-1.4.7 make clean make make install -cd ../asterisk-1.4.22 +cd ../asterisk-1.4.21.2 wget http://downloads.vicidial.com/asterisk-patches/1.4-gsm-gcc4.2.patch patch -p1 ./codecs/gsm/Makefile 1.4-gsm-gcc4.2.patch wget http://www.eflo.net/files/enter.h diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index df5bf791..41c8aa5f 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -1475,11 +1475,12 @@ $survey_camp_record_dir = ereg_replace(";","",$survey_camp_record_dir); # 81030-2228 - Fixed DIDs creation issue # 81103-1408 - Added 3way call dial prefix option # 81107-1551 - Added Stats Percent of Calls Answered Within X seconds fields to in-groups +# 81118-0933 - Changed lists listing with links and more options # # 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 -$admin_version = '2.0.5-149'; -$build = '81107-1551'; +$admin_version = '2.0.5-150'; +$build = '81118-0933'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -11549,66 +11550,101 @@ if ($ADD==31) echo "\n"; echo "
\n"; - echo "
LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE
\n"; - echo "\n"; - echo "\n"; + echo "
LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE\n"; - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; + echo "
LIST IDLIST NAMEACTIVE
\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';} + $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 and campaign_id='$campaign_id' group by list_id $SQLorder"; $rslt=mysql_query($stmt, $link); $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; + + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; $o=0; - while ($lists_to_print > $o) + while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - + $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; - echo "\n"; - } - echo "
LIST IDLIST NAMEDESCRIPTIONLEADS COUNTACTIVELAST CALL DATECAMPAIGNMODIFY
$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]MODIFY
$rowx[0]$rowx[2]$rowx[1]

\n"; - echo "
\n"; + if (ereg("Y", $row[4])) {$active_lists++; $camp_lists .= "'$row[0]',";} + if (ereg("N", $row[4])) {$inactive_lists++;} - $filterSQL = $filtersql_list[$lead_filter_id]; - $filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); - if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} - else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); - echo "This campaign has $active_lists active lists and $inactive_lists inactive lists

\n"; - - if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$fSQL); - echo " - HIDE

"; - } - else - { - echo "Popup Dialable Leads Count"; - echo " - SHOW

"; + $o++; } + echo "

\n"; + + echo "
\n"; + + $filterSQL = $filtersql_list[$lead_filter_id]; + $filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); + if (strlen($filterSQL)>4) + {$fSQL = "and $filterSQL";} + else + {$fSQL = '';} + + $camp_lists = eregi_replace(".$","",$camp_lists); + echo "This campaign has $active_lists active lists and $inactive_lists inactive lists

\n"; + + if ($display_dialable_count == 'Y') + { + ### call function to calculate and print dialable leads + dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$fSQL); + echo " - HIDE

"; + } + else + { + echo "Popup Dialable Leads Count"; + echo " - SHOW

"; + } - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; + + $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $hopper_leads = "$rowx[0]"; echo "This campaign has $hopper_leads leads in the dial hopper

\n"; echo "Click here to see what leads are in the hopper right now

\n"; @@ -12300,33 +12336,66 @@ if ($ADD==34) echo "
\n"; echo "
LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE
\n"; - echo "\n"; - echo "\n"; - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; + echo "
LIST IDLIST NAMEACTIVE
\n"; + echo ""; - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} + $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 and campaign_id='$campaign_id' group by list_id $SQLorder"; + $rslt=mysql_query($stmt, $link); + $lists_to_print = mysql_num_rows($rslt); + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo ""; + echo "\n"; + echo "\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 ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; - echo "\n"; + if (ereg("Y", $row[4])) {$active_lists++; $camp_lists .= "'$row[0]',";} + if (ereg("N", $row[4])) {$inactive_lists++;} + $o++; } - echo "
LIST IDLIST NAMEDESCRIPTIONLEADS COUNTACTIVELAST CALL DATECAMPAIGNMODIFY
$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]MODIFY
$rowx[0]$rowx[2]$rowx[1]

\n"; + echo "

\n"; echo "
\n"; $filterSQL = $filtersql_list[$lead_filter_id]; @@ -15915,26 +15984,56 @@ if ($ADD==100) echo "
\n"; echo ""; - $stmt="SELECT * from vicidial_lists order by list_id"; +$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); - $people_to_print = mysql_num_rows($rslt); + $lists_to_print = mysql_num_rows($rslt); echo "
LIST LISTINGS:\n"; echo "
\n"; +echo ""; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; - $o=0; - 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 ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; +$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 ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + $o++; } echo "
LIST IDLIST NAMEDESCRIPTIONLEADS COUNTACTIVELAST CALL DATECAMPAIGNMODIFY
$row[0] $row[1] $row[2]$row[4]$row[5] $row[3]$row[7]  MODIFY
$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]MODIFY
\n";