$back_names[] = "cl_call3"; $back_names[] = "cl_call4"; $back_names[] = "cl_call5"; $dt_id = $this->request['deal_type']; $d_id = $this->request['deal']; $todo = $this->request['todo']; // trade class $trade = new trade(); $trade->sp = $this->sp; $trade->mysqli = $this->mysqli; $trade->user = $this->user; $js_functions[] = $trade->show_js(); $js_include[] = 'js/trade.js'; // procurement product select event ; $js_functions[] = $trade->show_js_sel_prod_event_list(); $js_functions[] = $trade->show_js_sel_cat_event_list(); //deal settings if ($todo == "settings") { $main = $trade->deal_settings($d_id); } //detect deals table calling if (isset($dt_id) and $dt_id != '') { $main = $main ? $main : $trade->get_deals_by_type_table($this->request['deal_type']); } // detect deal calling if (isset($d_id) and $d_id != '') { $main = $main ? $main : $trade->edit_deal_selector($this->request['deal']); } else { //default form $main = $main ? $main : $trade->get_deals_by_type_table(4); // current lists