[eluser]Shaileen[/eluser]
Controller :
<?php
class T1_orders_active extends MY_Controller
{
function index()
{
$this->load->model('steve', '', true);
$this->load->model('t1_orders_active_model', '', true);
$username = $this->session->userdata('$username');
$data['username'] = $username;
$data['title'] = "T1 Order Tracking";
$data['subtitle'] = "List Active Orders";
$this->load->view('header_main', $data);
$this->load->view('showmenu', $data);
$this->load->view('t1_orders_active_view',$data);
$this->load->view('footer_main');
$this->load->helper('cookie');
$AUTH = $this->steve->get_menu($username);
if($AUTH->tick28 == 1)
{
$inyc_limit = " AND inyc = 1";
}
else
{
$inyc_limit = "";
}
if($AUTH->tick2 == 1)
{
$this->t1_orders_active_model->one();
}
elseif($AUTH->tick2 == 2)
{
$this->t1_orders_active_model->two();
}
elseif($AUTH->tick2 == 3)
{
$this->t1_orders_active_model->three();
}
if($tt_exist)
{
$tt_link = "<a href='dsl_tt_list.php?searchText=$refid'><img src='$c{url}{public_images}/tt_open.gif' border='0'></a>";
}
else
{
$tt_link = "<a href='dsl_tt_list.php?searchText=$refid'><img src='$c{url}{public_images}/tt_none.gif' border='0'></a>";
}
}
}
model :
<?php
class T1_orders_active_model extends Model
{
function T1_orders_active()
{
// Call the Model constructor
parent::Model();
}
function one()
{
$this->db->select('mydsl_auth.username, t1_admin.refid, t1_admin.admin_date_activated, t1_eu.eu_company, t1_eu.eu_contact, t1_admin.quote_id, t1_order.main_email, t1_order.bandwidth_id');
$this->db->from('mydsl_auth, t1_admin, t1_eu, t1_order ');
$this->db->where('t1_admin.admin_active =', '1');
$this->db->where('t1_admin.admin_deleted =', '0');
$this->db->where('t1_admin.admin_cancelled =', '0');
$this->db->where('t1_admin.admin_order_sent =','1');
$this->db->where('t1_eu.seqid = t1_admin.refid');
$this->db->where('mydsl_auth.user_id = t1_admin.salesperson');
$this->db->where('order.refid = t1_eu.seqid ');
$this->db->where('t1_admin.salesperson = $AUTH[1] $inyc_limit');
$find_admin = $this->db->get();
return $find_admin;
}
function two()
{
$this->db->select('mydsl_auth.username, t1_admin.refid, t1_admin.admin_date_activated, t1_eu.eu_company, t1_eu.eu_contact, t1_admin.quote_id, t1_order.main_email, t1_order.bandwidth_id ');
$this->db->from('mydsl_auth, t1_admin, t1_eu, t1_order ');
$this->db->where('t1_admin.admin_active =', '1');
$this->db->where('t1_admin.admin_deleted =', '0');
$this->db->where('t1_admin.admin_cancelled =', '0');
$this->db->where('t1_admin.admin_order_sent =','1');
$this->db->where('t1_eu.seqid = t1_admin.refid');
$this->db->where('mydsl_auth.user_id = t1_admin.salesperson');
$this->db->where('t1_order.refid = t1_eu.seqid');
$this->db->where('t1_admin.salesperson = $AUTH[1]$inyc_limit');
$this->db->or_where('mydsl_auth.agent_manager = $AUTH[1]) $inyc_limit');
$find_admin = $this->db->get();
return $find_admin;
}
function three()
{
$this->db->select('mydsl_auth.username, t1_admin.refid, t1_admin.admin_date_activated, t1_eu.eu_company, t1_eu.eu_contact, t1_admin.quote_id, t1_order.main_email, t1_order.bandwidth_id');
$this->db->from('mydsl_auth, t1_admin, t1_eu, t1_order');
$this->db->where('t1_admin.admin_active =', '1');
$this->db->where('t1_admin.admin_deleted =', '0');
$this->db->where('t1_admin.admin_cancelled =', '0');
$this->db->where('t1_admin.admin_order_sent =','1');
$this->db->where('t1_eu.seqid = t1_admin.refid');
$this->db->where('t1_order.refid = t1_eu.seqid');
$this->db->where('mydsl_auth.user_id = t1_admin.salesperson $inyc_limit');
$find_admin = $this->db->get();
return $find_admin;
}
function tt_exist($quote_id)
{
$this->db->count_all_results('dsl_tt');
$this->db->where('order_id','$quote_id');
$this->db->where('resloved', 0);
$query = $this->db->get();
return $query;
}
}
Please help me to fix the following errors :
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: controllers/t1_orders_active.php
Line Number: 21
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: controllers/t1_orders_active.php
Line Number: 30
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: controllers/t1_orders_active.php
Line Number: 36
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: controllers/t1_orders_active.php
Line Number: 42