PageRenderTime 76ms CodeModel.GetById 16ms app.highlight 52ms RepoModel.GetById 2ms app.codeStats 0ms

/source/gl/show1/f/l2010-09-29.php

http://prosporous.googlecode.com/
PHP | 588 lines | 548 code | 25 blank | 15 comment | 40 complexity | d9258f29a3338403f9ff8c2e4ecf590a MD5 | raw file
  1<?php
  2/**??????UTF-8???.
  3 * Created on 2010-6-27
  4 *
  5 * @author EXT <isrn@qq.com>
  6 *
  7 */
  8include ('../../includes/global.php');
  9include ('../global.php');
 10include ("../power.php");
 11//require_once './render.php';
 12//require_once './items_config.php';
 13$dbcfg=Sys::Gp(array('dbcfg','sevenel'));
 14$donotrender = array('htmleditor','fckeditor','password','hidden');
 15
 16 switch($_REQUEST['op']){
 17	case 'list':{
 18			$fldata=Dgd(array(
 19			  'db'=>'d_sevenel',
 20			  'cd'=>"tid = '".$_GET['tid']."' order by px asc ",
 21			  'tn'=>"fld"
 22			));
 23		Tr($fldata,'fld');
 24		Tr($_GET['bdtid'],'bdtid');
 25		Tr($_GET['bdid'],'bdid');
 26		foreach($fldata as $key =>$v){
 27				if($v['xr']==0){
 28					$xr[]=$v;
 29					}
 30				if($v['gj']==1){
 31					$gj[]=$v;
 32					}
 33			}
 34		Tr($xr,'xr');
 35		if($gj!=''){
 36		foreach($gj as $key =>$value){
 37			if($value['cfg']!=''){
 38			$config =json_decode($value['cfg'],true);
 39			}else{$config =''; }
 40			$config['STR']=str_replace("\r","",$config['STR']);
 41			$config['STR']=str_replace("\n","",$config['STR']);
 42			$config['STR']=str_replace("\t","",$config['STR']);
 43			switch($value['type']){
 44				case 'datefield':{
 45						$js[] ="{
 46							xtype: 'datefield',
 47							value:\"\",
 48							fieldLabel:'".$value['name']."',
 49							".(($value['id'])?("id:'".$value['id']."',"):(""))."
 50							".(($config['STR'])?("".$config['STR'].""):(""))."
 51							".(($config['zqgs'])?("format:'".$config['zqgs']."',"):(""))."
 52							name: '".$value['fname']."'
 53							}";
 54							break;}
 55				case 'combo':{
 56								$tempxx = json_decode($value['zyz'],true);
 57								$config_num = count($tempxx);
 58								$items='';
 59								if($config_num != 0){
 60									foreach($tempxx as $key => $data){
 61										if($data['ck']=='1'){
 62											$xzz=$data['xv'];}
 63											$items.= "['".$data['xv']."','".$data['yv']."']";
 64										if($key < $config_num-1){
 65											$items.= ",";
 66										}
 67									}
 68								}
 69						$js[] ="{
 70							value:\"".$xzz."\",
 71							fieldLabel:'".$value['name']."',
 72							".(($value['id'])?("id:'".$value['id']."',"):(""))."
 73							".(($value['width'])?("width:".$value['width'].","):(""))."
 74							".(($config['readonly'])?("readOnly:'true',"):(""))."
 75							typeAhead: true,
 76							name: '".$value['fname']."_',
 77							hiddenName : '".$value['fname']."',
 78							editable: false,xtype: 'combo',
 79							store:new Ext.data.SimpleStore({
 80											fields:['name','value'],
 81											data:[".$items."]}),
 82							mode:'local',
 83					        displayField:'name',
 84					        selectOnFocus:true,
 85					        valueField :'value',
 86					        triggerAction:'all'
 87
 88							}";
 89				break;}
 90				case 'combo1':{
 91								
 92						$js[] ="{
 93							".$back."
 94							value:\"".(adxx($fdada[$value['fname']])?adxx($fdada[$value['fname']]):$config['dy'])."\",
 95							fieldLabel:'".$value['name']."',
 96							".(($value['id'])?("id:'".$value['id']."',"):(""))."
 97							".(($value['width'])?("width:".$value['width'].","):(""))."
 98							".((!$value['yxwk'])?("allowBlank:false,blankText:'".adxx($value['ts'])."',"):(""))."
 99							".(($config['readonly'])?("readOnly:'true',"):(""))."
100							typeAhead: true,
101							emptyText:'".$config['dx']."',
102							name: '".$value['fname']."_',
103							id: '".$value['fname']."_',
104							hiddenName : '".$value['fname']."',
105							editable: false,xtype: 'combo',
106							store:new Ext.data.Store({   
107								proxy: new Ext.data.HttpProxy({   
108									url: '../cascade/getcascade.php?id=".$value['id']."'
109								}),
110								listeners : { 
111								load : function(){ 
112										
113										if(typeof(chuzai)=='undefined'){
114											Ext.getCmp('".$value['fname']."_"."').setValue('".(adxx($fdada[$value['fname']])?adxx($fdada[$value['fname']]):$config['dy'])."'); 
115											chuzai=1;
116											}
117										} 
118										} ,
119								autoLoad:true,
120								reader: new Ext.data.ArrayReader({   
121							}, [   
122								{name: '".$config['y']."', mapping: '".$config['y']."'},   
123								{name: '".$config['x']."', mapping: '".$config['x']."'}   
124							])   
125}),
126							mode:'local',
127					        displayField:'".$config['x']."',
128					        selectOnFocus:true,
129					        valueField :'".$config['y']."',
130							".(($config['STR'])?("".$config['STR'].""):(""))."
131					        triggerAction:'all'
132								
133							}";
134				break;}
135				case 'combo2':{
136								
137						$js[] ="{
138							".$back."
139							value:\"".(adxx($fdada[$value['fname']])?adxx($fdada[$value['fname']]):$config['dy'])."\",
140							fieldLabel:'".$value['name']."',
141							".(($value['id'])?("id:'".$value['id']."',"):(""))."
142							".(($value['width'])?("width:".$value['width'].","):(""))."
143							".((!$value['yxwk'])?("allowBlank:false,blankText:'".adxx($value['ts'])."',"):(""))."
144							".(($config['readonly'])?("readOnly:'true',"):(""))."
145							typeAhead: true,
146							".(($value['zy'])?("emptyText:'".$config['x2']."',"):("emptyText:'".$config['x1']."',"))."
147							name: '".$value['fname']."_',
148							id: '".$value['fname']."_',
149							hiddenName : '".$value['fname']."',
150							editable: false,xtype: 'combo',
151							store:new Ext.data.Store({   
152								proxy: new Ext.data.HttpProxy({   
153									url: '".(($config['zy'])?(($fdada[$config['jlzd']])?("../cascade/getcascade.php?op=sort&id=".$fdada[$config['jlzd']].""):("")):("../cascade/getcascade.php?op=sort&id=".$config['pid'].""))."'
154								}),
155								listeners : { 
156								load : function(){ 
157							".(($config['zy'])?("if(typeof(chuzai1)=='undefined'){
158											Ext.getCmp('".$value['fname']."_"."').setValue('".(adxx($fdada[$value['fname']])?adxx($fdada[$value['fname']]):$config['y2'])."'); 
159											chuzai1=1;
160											}
161										} "):("if(typeof(chuzai)=='undefined'){
162											Ext.getCmp('".$value['fname']."_"."').setValue('".(adxx($fdada[$value['fname']])?adxx($fdada[$value['fname']]):$config['y1'])."'); 
163											chuzai=1;
164											}
165										} "))."
166										
167										} ,
168								autoLoad:true,
169								reader: new Ext.data.ArrayReader({   
170							}, [   
171								{name: 'id', mapping: 'id'},   
172								{name: 'title', mapping: 'title'}   
173							])   
174}),
175							mode:'local',
176					        displayField:'title',
177					        selectOnFocus:true,
178					        valueField :'id',
179							".(($config['STR'])?("".$config['STR'].""):(""))."
180					        triggerAction:'all'
181							".(($config['zy'])?(""):(",
182							listeners:{     
183								select : function(combo, record,index){   
184								Ext.getCmp('".$config['jlzd']."_"."').store.proxy= new Ext.data.HttpProxy({url: '../cascade/getcascade.php?op=sort&id=' + combo.value});   								Ext.getCmp('".$config['jlzd']."_"."').store.load();			Ext.getCmp('".$config['jlzd']."_"."').setValue(''); 
185
186								}
187								}"))."
188
189								
190							}";
191							
192				break;}
193				case 'combo3':{
194						$url='';$chuzai='';$select='';
195						switch($config['jb']){
196								case 1:{
197									$url="../cascade/getcascade.php?op=sort&id=".$config['pid'];
198									$chuzai="if(typeof(chuzai1)=='undefined'){
199											Ext.getCmp('".$value['fname']."_"."').setValue('".(adxx($fdada[$value['fname']])?adxx($fdada[$value['fname']]):$config['y'])."'); 
200											chuzai1=1;
201											}";
202									$select=" Ext.getCmp('".$config['jl1']."_"."').store.proxy= new Ext.data.HttpProxy({url: '../cascade/getcascade.php?op=sort&id='+combo.value}); Ext.getCmp('".$config['jl1']."_"."').store.load();
203									 Ext.getCmp('".$config['jl2']."_"."').store.proxy= new Ext.data.HttpProxy({url: '../cascade/getcascade.php?op=kong'}); Ext.getCmp('".$config['jl2']."_"."').store.load();
204								Ext.getCmp('".$config['jl1']."_"."').setValue(''); 
205								Ext.getCmp('".$config['jl2']."_"."').setValue(''); ";
206									break;
207									}
208								case 2:{
209									$url=$fdada[$config['jl1']]?"../cascade/getcascade.php?op=sort&id=".$fdada[$config['jl1']]:"";
210									$chuzai="if(typeof(chuzai2)=='undefined'){
211											Ext.getCmp('".$value['fname']."_"."').setValue('".(adxx($fdada[$value['fname']])?adxx($fdada[$value['fname']]):$config['y'])."'); 
212											chuzai2=1;
213											}";
214									$select=" Ext.getCmp('".$config['jl2']."_"."').store.proxy= new Ext.data.HttpProxy({url: '../cascade/getcascade.php?op=sort&id=' + combo.value}); Ext.getCmp('".$config['jl2']."_"."').store.load();
215								Ext.getCmp('".$config['jl2']."_"."').setValue('');";
216									break;
217									}
218								case 3:{
219									$url=$fdada[$config['jl2']]?"../cascade/getcascade.php?op=sort&id=".$fdada[$config['jl2']]:"";
220									$chuzai="if(typeof(chuzai3)=='undefined'){
221											Ext.getCmp('".$value['fname']."_"."').setValue('".(adxx($fdada[$value['fname']])?adxx($fdada[$value['fname']]):$config['y'])."'); 
222											chuzai3=1;
223											}";
224									break;
225									}
226							}
227						$js[] ="{
228							".$back."
229							value:\"".(adxx($fdada[$value['fname']])?adxx($fdada[$value['fname']]):$config['y'])."\",
230							fieldLabel:'".$value['name']."',
231							".(($value['id'])?("id:'".$value['id']."',"):(""))."
232							".(($value['width'])?("width:".$value['width'].","):(""))."
233							".((!$value['yxwk'])?("allowBlank:false,blankText:'".adxx($value['ts'])."',"):(""))."
234							".(($config['readonly'])?("readOnly:'true',"):(""))."
235							typeAhead: true,
236							emptyText:'".$config['x']."',
237							name: '".$value['fname']."_',
238							id: '".$value['fname']."_',
239							hiddenName : '".$value['fname']."',
240							editable: false,xtype: 'combo',
241							store:new Ext.data.Store({   
242								proxy: new Ext.data.HttpProxy({   
243									url: '".$url."'
244								}),
245								listeners : { 
246								load : function(){ 
247								".$chuzai."
248								}} ,
249								autoLoad:true,
250								reader: new Ext.data.ArrayReader({   
251							}, [   
252								{name: 'id', mapping: 'id'},   
253								{name: 'title', mapping: 'title'}   
254							])   
255}),
256							mode:'local',
257					        displayField:'title',
258					        selectOnFocus:true,
259					        valueField :'id',
260							".(($config['STR'])?("".$config['STR'].""):(""))."
261					        triggerAction:'all',
262							listeners:{     
263								select : function(combo, record,index){".$select."}
264								}				
265							}";break;}
266				case 'radiogroup':{
267								$tempxx = json_decode($value['zyz'],true);
268								$config_num = count($tempxx);
269								if($config_num != 0){
270									$items='';
271									foreach($tempxx as $key => $data){
272										if($data['ck']=='1'){
273											$items.= "{boxLabel:'".$data['xv']."',name:'".$value['fname']."',inputValue:'".$data['yv']."',checked: true}";}else{
274											$items.= "{boxLabel:'".$data['xv']."',name:'".$value['fname']."',inputValue:'".$data['yv']."'}";}
275										if($key < $config_num-1){
276											$items.= ",";
277										}
278									}
279								}
280						$js[] ="{
281							xtype: 'radiogroup',
282							".(($value['width']&&$value['width']<=$config_num)?("columns:".$value['width'].","):(""))."
283							".(($config['vertical'])?("vertical: true,"):(""))."
284							anchor: '95%',
285							 items: [".$items."],
286							fieldLabel:'".$value['name']."'
287							}";
288				break;}
289				case 'recommend':{
290							$items='';
291								$items.= "{boxLabel:'???',name:'".$value['fname']."',inputValue:'1'},";
292								$items.= "{boxLabel:'???',name:'".$value['fname']."',inputValue:'0',checked: true}";
293								
294						$js[] ="{
295							xtype: 'radiogroup',
296							anchor: '95%',
297							 items: [".$items."],
298							fieldLabel:'".$value['name']."'
299							}";
300				break;}
301				case 'checkboxgroup':{
302								$tempxx = json_decode($value['zyz'],true);
303								$config_num = count($tempxx);
304								if($config_num != 0){
305									$items='';
306									foreach($tempxx as $key => $data){
307									$ckbox[]=$value['fname']."[".$key."]";	
308										if($data['ck']=='1'){
309											$items.= "{boxLabel:'".$data['xv']."',name:'".$value['fname']."[".$key."]',inputValue:'".$data['yv']."',checked: true}";}else{
310											$items.= "{boxLabel:'".$data['xv']."',name:'".$value['fname']."[".$key."]',inputValue:'".$data['yv']."'}";}
311										if($key < $config_num-1){
312											$items.= ",";
313										}
314										}
315								}
316						$js[] ="{
317							xtype:'checkboxgroup',
318							".(($value['width']&&$value['width']<=$config_num)?("columns:".$value['width'].","):(""))."
319							".(($config['vertical'])?("vertical: true,"):(""))."
320							anchor: '95%',
321							 items: [".$items."],
322							fieldLabel:'".$value['name']."'
323							}";
324				break;}
325				default:{
326						$js[] ="{
327							xtype: 'textfield',
328							value:\"\",
329							fieldLabel:'".$value['name']."',
330							".(($value['id'])?("id:'".$value['id']."',"):(""))."
331							".(($value['width'])?("width:'".$value['width']."px',"):("grow:true,growMin:68,growMax:300,"))."
332							".(($config['STR'])?("".$config['STR'].""):(""))."
333							name: '".$value['fname']."'
334							}";
335						}
336		  }
337		}
338		}
339		Tr($ckbox,'ckbox');
340		Tr($js,'js');
341		$tree=Dgd(array(
342			  'db'=>'d_sevenel',
343			  'cd'=>"id = '".$_GET['tid']."' ",
344			  'tn'=>"tree",
345			  'limit'=>1
346			));
347		Tr($tree,'tree');
348		if($tree['expand']){
349		$fstree=Dgd(array(
350			  'db'=>'d_sevenel',
351			  'cd'=>"id in (0,".$tree['expand'].") ",
352			  'tn'=>"tree"
353			));}
354		$fsstr='';
355            if ($fstree) {
356                if ($_GET['tid'] != '65'&&$_GET['tid']!='74') {
357                    foreach ($fstree as $fsvalue) {
358                        $fsstr.=",{xtype:\"button\",text:\"??" . $fsvalue['title'] . "\",iconCls:\"fsadd\",pressed:true,handler:function(){
359				var record = grid.getStore().getAt(rowIndex);
360				fsadd('" . $fsvalue['id'] . "','" . $fsvalue['title'] . "',\"./show1/i.php?op=add&tid=" . $fsvalue['id'] . "&bdtid=" . $_GET['tid'] . "&bdid=\",record.data.id);		}}
361				,{xtype:\"button\",text:\"??" . $fsvalue['title'] . "\",iconCls:\"fslist\",pressed:true,handler:function(){
362				var record = grid.getStore().getAt(rowIndex);
363				fslist('" . $fsvalue['id'] . "','" . $fsvalue['title'] . "',\"./show1/l.php?op=list&tid=" . $fsvalue['id'] . "&bdtid=" . $_GET['tid'] . "&bdid=\",record.data.id);
364					}}";
365                    }
366                } else {
367                    foreach ($fstree as $fsvalue) {
368                        $fsstr.=",{xtype:\"button\",text:\"??" . $fsvalue['title'] . "\",iconCls:\"fsadd\",pressed:true,handler:function(){
369				var record = grid.getStore().getAt(rowIndex);
370				fsadd('" . $fsvalue['id'] . "','" . $fsvalue['title'] . "',\"./show1/real_time.php?op=add&tid=" . $fsvalue['id'] . "&bdtid=" . $_GET['tid'] . "&bdid=\",record.data.id);		}}
371				,{xtype:\"button\",text:\"??" . $fsvalue['title'] . "\",iconCls:\"fslist\",pressed:true,handler:function(){
372				var record = grid.getStore().getAt(rowIndex);
373				fslist('" . $fsvalue['id'] . "','" . $fsvalue['title'] . "',\"./show1/real_time.php?op=list&tid=" . $fsvalue['id'] . "&bdtid=" . $_GET['tid'] . "&bdid=\",record.data.id);
374					}}";
375                    }
376                }
377            }
378		Tr($fsstr,'fstree');
379		
380		$table=Dgd(array(
381			  'db'=>'d_sevenel',
382			  'cd'=>"id = '".$tree['table']."' ",
383			  'tn'=>"datamod",
384			  'limit'=>1
385			));
386		Tr($table,'table');
387		
388		Ts('show1/list.html');
389		break;
390		}
391	case 'fy':{
392		
393			$fldata=Dgd(array(
394			  'db'=>'d_sevenel',
395			  'cd'=>"tid = '".$_POST['tid']."' order by px asc ",
396			  'tn'=>"fld"
397			));
398			$zhuanyi=array();
399			$btsc=array();
400			$gjsc=array();
401			foreach($fldata as $key=>$value){
402					if($value['zy']==1){
403						$zhuanyi[]=$value;
404						}
405					if($value['bt']==1){
406						$btsc[$value['fname']]=$value['type'];
407						}
408					if($value['gj']==1){
409						$gjsc[]=$value;
410						}
411				}
412			$condition='';
413			$_POST['tt']&&$condition.="and tt like '%".$_POST['tt']."%' ";
414			$_POST['bdtid']&&$condition.="and bdtid = '".$_POST['bdtid']."' ";
415			$_POST['bdid']&&$condition.="and bdid = '".$_POST['bdid']."' ";
416			 if($gjsc){
417				 $xzt=array('combo','recommend','radiogroup');
418				foreach($gjsc as $value){
419					if(in_array($value['type'],$xzt)){
420					$_POST[$value['fname']]!=''&&$condition.="and ".$value['fname']." = '".$_POST[$value['fname']]."' ";
421						}else{
422							if($value['type']=='checkboxgroup'){
423								if($_POST[$value['fname']]){
424								 foreach($_POST[$value['fname']] as $cv){
425					$cv!=''&&$condition.="and ".$value['fname']." like '%".$cv."%' ";
426									 }
427									}
428								}else{
429					$_POST[$value['fname']]!=''&&$condition.="and ".$value['fname']." like '%".$_POST[$value['fname']]."%' ";
430									}
431							}
432					} 
433				 }
434			$dbinfo=Dgd(array(
435					  'db'=>'d_sevenel',
436					  'tn'=>$_POST['dbname'],
437					  'start'=>$_POST['start'],
438					  'limit'=>$_POST['limit'],
439					  'total'=>true,
440					 // 'ce'=>1,
441					  'cd'=>" 1 and tid = '".$_POST['tid']."' ".$condition." and del != '1' order by id desc "
442					  ));
443			//??
444			
445			
446			//??
447			
448		foreach($dbinfo['data'] as $key =>$value){
449						foreach($zhuanyi as $zyv){
450								switch($zyv['type']){
451									case 'fileup':{
452										//echo $dbinfo['data'][$key][$zyv['fname']];
453										$config=json_decode($zyv['cfg'],true);
454										$dvalue=array( 0=>array('rar','zip','tar','.tz'),
455													   1=>array('jpg','gif','png','bmp'),
456													   2=>array('mp3','mp4','avi','wmv','mid','.rm','mvb','mov','wma','wav'),
457													   3=>array('doc','xls','txt','ocx','lsx','ppt','pdf','chm'),
458													   4=>array('doc','xls','txt','ocx','lsx','ppt','pdf','chm','mp3','mp4','avi','wmv','mid','.rm','mvb','mov','wma','wav','jpg','gif','png','bmp','rar','zip','tar','.tz')		   
459															   );
460										$otype=substr(strtolower($dbinfo['data'][$key][$zyv['fname']]),-3);
461												if(in_array($otype,$dvalue[0])){
462												$dbinfo['data'][$key][$zyv['fname']]="<a href=\"/uplods/pic/".$dbinfo['data'][$key][$zyv['fname']]."\" target='_blank'><img src=\"../img/archive.png\">??[Download]</a>";
463													}
464												if(in_array($otype,$dvalue[1])){
465													if($config['sl1']==1){
466													$dbinfo['data'][$key][$zyv['fname']]="<img src=\"/uplods/thumb1/".$dbinfo['data'][$key][$zyv['fname']]."\" >";	
467														}elseif($config['sl2']==1){
468													$dbinfo['data'][$key][$zyv['fname']]="<img src=\"/uplods/thumb2/".$dbinfo['data'][$key][$zyv['fname']]."\" >";	
469															}elseif($config['sypic']==1||$config['sytxt']==1){
470													$dbinfo['data'][$key][$zyv['fname']]="<img src=\"/uplods/sytp/".$dbinfo['data'][$key][$zyv['fname']]."\"  width=\"100px\">";	
471															}else{
472													$dbinfo['data'][$key][$zyv['fname']]="<img src=\"/uplods/pic/".$dbinfo['data'][$key][$zyv['fname']]."\"  width=\"100px\">";	
473																}
474													}
475												if(in_array($otype,$dvalue[2])){
476												$dbinfo['data'][$key][$zyv['fname']]="<a href=\"/uplods/pic/".$dbinfo['data'][$key][$zyv['fname']]."\" target='_blank'><img src=\"../img/film_link.png\">??[Download]</a>";
477													}
478												if(in_array($otype,$dvalue[3])){
479												$dbinfo['data'][$key][$zyv['fname']]="<a href=\"/uplods/pic/".$dbinfo['data'][$key][$zyv['fname']]."\" target='_blank'><img src=\"../img/report_word.png\">??[Download]</a>";
480													}
481										break;	
482										}
483									case 'radiogroup':{	
484									$tempxx = json_decode($zyv['zyz'],true);
485									foreach($tempxx as $value){
486											if($value['yv']==$dbinfo['data'][$key][$zyv['fname']]){
487											$dbinfo['data'][$key][$zyv['fname']]=$value['xv'];
488												}
489										}
490										break;
491										}
492									case 'checkboxgroup':{	
493									$tempxx = json_decode($zyv['zyz'],true);
494									$nowv=explode('#_#',$dbinfo['data'][$key][$zyv['fname']]);
495									$dbinfo['data'][$key][$zyv['fname']]='';
496									foreach($tempxx as $value){
497											if(in_array($value['yv'],$nowv)){
498											$dbinfo['data'][$key][$zyv['fname']].=$value['xv']."<BR>";
499												}
500										}
501										break;
502										}
503									case 'combo':{	
504									$tempxx = json_decode($zyv['zyz'],true);
505									foreach($tempxx as $value){
506											if($value['yv']==$dbinfo['data'][$key][$zyv['fname']]){
507											$dbinfo['data'][$key][$zyv['fname']]=$value['xv'];
508												}
509										}
510										break;
511										}
512									case 'combo1':{
513										$config =json_decode($zyv['cfg'],true);
514										$tq=Dgd(array(
515										  'db'=>'d_sevenel',
516										  'tn'=>$config['table'],
517										  'cd'=> " ".$config['y']." = '".$dbinfo['data'][$key][$zyv['fname']]."' and  ".$config['conditon'],
518										  'limit'=>1
519
520										  ));
521									$dbinfo['data'][$key][$zyv['fname']]=$tq[$config['x']];
522										break;
523								}
524									case 'combo2':{
525										$tq=Dgd(array(
526										  'db'=>'d_sevenel',
527										  'tn'=>'sort',
528										  'cd'=> " id = '".$dbinfo['data'][$key][$zyv['fname']]."' ",
529										  'limit'=>1
530
531										  ));
532									$dbinfo['data'][$key][$zyv['fname']]=$tq['title'];
533										break;
534								}
535									case 'combo3':{
536										$tq=Dgd(array(
537										  'db'=>'d_sevenel',
538										  'tn'=>'sort',
539										  'cd'=> " id = '".$dbinfo['data'][$key][$zyv['fname']]."' ",
540										  'limit'=>1
541
542										  ));
543									$dbinfo['data'][$key][$zyv['fname']]=$tq['title'];
544										break;
545								}
546								
547									case 'recommend':{	
548										$config=json_decode($zyv['cfg'],true);
549										if($dbinfo['data'][$key][$zyv['fname']]!=0){
550											$dbinfo['data'][$key][$zyv['fname']]="<a href=\"#\" onclick='gxzd(\"".$dbinfo['data'][$key]['id']."\",\"".$zyv['fname']."\",\"0\")' title=\"??????????\"  >  <img src=\"../img/".$config['paixu']."\"></a>    <a href=\"#\"  title=\"??[order]\"  onclick='tjpx(\"".$_POST['tid']."@".$_POST['dbname']."\",\"".$zyv['fname']."\")' >   <img src=\"../img/sucaiwcom8170000bzc.gif\" ait=\"??[order]\"></a>";
551												}else{
552											$dbinfo['data'][$key][$zyv['fname']]="<a href=\"#\" onclick='gxzd(\"".$dbinfo['data'][$key]['id']."\",\"".$zyv['fname']."\",\"1\")'  title=\"????????\"  ><img src=\"../img/flag.png\"></a> <a href=\"#\" title=\"??[order]\"   onclick='tjpx(\"".$_POST['tid']."@".$_POST['dbname']."\",\"".$zyv['fname']."\")' >  <img src=\"../img/sucaiwcom8170000bzc.gif\" ait=\"??[order]\"></a>";
553													}
554										break;
555										}
556									}
557							
558							}
559						
560				}
561/*				
562			$_SESSION['as']=$_SESSION['as']+10;
563			$dbinfo['as']=$_SESSION['as'];
564*/			echo json_encode($dbinfo);
565			break;
566		}
567	case 'width_change':{
568	$id=$_POST['id'];
569	Du('sevenel','fld',array('wd'=>$_POST['width']),'id',$id,1);
570	echo 'ok';
571	break;
572	}
573	case 'del':{
574	$_POST['del']=1;
575	$_POST['ids']=json_decode(stripslashes($_POST['ids']));
576	if(is_array($_POST['ids'])){
577		foreach($_POST['ids'] as $id){
578			Du('sevenel',$_POST['dbname'],$_POST,'id',$id,0);
579			}				   
580		}else{
581			Du('sevenel',$_POST['dbname'],$_POST,'id',$id,0);
582			}
583	 echo '{success:true,msg:\'ok\'}';
584	break;
585	}
586
587 }
588?>