コード例 #1
0
ファイル: system_info.php プロジェクト: BACKUPLIB/mwenhanced
function system_info()
{
    $version = $GLOBALS['ext_version'];
    //$tab = extGetParam( $_REQUEST, 'tab', 'tab1' );
    $width = 400;
    // width of 100%
    ?>
	<br />
	<div id="sysinfo">
	<div id="system-page" class="x-tab" title="<?php 
    echo ext_Lang::msg('sisysteminfo');
    ?>
">
	
	<table class="adminform">
	<tr>
		<td valign="top" width="250" style="font-weight:bold;">
		Logged in as:
		</td>
		<td><?php 
    echo $_SESSION['s_user'];
    ?>
</td>
	<tr>
		<td valign="top" width="250" style="font-weight:bold;">
			<?php 
    echo ext_lang::msg('sibuilton');
    ?>
:
		</td>
		<td>
		<?php 
    echo php_uname();
    ?>
		</td>
	</tr>
	<tr>
		<td valign="top" style="font-weight:bold;">
			<?php 
    echo ext_lang::msg('siphpversion');
    ?>
:
		</td>
		<td>
		<?php 
    echo phpversion();
    ?>
		&nbsp;
		<?php 
    echo phpversion() >= '4.3' ? '' : $GLOBALS['messages']['siphpupdate'];
    ?>
		</td>
	</tr>
	<tr>
		<td style="font-weight:bold;">
			<?php 
    echo ext_lang::msg('siwebserver');
    ?>
:
		</td>
		<td>
		<?php 
    echo get_server_software();
    ?>
		</td>
	</tr>
	<tr>
		<td style="font-weight:bold;">
			<?php 
    echo ext_lang::msg('siwebsphpif');
    ?>
:
		</td>
		<td>
		<?php 
    echo php_sapi_name();
    ?>
		</td>
	</tr>
	<tr>
		<td style="font-weight:bold;">
			<?php 
    echo ext_lang::msg('simamboversion');
    ?>
:
		</td>
		<td>
		<?php 
    echo $version;
    ?>
		</td>
	</tr>
	<tr>
		<td style="font-weight:bold;">
			<?php 
    echo ext_lang::msg('siuseragent');
    ?>
:
		</td>
		<td>
		<?php 
    echo phpversion() <= "4.2.1" ? getenv("HTTP_USER_AGENT") : $_SERVER['HTTP_USER_AGENT'];
    ?>
		</td>
	</tr>
	<tr>
		<td valign="top" style="font-weight:bold;">
			<?php 
    echo ext_lang::msg('sirelevantsettings');
    ?>
:
		</td>
		<td>
			<table cellspacing="1" cellpadding="1" border="0">
			<tr>
				<td valign="top">
					<?php 
    echo ext_lang::msg('sisafemode');
    ?>
:
				</td>
				<td>
				<?php 
    echo get_php_setting('safe_mode', 0);
    ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
    echo ext_lang::msg('sibasedir');
    ?>
:
				</td>
				<td>
				<?php 
    echo ($ob = ini_get('open_basedir')) ? $ob : 'none';
    ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
    echo ext_lang::msg('sidisplayerrors');
    ?>
:
				</td>
				<td>
				<?php 
    echo get_php_setting('display_errors');
    ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
    echo ext_lang::msg('sishortopentags');
    ?>
:
				</td>
				<td>
				<?php 
    echo get_php_setting('short_open_tag');
    ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
    echo ext_lang::msg('sifileuploads');
    ?>
:
				</td>
				<td>
				<?php 
    echo get_php_setting('file_uploads');
    ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
    echo ext_lang::msg('simagicquotes');
    ?>
:
				</td>
				<td>
				<?php 
    echo get_php_setting('magic_quotes_gpc');
    ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
    echo ext_lang::msg('siregglobals');
    ?>
:
				</td>
				<td>
				<?php 
    echo get_php_setting('register_globals', 0);
    ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
    echo ext_lang::msg('sioutputbuf');
    ?>
:
				</td>
				<td>
				<?php 
    echo get_php_setting('output_buffering', 0);
    ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
    echo ext_lang::msg('sisesssavepath');
    ?>
:
				</td>
				<td>
				<?php 
    echo ($sp = ini_get('session.save_path')) ? $sp : 'none';
    ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
    echo ext_lang::msg('sisessautostart');
    ?>
:
				</td>
				<td>
				<?php 
    echo intval(ini_get('session.auto_start'));
    ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
    echo ext_lang::msg('sixmlenabled');
    ?>
:
				</td>
				<td>
					<?php 
    echo extension_loaded('xml') ? '<font style="color: green;">' . $GLOBALS['messages']['miscyesno'][0] . '</font>' : '<font style="color: red;">' . $GLOBALS['messages']['miscyesno'][1] . '</font>';
    ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
    echo ext_lang::msg('sizlibenabled');
    ?>
:
				</td>
				<td>
				<?php 
    echo extension_loaded('zlib') ? '<font style="color: green;">' . $GLOBALS['messages']['miscyesno'][0] . '</font>' : '<font style="color: red;">' . $GLOBALS['messages']['miscyesno'][1] . '</font>';
    ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
    echo ext_lang::msg('sidisabledfuncs');
    ?>
:
				</td>
				<td>
				<?php 
    echo ($df = ini_get('disable_functions')) ? $df : 'none';
    ?>
				</td>
			</tr>
			</table>
		</td>
	</tr>
	</table>
	</div>
	<div id="php-page" class="x-tab" title="<?php 
    echo ext_Lang::msg('siphpinfo');
    ?>
">
	<table class="adminform">
	<tr>
		<th colspan="2">
			<?php 
    echo ext_lang::msg('siphpinformation');
    ?>
:
		</th>
	</tr>
	<tr>
		<td>
		<?php 
    ob_start();
    phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES);
    $phpinfo = ob_get_contents();
    ob_end_clean();
    preg_match_all('#<body[^>]*>(.*)</body>#siU', $phpinfo, $output);
    $output = preg_replace('#<table#', '<table class="adminlist" align="center"', $output[1][0]);
    $output = preg_replace('#(\\w),(\\w)#', '\\1, \\2', $output);
    $output = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);
    $output = preg_replace('#<hr />#', '', $output);
    echo $output;
    ?>
		</td>
	</tr>
	</table>
	</div>
	</div>
	<script type="text/javascript">
