class Agent extends CI_Controller{ private $siteMenu; /************************************************************** * class constuctor method **************************************************************/ function __construct(){ parent::__construct(); $this->load->model("Shop_class"); $this->load->model("Agent_class"); $this->load->model("Tree_class"); $this->load->model("Acms_class"); $this->load->library('cart'); $result = $this->Tree_class->selectTable("menubar"); $this->siteMenu = $this->Tree_class->createMenubar($result[0],0,NULL); $this->language = $this->Acms_class->siteLanguage(); $this->moduleMenu = $this->Acms_class->moduleMenu(); } /************************************************************** * Get City .:Jquery:. /*************************************************************/ public function getCity(){ echo json_encode($this->Agent_class->getLocation($this->input->get("locID"))); } /************************************************************** * Request Agent /*************************************************************/ public function agentReques1t(){ $data['dataRegister'] = NULL; $data['siteMenu'] = $this->siteMenu; $data['datePicker'] = "ON"; $data['location'] = $this->Agent_class->getLocation(); $data['city'] = $this->Agent_class->getLocation("1"); $data['captchaError'] = NULL; $data['privacy'] = TRUE; $data['passwordFlag'] = TRUE; // Captcha Control $this->load->helper('file'); $this->load->helper("captcha"); delete_files('./assets/captcha/signup/'); $data['cap'] = $this->Agent_class->Captcha(4, 140, 35, 900,"assets/captcha/signup/"); if($this->input->post("submit") != ""){ if($this->input->post("privacy") != "on"){ $data['privacy'] = FALSE; $data['city'] = $this->Agent_class->getLocation($this->input->post("state")); $data['dataRegister'] = "FALSE"; }else{ $this->form_validation->run('insertAgent'); if($this->form_validation->run() == FALSE){ $data['dataRegister'] = "FALSE"; $data['city'] = $this->Agent_class->getLocation($this->input->post("state")); }else{ // Captcha Controler $data['captchaResult'] = $this->Agent_class->captchaValid($this->input->post('captcha',TRUE), $this->input->ip_address()); if($data['captchaResult'] != 1){ $data['city'] = $this->Agent_class->getLocation($this->input->post("state")); $data['captchaError'] = $data['captchaResult']; $data['dataRegister'] = "FALSE"; }else{ if($this->input->post("agentPassword",TRUE) == $this->input->post("passwordRetry",TRUE)){ $this->Agent_class->agentActionData($this->input->post(),"agent"); $data['dataRegister'] = "TRUE"; }else{ $data['city'] = $this->Agent_class->getLocation($this->input->post("state")); $data['dataRegister'] = "FALSE"; $data['passwordFlag'] = FALSE; } } } } } $data['captchaImg'] = $data['cap']['image']; $data['pageTitle'] = "ثبت نام"; $data['pageDesc'] = "فروشگاه اینترنتی شرکت گسترش فناوری آگو سبد خرید "; $data['pageKeywords'] = "ثبت نام"; $data['mainContent'] = 'agent/signup'; $this->load->view("layouts/ui/agent",$data); } /************************************************************** * + Agent List ACMS + /**************************************************************/ function agentList($page = 0){ $data['permission'] = $this->Acms_class->checkPermission(6); $data['counter'] = $page+1; if($this->session->userdata("userStatus") == "a"){ $data['permission'] = "a"; } $data['menubar'] = $this->moduleMenu; $data['language'] = $this->language; $data['agent'] = $this->Agent_class->getAgentList(25,3,$page,base_url()."index.php/agent/agentList"); $data['pageTitle'] = "لیست نمایندگان سایت"; $data['mainContent'] = 'agent/agentList'; $this->load->view("layouts/admin/form",$data); } /************************************************************** * Sign Up /*************************************************************/ public function insertAgent(){ $data['dataRegister'] = NULL; $data['datePicker'] = "ON"; $data['location'] = $this->Agent_class->getLocation(); $data['city'] = $this->Agent_class->getLocation("1"); $data['menubar'] = $this->moduleMenu; $data['language'] = $this->language; $data['permission'] = $this->Acms_class->checkPermission(6); if($this->input->post("submit") == "submit"){ $this->form_validation->run('agent'); if($this->form_validation->run() == FALSE){ $data['dataRegister'] = "FALSE"; $data['city'] = $this->Agent_class->getLocation($this->input->post("state")); }else{ if($data['permission'] == "3" || $data['permission'] == "2" || $this->session->userdata("userStatus") == "a"){ $this->Agent_class->agentActionData($this->input->post(),"CMS"); $data['dataRegister'] = "TRUE"; }else{ echo ""; redirect(base_url()."index.php/agent/insertAgent","refresh"); } } } $data['pageTitle'] = "درج نماینده جدید سایت"; $data['mainContent'] = 'agent/insertAgent'; $this->load->view("layouts/admin/form",$data); } /************************************************************** * Sign Up /*************************************************************/ public function editAgent($id){ $data['dataRegister'] = NULL; $data['agentInfo'] = $this->Agent_class->getAgentInfo($id); $data['parentLocation'] = $this->Agent_class->getParentLocation($data['agentInfo']['agentLocation']); $data['menubar'] = $this->moduleMenu; $data['language'] = $this->language; $data['permission'] = $this->Acms_class->checkPermission(6); $data['city'] = $this->Agent_class->getLocation($data['parentLocation']); $data['location'] = $this->Agent_class->getLocation(); if($this->input->post("submit") != ""){ $this->form_validation->run('agent'); if($this->form_validation->run() == FALSE){ $data['dataRegister'] = "FALSE"; $data['city'] = $this->Agent_class->getLocation($this->input->post("state")); }else{ if($data['permission'] == "3" || $data['permission'] == "2" || $this->session->userdata("userStatus") == "a"){ $this->Agent_class->agentActionData($this->input->post(),"CMS",$id); $data['dataRegister'] = "TRUE"; }else{ echo ""; redirect(base_url()."index.php/agent/insertAgent","refresh"); } } } $data['pageTitle'] = "ویرایش اطلاعات نماینده | ".$data['agentInfo']['agentFName']." ".$data['agentInfo']['agentLName']; $data['mainContent'] = 'agent/editAgent'; $this->load->view("layouts/admin/form",$data); } /* |-------------------------------------------------------------------------- | .:Delete Agent Without View:. |-------------------------------------------------------------------------- */ public function deleteAgent($id,$title){ $data['permission'] = $this->Acms_class->checkPermission(6); if($data['permission'] == "3" || $this->session->userdata("userStatus") == "a"){ $this->Agent_class->deleteAgent($id); echo ""; $this->Agent_class->userLog("حذف نمایندگی",urldecode($title)); redirect(base_url()."index.php/agent/agentList","refresh"); }else{ echo ""; redirect(base_url()."index.php/agent/agentList","refresh"); } } /************************************************************** * + Agents Location List + **************************************************************/ function agentArchive($locID = 0,$locTitles = NULL){ $this->load->model("User_class"); $data['agentsList'] = "-1"; $data['siteMenu'] = $this->siteMenu; $data['loc'] = $this->User_class->getLocation($locID); if($locTitles == NULL){ $data['locTitle'] = "استانها"; }else{ $data['locTitle'] = urldecode($locTitles); } if(count($data['loc']) < 1 || $locID == "89"){ $data['agentsList'] = $this->Agent_class->getAgents($locID); } $data['pageTitle'] = "لیست نمایندگی های ". urldecode($locTitles); $data['pageKeywords'] = "لیست نمایندگی های ". urldecode($locTitles); $data['pageDesc'] = "لیست نمایندگی های ". urldecode($locTitles); $data['mainContent'] = 'agent/agentArchive'; $this->load->view("layouts/ui/inner",$data); } /************************************************************** * + Agents Detail + **************************************************************/ function agentDetail($id){ $data['siteMenu'] = $this->siteMenu; $data['agentInfo'] = $this->Agent_class->getAgentInfo($id); $data['pageTitle'] = "اطلاعات نمایندگی | ".$data['agentInfo']['agentCoName']; $data['pageKeywords'] = "اطلاعات نمایندگی | ".$data['agentInfo']['agentCoName']; $data['pageDesc'] = "اطلاعات نمایندگی | ".$data['agentInfo']['agentCoName']; $data['mainContent'] = 'agent/agentDetail'; $this->load->view("layouts/ui/inner",$data); } /************************************************************** * Sign Up /*************************************************************/ public function agentRequest(){ $data['siteMenu'] = $this->siteMenu; $data['dataRegister'] = NULL; $data['datePicker'] = "ON"; $data['location'] = $this->Agent_class->getLocation(); $data['city'] = $this->Agent_class->getLocation("1"); $data['captchaError'] = NULL; // Captcha Control $this->load->helper('file'); $this->load->helper("captcha"); delete_files('./assets/captcha/agent/'); $data['cap'] = $this->Agent_class->Captcha(4, 140, 35, 900,"assets/captcha/agent/"); if($this->input->post("submit") == "submit"){ $this->form_validation->run('agent'); if($this->form_validation->run() == FALSE){ $data['dataRegister'] = "FALSE"; $data['city'] = $this->Agent_class->getLocation($this->input->post("state")); }else{ $this->Agent_class->agentActionData($this->input->post(),"CMS"); $data['dataRegister'] = "TRUE"; } } $data['pageTitle'] = "اخذ نمایندگی "; $data['pageKeywords'] = "اخذ نمایندگی "; $data['pageDesc'] = "اخذ نمایندگی "; $data['mainContent'] = 'agent/agentRequest'; $this->load->view("layouts/ui/inner",$data); } /* End of file main.php /* Location: ./application/controlers/main.php */ } ?>

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/arshad/domains/amozeshportal.ir/public_html/application/controllers/Agent.php:643)

Filename: core/Common.php

Line Number: 573

Backtrace:

File: /home/arshad/domains/amozeshportal.ir/public_html/index.php
Line: 294
Function: require_once

404 Page Not Found

404 Page Not Found

The page you requested was not found.