Authored by whb

onlinereg

@@ -72,7 +72,7 @@ class Controller_Onlinereg extends Controller_Abstract @@ -72,7 +72,7 @@ class Controller_Onlinereg extends Controller_Abstract
72 $is_3c = $this->_request->post('is_3c'); 72 $is_3c = $this->_request->post('is_3c');
73 $website = $this->_request->post('website'); 73 $website = $this->_request->post('website');
74 $zipcode = $this->_request->post('zipcode'); 74 $zipcode = $this->_request->post('zipcode');
75 - $files = array(); 75 + $files = trim($this->_request->post('files'));
76 if($type == Facade_Onlinereg::TYPE_ONLINE_SPONSOR)//赞助商 76 if($type == Facade_Onlinereg::TYPE_ONLINE_SPONSOR)//赞助商
77 { 77 {
78 if(empty($name) || empty($contact)|| empty($place)) 78 if(empty($name) || empty($contact)|| empty($place))
@@ -96,14 +96,11 @@ class Controller_Onlinereg extends Controller_Abstract @@ -96,14 +96,11 @@ class Controller_Onlinereg extends Controller_Abstract
96 } 96 }
97 if(in_array($type, array(Facade_Onlinereg::TYPE_ONLINE_SPONSOR, Facade_Onlinereg::TYPE_ONLINE_EXHIBITOR))) 97 if(in_array($type, array(Facade_Onlinereg::TYPE_ONLINE_SPONSOR, Facade_Onlinereg::TYPE_ONLINE_EXHIBITOR)))
98 { 98 {
99 - if(!empty($_FILES))  
100 - {  
101 - $path = Lib_Images::saveImage($_FILES, 'onlinereg');  
102 - if(!empty($path))  
103 - {  
104 - $files[] = $path;  
105 - }  
106 - } 99 + $files = array($files);
  100 + }
  101 + else
  102 + {
  103 + $files = '';
107 } 104 }
108 $status = Facade_Onlinereg::setSellerInfo($name, $type, 0, $is_enter_yohobuy, 105 $status = Facade_Onlinereg::setSellerInfo($name, $type, 0, $is_enter_yohobuy,
109 $product_type, $country, $company, $contact, $telphone, $email, 0, $website, 0, $place, $files); 106 $product_type, $country, $company, $contact, $telphone, $email, 0, $website, 0, $place, $files);
@@ -186,7 +183,11 @@ class Controller_Onlinereg extends Controller_Abstract @@ -186,7 +183,11 @@ class Controller_Onlinereg extends Controller_Abstract
186 public function validatecodeAction() 183 public function validatecodeAction()
187 { 184 {
188 $code = $this->_request->query('code'); 185 $code = $this->_request->query('code');
189 - $status = $this->validate($code); 186 + $status = false;
  187 + if(!empty($code))
  188 + {
  189 + $status = $this->validate($code);
  190 + }
190 if($status) 191 if($status)
191 { 192 {
192 return $this->returnJson(true, 200); 193 return $this->returnJson(true, 200);