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