Example #1
0
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 
    }
}
Example #2
0
     //------------------------------------------------------------------------------
     // BOOKMARKS
 //------------------------------------------------------------------------------
 // BOOKMARKS
 case 'modify_bookmark':
     $task = extGetParam($_REQUEST, 'task');
     require_once _EXT_PATH . '/include/bookmarks.php';
     modify_bookmark($task, $dir);
     break;
     //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
 case 'show_error':
     ext_Result::sendResult('', false, '');
     break;
 case 'get_about':
     show_about();
     require_once _EXT_PATH . "/include/system_info.php";
     system_info();
     break;
     //------------------------------------------------------------------------------
     // DEFAULT: LIST FILES & DIRS
 //------------------------------------------------------------------------------
 // DEFAULT: LIST FILES & DIRS
 case "getdircontents":
     require_once _EXT_PATH . "/include/list.php";
     $requestedDir = stripslashes(str_replace('_RRR_', '/', extGetParam($_REQUEST, 'node')));
     if (empty($requestedDir) || $requestedDir == 'ext_root') {
         $requestedDir = $dir;
     }
     send_dircontents($requestedDir, extGetParam($_REQUEST, 'sendWhat', 'files'));
     break;