| 
					
				 | 
			
			
				@@ -97,7 +97,7 @@ class Database 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             'delete'      => 'database.delete_action?{param}&where_id=' . $id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             'recovery'    => 'database.recovery_action?{param}&where_id=' . $id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             'stat'              => 'project/database/stat?{param}', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'list_excel'        => 'database.list_excel?{param}', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            'excel'             => 'database.list_excel?{param}', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             'stat_excel'        => 'database.stat_excel?{param}', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             'diy'               => 'list?{param}', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -796,7 +796,7 @@ class Database 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         # 增加下载报表按钮 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (isset($config['manage']['excel'])) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $config['manage']['button']['导出数据'] = 'onclick="$(\'#form1\').attr(\'action\', \'' . $this->url('list_excel') . '\');list_search($(this))"'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $config['manage']['button']['导出数据'] = 'onclick="$(\'#form1\').attr(\'action\', \'' . $this->url('excel') . '\');list_search($(this))"'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         # 增加回收站 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (isset($config['struct']['state']) && (!isset($config['manage']['delete']) || (isset($config['manage']['delete']) && $config['manage']['delete'] && isset($config['manage']['_list']['value']['delete'])))) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1151,7 +1151,7 @@ class Database 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return array 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public function list_excel() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public function list_excel_api() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Dever::$global['base']['excel'] = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $data = $this->list_tbody(true); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1173,13 +1173,13 @@ class Database 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				              */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $xls->getProperties()->setCreator("Maze Excel") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ->setLastModifiedBy("Maze Excel") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $xls->getProperties()->setCreator("Dever Excel") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ->setLastModifiedBy("Dever Excel") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 ->setTitle("Office 2007 XLSX Analysis Document") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 ->setSubject("Office 2007 XLSX Analysis Document") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ->setDescription("Mazephp Excel") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ->setKeywords("Mazephp Excel") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ->setCategory("Mazephp Excel"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ->setDescription("Dever Excel") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ->setKeywords("Dever Excel") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ->setCategory("Dever Excel"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $info = $this->info(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1389,7 +1389,11 @@ class Database 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $result = array(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $method = $this->project . '/' . $this->table . '-list'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if ($excel == true) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $method = $this->project . '/' . $this->table . '-all'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $method = $this->project . '/' . $this->table . '-list'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //print_r($param);die; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $data = Dever::load($method, $param); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1470,7 +1474,7 @@ class Database 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             $show = $this->value($vi['list'], $data[$k], $config['struct']); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if (isset($vi['key']) && $vi['update'] != 'editor') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            $show = Dever::pic($show); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            $show = Dever::upload($show); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if (isset($vi['modal'])) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             $show = Html::modal($this->value($vi['modal'], $data[$k], $config['struct']), $show); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1899,7 +1903,7 @@ class Database 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             # 得到下级的值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (isset($param['child_value'])) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (isset($param['child_value']) && isset($data['id'])) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $param['child_value'] = $this->value($param['child_value'], $data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1909,7 +1913,7 @@ class Database 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (isset($data[$index]) && isset($param['key']) && $param['update'] != 'editor') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $param['value'] = Dever::pic($data[$index]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $param['value'] = Dever::upload($data[$index]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             # 处理下级字段 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2236,7 +2240,11 @@ class Database 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (isset($log[$j['name']])) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $tlog[$j['name']] = $log[$j['name']]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (is_array($tlog[$j['name']])) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $tlog[$j['name']] = implode(',', $tlog[$j['name']]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (isset($tlog[$j['name']][0]) && is_array($tlog[$j['name']][0])) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $tlog[$j['name']] = json_encode($tlog[$j['name']]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $tlog[$j['name']] = implode(',', $tlog[$j['name']]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } elseif (strpos($log[$j['name']], 'http://wx.qlogo.cn/') !== false || strpos($log[$j['name']], '.jpg') !== false || strpos($log[$j['name']], '.gif') !== false || strpos($log[$j['name']], '.png') !== false) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     $log[$j['name']] = '<a href="' . $log[$j['name']] . '" target="_blank"><img src="' . $log[$j['name']] . '" width="150"></a>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } elseif (is_numeric($log[$j['name']]) && (strpos($i, 'time') !== false || strpos($i, 'date') !== false)) { 
			 |