Exemplo n.º 1
0
 echo "<TR><TD COLSPAN=7 ALIGN=CENTER><input type=submit value=\"SUBMIT AKTIVEN LISTE ÄNDERUNGEN\"></TD></TR>\n";
 echo "</TABLE></center><BR></FORM>\n";
 echo "<center><b>\n";
 $filterSQL = $filtersql_list[$lead_filter_id];
 $filterSQL = preg_replace("/\\\\/", "", $filterSQL);
 $filterSQL = eregi_replace("^and|and\$|^or|or\$", "", $filterSQL);
 if (strlen($filterSQL) > 4) {
     $fSQL = "and {$filterSQL}";
 } else {
     $fSQL = '';
 }
 $camp_lists = eregi_replace(".\$", "", $camp_lists);
 echo "Diese Kampagne hat{$active_lists} aktive Listen und{$inactive_lists} unaktivierte Listen<br><br>\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, $drop_lockout_time, $fSQL);
     echo " - <font size=1><a href=\"{$PHP_SELF}?ADD=34&campaign_id={$campaign_id}&stage=hide_dialable\">Verberge</a></font><BR><BR>";
 } else {
     echo "<a href=\"{$PHP_SELF}?ADD=73&campaign_id={$campaign_id}\" target=\"_blank\">Popup Dialable Leads Count</a>";
     echo " - <font size=1><a href=\"{$PHP_SELF}?ADD=31&campaign_id={$campaign_id}&stage=show_dialable\">Zeige</a></font><BR><BR>";
 }
 $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 "Diese Kampagne hat{$hopper_leads} Leitungen im Vorwahlknopfzufuhrbehälter<br><br>\n";
 echo "<a href=\"./AST_VICIDIAL_hopperlist.php?group={$campaign_id}\">Klicken Sie hier, um zu sehen, welche Leitungen im Zufuhrbehälter imAugenblick sind</a><br><br>\n";
 echo "<a href=\"./AST_VDADstats.php?group={$campaign_id}\">Klicken Sie hier, um ein VDAD Bericht für diese Kampagne</a><BR><BR>\n";
     }
     $list_call_inv = 0;
     GetListCount($list_id, $inventory_ptnstr);
     $average_calls = sprintf("%.1f", MathZDC($total_calls, $list_start_inv));
     ### For TOTAL counts, needs to be here instead of with other "total" variables further down in this particular report
     $total_total_calls += $total_calls;
     $Xdialable_count_nofilter = dialable_leads($DB, $link, $local_call_time, "{$dial_statuses}", $selected_list, $drop_lockout_time, $call_count_limit, $single_status, "");
     if (strlen($inactive_dial_statuses) > 1) {
         $Xdialable_inactive_count = dialable_leads($DB, $link, $local_call_time, "{$inactive_dial_statuses}", $selected_list, $drop_lockout_time, $call_count_limit, $single_status, "{$filter_SQL}");
     } else {
         $Xdialable_inactive_count = 0;
     }
     $oneoff_SQL = $filter_SQL . " and (called_count < {$call_count_limit}-1) ";
     $oneoff_count = dialable_leads($DB, $link, $local_call_time, "{$dial_statuses}", $selected_list, $drop_lockout_time, $call_count_limit, $single_status, "{$oneoff_SQL}");
     $full_dialable_SQL = "";
     $Xdialable_count = dialable_leads($DB, $link, $local_call_time, "{$dial_statuses}", $selected_list, $drop_lockout_time, $call_count_limit, $single_status, "{$filter_SQL}");
     if ($DB > 0) {
         echo _QXZ("FULL DIALABLE SQL") . ": |{$full_dialable_SQL}|";
     }
 }
 $penetration = sprintf("%.2f", MathZDC(100 * ($list_start_inv - $Xdialable_count), $list_start_inv));
 $rpt_body .= "| " . sprintf("%9s", $list_id) . " | " . sprintf("%-30s", $list_info) . " | " . sprintf("%8s", $campaign_id) . " | " . $last_calldate . " | " . sprintf("%9s", $list_start_inv) . " | " . sprintf("%8s", $Xdialable_count) . " | " . sprintf("%8s", $Xdialable_count_nofilter) . " | " . sprintf("%8s", $oneoff_count) . " | " . sprintf("%8s", $Xdialable_inactive_count) . " | " . sprintf("%8s", $average_calls) . " | " . sprintf("%6s", $penetration) . "% |";
 $CSV_body .= "\"{$list_id}\",\"{$list_info}\",\"{$last_calldate}\",\"{$campaign_id}\",\"{$list_start_inv}\",\"{$Xdialable_count}\",\"{$Xdialable_count_nofilter}\",\"{$oneoff_count}\",\"{$Xdialable_inactive_count}\",\"{$average_calls}\",\"{$penetration} %\"";
 $total_list_start_inv += $list_start_inv;
 $total_dialable_count += $Xdialable_count;
 $total_dialable_count_nofilter += $Xdialable_count_nofilter;
 $total_dialable_count_oneoff += $oneoff_count;
 $total_dialable_count_inactive += $Xdialable_inactive_count;
 $shift_ary2 = $shift_ary;
 while (list($key, $val) = each($shift_ary2)) {
     $total_shift_count = 0;