Define functions to process form
**************/
$rebills = new rebill_class();
$rebills->set_user($sessionlogin);
/****************
Process Form
****************/
if ($_REQUEST['frm_cancel_rebills'] == "1") {
    $rebills->cancel_rebills($_REQUEST['frm_cancel_ids']);
    unset($_REQUEST['frm_cancel_ids']);
    unset($_REQUEST['frm_cancel_rebills']);
    $params = $rebills->request_params("frm_");
    header("Location: rebillSummary_smart.php?{$params}");
    exit;
}
$rebill_info = $rebills->get_rebill_info();
/**************
Define pairs
**************/
$my_sql['pairs']['SubAccounts'] = array();
$my_sql['pairs']['SubAccounts'][] = array("display" => "All", "value" => "");
foreach ($rebill_info as $info) {
    $my_sql['pairs']['SubAccounts'][] = array("display" => $info['rd_subname'], "value" => $info['rd_subaccount']);
}
/****************
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;