PageRenderTime 64ms CodeModel.GetById 10ms app.highlight 45ms RepoModel.GetById 1ms app.codeStats 1ms

/source/gl/user/user.php

http://prosporous.googlecode.com/
PHP | 607 lines | 583 code | 9 blank | 15 comment | 72 complexity | 374b50a0ac9cfd895e50c1896acab81d MD5 | raw file
  1<?php
  2/* * ??????UTF-8???.
  3 * Created on 2010-6-3
  4 *
  5 * @author EXT <isrn@qq.com>
  6 *
  7 */
  8include ('../../includes/global.php');
  9include ('../global.php');
 10include ("../power.php");
 11function grv($type, $blm, $dvalue=false) {
 12    //print_r($type);
 13    if ($dvalue) {
 14        return $dvalue;
 15    } else {
 16        switch ($type) {
 17            case 'function': {
 18                    $a = explode('#', $blm);
 19                    return $a[0]($a[1]);
 20                    break;
 21                }
 22            case '$_GET': {
 23                    return $_GET[$blm];
 24                    break;
 25                }
 26            case '$_SESSION': {
 27                    return $_SESSION[$blm];
 28                    break;
 29                }
 30            case '$_POST': {
 31                    return $_POST[$blm];
 32                    break;
 33                }
 34            case '$_COOKIE': {
 35                    return $_COOKIE[$blm];
 36                    break;
 37                }
 38            case '$_SERVER': {
 39                    return $_SERVER[$blm];
 40                    break;
 41                }
 42            case '$_ENV': {
 43                    return $_ENV[$blm];
 44                    break;
 45                }
 46            case '$_FILES': {
 47                    return $_FILES[$blm];
 48                    break;
 49                }
 50            case '0': {
 51                    return $blm;
 52                    break;
 53                }
 54            case '1': {
 55                    break;
 56                }
 57            default: {
 58                    return $blm;
 59                    break;
 60                }
 61        }
 62    }
 63}
 64switch ($_REQUEST['op']) {
 65    /* 	case 'load':{
 66      ext_request('ok');
 67      break;}
 68     */
 69
 70    case 'add': {
 71            $tree_id = $_GET['tid'];
 72            Tr($_GET['tid'], 'tid');
 73            Tr($_GET['bdtid'], 'bdtid');
 74            Tr($_GET['bdid'], 'bdid');
 75            $field = Dgd(array(
 76                'db' => 'd_sevenel',
 77                'cd' => "tid = $tree_id order by px asc",
 78//		  'ce'=>1,
 79                'tn' => "fld"
 80                    ));
 81            $tree = Dgd(array(
 82                'db' => 'd_sevenel',
 83                'cd' => "id = $tree_id",
 84                'tn' => "tree",
 85                'limit' => 1
 86                    ));
 87            $tname = gettabname($tree['table'], $dbcfg['prefix'], true);
 88            Tr($tname, 'tname');
 89            if ($_GET['id']) {
 90                Tr($_GET['id'], 'id');
 91                $fdada = Dgd(array(
 92                    'db' => 'd_sevenel',
 93                    'cd' => " id = '" . $_GET['id'] . "' and del != '1' ",
 94                    'tn' => "$tname",
 95                    'limit' => 1
 96                        ));
 97                Tr($fdada['gid'], 'gid');
 98                Tr(preg_replace("/[\s]{2,}/", "", $fdada['lg']), 'lg');
 99            }
100            foreach ($field as $arrow => $value) {
101                $back = is_odd($arrow + 1) ? "itemCls:'hang'," : "";
102                if ($value['cfg'] != '') {
103                    $config = json_decode($value['cfg'], true);
104                } else { $config = ''; }
105                /* 			if($config!=''){foreach($config  as $key=>$v){
106                  $config[$key]=adxx($v);
107                  }}
108                 */ $config['STR'] = str_replace("\r", "", $config['STR']);
109                $config['STR'] = str_replace("\n", "", $config['STR']);
110                $config['STR'] = str_replace("\t", "", $config['STR']);
111                switch ($value['type']) {
112                    case 'hidden': {
113                            $js[$value['fname']] = "{
114							xtype: 'hidden',
115								value:\"" . (grv($value['qzfs'], $value['blm'], adxx($fdada[$value['fname']]))) . "\",
116								" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
117							name: '" . $value['fname'] . "'
118							}";
119                            break; }
120                    case 'textfield': {
121                            $js[$value['fname']] = "{
122							xtype: 'textfield',
123							value:\"" . (grv($value['qzfs'], $value['blm'], adxx($fdada[$value['fname']]))) . "\",
124							fieldLabel:'" . $value['name'] . "',
125							" . (($value['id']) ? ("id:'" . $value['id'] . "',") : ("")) . "
126							" . (($value['width']) ? ("width:'" . $value['width'] . "px',") : ("grow:true,growMin:68,growMax:300,")) . "
127							" . ((!$value['yxwk']) ? ("allowBlank:false,blankText:'" . adxx($value['ts']) . "',") : ("")) . "
128							" . (($config['readonly']) ? ("readOnly:'true',") : ("")) . "
129							" . (($_GET['id'] && $value['fname'] == 'user') ? ("readOnly:'true',") : ("")) . "
130							" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
131							" . $back . "
132							name: '" . $value['fname'] . "'
133							}";
134                            break; }
135                    case 'password': {
136                            if ($_GET['id'] == '') {
137                                $js[$value['fname']] = "{
138							xtype: 'textfield',
139							value:\"" . (grv($value['qzfs'], $value['blm'], adxx($fdada[$value['fname']]))) . "\",
140							fieldLabel:'" . $value['name'] . "',
141							inputType: 'password',allowBlank:false,blankText:'??????',
142							id: '" . $value['fname'] . "',
143							" . (($value['width']) ? ("width:'" . $value['width'] . "px',") : ("width:'100px',")) . "
144							" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
145							" . $back . "name: '" . $value['fname'] . "'
146							},{
147							xtype: 'textfield',
148							value:\"" . (grv($value['qzfs'], $value['blm'], adxx($fdada[$value['fname']]))) . "\",
149							fieldLabel:'??" . $value['name'] . "',
150							inputType: 'password',allowBlank:false,blankText:'??????',
151							vtype: 'password',
152							" . (($value['width']) ? ("width:'" . $value['width'] . "px',") : ("width:'100px',")) . "
153							" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
154							initialPassField: '" . $value['fname'] . "',
155							" . $back . "name: '" . $value['fname'] . "-cfrm'
156							}";
157                                $plugurl[] = '/Plug-in/ext/adv-vtypes.js';
158                            } else {
159                                $js[$value['fname']] = "{
160							xtype: 'button',
161							text:'??????????',
162							handler:function(){
163								var pr=top.Ext.get('fname" . $_GET['tid'] . $value['fname'] . $_GET['id'] . "');
164														if(pr){
165															pr.close();
166															}
167														top.xajax_loadUrl('??" . $value['name'] . "','./zdgx/show.php?&op=show&tid=" . $_GET['tid'] . "&fname=" . $value['fname'] . "&id=" . $_GET['id'] . "','438','138',false,'fname" . $_GET['tid'] . $value['fname'] . $_GET['id'] . "');								}					}";
168                            } break; }
169                    case 'fileup': {
170                            if ($fdada[$value['fname']] == '') {
171                                $fdada[$value['fname']] = 'zwtp.jpg';
172                            }
173                            $dvalue = array(0 => array('rar', 'zip', 'tar', '.tz'),
174                                1 => array('jpg', 'gif', 'png', 'bmp'),
175                                2 => array('mp3', 'mp4', 'avi', 'wmv', 'mid', '.rm', 'mvb', 'mov', 'wma', 'wav'),
176                                3 => array('doc', 'xls', 'txt', 'ocx', 'lsx', 'ppt', 'pdf', 'chm'),
177                                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')
178                            );
179                            $otype = substr(strtolower($fdada[$value['fname']]), -3);
180                            if (in_array($otype, $dvalue[0])) {
181                                $zs = "<a href=\"/uplods/pic/" . $fdada[$value['fname']] . "\" target=\'_blank\'><img src=\"../img/archive.png\">??[Download]</a>";
182                            }
183                            if (in_array($otype, $dvalue[1])) {
184                                if ($config['sypic'] == 1 || $config['sytxt'] == 1) {
185                                    $zs = "<img src=\"/uplods/sytp/" . $fdada[$value['fname']] . "\" >";
186                                } else {
187                                    $zs = "<img src=\"/uplods/pic/" . $fdada[$value['fname']] . "\" >";
188                                }
189                            }
190                            if (in_array($otype, $dvalue[2])) {
191                                $zs = "<a href=\"/uplods/pic/" . $fdada[$value['fname']] . "\" target=\'_blank\'><img src=\"../img/film_link.png\">??[Download]</a>";
192                            }
193                            if (in_array($otype, $dvalue[3])) {
194                                $zs = "<a href=\"/uplods/pic/" . $fdada[$value['fname']] . "\" target=\'_blank\'><img src=\"../img/report_word.png\">??[Download]</a>";
195                            }
196                            $qk = " <a href=\"#\"  onclick=qkzd(\"" . $fdada['id'] . "\",\"" . $value['fname'] . "\") ><img src=\"../img/001_02.gif\">?????</a>";
197                            $js[$value['fname']] = "{
198							xtype: 'textfield',
199							fieldLabel:'" . $value['name'] . "',
200							inputType: 'file',
201							" . (($value['id']) ? ("id:'" . $value['id'] . "',") : ("")) . "
202							width:'150',
203							" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
204							" . $back . "name: '" . $value['fname'] . "'
205							},{" . $back . "html:'<div style=\"float:left;width:300px;\" align=center>" . $zs . "" . $qk . "</div>'}";
206                            break; }
207                    case 'textarea': {
208                            $js[$value['fname']] = preg_replace("/[\s]{2,}/", "", "{
209							xtype: 'textarea',
210							value:\"" . (grv($value['qzfs'], $value['blm'], adxx($fdada[$value['fname']]))) . "\",
211							fieldLabel:'" . $value['name'] . "',
212							grow:true,
213							" . (($value['id']) ? ("id:'" . $value['id'] . "',") : ("")) . "
214							" . (($value['width']) ? ("width:'" . $value['width'] . "px',") : ("width:'400px',")) . "
215							" . ((!$value['yxwk']) ? ("allowBlank:false,blankText:'" . adxx($value['ts']) . "',") : ("")) . "
216							" . (($config['readonly']) ? ("readOnly:'true',") : ("")) . "
217							" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
218							" . $back . "
219							name: '" . $value['fname'] . "'
220							}");
221                            break; }
222                    case 'htmleditor': {
223                            $js[$value['fname']] = preg_replace("/[\s]{2,}/", "", "{
224							xtype: 'htmleditor',
225							value:\"" . (grv($value['qzfs'], $value['blm'], adxx($fdada[$value['fname']]))) . "\",
226							fieldLabel:'" . $value['name'] . "',
227							" . (($value['id']) ? ("id:'" . $value['id'] . "',") : ("")) . "
228							" . (($value['width']) ? ("width:" . $value['width'] . ",") : ("anchor:'98%',")) . "
229							" . (($config['height']) ? ("height:" . $config['height'] . ",") : ("")) . "
230							" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
231							" . $back . "
232							name: '" . $value['fname'] . "'
233							}");
234                            break; }
235                    case 'fckeditor': {
236                            $js[$value['fname']] = preg_replace("/[\s]{2,}/", "", "{
237						xtype:\"textarea\",
238						" . (($value['id']) ? ("id:'" . $value['id'] . "',") : ("")) . "
239						value:\"" . (grv($value['qzfs'], $value['blm'], adxx($fdada[$value['fname']]))) . "\",
240						" . (($value['width']) ? ("width:" . $value['width'] . ",") : ("anchor:'98%',")) . "
241						" . (($config['height']) ? ("height:" . $config['height'] . ",") : ("height:300,")) . "
242						fieldLabel:'" . $value['name'] . "',
243						" . $back . "
244						listeners:{
245						     focus:function(f){
246								 				var myMask = new Ext.LoadMask(Ext.getBody(), {msg:'???'});
247												myMask.show();
248												var w=f.getSize();
249												   fckEditor = new FCKeditor('" . $value['fname'] . "') ;
250												   fckEditor.Height=" . (($config['height']) ? ($config['height']) : (300)) . ";
251												   fckEditor.Width=" . (($value['width']) ? ($value['width']) : (800)) . ";
252												fckEditor.SkinPath = '/Plug-in/fck/editor/skins/silver/' ;
253												fckEditor.BasePath = '/Plug-in/fck/' ;
254												fckEditor.Config['ToolbarStartExpanded'] = " . (($config['zhed']) ? ("false") : ('true')) . ";
255												" . (($config['STR']) ? ($config['STR']) : ("")) . "
256												fckEditor.ReplaceTextarea() ;
257												myMask.hide();
258						                     }
259						                   },
260						name: '" . $value['fname'] . "'
261						}");
262                            $fckplugin.="try{var fckobj_temp = FCKeditorAPI.GetInstance('" . $value['fname'] . "');
263										 fckobj_temp.UpdateLinkedField();}catch(err){
264														};";
265                            $plugurl[] = '/Plug-in/fck/fckeditor.js';   // fckEditor.ReplaceTextarea() ;
266                            break; }
267                    case 'kindeditor': {
268                            $yuan = array("</script>", "vegetables", "fiber");
269                            $tyuan = array("<\/script>", "beer", "ice cream");
270
271                            $js[$value['fname']] = preg_replace("/[\s]{2,}/", "", "{
272						xtype:\"textarea\",
273						id:'" . $value['fname'] . "',
274						" . $back . "
275						value:\"" . (grv($value['qzfs'], $value['blm'], str_replace($yuan, $tyuan, adxx(preg_replace("'([\r\n])[\s]+'", "", $fdada[$value['fname']]))))) . "\",
276						" . (($value['width']) ? ("width:" . $value['width'] . ",") : ("anchor:'98%',")) . "
277						" . (($config['height']) ? ("height:" . $config['height'] . ",") : ("height:300,")) . "
278						fieldLabel:'" . $value['name'] . "',
279						listeners:{
280							   render:function(f){
281												try{KE.show({id : '" . $value['fname'] . "',
282												width :" . (($value['width']) ? ("'" . $value['width'] . "px'") : ('70%')) . ",
283												height : " . (($config['height']) ? ("'" . $config['height'] . "px'") : ('300px')) . ", 
284												" . (($config['STR']) ? ($config['STR']) : ("")) . "
285												" . (($config['jd']) ? ("resizeMode : 1,
286													allowPreviewEmoticons : false,
287													allowUpload : false,
288													items : [
289													'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
290													'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
291													'insertunorderedlist', '|', 'emoticons', 'image', 'link'],") : ("")) . "
292												filterMode : false});}catch(err){
293														};
294								   				}
295						                   },
296						
297						name: '" . $value['fname'] . "'
298						}");
299                            $fckplugin.="KE.util.setData('" . $value['fname'] . "');";
300                            $plugurl[] = '/Plug-in/kind/kindeditor.js';   // fckEditor.ReplaceTextarea() ;
301                            break; }
302                    case 'datefield': {
303                            if (is_numeric($fdada[$value['fname']])) {
304                                $fdada[$value['fname']] = date($config['zqgs'], $fdada[$value['fname']]);
305                            }
306                            $js[$value['fname']] = "{
307							xtype: 'datefield',
308							" . $back . "
309							value:\"" . (grv($value['qzfs'], $value['blm'], adxx($fdada[$value['fname']]))) . "\",
310							fieldLabel:'" . $value['name'] . "',
311							" . (($value['id']) ? ("id:'" . $value['id'] . "',") : ("")) . "
312							" . (($value['width']) ? ("width:" . $value['width'] . ",") : ("")) . "
313							disabledDays :[" . @implode(',', $config['pbxq']) . "],
314							" . ((!$value['yxwk']) ? ("allowBlank:false,blankText:'" . adxx($value['ts']) . "',") : ("")) . "
315							" . (($config['zwxs']) ? ("readOnly:'true',") : ("")) . "
316							" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
317							" . (($config['zqgs']) ? ("format:'" . $config['zqgs'] . "',") : ("")) . "
318							name: '" . $value['fname'] . "'
319							}";
320                            if ($config['zwxs'] == 1) { $plugjs[] = 'Date.dayNames = ["?", "?", "?", "?", "?", "?", "?"];
321						    if (Ext.DatePicker) {
322						        Ext.apply(Ext.DatePicker.prototype, {
323						            todayText: "??",
324						            minText: "?????????",
325						            maxText: "?????????",
326						            disabledDaysText: "",
327						            disabledDatesText: "",
328						            monthNames: Date.monthNames,
329						            dayNames: Date.dayNames,
330						            nextText: "?? (Control+Right)",
331						            prevText: "?? (Control+Left)",
332						            monthYearText: "????? (Control+Up/Down ????)",
333						            todayTip: "{0} (Spacebar)",
334						            okText: "??",
335						            cancelText: "??",
336						            format: "y?m?d?"
337						        });
338   					}'; }
339                            break; }
340                    case 'swfupload': {
341                            $js[$value['fname']] = "{
342							xtype: '{$value['type']}',
343							" . $back . "
344			                name: '{$value['fname']}',
345			                id: '{$value['fname']}',
346			                fieldLabel: '{$value['name']}',
347			                anchor:'99%',
348			                height: {$config['height']}
349						}";
350                            break; }
351                    case 'combo': {
352                            $tempxx = json_decode($value['zyz'], true);
353                            $config_num = count($tempxx);
354                            $items = '';
355                            if ($config_num != 0) {
356                                foreach ($tempxx as $key => $data) {
357                                    if ($data['ck'] == '1') {
358                                        $fdada[$value['fname']] ? $fdada[$value['fname']] : $fdada[$value['fname']] = $data['xv']; }
359                                    $items.= "['" . $data['xv'] . "','" . $data['yv'] . "']";
360                                    if ($key < $config_num - 1) {
361                                        $items.= ",";
362                                    }
363                                }
364                            }
365                            $js[$value['fname']] = "{
366							" . $back . "
367							value:\"" . (grv($value['qzfs'], $value['blm'], adxx($fdada[$value['fname']]))) . "\",
368							fieldLabel:'" . $value['name'] . "',
369							" . (($value['id']) ? ("id:'" . $value['id'] . "',") : ("")) . "
370							" . (($value['width']) ? ("width:" . $value['width'] . ",") : ("")) . "
371							" . ((!$value['yxwk']) ? ("allowBlank:false,blankText:'" . adxx($value['ts']) . "',") : ("")) . "
372							" . (($config['readonly']) ? ("readOnly:'true',") : ("")) . "
373							typeAhead: true,
374							name: '" . $value['fname'] . "_',
375							hiddenName : '" . $value['fname'] . "',
376							editable: false,xtype: 'combo',
377							store:new Ext.data.SimpleStore({
378											fields:['name','value'],
379											data:[" . $items . "]}),
380							mode:'local',
381					        displayField:'name',
382					        selectOnFocus:true,
383					        valueField :'value',
384							" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
385					        triggerAction:'all'
386
387							}";
388                            break; }
389                    case 'combo1': {
390
391                            $js[$value['fname']] = "{
392							" . $back . "
393							value:\"" . (adxx($fdada[$value['fname']]) ? adxx($fdada[$value['fname']]) : $config['dy']) . "\",
394							fieldLabel:'" . $value['name'] . "',
395							" . (($value['id']) ? ("id:'" . $value['id'] . "',") : ("")) . "
396							" . (($value['width']) ? ("width:" . $value['width'] . ",") : ("")) . "
397							" . ((!$value['yxwk']) ? ("allowBlank:false,blankText:'" . adxx($value['ts']) . "',") : ("")) . "
398							" . (($config['readonly']) ? ("readOnly:'true',") : ("")) . "
399							typeAhead: true,
400							emptyText:'" . $config['dx'] . "',
401							name: '" . $value['fname'] . "_',
402							id: '" . $value['fname'] . "_',
403							hiddenName : '" . $value['fname'] . "',
404							editable: false,xtype: 'combo',
405							store:new Ext.data.Store({   
406								proxy: new Ext.data.HttpProxy({   
407									url: '../cascade/getcascade.php?id=" . $value['id'] . "'
408								}),
409								listeners : { 
410								load : function(){ 
411										
412										if(typeof(chuzai)=='undefined'){
413											Ext.getCmp('" . $value['fname'] . "_" . "').setValue('" . (adxx($fdada[$value['fname']]) ? adxx($fdada[$value['fname']]) : $config['dy']) . "'); 
414											chuzai=1;
415											}
416										} 
417										} ,
418								autoLoad:true,
419								reader: new Ext.data.ArrayReader({   
420							}, [   
421								{name: '" . $config['y'] . "', mapping: '" . $config['y'] . "'},   
422								{name: '" . $config['x'] . "', mapping: '" . $config['x'] . "'}   
423							])   
424}),
425							mode:'local',
426					        displayField:'" . $config['x'] . "',
427					        selectOnFocus:true,
428					        valueField :'" . $config['y'] . "',
429							" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
430					        triggerAction:'all'
431								
432							}";
433                            break; }
434                    case 'radiogroup': {
435                            $tempxx = json_decode($value['zyz'], true);
436                            $config_num = count($tempxx);
437                            if ($config_num != 0) {
438                                $items = '';
439                                if ($_GET['id'] != '') {
440                                    foreach ($tempxx as $key => $data) {
441                                        if ($data['yv'] == $fdada[$value['fname']]) {
442                                            $items.= "{boxLabel:'" . $data['xv'] . "',name:'" . $value['fname'] . "',inputValue:'" . $data['yv'] . "',checked: true}"; } else {
443                                            $items.= "{boxLabel:'" . $data['xv'] . "',name:'" . $value['fname'] . "',inputValue:'" . $data['yv'] . "'}"; }
444                                        if ($key < $config_num - 1) {
445                                            $items.= ",";
446                                        }
447                                    }
448                                } else {
449                                    foreach ($tempxx as $key => $data) {
450                                        if ($data['ck'] == '1') {
451                                            $items.= "{boxLabel:'" . $data['xv'] . "',name:'" . $value['fname'] . "',inputValue:'" . $data['yv'] . "',checked: true}"; } else {
452                                            $items.= "{boxLabel:'" . $data['xv'] . "',name:'" . $value['fname'] . "',inputValue:'" . $data['yv'] . "'}"; }
453                                        if ($key < $config_num - 1) {
454                                            $items.= ",";
455                                        }
456                                    }
457                                }
458                            }
459                            $js[$value['fname']] = "{
460							xtype: 'radiogroup',
461							" . $back . "
462							" . (($value['width'] && $value['width'] <= $config_num) ? ("columns:" . $value['width'] . ",") : ("")) . "
463							" . (($config['vertical']) ? ("vertical: true,") : ("")) . "
464							" . ((!$value['yxwk']) ? ("allowBlank:false,blankText:'" . adxx($value['ts']) . "',") : ("")) . "
465							anchor: '95%',
466							 items: [" . $items . "],
467							" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
468							fieldLabel:'" . $value['name'] . "'
469							}";
470                            break; }
471                    case 'recommend': {
472                            $items = '';
473                            if (1 == $fdada[$value['fname']]) {
474                                $items.= "{boxLabel:'???',name:'" . $value['fname'] . "',inputValue:'1',checked: true},";
475                                $items.= "{boxLabel:'???',name:'" . $value['fname'] . "',inputValue:'0'}";
476                            } else {
477                                $items.= "{boxLabel:'???',name:'" . $value['fname'] . "',inputValue:'1'},";
478                                $items.= "{boxLabel:'???',name:'" . $value['fname'] . "',inputValue:'0',checked: true}";
479                            }
480
481                            $js[$value['fname']] = "{
482							xtype: 'radiogroup',
483							" . $back . "
484							" . ((!$value['yxwk']) ? ("allowBlank:false,blankText:'" . adxx($value['ts']) . "',") : ("")) . "
485							anchor: '95%',
486							 items: [" . $items . "],
487							" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
488							fieldLabel:'" . $value['name'] . "'
489							}";
490                            break; }
491                    case 'checkboxgroup': {
492                            $tempxx = json_decode($value['zyz'], true);
493                            $config_num = count($tempxx);
494                            if ($config_num != 0) {
495                                $items = '';
496                                if ($_GET['id'] != '') {
497                                    $xsarray = explode("#_#", $fdada[$value['fname']]);
498                                    foreach ($tempxx as $key => $data) {
499                                        if (in_array($data['yv'], $xsarray)) {
500                                            $items.= "{boxLabel:'" . $data['xv'] . "',name:'" . $value['fname'] . "[" . $key . "]',inputValue:'" . $data['yv'] . "',checked: true}"; } else {
501                                            $items.= "{boxLabel:'" . $data['xv'] . "',name:'" . $value['fname'] . "[" . $key . "]',inputValue:'" . $data['yv'] . "'}"; }
502                                        if ($key < $config_num - 1) {
503                                            $items.= ",";
504                                        }
505                                    }
506                                } else {
507                                    foreach ($tempxx as $key => $data) {
508                                        if ($data['ck'] == '1') {
509                                            $items.= "{boxLabel:'" . $data['xv'] . "',name:'" . $value['fname'] . "[" . $key . "]',inputValue:'" . $data['yv'] . "',checked: true}"; } else {
510                                            $items.= "{boxLabel:'" . $data['xv'] . "',name:'" . $value['fname'] . "[" . $key . "]',inputValue:'" . $data['yv'] . "'}"; }
511                                        if ($key < $config_num - 1) {
512                                            $items.= ",";
513                                        }
514                                    }
515                                }
516                            }
517                            $js[$value['fname']] = "{
518							xtype:'checkboxgroup',
519							" . $back . "
520							" . (($value['width'] && $value['width'] <= $config_num) ? ("columns:" . $value['width'] . ",") : ("")) . "
521							" . (($config['vertical']) ? ("vertical: true,") : ("")) . "
522							" . ((!$value['yxwk']) ? ("allowBlank:false,blankText:'" . adxx($value['ts']) . "',") : ("")) . "
523							anchor: '95%',
524							 items: [" . $items . "],
525							" . (($config['STR']) ? ("" . $config['STR'] . "") : ("")) . "
526							fieldLabel:'" . $value['name'] . "'
527							}";
528                            break; }
529                    default: {
530                            $js[$value['fname']] = "{
531							xtype: 'textfield',
532							fieldLabel: '{$value['name']}',
533							name: '{$value['fname']}',
534							" . $back . "
535							anchor:'60%'
536						}";
537                            break;
538                        }
539                }
540            }
541            Tr($plugurl, 'plugurl');
542            Tr($plugjs, 'plugjs');
543            Tr($fckplugin, 'fckplugin');
544            if ($_GET['id'] == 0) {
545                Tr('??', 'action');
546            } else {
547                Tr('??', 'action');
548            }
549
550            $showcf = array(
551                0 => array('title' => '????', 'zd' => array('user', 'psw')),
552                1 => array('title' => '??????', 'zd' => array('name', 'sex', 'tel'/* ,'email','mobile','sheng','shi','xian','homepage','instro' */)),
553                2 => array('title' => '??????', 'zd' => array('gongs', 'zhiw', 'gsjs'))
554            );
555            $fcf = '';
556            foreach ($showcf as $value) {
557                if ($value['column']) {
558                    $fcf.="{
559								layout: 'column',
560								border: false,
561								defaults: {
562									columnWidth: '." . floor((10 / $value['column'])) . "',
563									border: false
564								},items:[
565								";
566                    for ($i = 0; $i < $value['column']; $i++) {
567                        $fcf.="{
568									bodyStyle: 'padding-right:5px;',
569									items:{
570										xtype:'fieldset',
571										title: '" . $value[$i]['title'] . "',
572										autoHeight: true,
573										items: [";
574                        foreach ($value[$i]['zd'] as $zdm) {
575                            $fcf.=$js[$zdm] . ",";
576                        }
577                        $fcf = substr($fcf, 0, -1);
578                        $fcf.="]}},";
579                    }
580                    $fcf = substr($fcf, 0, -1);
581                    $fcf.="]},";
582                } else {
583                    $fcf.="{
584								xtype:'fieldset',
585								title: '" . $value['title'] . "',
586								autoHeight: true,
587								items: [";
588                    foreach ($value['zd'] as $zdm) {
589                        $fcf.=$js[$zdm] . ",";
590                    }
591                    $fcf = substr($fcf, 0, -1);
592                    $fcf.="]},";
593                }
594            }
595            $fcf = substr($fcf, 0, -1);
596            Tr($fcf, 'fcf');
597            Ts('user/add.html');
598            break; }
599    case 'list': {
600            Ts('user/list.html');
601            break; }
602    default: {
603            Ts('user/index.html');
604            break;
605        }
606}
607?>