<!--
var tabs = new Ext.TabPanel( "sysinfo" );
tabs.addTab( "system-page","<?php 
    echo ext_Lang::msg('sisysteminfo');
    ?>
" ); 
tabs.addTab( "php-page","<?php 
    echo ext_Lang::msg('siphpinfo');
    ?>
" ); 
tabs.activate( "system-page" );
//-->
</script>
	<?php 
}
コード例 #2
0
ファイル: system_info.php プロジェクト: Gninety/Microweber
function system_info()
{
    $version = $GLOBALS['ext_version'];
    //$tab = extGetParam( $_REQUEST, 'tab', 'tab1' );
    $width = 400;
    // width of 100%
    switch (extGetParam($GLOBALS['__POST'], 'action2', 'panel')) {
        case 'systeminfo':
            ?>
		<div class="body-wrap">
		  <table class="member-table">
			<tr>
				<td valign="top" width="250" style="font-weight:bold;">
				Logged in as:
				</td>
				<td><?php 
            echo $_SESSION['credentials_extplorer']['username'];
            ?>
</td>
			<tr>
				<td valign="top" width="250" style="font-weight:bold;">
					<?php 
            echo ext_lang::msg('sibuilton');
            ?>
:
				</td>
				<td>
				<?php 
            echo php_uname();
            ?>
				</td>
			</tr>
			<tr>
				<td valign="top" style="font-weight:bold;">
					<?php 
            echo ext_lang::msg('siphpversion');
            ?>
:
				</td>
				<td>
				<?php 
            echo phpversion();
            ?>
				&nbsp;
				<?php 
            echo phpversion() >= '4.3' ? '' : $GLOBALS['messages']['siphpupdate'];
            ?>
				</td>
			</tr>
			<tr>
				<td style="font-weight:bold;">
					<?php 
            echo ext_lang::msg('siwebserver');
            ?>
:
				</td>
				<td>
				<?php 
            echo get_server_software();
            ?>
				</td>
			</tr>
			<tr>
				<td style="font-weight:bold;">
					<?php 
            echo ext_lang::msg('siwebsphpif');
            ?>
:
				</td>
				<td>
				<?php 
            echo php_sapi_name();
            ?>
				</td>
			</tr>
			<tr>
				<td style="font-weight:bold;">
					<?php 
            echo ext_lang::msg('simamboversion');
            ?>
:
				</td>
				<td>
				<?php 
            echo $version;
            ?>
				</td>
			</tr>
			<tr>
				<td style="font-weight:bold;">
					<?php 
            echo ext_lang::msg('siuseragent');
            ?>
:
				</td>
				<td>
				<?php 
            echo phpversion() <= "4.2.1" ? getenv("HTTP_USER_AGENT") : $_SERVER['HTTP_USER_AGENT'];
            ?>
				</td>
			</tr>
			<tr>
				<td valign="top" style="font-weight:bold;">
					<?php 
            echo ext_lang::msg('sirelevantsettings');
            ?>
:
				</td>
				<td>
					<table cellspacing="1" cellpadding="1" border="0">
					<tr>
						<td valign="top">
							<?php 
            echo ext_lang::msg('sisafemode');
            ?>
:
						</td>
						<td>
						<?php 
            echo get_php_setting('safe_mode', 0);
            ?>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
            echo ext_lang::msg('sibasedir');
            ?>
:
						</td>
						<td>
						<?php 
            echo ($ob = ini_get('open_basedir')) ? $ob : 'none';
            ?>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
            echo ext_lang::msg('sidisplayerrors');
            ?>
:
						</td>
						<td>
						<?php 
            echo get_php_setting('display_errors', 0);
            ?>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
            echo ext_lang::msg('sishortopentags');
            ?>
:
						</td>
						<td>
						<?php 
            echo get_php_setting('short_open_tag', 0);
            ?>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
            echo ext_lang::msg('sifileuploads');
            ?>
:
						</td>
						<td>
						<?php 
            echo get_php_setting('file_uploads');
            ?>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
            echo ext_lang::msg('simagicquotes');
            ?>
:
						</td>
						<td>
						<?php 
            echo get_php_setting('magic_quotes_gpc');
            ?>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
            echo ext_lang::msg('siregglobals');
            ?>
:
						</td>
						<td>
						<?php 
            echo get_php_setting('register_globals', 0);
            ?>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
            echo ext_lang::msg('sioutputbuf');
            ?>
:
						</td>
						<td>
						<?php 
            echo get_php_setting('output_buffering', 0);
            ?>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
            echo ext_lang::msg('sisesssavepath');
            ?>
:
						</td>
						<td>
						<?php 
            echo ($sp = ini_get('session.save_path')) ? $sp : 'none';
            ?>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
            echo ext_lang::msg('sisessautostart');
            ?>
:
						</td>
						<td>
						<?php 
            echo intval(ini_get('session.auto_start'));
            ?>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
            echo ext_lang::msg('sixmlenabled');
            ?>
:
						</td>
						<td>
							<?php 
            echo extension_loaded('xml') ? '<font style="color: green;">' . $GLOBALS['messages']['miscyesno'][0] . '</font>' : '<font style="color: red;">' . $GLOBALS['messages']['miscyesno'][1] . '</font>';
            ?>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
            echo ext_lang::msg('sizlibenabled');
            ?>
:
						</td>
						<td>
						<?php 
            echo extension_loaded('zlib') ? '<font style="color: green;">' . $GLOBALS['messages']['miscyesno'][0] . '</font>' : '<font style="color: red;">' . $GLOBALS['messages']['miscyesno'][1] . '</font>';
            ?>
						</td>
					</tr>
					<tr>
						<td>
							<?php 
            echo ext_lang::msg('sidisabledfuncs');
            ?>
:
						</td>
						<td>
						<?php 
            echo ($df = ini_get('disable_functions')) ? $df : 'none';
            ?>
						</td>
					</tr>
					</table>
				</td>
			</tr>
			</table>
		</div>
			<?php 
            break;
        case 'phpinfo':
            ob_start();
            phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES);
            $phpinfo = ob_get_contents();
            ob_end_clean();
            preg_match_all('#<body[^>]*>(.*)</body>#siU', $phpinfo, $output);
            $output = preg_replace('#<table#', '<table class="member-table" align="center"', $output[1][0]);
            $output = '<div class="body-wrap">' . $output . '</div>';
            $output = preg_replace('#(\\w),(\\w)#', '\\1, \\2', $output);
            $output = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);
            $output = preg_replace('#<hr />#', '', $output);
            echo $output;
            break;
        case 'about':
            show_about();
            break;
        default:
            ?>
			{
				"xtype": "tabpanel",
				
				"height": 350,
				"activeTab": 0,
				"items": [{
					"title": "<?php 
            echo ext_Lang::msg('aboutlink');
            ?>
",
					"autoScroll": true,
					"autoLoad": { 
						"url": "<?php 
            echo $GLOBALS['script_name'];
            ?>
",
						"params": {
							"option": "com_extplorer",
							"action": "get_about",
							"action2": "about"
						}
					}
				},{
					"title": "<?php 
            echo ext_Lang::msg('sisysteminfo');
            ?>
",
					"autoScroll": true,
					"autoLoad": { 
						"url": "<?php 
            echo $GLOBALS['script_name'];
            ?>
",
						"params": {
							"option": "com_extplorer",
							"action": "get_about",
							"action2": "systeminfo"
						}
					}
				},{
					"title": "<?php 
            echo ext_Lang::msg('siphpinfo');
            ?>
",
					"autoScroll": true,
					"autoLoad": { 
						"url": "<?php 
            echo $GLOBALS['script_name'];
            ?>
",
						"params": {
							"option": "com_extplorer",
							"action": "get_about",
							"action2": "phpinfo"
						}
					}
				}]
			}
			<?php 
    }
}
コード例 #3
0
ファイル: admin.php プロジェクト: chajianku/admin_eXtplorer
function show_userform($data = null)
{
    if ($data == null) {
        $data = array('', '', '', '', '', '', '');
    }
    $formname = @$data[0] ? 'frmedituser' : 'frmadduser';
    ?>
{
	"xtype": "form",
	"id" : "<?php 
    echo $formname;
    ?>
",
	"renderTo": Ext.getCmp("dialog_tabpanel").getEl(),
	"hidden": true,
	"closable":true,
	"autoHeight": "true",
	"labelWidth": 125,
	"url":"<?php 
    echo basename($GLOBALS['script_name']);
    ?>
",
	"title": "<?php 
    if (!empty($data[0])) {
        printf($GLOBALS["messages"]["miscedituser"], $data[0]);
    } else {
        echo $GLOBALS["messages"]["miscadduser"];
    }
    ?>
"	,
		
	items: [{
			"xtype": "textfield",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('miscusername', true);
    ?>
",
			"name": "nuser",
			"value": "<?php 
    echo @$data[0];
    ?>
",
			"width":175,
			"allowBlank":false
		},{
			"xtype": "textfield",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('miscconfpass', true);
    ?>
",
			"name": "pass1",
			"inputType": "password",
			"width":175
		},
		{	"xtype": "textfield",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('miscconfnewpass', true);
    ?>
",
			"name": "pass2",
			"inputType": "password",
			"width":175
		},
		<?php 
    if (!empty($data[0])) {
        ?>
			{	"xtype": "checkbox",
				"fieldLabel": "<?php 
        echo ext_Lang::msg('miscchpass', true);
        ?>
",
				"name": "chpass",
				"hiddenValue": "true"
			},
			<?php 
    }
    ?>
		{
			"xtype": "textfield",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('mischomedir', true);
    ?>
",
			"name": "home_dir",
			"value": "<?php 
    echo !empty($data[2]) ? $data[2] : $_SERVER['DOCUMENT_ROOT'];
    ?>
",
			"width":175,
			"allowBlank":false
		},
		{ 	"xtype": "textfield",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('mischomeurl', true);
    ?>
",
			"name": "home_url",
			"value": "<?php 
    echo !empty($data[3]) ? $data[3] : $GLOBALS["home_url"];
    ?>
",
			"width":175,
			"allowBlank":false
		},{
			"xtype": "combo",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('miscshowhidden', true);
    ?>
",
			"store": [
					["1", "<?php 
    echo ext_Lang::msg(array('miscyesno' => 0), true);
    ?>
"],
					["0", "<?php 
    echo ext_Lang::msg(array('miscyesno' => 1), true);
    ?>
"]
				   ],
			"hiddenName": "show_hidden",
			"disableKeyFilter": true,
			"value": "<?php 
    echo !empty($data[4]) ? $data[4] : (int) $data[4];
    ?>
",
			"editable": false,
			"triggerAction": "all",
			"mode": "local",
			"allowBlank": false,
			"selectOnFocus":true
		},
		{ 	"xtype": "textfield",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('mischidepattern', true);
    ?>
",
			"name": "no_access",
			"value": "<?php 
    echo @$data[5];
    ?>
",
			"width":175,
			"allowBlank":true
		},
		{
			"xtype": "combo",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('miscperms', true);
    ?>
",
			"store": [<?php 
    $permvalues = array(0, 1, 2, 3, 7);
    $permcount = count($GLOBALS["messages"]["miscpermnames"]);
    for ($i = 0; $i < $permcount; ++$i) {
        if ($permvalues[$i] == 7) {
            $index = 4;
        } else {
            $index = $i;
        }
        echo '["' . $permvalues[$i] . '", "' . ext_lang::msg(array('miscpermnames' => $index)) . '" ]' . "\n";
        if ($i + 1 < $permcount) {
            echo ',';
        }
    }
    ?>
					],
			"hiddenName": "permissions",
			"disableKeyFilter": true,
			"value": "<?php 
    echo (int) @$data[6];
    ?>
",
			"editable": false,
			"triggerAction": "all",
			"mode": "local"
		},
		{ 	"xtype": "combo",
			"fieldLabel": "<?php 
    echo ext_Lang::msg('miscactive', true);
    ?>
",
			"store": [
					["1", "<?php 
    echo ext_Lang::msg(array('miscyesno' => 0), true);
    ?>
"],
					["0", "<?php 
    echo ext_Lang::msg(array('miscyesno' => 1), true);
    ?>
"]
				   ],
			"hiddenName": "active",
			"disableKeyFilter": true,
			"value": "<?php 
    echo !empty($data[7]) ? $data[7] : 0;
    ?>
",
			"disabled": <?php 
    echo !empty($self) ? 'true' : 'false';
    ?>
,
			"editable": false,
			"triggerAction": "all",
			"mode": "local",
			"allowBlank": false,
			"selectOnFocus":true
		}
	],
	
	"buttons": [ {
		"text": "<?php 
    echo ext_Lang::msg('btnsave', true);
    ?>
", 
		"handler": function() {
					userform = Ext.getCmp("<?php 
    echo $formname;
    ?>
").getForm();
					if(userform.findField('nuser').getValue()=="" || userform.findField('home_dir').getValue()=="") {
						Ext.Msg.alert('Status', "<?php 
    echo ext_Lang::err('miscfieldmissed', true);
    ?>
");
						return false;
					}
					if( userform.findField('chpass') ) {
						if(userform.findField('chpass').getValue() &&
							userform.findField('pass1').getValue() != userform.findField('pass2').getValue())
						{
							Ext.Msg.alert('Status', "<?php 
    echo ext_Lang::err('miscnopassmatch', true);
    ?>
");
							return false;
						}
					}
					statusBarMessage( 'Please wait...', true );
					userform.submit({
						"success": function(form, action) {
							statusBarMessage( action.result.message, false, true );
							Ext.getCmp("dialog_tabpanel").remove("<?php 
    echo $formname;
    ?>
");
						},
						"failure": function(form, action) {
							if( !action.result ) return;
							Ext.Msg.alert('Error!', action.result.error);
							statusBarMessage( action.result.error, false, true );
						},
						"scope": userform,
						// add some vars to the request, similar to hidden fields
						"params": {option: 'com_extplorer', 
								user: "******",
								"action": 'admin', 
								"action2": "<?php 
    echo @$data[0] ? 'edituser' : 'adduser';
    ?>
",
								"confirm": "true"
						}
					})
				}
	},{
		"text": "<?php 
    echo ext_Lang::msg('btncancel', true);
    ?>
", 
		"handler": function() { Ext.getCmp("dialog_tabpanel").remove("<?php 
    echo $formname;
    ?>
"); }
	}]
}
	<?php 
}
コード例 #4
0
ファイル: admin.php プロジェクト: BACKUPLIB/mwenhanced
function show_userform($data = null)
{
    if ($data == null) {
        $data = array('', '', '', '', '', '', '');
    }
    ?>
	<div>
	    <div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>
	    <div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc">
	
	        <h3 style="margin-bottom:5px;"><?php 
    if (!empty($data[0])) {
        echo $GLOBALS["messages"]["actadmin"] . ": " . sprintf($GLOBALS["messages"]["miscedituser"], $data[0]);
    } else {
        echo $GLOBALS["messages"]["actadmin"] . ": " . $GLOBALS["messages"]["miscadduser"];
    }
    ?>
</h3>
	        <div id="adminForm">
	
	        </div>
	    </div></div></div>
	    <div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>
	</div>
	<script type="text/javascript">
	var yesno = new Ext.data.SimpleStore({
	    fields: ['yesno', 'Yes_No'],
	    data :  [
	        ['1', '<?php 
    echo ext_Lang::msg(array('miscyesno' => 0), true);
    ?>
'],
	        ['0', '<?php 
    echo ext_Lang::msg(array('miscyesno' => 1), true);
    ?>
']
	        ]
	});
	var permvalues = new Ext.data.SimpleStore({
		fields: ['value', 'text'],
		data: [
	
	<?php 
    $permvalues = array(0, 1, 2, 3, 7);
    $permcount = count($GLOBALS["messages"]["miscpermnames"]);
    for ($i = 0; $i < $permcount; ++$i) {
        if ($permvalues[$i] == 7) {
            $index = 4;
        } else {
            $index = $i;
        }
        echo "['{$permvalues[$i]}', '" . ext_lang::msg(array('miscpermnames' => $index)) . "' ]\n";
        if ($i + 1 < $permcount) {
            echo ',';
        }
    }
    ?>
	]});
	var userform = new Ext.form.Form({
	    labelWidth: 125, // label settings here cascade unless overridden
	    url:'<?php 
    echo basename($GLOBALS['script_name']);
    ?>
'
	});

	
	userform.add(
	    new Ext.form.TextField({
	        fieldLabel: '<?php 
    echo ext_Lang::msg('miscusername', true);
    ?>
',
	        name: 'nuser',
	        value: '<?php 
    echo @$data[0];
    ?>
',
	        width:175,
	        allowBlank:false
	    }),
	    new Ext.form.TextField({
	        fieldLabel: '<?php 
    echo ext_Lang::msg('miscconfpass', true);
    ?>
',
	        name: 'pass1',
	        inputType: 'password',
	        width:175
	    }),
	    new Ext.form.TextField({
	        fieldLabel: '<?php 
    echo ext_Lang::msg('miscconfnewpass', true);
    ?>
',
	        name: 'pass2',
	        inputType: 'password',
	        width:175
	    }),
	    <?php 
    if (!empty($data[0])) {
        ?>
		    new Ext.form.Checkbox({
		        fieldLabel: '<?php 
        echo ext_Lang::msg('miscchpass', true);
        ?>
',
		        name: 'chpass',
		        hiddenValue: 'true'
			}),
			<?php 
    }
    ?>
	    
	    new Ext.form.TextField({
	        fieldLabel: '<?php 
    echo ext_Lang::msg('mischomedir', true);
    ?>
',
	        name: 'home_dir',
	        value: '<?php 
    echo !empty($data[2]) ? $data[2] : $_SERVER['DOCUMENT_ROOT'];
    ?>
',
	        width:175,
	        allowBlank:false
	    }),	    
	    new Ext.form.TextField({
	        fieldLabel: '<?php 
    echo ext_Lang::msg('mischomeurl', true);
    ?>
',
	        name: 'home_url',
	        value: '<?php 
    echo !empty($data[3]) ? $data[3] : $GLOBALS["home_url"];
    ?>
',
	        width:175,
	        allowBlank:false
	    }),		
		new Ext.form.ComboBox({
			fieldLabel: '<?php 
    echo ext_Lang::msg('miscshowhidden', true);
    ?>
',
		    store: yesno,
		    displayField:'Yes_No',
		    valueField: 'yesno',
		    hiddenName: 'show_hidden',
		    disableKeyFilter: true,
		    value: '<?php 
    echo !empty($data[4]) ? $data[4] : (int) $data[4];
    ?>
',
		    editable: false,
		    triggerAction: 'all',
		    mode: 'local',
		    allowBlank: false,
		    selectOnFocus:true
		}),
	    new Ext.form.TextField({
	        fieldLabel: '<?php 
    echo ext_Lang::msg('mischidepattern', true);
    ?>
',
	        name: 'no_access',
	        value: '<?php 
    echo @$data[5];
    ?>
',
	        width:175,
	        allowBlank:true
	    }),
	
		new Ext.form.ComboBox({
			fieldLabel: '<?php 
    echo ext_Lang::msg('miscperms', true);
    ?>
',
		    store: permvalues,
		    valueField: 'value',
		    displayField:'text',
		    hiddenName: 'permissions',
		    disableKeyFilter: true,
		    value: '<?php 
    echo (int) @$data[6];
    ?>
',
		    editable: false,
		    triggerAction: 'all',
		    mode: 'local'
		}),
		new Ext.form.ComboBox({
			fieldLabel: '<?php 
    echo ext_Lang::msg('miscactive', true);
    ?>
',
		    store: yesno,
		    displayField:'Yes_No',
		    valueField: 'yesno',
		    hiddenName: 'active',
		    disableKeyFilter: true,
		    value: '<?php 
    echo !empty($data[7]) ? $data[7] : 0;
    ?>
',
		    disabled: <?php 
    echo !empty($self) ? 'true' : 'false';
    ?>
,
		    editable: false,
		    triggerAction: 'all',
		    mode: 'local',
		    allowBlank: false,
		    selectOnFocus:true
		})
	);
	userform.addButton('<?php 
    echo ext_Lang::msg('btnsave', true);
    ?>
', function() {
		if( !check_pwd()) return;
		statusBarMessage( 'Please wait...', true );
	    userform.submit({
	        success: function(form, action) {	
	        	statusBarMessage( action.result.message, false, true );
				dialog_panel.load({ url: '<?php 
    echo make_link('admin', '');
    ?>
' });
	        },
	        failure: function(form, action) {
	        	if( !action.result ) return;
				Ext.MessageBox.alert('Error!', action.result.error);
				statusBarMessage( action.result.error, false, true );
	        },
	        scope: userform,
	        // add some vars to the request, similar to hidden fields
	        params: {option: 'com_extplorer', 
	        		user: '******',
	        		action: 'admin', 
	        		action2: '<?php 
    echo @$data[0] ? 'edituser' : 'adduser';
    ?>
',
	        		confirm: 'true'
	        }
	    })
	});
	userform.addButton('<?php 
    echo ext_Lang::msg('btncancel', true);
    ?>
', 
		function() { 
			dialog_panel.load({ url: '<?php 
    echo make_link('admin', '');
    ?>
' });
		} 
	);
	userform.render('adminForm');
	</script>
	<?php 
}
コード例 #5
0
ファイル: application.js.php プロジェクト: ejailesb/repo_empr
                region: "north",
                xtype: "locationbar",
                id: "locationbarcmp",
                height: 28
            	},
            	{
                region: "center",
                xtype: "tabpanel",
	            id: "mainpanel",
	            enableTabScroll: true,
	            activeTab: 0,
	            items: [{
					xtype: "editorgrid",
		        	region: "center",
		            title: "<?php 
echo ext_lang::msg("actdir", true);
?>
",
		            autoScroll:true,
		            collapsible: false,
		            closeOnTab: true,
		            id: "gridpanel",
		            ds: datastore,
		            cm: cm,
		           	tbar: gridtb,
		            bbar: gridbb,
		            ddGroup : 'TreeDD',
		            enableDragDrop: true,
		            selModel: new Ext.grid.RowSelectionModel({
		                		listeners: {
		        					'rowselect': { fn: handleRowClick },