<?php $etel_debug_mode = 0; $headerInclude = "risk_smart"; require_once "../includes/dbconnection.php"; require_once '../includes/function.php'; require_once '../includes/subFunctions/risk_report.php'; include "includes/header.php"; $report = new risk_report_main(); if (isset($_POST['frm_report_name'])) { $use_date = array(); $use_proj = array(); $use_calc = array(); if (isset($_POST['frm_date'])) { foreach ($_POST['frm_date'] as $index => $name) { $use_date[] = $name; } } if (isset($_POST['frm_proj'])) { foreach ($_POST['frm_proj'] as $index => $name) { $use_proj[] = $name; } } if (isset($_POST['frm_calc'])) { foreach ($_POST['frm_calc'] as $index => $name) { $use_calc[$name] = array(); } foreach ($use_calc as $name => $info) { $frm_append = "frm_" . strtolower(str_replace(array(" ", "-"), "_", $name)); foreach ($_POST as $post_name => $value) { if (stristr($post_name, $frm_append) !== FALSE) {
$my_sql['search']['page_count']['options']['source']['pairs'] = "ResultsPerPage"; $my_sql['search']['page_offset'] = array("input_type" => "hidden", "in_query" => false, "value" => 0, "locked" => false); $my_sql['subquery']['title'] = "Report Summary"; $my_sql['subquery']['queries']['02|Reports'] = array("name" => "number_reports", "source" => "COUNT(r.rc_company_id)", "hidden" => 0); $my_sql['result_actions']['title'] = "Reports Found"; $my_sql['postpage'] = "risk_Smarter.php"; $my_sql['title'] = "Report Lookup"; $my_sql['pairs']['ResultsPerPage'] = array(array("display" => "50", "value" => "50"), array("display" => "25", "value" => "25"), array("display" => "10", "value" => "10"), array("display" => "100", "value" => "100"), array("display" => "All", "value" => "1000")); $my_sql['pairs']['Company_Search_By'] = array(array("display" => "Company Name", "value" => "cn"), array("display" => "Reference ID", "value" => "ri"), array("display" => "Login UserName", "value" => "un"), array("display" => "Contact Email", "value" => "em"), array("display" => "Website Name", "value" => "wn"), array("display" => "Website Reference ID", "value" => "wr"), array("display" => "Merchant ID (List)", "value" => "id")); /**************** Process and Render Forms ****************/ smart_search_form($my_sql); if (smart_process_mysql_form($my_sql)) { $results = smart_search($my_sql); $report = new risk_report_main($_POST['frm_custom_report']); $company_ids = array(); foreach ($results['rows'] as $key => $values) { foreach ($values as $index => $value) { $company_ids[] = $value['rc_company_id']; } } unset($my_sql['limit']); unset($my_sql['return']); unset($my_sql['subquery']); $my_sql['return']["00|Company Id"] = array("source" => "r.rc_company_id", "column" => "rc_company_id", "hidden" => 1); $results = smart_search($my_sql, true); foreach ($results['rows'] as $key => $values) { foreach ($values as $index => $value) { $all_company_ids[] = $value['rc_company_id']; }
<?php $etel_debug_mode = 0; require_once "../includes/dbconnection.php"; require_once '../includes/function.php'; require_once '../includes/subFunctions/risk_report.php'; $t = time(); echo time() - $t . " Ready to Report<BR>"; $report = new risk_report_main(); if (isset($_GET['install'])) { $report->install_risk_reporting(); } echo time() - $t . " Running Report<BR>"; $report->run_cron(); echo time() - $t . " seconds to process";
<?php $etel_debug_mode = 0; include "includes/sessioncheck.php"; require_once "../includes/dbconnection.php"; require_once '../includes/function.php'; require_once '../includes/subFunctions/risk_report.php'; //$company_id = isset($_GET['company_id']) ? $_GET['company_id'] : (isset($_POST['company_id']) ? $_POST['company_id'] : ""); //$custom_report = isset($_GET['custom_report']) ? $_GET['custom_report'] : (isset($_POST['custom_report']) ? $_POST['custom_report'] : ""); if (isset($_SESSION['company_id'])) { $company_id = $_SESSION['company_id']; } else { exit; } if (isset($_SESSION['custom_report'])) { $custom_report = $_SESSION['custom_report']; } $report = new risk_report_main($custom_report); if (is_array($company_id)) { $report->display_risk_report($company_id); } else { if ($company_id != "") { $report->display_risk_report(array($company_id)); } } unset($_SESSION['company_id']);
<?php $etel_debug_mode = 0; include "includes/sessioncheck.php"; require_once "../includes/dbconnection.php"; require_once '../includes/function.php'; require_once '../includes/subFunctions/risk_report.php'; //$company_id = isset($_GET['company_id']) ? $_GET['company_id'] : (isset($_POST['company_id']) ? $_POST['company_id'] : ""); //$custom_report = isset($_GET['custom_report']) ? $_GET['custom_report'] : (isset($_POST['custom_report']) ? $_POST['custom_report'] : ""); if (isset($_SESSION['summary_company_id'])) { $company_id = $_SESSION['summary_company_id']; } else { exit; } if (isset($_SESSION['custom_report'])) { $custom_report = $_SESSION['custom_report']; } $report = new risk_report_main($custom_report); if (is_array($company_id)) { $report->display_summary_report($company_id); } else { if ($company_id != "") { $report->display_summary_report(array($company_id)); } else { $report->display_summary_report(); } } unset($_SESSION['summary_company_id']);