|
|
@@ -21,13 +21,31 @@ class Brand extends Start_Controller {
|
|
|
else if($arg == 'del')//修改
|
|
|
{
|
|
|
$this->_del();
|
|
|
- }
|
|
|
+ }else if($arg == 'adddo'){
|
|
|
+ $this->_adddo();
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
$this->_index();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private function _adddo(){
|
|
|
+ $data = $this->input->post(NULL, TRUE);
|
|
|
+ $params = json_decode($data['data'],true);
|
|
|
+ $final_list = [];
|
|
|
+ foreach ($params as $key => $value) {
|
|
|
+ $final_list[] = [
|
|
|
+ 'one'=>$value[0],
|
|
|
+ 'two'=>$value[1],
|
|
|
+ 'three'=>$value[2],
|
|
|
+ 'four'=>$value[3],
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
+ $this->db->insert_batch('zzlvtmp', $final_list);
|
|
|
+ }
|
|
|
+
|
|
|
//管理
|
|
|
public function _index()
|
|
|
{
|