Also these scripts have not really been touched but we upgraded from 4.x to the lastest stable release and switcged from Apache to windows IIS. This was not my idea and I did not perform these tasks. I got left with trying to clean up everything that stopped working
Does anyone see anything that is preventing the Header Location from working:
Thanks in advance
Andrew
Warning: Cannot modify header information - headers already sent by (output started at C:\WWW\slfsrvdemo\fcnlib\depcalcc.class.php:284) in C:\WWW\slfsrvdemo\login.php on line 8
Login Script:
Expand|Select|Wrap|Line Numbers
- <?php
- error_reporting(E_ALL);
- ini_set('display_errors', true);
- require_once('fcnlib/application.inc.php'); // This is where the depcalcc is called
- header('Location:http://webserver/slfsrvdemo/phhome.php');
- phpinfo();
- ?>
Expand|Select|Wrap|Line Numbers
- <?php
- class DepCalcC
- {
- function DepCalcC($w_sex, $w_age, $w_plan_type,
- $w_plan_num, $w_plan_rest, $w_rm_board,
- $w_aft_number, $w_assn, $w_clientnum,
- &$work_prem_out, $w_effect_date, $which_pass,
- &$prem2_out, &$rating_sw, $w_pro_sw,
- $use_prem2_sw_in, $w_which_pass,
- $w_use_prem2_sw, &$work_prem, &$w_rating_sw,
- $rate_exit, &$message_out, $w_plan_ident,
- $w_children, $w_certnum, $gp_use_oldest,
- $gp_rating_age_flag, $gp_rated_by_child,
- $gp_use_sp_rate, $cov_prem2_date,
- $hold_cov_rating, $w_coverage_code, $age_band)
- {
- $t_rate1 = 0;
- $t_rate2 = 0;
- $t_rate3 = 0;
- $t_rate4 = 0;
- $temp_rat = 0;
- $aft_sw = 'A';
- $aftemp_rate = 0;
- $got_assn = 0;
- $hold_age = $w_age;
- $hold_sex = $w_sex;
- $spouse_age = 0;
- $getIni = new ParseConnIni("Admin_Odbc", $usrnm,
- $pswd, $dsn);
- $connect = odbc_connect($dsn,$usrnm,$pswd);
- if ($_SERVER['adminDbType'] == 'geronimo') {
- $sql = "select spouse_sex,
- spouse_birthdate ".
- "from empmst ".
- "where assn = $w_assn ".
- "and clientnum = $w_clientnum ".
- "and certnum = $w_certnum";
- $result = odbc_exec($connect, $sql);
- $empSpouse_sex = odbc_result
- ($result, "spouse_sex");
- $empSpouse_birthdate = odbc_result
- ($result, "spouse_birthdate");
- odbc_free_result($result);
- }
- if ($_SERVER['adminDbType'] == 'ce') {
- $sql = "select emp1_spouse_bdate ".
- "from emp ".
- "where emp1_assn = $w_assn ".
- "and emp1_clientnum =
- $w_clientnum ".
- "and emp1_certnum
- = '$w_certnum'";
- $result = odbc_exec($connect, $sql);
- // $empSpouse_sex = odbc_result
- ($result, "spouse_sex");
- $empSpouse_birthdate = odbc_result
- ($result, "emp1_spouse_bdate");
- }
- if ($gp_use_oldest == 'B') {
- $empSpouse_age = get_age
- ($empSpouse_birhtdate, $w_effect_date);
- $w_age = $empSpouse_age;
- $w_sex = $empSpouse_sex;
- } elseif ($gp_use_oldest == 'O') {
- $empSpouse_age = get_age
- ($empSpouse_birhtdate, $w_effect_date);
- if ($empSpouse_age > $w_age) {
- $w_age = $empSpouse_age;
- $w_sex = $empSpouse_sex;
- }
- }
- if (!$w_age)
- $w_age = $hold_age;
- if (!$w_sex)
- $w_sex = $hold_sex;
- $w_room_board = $w_rm_board;
- if (!$w_room_board || $w_room_board == '0')
- $w_room_board = '000' ;
- $work_prem = 0;
- $message_code = '00';
- $w_which_pass = $which_pass;
- $w_use_prem2_sw = $use_prem2_sw_in;
- if (!$w_effect_date) {
- $vMessageCode = '45';
- $msg = new GetMessage($vMessageCode,
- $message_out);
- return;
- }
- if ($message_code == '00') {
- if ($w_plan_ident == '5' || $w_plan_ident == 'E')
- {
- $got_assn = $w_assn;
- } elseif ($w_plan_ident == '2' || $w_plan_ident
- == 'B') {
- $got_assn = 0;
- } elseif ($w_plan_ident == '1' || $w_plan_ident
- == 'A') {
- $got_assn = 0;
- }
- if (!$w_room_board || $w_room_board == '0')
- $w_room_board = '000';
- }
- if ($message_code == '00') {
- if($_SERVER['adminDbType'] == 'geronimo') {
- $sql = "select max(effect_date) ".
- "from ratc ".
- "where p_type =
- $w_plan_type ".
- "and base_code =
- $w_plan_num ".
- "and code_num = '000 ' ".
- "and identifier = $w_plan_ident ".
- "and room_board = $w_room_board ".
- "and assn = got_assn ".
- "and (effect_date < $w_effect_date or ".
- " effect_date = $w_effect_date)";
- $result = odbc_exec($connect, $sql);
- $got_date = odbc_result($result, "max(effect_date)");
- }
- if($_SERVER['adminDbType'] == 'ce') {
- $cerates = new CeRate();
- $ratcRec = $cerates->fetchRatRecord($w_plan_type,
- $w_plan_num, $w_plan_ident,
- $ceRat_plan_type, $ceRat_plan_num,
- $ceRat_identifier, $ceRat_assn,
- $ceRat_age, $ceRat_rb, $ceRat_class,
- $ceRat_date, $ceRat_unit, $ceRat_twl_rate,
- $ceRat_lcd_rate1, $ceRat_lcd_rate2,
- $ceRat_activity_date, $ceRat_a_rates_table,
- $result, $w_rate1, $w_unit);
- $w_p_type = $w_plan_type;
- $w_rate_a1 = substr($ceRat_a_rates_table, 0, 4).".".substr($ceRat_a_rates_table, 4, 4);
- $w_rate_b1 = substr($ceRat_a_rates_table, 72, 4).".".substr($ceRat_a_rates_table, 76, 4);
- $w_rate_a2 = substr($ceRat_a_rates_table, 8, 4).".".substr($ceRat_a_rates_table, 12, 4);
- $w_rate_b2 = substr($ceRat_a_rates_table, 80, 4).".".substr($ceRat_a_rates_table, 84, 4);
- $w_rate_a3 = substr($ceRat_a_rates_table, 16, 4).".".substr($ceRat_a_rates_table, 20, 4);
- $w_rate_b3 = substr($ceRat_a_rates_table, 88, 4).".".substr($ceRat_a_rates_table, 92, 4);
- $w_rate_a4 = substr($ceRat_a_rates_table, 24, 4).".".substr($ceRat_a_rates_table, 28, 4);
- $w_rate_b4 = substr($ceRat_a_rates_table, 96, 4).".".substr($ceRat_a_rates_table, 100, 4);
- $w_rate_a5 = substr($ceRat_a_rates_table, 32, 4).".".substr($ceRat_a_rates_table, 36, 4);
- $w_rate_b5 = substr($ceRat_a_rates_table, 104, 4).".".substr($ceRat_a_rates_table, 108, 4);
- $w_rate_a6 = substr($ceRat_a_rates_table, 40, 4).".".substr($ceRat_a_rates_table, 44, 4);
- $w_rate_b6 = substr($ceRat_a_rates_table, 112, 4).".".substr($ceRat_a_rates_table, 116, 4);
- $w_rate_a7 = substr($ceRat_a_rates_table, 48, 4).".".substr($ceRat_a_rates_table, 52, 4);
- $w_rate_b7 = substr($ceRat_a_rates_table, 120, 4).".".substr($ceRat_a_rates_table, 124, 4);
- $w_rate_a8 = substr($ceRat_a_rates_table, 56, 4).".".substr($ceRat_a_rates_table, 60, 4);
- $w_rate_b8 = substr($ceRat_a_rates_table, 128, 4).".".substr($ceRat_a_rates_table, 132, 4);
- $w_rate_a9 = substr($ceRat_a_rates_table, 64, 4).".".substr($ceRat_a_rates_table, 68, 4);
- $w_rate_b9 = substr($ceRat_a_rates_table, 136, 4).".".substr($ceRat_a_rates_table, 140, 4);
- $w_ba_area = substr($ceRat_a_rates_table, 210, 1);
- $w_sup_flat_yn = substr($ceRat_a_rates_table, 211, 1);
- $w_round_type = substr($ceRat_a_rates_table, 212, 1);
- }
- }
- if ($_SERVER['adminDbType'] == 'geronimo') {
- if ($w_plan_ident == 'A' ||
- $w_plan_ident == 'B' ||
- $w_plan_ident == 'E') {
- $sql = "select min(age) ".
- "from ratc ".
- "where p_type = $w_plan_type ".
- "and base_code = $w_plan_num ".
- "and code_num = '000' ".
- "and identifier = $w_plan_ident ".
- "and room_board = $w_room_board ".
- "and assn = got_assn ".
- "and (age > $w_age or age = $w_age) ".
- "and effect_date = got_date}";
- $result = odbc_exec($connect, $sql);
- $got_age = odbc_result($result, "min(age)");
- odbc_free_result($result);
- } elseif ($w_plan_ident == '1' ||
- $w_plan_ident == '2' ||
- $w_plan_ident == '5') {
- $sql = "select age ".
- "from ratc ".
- "where p_type = $w_plan_type ".
- "and base_code = $w_plan_num ".
- "and code_num = '000' ".
- "and identifier = $w_plan_ident ".
- "and room_board = $w_room_board ".
- "and assn = got_assn ".
- "and age = $w_age ".
- "and effect_date = got_date";
- $result = odbc_exec($connect, $sql);
- $got_xage = odbc_result($result, "age");
- $got_age = $got_xage;
- odbc_free_result($result);
- }
- }
- if ($message_code == '00') {
- if ($_SERVER['adminDbType'] == 'geronimo') {
- $sql = "select p_type, ".
- "rate_a1, rate_b1, rate_a2, rate_b2, ".
- "rate_a3, rate_b3, rate_a4, rate_b4, ".
- "rate_a5, rate_b5, rate_a6, rate_b6, ".
- "rate_a7, rate_b7, rate_a8, rate_b8, ".
- "rate_a9, rate_b9, rate_a10, rate_b10, ".
- "rate_a11, rate_b11, rate_a12, rate_b12, ".
- "ba_area, sup_flat_yn, round ".
- "from ratc ".
- "where p_type = $w_plan_type ".
- "and base_code = $w_plan_num ".
- "and code_num = '000' ".
- "and identifier = $w_plan_ident ".
- "and age = got_age ".
- "and room_board = $w_room_board ".
- "and effect_date = got_date ".
- "and assn = got_assn";
- $result = odbc_exec($connect, $sql);
- $w_p_type = odbc_result($result, "w_p_type");
- $w_rate_a1 = odbc_result($result, "w_rate_a1");
- $w_rate_b1 = odbc_result($result, "w_rate_b1");
- $w_rate_a2 = odbc_result($result, "w_rate_a2");
- $w_rate_b2 = odbc_result($result, "w_rate_b2");
- $w_rate_a3 = odbc_result($result, "w_rate_a3");
- $w_rate_b3 = odbc_result($result, "w_rate_b3");
- $w_rate_a4 = odbc_result($result, "w_rate_a4");
- $w_rate_b4 = odbc_result($result, "w_rate_b4");
- $w_rate_a5 = odbc_result($result, "w_rate_a5");
- $w_rate_b5 = odbc_result($result, "w_rate_b5");
- $w_rate_a6 = odbc_result($result, "w_rate_a6");
- $w_rate_b6 = odbc_result($result, "w_rate_b6");
- $w_rate_a7 = odbc_result($result, "w_rate_a7");
- $w_rate_b7 = odbc_result($result, "w_rate_b7");
- $w_rate_a8 = odbc_result($result, "w_rate_a8");
- $w_rate_b8 = odbc_result($result, "w_rate_b8");
- $w_rate_a9 = odbc_result($result, "w_rate_a9");
- $w_rate_b9 = odbc_result($result, "w_rate_b9");
- $w_rate_a10 = odbc_result($result, "w_rate_a10");
- $w_rate_b10 = odbc_result($result, "w_rate_b10");
- $w_rate_a11 = odbc_result($result, "w_rate_a11");
- $w_rate_b11 = odbc_result($result, "w_rate_b11");
- $w_rate_a12 = odbc_result($result, "w_rate_a12");
- $w_rate_b12 = odbc_result($result, "w_rate_b12");
- $w_ba_area = odbc_result($result, "w_ba_area");
- $w_sup_flat_yn = odbc_result($result, "w_sup_flat_yn");
- $w_round_type = odbc_result($result, "w_round_type");
- odbc_free_result($result);
- }
- if (!$w_p_type) {
- $vMessageCode = '66';
- $msg = new GetMessage($vMessageCode,
- $message_out);
- return;
- } else {
- if ($w_coverage_code == '2') {
- $w_rate_a1 = $w_rate_a2;
- $w_rate_b1 = $w_rate_b2;
- if ($w_sex == 'M') {
- $work_prem = $w_rate_a1;
- } elseif ($w_sex == 'F') {
- $work_prem = $w_rate_b1;
- }
- } elseif ($w_coverage_code == '3') {
- $w_rate_a1 = $w_rate_a3;
- $w_rate_b1 = $w_rate_b3;
- if ($w_sex == 'M') {
- $work_prem = $w_rate_a1;
- } elseif ($w_sex == 'F') {
- $work_prem = $w_rate_b1;
- }
- } elseif ($w_coverage_code == '4') {
- $w_rate_a1 = $w_rate_a4;
- $w_rate_b1 = $w_rate_b4;
- if ($w_sex == 'M') {
- $work_prem = $w_rate_a1;
- } elseif ($w_sex == 'F') {
- $work_prem = $w_rate_b1;
- }
- } elseif ($w_coverage_code == '5') {
- $w_rate_a1 = $w_rate_a5;
- $w_rate_b1 = $w_rate_b5;
- if ($w_sex == 'M') {
- $work_prem = $w_rate_a1;
- } elseif ($w_sex == 'F') {
- $work_prem = $w_rate_b1;
- }
- }
- }
- }
- if ($message_code == '00') {
- $aft_sw = 'A';
- $aftRec = new GetAftRate($w_plan_type, $w_plan_num,
- $w_aft_number, &$aft_sw,
- &$a_rate, &$message_out);
- $aft_rate = $a_rate;
- $aft_sw = 'D';
- $aftRec = new GetAftRate($w_plan_type, $w_plan_num,
- $w_aft_number, &$aft_sw,
- &$a_rate, &$message_out);
- $aftdep_rate = $a_rate;
- }
- if ($message_code == '00') {
- $aftemp_rate = $aftdep_rate;
- //Add on Supplemental Flat Rate
- $ratec1ba = new RateCalcC1Ba($w_plan_ident, $w_sex, $hold_cov_rating,
- $w_rate_a1, $w_rate_b1, $w_rate_a7, $w_rate_b7,
- $w_ba_area, $w_sup_flat_yn, $w_round_type,
- $aft_rate, $aftemp_rate, &$work_prem);
- $temp_work_prem = $work_prem;
- //Rated by Child
- if ($gp_use_oldest == 'B' &&
- $gp_rated_by_child == 'Y' &&
- $w_children > 0) {
- if ($w_coverage_code == '2') {
- $t_rate1 = $w_rate_a2;
- $t_rate2 = $w_rate_b2;
- $t_rate3 = $w_rate_a8;
- $t_rate4 = $w_rate_b8;
- } elseif ($w_coverage_code == '3') {
- $t_rate1 = $w_rate_a3;
- $t_rate2 = $w_rate_b3;
- $t_rate3 = $w_rate_a9;
- $t_rate4 = $w_rate_b9;
- } elseif ($w_coverage_code == '4') {
- $t_rate1 = $w_rate_a4;
- $t_rate2 = $w_rate_b4;
- $t_rate3 = $w_rate_a10;
- $t_rate4 = $w_rate_b10;
- } elseif ($w_coverage_code == '5') {
- $t_rate1 = $w_rate_a5;
- $t_rate2 = $w_rate_b5;
- $t_rate3 = $w_rate_a11;
- $t_rate4 = $w_rate_b11;
- } else {
- $t_rate1 = 0;
- $t_rate2 = 0;
- }
- $ratec1ba = new RateCalcC1Ba($w_plan_ident, $w_sex, $hold_cov_rating,
- $w_rate_a1, $w_rate_b1, $w_rate_a7, $w_rate_b7,$w_ba_area, $w_sup_flat_yn, $w_round_type, $aft_rate, $aftemp_rate, &$work_prem);
- $temp_work_prem = $work_prem;
- $child_work_prem = $work_prem;
- if ($w_rating_sw == 7) {
- $w_rating_sw = 3;
- $rate_exit = 'Y';
- } elseif ($w_rating_sw == 4 || $w_pro_sw == 'Y') {
- $w_rating_sw = 3;
- $rate_exit = 'Y';
- } elseif ($prem2_out == 0 &&
- $w_effect_date < $cov_prem2_date) {
- $w_which_pass = '2';
- $w_use_prem2_sw = 'Y';
- }
- }
- }
- if ($w_rating_sw == 3)
- $age_band = $got_age;
- $w_age = $hold_age;
- $w_sex = $hold_sex;
- }//end constructor
- }//end class
- ?>