diff --git a/application/controllers/companycontroller.php b/application/controllers/companycontroller.php index ebdb8763..4aceb9fb 100755 --- a/application/controllers/companycontroller.php +++ b/application/controllers/companycontroller.php @@ -154,7 +154,25 @@ class companycontroller extends BaseController else { - $Picture = $this->add(); + // $Picture = $this->add(); + $PictureName = $this->input->post('Image'); + $ModifyPictureName = $this->input->post('ModifyImage'); + if ($PictureName != '') + { + if(strlen($ModifyPictureName) == 0) + { + $Picture = $PictureName; + } + else + { + $Picture = $ModifyPictureName; + } + } + else + { + //echo 'Not Exists'; + $Picture = $this->add(); + } $file =$this->addfile(); $CompID = $this->input->post('CompanyID'); $CompanyName = $this->input->post('CompanyName');