Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Thu, Jul 10, 8:27 PM

in-portal

Index: trunk/admin/tools/server_info.php
===================================================================
--- trunk/admin/tools/server_info.php (revision 375)
+++ trunk/admin/tools/server_info.php (revision 376)
@@ -1,192 +1,194 @@
<?php
##############################################################
##In-portal ##
##############################################################
## In-portal ##
## Intechnic Corporation ##
## All Rights Reserved, 1998-2002 ##
## ##
## No portion of this code may be copied, reproduced or ##
## otherwise redistributed without proper written ##
## consent of Intechnic Corporation. Violation will ##
## result in revocation of the license and support ##
## privileges along maximum prosecution allowed by law. ##
##############################################################
if(!strlen($pathtoroot))
{
$path=dirname(realpath(__FILE__));
if(strlen($path))
{
/* determine the OS type for path parsing */
$pos = strpos($path,":");
if ($pos === false)
{
$gOS_TYPE="unix";
$pathchar = "/";
}
else
{
$gOS_TYPE="win";
$pathchar="\\";
}
$p = $path.$pathchar;
/*Start looking for the root flag file */
while(!strlen($pathtoroot) && strlen($p))
{
$sub = substr($p,strlen($pathchar)*-1);
if($sub==$pathchar)
{
$filename = $p."root.flg";
}
else
$filename = $p.$pathchar."root.flg";
if(file_exists($filename))
{
$pathtoroot = $p;
}
else
{
$parent = realpath($p.$pathchar."..".$pathchar);
if($parent!=$p)
{
$p = $parent;
}
else
$p = "";
}
}
if(!strlen($pathtoroot))
$pathtoroot = ".".$pathchar;
}
else
{
$pathtoroot = ".".$pathchar;
}
}
$sub = substr($pathtoroot,strlen($pathchar)*-1);
if($sub!=$pathchar)
{
$pathtoroot = $pathtoroot.$pathchar;
}
//echo $pathtoroot;
require_once($pathtoroot."kernel/startup.php");
//admin only util
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
//require_once ($pathtolocal."admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
$envar = "env=" . BuildEnv();
$section = 'in-portal:server_info';
$sec = $objSections->GetSection($section);
$parent = $objSections->GetSection($sec->Get("parent"));
if(strlen($ParentUrl)>0)
{
$cancelUrl = $ParentUrl;
}
else
$cancelUrl = $_SERVER['PHP_SELF']."?".$envar;
$cancelUrl = $admin."/subitems.php?section=in-portal:tools&".$envar;
//$title = admin_language("la_tab_QueryDB");
$ro_perm = $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY");
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('sinfoform','','$cancelUrl',2,'');","tool_cancel.gif");
//td.php_info, th.php_info { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
$extra = "<style type=\"text/css\"><!--
body, td, th, h1, h2 {font-family: sans-serif;}
pre {margin: 0px; font-family: monospace;}
- a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
+ a:link {color: #000099; text-decoration: none; }
a:hover {text-decoration: underline;}
table {border-collapse: collapse;}
.center {text-align: center;}
.center table { margin-left: auto; margin-right: auto; text-align: left;}
.center th { text-align: center !important; }
th.php_info { border: 1px solid #000000; font-size: 75%; align: center; vertical-align: baseline;}
h1 {font-size: 150%; text-align: center;}
h2 {font-size: 125%; text-align: center;}
.p {text-align: left;}
.e {background-color: #ccccff; font-weight: bold; color: #000000; border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
.h {background-color: #9999cc; font-weight: bold; color: #000000; border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
.v {background-color: #cccccc; color: #000000; border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
i {color: #666666; background-color: #cccccc; }
hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
//--></style>";
int_header($objCatToolBar,NULL,$title, NULL, $extra);
?>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableborder">
+<tr><td class="table_color1">
<form ID="sinfoform" name="sinfoform" action="" method=POST>
<!-- before phpinfo -->
<?php
ob_start();
phpinfo();
$php_info .= ob_get_contents();
ob_end_clean();
-$php_info = str_replace(" width=\"600\"", " width=\"786\"", $php_info);
+$php_info = str_replace(" width=\"600\"", " width=\"100%\" align=\"center\"", $php_info);
$php_info = str_replace("</body></html>", "", $php_info);
$php_info = str_replace('<a href="http://www.php.net/"><img border="0"', '<a href="http://www.php.net/"><img border="0" align="right" ', $php_info);
$php_info = str_replace(";", "; ", $php_info);
$php_info = str_replace(",", ", ", $php_info);
$php_info = str_replace("' '", " \<br>", $php_info);
$php_info = str_replace("'", "", $php_info);
// include_path:
$php_info = str_replace(".:/", "/", $php_info);
// paths:
$php_info = str_replace(":/", "<br>/", $php_info);
$php_info = str_replace("<br>//", "://", $php_info); // correct urls
// LS_COLORS and some paths:
$php_info = str_replace(";", "; ", $php_info);
$php_info = str_replace(",", ", ", $php_info);
// apache address :
$php_info = str_replace("&lt; ", "<", $php_info);
$php_info = str_replace("&gt;", ">", $php_info);
$php_info = str_replace('<a name', '<a style="color: #000000" name', $php_info);
// td styles
//$php_info = str_replace("<td", "<td class=\"php_info\"", $php_info);
//$php_info = str_replace("<th", "<th class=\"php_info\"", $php_info);
$offset = strpos($php_info, "<table");
print substr($php_info, $offset);
?>
<!-- after phpinfo -->
</FORM>
+</td></tr>
</TABLE>
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/tools/server_info.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.5
\ No newline at end of property

Event Timeline