Small bug fixes and link additions involving custom list fields

git-svn-id: svn://192.168.202.10@1479 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-07-13 15:16:16 +00:00
parent 44590dea74
commit 6d9a174c43
4 changed files with 26 additions and 6 deletions
@@ -251,6 +251,8 @@ Slave Database Server||
If you have a MySQL slave database server then enter the local IP address for that server here. This option is currently only used by the selected reports in the next option and has nothing to do with automatically configuring MySQL master-slave replication. Default is empty for disabled||
Reports to use Slave DB||
This option allows you to select the reports that you want to have use the MySQL slave database as defined in the option above instead of the master database that your live ViciDial system is running on. You must set up the MySQL slave replication before you can enable this option. Default is empty for disabled||
Custom fields defined for this list||
Go to the list modification page for this list||
AST_VICIDIAL_ingrouplist.php
+10 -1
View File
@@ -20254,7 +20254,16 @@ if ($ADD==311)
echo "<center><b>\n";
echo "<br><br><a href=\"$PHP_SELF?ADD=811&list_id=$list_id\">Click here to see all CallBack Holds in this list</a><BR><BR>\n";
if ($SScustom_fields_enabled > 0)
{
$stmt="SELECT count(*) from vicidial_lists_fields where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
echo "<br><br><a href=\"./admin_lists_custom.php?action=MODIFY_CUSTOM_FIELDS&list_id=$list_id\">Custom fields defined for this list: $rowx[0]</a><BR>\n";
}
echo "<br><br><a href=\"$PHP_SELF?ADD=811&list_id=$list_id\">Click here to see all CallBack Holds in this list</a><BR>\n";
echo "<br><br><a href=\"./list_download.php?list_id=$list_id\">Click here to download this list</a><BR><BR>\n";
if ($LOGdelete_lists > 0)
@@ -1229,6 +1229,9 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
echo "</table></center></form><BR><BR>\n";
echo "</table></center><BR><BR>\n";
echo "</TABLE>\n";
echo "&nbsp; <a href=\"./admin.php?ADD=311&list_id=$list_id\">Go to the list modification page for this list</a><BR><BR>\n";
echo "&nbsp; <a href=\"$PHP_SELF?action=ADMIN_LOG&list_id=$list_id\">Click here to see Admin changes to this lists custom fields</a><BR><BR><BR> </center> &nbsp; \n";
}
### END modify custom fields for list
@@ -21,6 +21,7 @@
# 100702-1332 - Added custom fields option
# 100712-1324 - Added system setting slave server option
# 100713-0101 - Added recordings fields option (for filename, recording ID and URL)
# 100713-1050 - Fixed minor custom fields issue
#
require("dbconnect.php");
@@ -244,7 +245,7 @@ if ($run_export > 0)
$k=0;
if ($RUNcampaign > 0)
{
$stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id,vl.uniqueid from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;";
$stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id,vl.uniqueid,vi.entry_list_id from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$outbound_to_print = mysql_num_rows($rslt);
@@ -266,6 +267,7 @@ if ($run_export > 0)
$export_list_id[$k] = $row[8];
$export_lead_id[$k] = $row[35];
$export_vicidial_id[$k] = $row[36];
$export_entry_list_id[$k] = $row[37];
$export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t";
$i++;
$k++;
@@ -276,7 +278,7 @@ if ($run_export > 0)
if ($RUNgroup > 0)
{
$stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id,vl.closecallid from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;";
$stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id,vl.closecallid,vi.entry_list_id from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;";
$rslt=mysql_query($stmtA, $link);
if ($DB) {echo "$stmt\n";}
$inbound_to_print = mysql_num_rows($rslt);
@@ -298,6 +300,7 @@ if ($run_export > 0)
$export_list_id[$k] = $row[8];
$export_lead_id[$k] = $row[35];
$export_vicidial_id[$k] = $row[36];
$export_entry_list_id[$k] = $row[37];
$export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t";
$i++;
$k++;
@@ -423,13 +426,16 @@ if ($run_export > 0)
if ( ($custom_fields_enabled > 0) and ($custom_fields=='YES') )
{
$stmt="SHOW TABLES LIKE \"custom_$export_list_id[$i]\";";
$CF_list_id = $export_list_id[$i];
if ($export_entry_list_id[$i] > 99)
{$CF_list_id = $export_entry_list_id[$i];}
$stmt="SHOW TABLES LIKE \"custom_$CF_list_id\";";
if ($DB>0) {echo "$stmt";}
$rslt=mysql_query($stmt, $link);
$tablecount_to_print = mysql_num_rows($rslt);
if ($tablecount_to_print > 0)
{
$stmt = "describe custom_$export_list_id[$i];";
$stmt = "describe custom_$CF_list_id;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$columns_ct = mysql_num_rows($rslt);
@@ -442,7 +448,7 @@ if ($run_export > 0)
}
if ($columns_ct > 1)
{
$stmt = "SELECT * from custom_$export_list_id[$i] where lead_id='$export_lead_id[$i]' limit 1;";
$stmt = "SELECT * from custom_$CF_list_id where lead_id='$export_lead_id[$i]' limit 1;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$customfield_ct = mysql_num_rows($rslt);