Exemplo n.º 1
0
$my_sql['result_actions']['postpage'] = "rebillSummary.php";
$my_sql['result_actions']['title'] = "Rebills Found";
/****************
Process and Render Forms
****************/
require_once 'includes/header.php';
smart_search_form($my_sql);
if (smart_process_mysql_form($my_sql)) {
    $rebills->set_user($_REQUEST['frm_user_id']);
    $rebills->set_limit_offset($_REQUEST['frm_page_count'], $_REQUEST['frm_page_offset']);
    $rebills->set_site_id($_REQUEST['frm_site']);
    $rebills->set_banks($_REQUEST['frm_show_banks']);
    $rebills->set_sort_by($_REQUEST['frm_sort_by']);
    $rebills->set_hide_dupes($_REQUEST['frm_hide_duplicates']);
    $rebills->set_subaccount_byname($_REQUEST['frm_subaccount_name']);
    $rebills->set_account_status($_REQUEST['frm_account_status']);
    $rebills->set_rebill_status($_REQUEST['frm_rebill_type']);
    $rebills->set_frozen_status($_REQUEST['frm_ss_rebill_frozen']);
    if (isset($_REQUEST['frm_displayrange']) && $_REQUEST['frm_displayrange'] == 1) {
        $rebills->set_date_range($_REQUEST['frm_tran_date_from'], $_REQUEST['frm_tran_date_to']);
    }
    $rebills->get_rebilldetails();
    if (isset($_REQUEST['frm_display_type'])) {
        echo in_array(1, $_REQUEST['frm_display_type']) ? $rebills->render_status_summary() . "<br><br>" : "";
        echo in_array(2, $_REQUEST['frm_display_type']) ? $rebills->render_rebill_summary() . "<br><br>" : "";
        echo in_array(4, $_REQUEST['frm_display_type']) ? $rebills->render_transactions() . "<br><br>" : "";
        echo in_array(16, $_REQUEST['frm_display_type']) ? $rebills->render_pay_details() . "<br><br>" : "";
        echo in_array(8, $_REQUEST['frm_display_type']) ? $rebills->render_calendar(true, $_REQUEST['frm_show_banks']) . "<br><br>" : "";
    }
}
require_once "includes/footer.php";
/****************
Define Search Fields and Action Fields
****************/
$my_sql['search']['site'] = array("input_type" => "selectmulti", "display" => "Web Site");
$my_sql['search']['site']['style'] = array("size" => 3, "style" => "width:250px;");
$my_sql['search']['site']['options']['source']['script'] = "smart_getSites";
$my_sql['search']['site']['options']['source']['parameters']['userid'] = $sessionlogin;
$my_sql['search']['subaccount'] = array("input_type" => "selectmulti", "display" => "SubAccount");
$my_sql['search']['subaccount']['options']['source']['pairs'] = "SubAccounts";
$my_sql['search']['subaccount']['style'] = array("size" => 3, "style" => "width:250px;");
$my_sql['search']['tran_date'] = array("input_type" => "date_simple", "display" => "Month to View", "date_format" => "Y-n-j", "min_year" => date("Y") - 10, "max_year" => date("Y") + 2);
$my_sql['postpage'] = "rebillSummary_calendar.php";
$my_sql['title'] = "Rebill Calendar";
/****************
Process and Render Forms
****************/
require_once 'includes/header.php';
smart_search_form($my_sql);
if (smart_process_mysql_form($my_sql)) {
    $rebills->set_limit_offset($_REQUEST['frm_page_count'], $_REQUEST['frm_page_offset']);
    $rebills->set_site_id($_REQUEST['frm_site']);
    $rebills->set_sort_by($_REQUEST['frm_sort_by']);
    $rebills->set_subaccount($_REQUEST['frm_subaccount']);
    $rebills->set_rebill_status('active');
    $rebills->set_month($_REQUEST['frm_tran_date_month'], $_REQUEST['frm_tran_date_year']);
    //$rebills->get_rebilldetails();
    echo $rebills->render_status_summary() . "<br><br>";
    echo $rebills->render_rebill_summary() . "<br><br>";
    echo $rebills->render_calendar(false) . "<br><br>";
}
require_once "includes/footer.php";