[eluser]RJ[/eluser]
Hmmm.. still happening. and of course once the extra 999 is added now the second var for my device method is assign 999 rather than default killing the page. here is my method:
Code:
function device($dealer = FALSE, $page = 'personal_information', $debug = FALSE)
{
if (!$dealer)
{
$dealer = '999';
}
// begin benchmarking
$this->benchmark->mark('code_start');
if($debug == true) {$this->error_debug = true;}
$this->load->model('dealer_model','dealer'); // load dealer
$this->load->model('suw_model', 'suw'); // load suw
$this->load->model('common_model', 'common'); // load common
$this->lang->load('suw_main'); // load language
$this->load->model('sql_model','sql');
// Set dealer params
$this->dealer->set_dealer($dealer); // passes db info to dealer model for processing
$this->load->model('Trimtrac_model', 'trimtrac'); // load trimtrac
$this->load->helper(array('form')); // load form helper
//echo $this->lang->lang;
switch($page)
{
case "personal_information":
// Load stuff
//$this->common->on_screen($this->sql->build_display('US','GPRS','999'));
$this->load->library('form_validation'); // load libraries
$this->form_validation->set_error_delimiters('<pre class="alert">', '</pre>');
$this->lang->load('form_validation');
// Validation Check: rules are managed in the config/form_validation.php file
if ($this->form_validation->run('device') == FALSE)
{
// Build the page
$page = 'page_one';
$data['css'] = $this->common->set_css();
$data['nav'] = $this->suw->navigation($page);
$data['round_start'] = $this->common->round_start();
$ctyarr = array();
$cdata = $this->suw->country_generator($this->dealer->countries,$this->lang->lang());
$ctyarr['countries'] = $cdata;
$data['content'] = $this->load->view('device_one',$ctyarr, TRUE);
$data['sidebar'] = "Side bar here";
$data['round_end'] = $this->common->round_end();
$data['footer'] = "Footer";
$data['google'] = $this->load->view('google','', TRUE);
// write to template
$this->template->write('title', 'Welcome White Label');
$this->template->write('css', $data['css']);
$this->template->write('nav', $data['nav']);
$this->template->write('round_start', $data['round_start']);
$this->template->write('content', $data['content']);
$this->template->write('sidebar', $data['sidebar']);
$this->template->write('round_end', $data['round_end']);
$this->template->write('footer', $data['footer']);
$this->template->write('google', $data['google']);
// render page
$this->template->render();
}
else
{
// make sure session is empty
if($this->error_debug)
{
log_message('debug', 'VALIDATION OK, ADD TO SESSION');
}
// build session
$session = array(
'country' => $this->input->post('country'),
'terms' => $this->input->post('terms')
);
// write to session
$this->session->set_userdata($session);
log_message('debug', 'SESSION VALUES ADDED, NOW SEND TO PAGE TWO');
// redirect to page two
$redirect = ''.uri_string().'/plan_information';
log_message('debug', 'REDIRECT :'.$redirect.'');
redirect($redirect, 'refresh');
}
//$this->page_one();
break;
case "plan_information":
if($this->error_debug)
{
log_message('debug', 'WE MADE IT! WELCOME TO PAGE TWO');
}
}