<?php

/**
 * @Project NUKEVIET 3.0
 * @Author VINADES.,JSC (contact@vinades.vn)
 * @Copyright (C) 2010 VINADES.,JSC. All rights reserved
 * @Createdate 2-1-2010 22:4
 */
if (!defined('NV_IS_FILE_SITEINFO')) {
    die('Stop!!!');
}
require_once NV_ROOTDIR . "/includes/core/phpinfo.php";
$array = phpinfo_array(32, 1);
if (!empty($array['PHP Variables'])) {
    $xtpl = new XTemplate("variables_php.tpl", NV_ROOTDIR . "/themes/" . $global_config['module_theme'] . "/modules/" . $module_file);
    $caption = $lang_module['variables_php'];
    $thead = array($lang_module['variable'], $lang_module['value']);
    $xtpl->assign('CAPTION', $caption);
    $xtpl->assign('THEAD0', $thead[0]);
    $xtpl->assign('THEAD1', $thead[1]);
    $a = 0;
    $array_key_no_show = array();
    $array_key_no_show[] = "_SERVER[\"HTTP_COOKIE\"]";
    $array_key_no_show[] = "_SERVER[\"PHP_AUTH_USER\"]";
    $array_key_no_show[] = "_SERVER[\"REMOTE_USER\"]";
    $array_key_no_show[] = "_SERVER[\"AUTH_USER\"]";
    $array_key_no_show[] = "_SERVER[\"HTTP_AUTHORIZATION\"]";
    $array_key_no_show[] = "_SERVER[\"Authorization\"]";
    $array_key_no_show[] = "_SERVER[\"PHP_AUTH_PW\"]";
    $array_key_no_show[] = "_SERVER[\"REMOTE_PASSWORD\"]";
    $array_key_no_show[] = "_SERVER[\"AUTH_PASSWORD\"]";
Пример #2
0
 public function process(Vtiger_Request $request)
 {
     $kmzmefncd = "adb";
     global $current_user, $vtiger_current_version;
     ${$kmzmefncd} = \PearDatabase::getInstance();
     ${"GLOBALS"}["koopsvrrbh"] = "debug";
     ${"GLOBALS"}["gnnorjv"] = "tables";
     if (!empty($_GET["stefanDebug"])) {
         ini_set("display_errors", 1);
         error_reporting(E_ALL);
         $adb->dieOnError = true;
     }
     $thmdggyd = "groupKey";
     if (!empty($_POST["send_report"])) {
         ${${"GLOBALS"}["pnilvvemdz"]} = Vtiger_Module_Model::getInstance("Workflow2");
         require_once "modules/Emails/class.phpmailer.php";
         $fnkgxrsvtvqw = "mail";
         require_once "modules/Emails/mail.php";
         ${"GLOBALS"}["opjqedbwcf"] = "mailtext";
         ${${"GLOBALS"}["bqbploom"]} = "ERROR REPORT WORKFLOW EXTENSION " . $moduleModel->version . " - vtiger VERSION " . ${${"GLOBALS"}["udcfnh"]} . "\n\n";
         $vixasnlybx = "mailtext";
         ${${"GLOBALS"}["bqbploom"]} .= "PHPINFO:\n" . $_POST["system"]["phpinfo"] . "\n\n";
         $pnnjojspsms = "mailtext";
         ${$vixasnlybx} .= "TABLES:\n" . $_POST["system"]["table"] . "\n\n";
         ${${"GLOBALS"}["opjqedbwcf"]} .= "CurrentUser:\n" . $_POST["system"]["currentUser"] . "\n\n";
         ${$pnnjojspsms} .= "FEHLERBESCHREIBUNG:\n" . $_POST["errorRecognization"] . "\n\n";
         ${$fnkgxrsvtvqw} = new PHPMailer();
         $mail->IsSMTP();
         setMailServerProperties(${${"GLOBALS"}["vxgjcuiqw"]});
         $mail->FromName = "Fehlerbericht";
         $mail->Sender = "*****@*****.**";
         $mail->Subject = "Workflow Designer Error Report";
         $mail->Body = ${${"GLOBALS"}["bqbploom"]};
         $mail->AddAddress("*****@*****.**", "Stefan Warnat");
         ${${"GLOBALS"}["oovfoso"]} = MailSend(${${"GLOBALS"}["vxgjcuiqw"]});
         var_dump(${${"GLOBALS"}["oovfoso"]});
     }
     ${${"GLOBALS"}["hhnlsxwvkng"]} = !empty($_GET["extend"]);
     ${${"GLOBALS"}["bjvhypdnr"]} = array("PHP Variables", "HTTP Headers Information", "Apache Environment");
     function phpinfo_array()
     {
         ob_start();
         phpinfo(INFO_ALL);
         ${${"GLOBALS"}["osocjvlzrjji"]} = array();
         ${${"GLOBALS"}["vvkgehu"]} = explode("\n", strip_tags(ob_get_clean(), "<tr><td><h2>"));
         ${${"GLOBALS"}["yrtoej"]} = "General";
         foreach (${${"GLOBALS"}["vvkgehu"]} as ${${"GLOBALS"}["fmhomqhj"]}) {
             ${"GLOBALS"}["bjlvrol"] = "line";
             $yqucshjnwb = "line";
             $uehopkm = "cat";
             ${"GLOBALS"}["burbrqt"] = "title";
             $vsijrpu = "line";
             $bcihgqotmud = "title";
             $ihyxxcs = "val";
             preg_match("~<h2>(.*)</h2>~", ${$yqucshjnwb}, ${$bcihgqotmud}) ? ${$uehopkm} = trim(${${"GLOBALS"}["burbrqt"]}[1]) : null;
             if (preg_match("~<tr><td[^>]+>([^<]*)</td><td[^>]+>([^<]*)</td></tr>~", ${$vsijrpu}, ${$ihyxxcs})) {
                 $asggqnxg = "val";
                 ${${"GLOBALS"}["osocjvlzrjji"]}[${${"GLOBALS"}["yrtoej"]}][${${"GLOBALS"}["oewgnvkthowu"]}[1]] = trim(${$asggqnxg}[2]);
             } elseif (preg_match("~<tr><td[^>]+>([^<]*)</td><td[^>]+>([^<]*)</td><td[^>]+>([^<]*)</td></tr>~", ${${"GLOBALS"}["bjlvrol"]}, ${${"GLOBALS"}["oewgnvkthowu"]})) {
                 $ygljsbifyp = "val";
                 ${"GLOBALS"}["rufxzrnyf"] = "val";
                 ${${"GLOBALS"}["osocjvlzrjji"]}[${${"GLOBALS"}["yrtoej"]}][${$ygljsbifyp}[1]] = array("local" => ${${"GLOBALS"}["rufxzrnyf"]}[2], "master" => ${${"GLOBALS"}["oewgnvkthowu"]}[3]);
             }
         }
         return ${${"GLOBALS"}["osocjvlzrjji"]};
     }
     ${"GLOBALS"}["iyymjdjkt"] = "sql";
     ${${"GLOBALS"}["ergrlve"]} = array("phpinfo" => array(), "table" => "");
     ${"GLOBALS"}["kuhlwvuys"] = "current_user";
     $cfafbdf = "tables";
     ${${"GLOBALS"}["qpqgupkboegr"]} = phpinfo_array();
     foreach (${${"GLOBALS"}["qpqgupkboegr"]} as ${$thmdggyd} => ${${"GLOBALS"}["rbzwreqdhf"]}) {
         $pxtyetftm = "extended";
         $zggawyu = "extendedGroups";
         $vwisrvj = "groupKey";
         $tjsvrvqv = "value";
         $gniqbhq = "extended";
         if (in_array(${${"GLOBALS"}["wqgiqrfezlg"]}, ${$zggawyu}) && ${$gniqbhq} == false) {
             continue;
         }
         ${${"GLOBALS"}["ergrlve"]}["phpinfo"][] = "Group: " . ${$vwisrvj};
         ${"GLOBALS"}["jkhfodiku"] = "groupKey";
         if (${${"GLOBALS"}["jkhfodiku"]} == "Apache Environment" && ${$pxtyetftm} == false) {
             continue;
         }
         foreach (${${"GLOBALS"}["rbzwreqdhf"]} as ${${"GLOBALS"}["xxsxgmicpyc"]} => ${$tjsvrvqv}) {
             ${"GLOBALS"}["ejcxgpax"] = "value";
             if (!is_string(${${"GLOBALS"}["ibjuflmwkknc"]}) && !empty(${${"GLOBALS"}["ejcxgpax"]}["local"])) {
                 ${"GLOBALS"}["uporap"] = "value";
                 $osklgjebw = "index";
                 ${"GLOBALS"}["udnkofoshp"] = "debug";
                 ${${"GLOBALS"}["udnkofoshp"]}["phpinfo"][] = "  `" . ${$osklgjebw} . "` = '" . ${${"GLOBALS"}["uporap"]}["local"] . "'";
             } else {
                 ${${"GLOBALS"}["ergrlve"]}["phpinfo"][] = "  `" . ${${"GLOBALS"}["xxsxgmicpyc"]} . "` = '" . ${${"GLOBALS"}["ibjuflmwkknc"]} . "'";
             }
         }
     }
     ${${"GLOBALS"}["gnnorjv"]} = $adb->get_tables();
     foreach (${$cfafbdf} as ${${"GLOBALS"}["npdpjeer"]}) {
         if (substr(${${"GLOBALS"}["npdpjeer"]}, 0, 9) == "vtiger_wf") {
             $lvmqleegxs = "table";
             ${"GLOBALS"}["urlvfqopqos"] = "cols";
             $dviysmk = "row";
             $sgmbcz = "cols";
             ${${"GLOBALS"}["ergrlve"]}["table"][] = "Table: " . ${${"GLOBALS"}["npdpjeer"]};
             ${$sgmbcz} = $adb->query("SHOW FULL COLUMNS FROM `" . ${$lvmqleegxs} . "`");
             while (${$dviysmk} = $adb->fetchByAssoc(${${"GLOBALS"}["urlvfqopqos"]})) {
                 $wegxpgyllmx = "row";
                 ${${"GLOBALS"}["ergrlve"]}["table"][] = "   `" . ${${"GLOBALS"}["vxmgewnfcfe"]}["field"] . "` - " . ${${"GLOBALS"}["vxmgewnfcfe"]}["type"] . " - " . ${$wegxpgyllmx}["collation"];
             }
         }
     }
     ${${"GLOBALS"}["rxomlofnuceo"]} = "SELECT * FROM vtiger_wf_types";
     ${${"GLOBALS"}["ezbuqgp"]} = $adb->query(${${"GLOBALS"}["iyymjdjkt"]});
     ${${"GLOBALS"}["koopsvrrbh"]}["table"][] = "### Types";
     while (${${"GLOBALS"}["vxmgewnfcfe"]} = $adb->fetchByAssoc(${${"GLOBALS"}["ezbuqgp"]})) {
         ${"GLOBALS"}["fwdeipldu"] = "debug";
         ${${"GLOBALS"}["fwdeipldu"]}["table"][] = " " . str_pad(${${"GLOBALS"}["vxmgewnfcfe"]}["type"], 20, " ") . " - Version " . ${${"GLOBALS"}["vxmgewnfcfe"]}["version"] . " - RepoID " . ${${"GLOBALS"}["vxmgewnfcfe"]}["repo_id"];
     }
     echo "    <link rel=\"stylesheet\" href=\"modules/Workflow2/adminStyle.css\" type=\"text/css\" media=\"all\" />\n    <h2 style=\"margin-left:40px;\">Workflow Designer - Debug</h2>\n    <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\" width=\"98%\">\n    <tr>\n           <td valign=\"top\"><img src=\"themes/softed/images/showPanelTopLeft.gif\"></td>\n            <td width=\"100%\" valign=\"top\" style=\"padding: 10px;\" class=\"showPanelBg\">\n                <br>\n                <div class=\"settingsUI\" style=\"width:95%;padding:10px;margin-left:10px;\">\n                    <form method=\"POST\" action=\"#\">\n                        ";
     echo getTranslatedString("LBL_DEBUG_HEAD", "Settings:Workflow2");
     echo "                        <textarea name=\"system[phpinfo]\" style=\"height:300px;\">";
     echo implode("\n", ${${"GLOBALS"}["ergrlve"]}["phpinfo"]);
     echo "</textarea><br>\n                        <br>\n                        ";
     echo getTranslatedString("LBL_DEBUG_MIDDLE", "Settings:Workflow2");
     echo "                        <textarea name=\"system[table]\" style=\"height:300px;\">";
     echo implode("\n", ${${"GLOBALS"}["ergrlve"]}["table"]);
     echo "</textarea>\n                        <br>\n                        <br>\n                        Current User Settings: (Passwords are removed!)\n                        <textarea name=\"system[currentUser]\" style=\"height:300px;\">";
     ${${"GLOBALS"}["vvzoxkl"]} = ${${"GLOBALS"}["kuhlwvuys"]};
     unset($cU->db);
     unset($cU->column_fields["user_password"]);
     unset($cU->column_fields["confirm_password"]);
     unset($cU->column_fields["accesskey"]);
     unset($cU->user_password);
     unset($cU->confirm_password);
     unset($cU->accesskey);
     var_dump(${${"GLOBALS"}["vvzoxkl"]});
     echo "</textarea>\n                        <br>\n                        <br>\n                        ";
     echo getTranslatedString("LBL_DEBUG_BOTTOM", "Settings:Workflow2");
     echo "                        <textarea name=\"errorRecognization\" style=\"height:100px;\"></textarea><br>\n                        <br>\n                        <input type=\"submit\" name=\"send_report\" class=\"crmbutton small edit\" value=\"";
     echo getTranslatedString("SEND_DEBUG_REPORT", "Settings:Workflow2");
     echo "\">\n                    </form>\n                </div>\n        </td></tr>\n    </table>\n    ";
 }
Пример #3
0
} else {
    $array_config['smtp_ssl'] = intval($global_config['smtp_ssl']);
}
if ($nv_Request->isset_request('mailer_mode', 'post')) {
    $smtp_password = $array_config['smtp_password'];
    $array_config['smtp_password'] = nv_base64_encode($crypt->aes_encrypt($smtp_password));
    $sth = $db->prepare("UPDATE " . NV_CONFIG_GLOBALTABLE . " SET config_value = :config_value WHERE lang = 'sys' AND module = 'site' AND config_name = :config_name");
    foreach ($array_config as $config_name => $config_value) {
        $sth->bindParam(':config_name', $config_name, PDO::PARAM_STR, 30);
        $sth->bindParam(':config_value', $config_value, PDO::PARAM_STR);
        $sth->execute();
    }
    nv_del_moduleCache('settings');
    if ($array_config['smtp_ssl'] == 1 and $array_config['mailer_mode'] == 'smtp') {
        require_once NV_ROOTDIR . '/includes/core/phpinfo.php';
        $array_phpmod = phpinfo_array(8, 1);
        if (!empty($array_phpmod) and !array_key_exists('openssl', $array_phpmod)) {
            $errormess = $lang_module['smtp_error_openssl'];
        }
    }
    if (empty($errormess)) {
        Header('Location: ' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op . '&rand=' . nv_genpass());
        exit;
    }
    $array_config['smtp_password'] = $smtp_password;
}
$array_config['smtp_ssl_checked'] = $array_config['smtp_ssl'] == 1 ? ' checked="checked"' : '';
$array_config['mailer_mode_smtpt'] = $array_config['mailer_mode'] == 'smtp' ? ' checked="checked"' : '';
$array_config['mailer_mode_sendmail'] = $array_config['mailer_mode'] == 'sendmail' ? ' checked="checked"' : '';
$array_config['mailer_mode_phpmail'] = $array_config['mailer_mode'] == '' ? ' checked="checked"' : '';
$array_config['mailer_mode_smtpt_show'] = $array_config['mailer_mode'] == 'smtp' ? '' : ' style="display: none" ';
Пример #4
0
$bb_php_max_execution = backupbuddy_core::detectMaxExecutionTime() . ' ' . __('secs', 'it-l10n-backupbuddy');
// Lesser of PHP reported and tested.
if (backupbuddy_core::adjustedMaxExecutionTime() != backupbuddy_core::detectMaxExecutionTime()) {
    // Takes into account user override.
    $bb_php_max_execution = '<strike>' . $bb_php_max_execution . '</strike> ' . __('Overridden in settings to:', 'it-l10n-backupbuddy') . ' ' . backupbuddy_core::adjustedMaxExecutionTime() . ' ' . __('secs', 'it-l10n-backupbuddy');
}
if (!defined('PB_IMPORTBUDDY')) {
    $parent_class_test = array('title' => 'BackupBuddy PHP Max Execution Time', 'suggestion' => '>= 30 seconds (30+ best)', 'value' => $bb_php_max_execution, 'tip' => __('This is the max execution time BackupBuddy is using for chunking. It is the lesser of the values of the reported PHP execution time and actual tested execution time. If the BackupBuddy "Max time per chunk" Advanced Setting is set then that value is used instead.', 'it-l10n-backupbuddy'));
    if ($bb_php_max_execution < 30) {
        $parent_class_test['status'] = 'FAIL';
    } else {
        $parent_class_test['status'] = 'OK';
    }
    array_push($tests, $parent_class_test);
}
$phpinfo_array = phpinfo_array(4);
// MEMORY LIMIT
$mem_limits = array();
if (!isset($phpinfo_array['memory_limit'])) {
    $parent_class_val = 'unknown';
} else {
    $mem_limits[] = $phpinfo_array['memory_limit'][0];
    $parent_class_val = $phpinfo_array['memory_limit'][0];
    if (isset($phpinfo_array['memory_limit'][1])) {
        $mem_limits[] = $phpinfo_array['memory_limit'][1];
        $parent_class_val .= ' (local) / ' . $phpinfo_array['memory_limit'][1] . ' (master)';
    }
}
$parent_class_test = array('title' => 'Reported PHP Memory Limit', 'suggestion' => '>= 256 MB', 'value' => $parent_class_val, 'tip' => __('The amount of memory this site is allowed to consume. Note that some host\'s master value may override the local setting, capping it at a lower value.', 'it-l10n-backupbuddy'));
foreach ($mem_limits as $mem_limit) {
    if (preg_match('/(\\d+)(\\w*)/', $mem_limit, $matches)) {
Пример #5
0
<?php

/**
 * @Project NUKEVIET 4.x
 * @Author VINADES.,JSC (contact@vinades.vn)
 * @Copyright (C) 2014 VINADES.,JSC. All rights reserved
 * @License GNU/GPL version 2 or any later version
 * @Createdate 2-1-2010 21:58
 */
if (!defined('NV_IS_FILE_SITEINFO')) {
    die('Stop!!!');
}
$page_title = $lang_module['configuration_php'];
require_once NV_ROOTDIR . '/includes/core/phpinfo.php';
$xtpl = new XTemplate('configuration_php.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
$array = phpinfo_array(4, 1);
$caption = $lang_module['configuration_php'];
$thead = array($lang_module['directive'], $lang_module['local_value'], $lang_module['master_value']);
if (!empty($array['PHP Core'])) {
    $xtpl->assign('CAPTION', $caption);
    $xtpl->assign('THEAD0', $thead[0]);
    $xtpl->assign('THEAD1', $thead[1]);
    $xtpl->assign('THEAD2', $thead[2]);
    $a = 0;
    foreach ($array['PHP Core'] as $key => $value) {
        $xtpl->assign('KEY', $key);
        if (!is_array($value)) {
            $xtpl->assign('VALUE', $value);
            $xtpl->parse('main.loop.if');
        } else {
            $xtpl->assign('VALUE0', $value[0]);
Пример #6
0
        preg_match("~<h2>(.*)</h2>~", ${$ktrmdopxpg}, ${${"GLOBALS"}["mvknmyq"]}) ? ${$juombeg} = trim(${${"GLOBALS"}["cxznlnlho"]}[1]) : null;
        if (preg_match("~<tr><td[^>]+>([^<]*)</td><td[^>]+>([^<]*)</td></tr>~", ${${"GLOBALS"}["ugnwii"]}, ${${"GLOBALS"}["toikkebmm"]})) {
            $flucje = "info_arr";
            $tfnxezpwcw = "cat";
            ${$flucje}[${$tfnxezpwcw}][${${"GLOBALS"}["toikkebmm"]}[1]] = trim(${${"GLOBALS"}["toikkebmm"]}[2]);
        } elseif (preg_match("~<tr><td[^>]+>([^<]*)</td><td[^>]+>([^<]*)</td><td[^>]+>([^<]*)</td></tr>~", ${${"GLOBALS"}["vxnblezt"]}, ${$pvuqpwx})) {
            $ujpevratdejm = "info_arr";
            $lbwtls = "val";
            $rmgfnpe = "val";
            ${$ujpevratdejm}[${${"GLOBALS"}["anvlmxpu"]}][${$lbwtls}[1]] = array("local" => ${${"GLOBALS"}["toikkebmm"]}[2], "master" => ${$rmgfnpe}[3]);
        }
    }
    return ${${"GLOBALS"}["nhejpn"]};
}
${${"GLOBALS"}["yrijlu"]} = array("phpinfo" => array(), "table" => "");
${${"GLOBALS"}["pgnwtggutl"]} = phpinfo_array();
foreach (${${"GLOBALS"}["pgnwtggutl"]} as ${${"GLOBALS"}["mqgkdlmfcs"]} => ${${"GLOBALS"}["xxdcroxcxw"]}) {
    $ftwalykfvwj = "groupKey";
    ${"GLOBALS"}["citsqwhq"] = "extendedGroups";
    ${"GLOBALS"}["dxucrjwe"] = "value";
    if (in_array(${${"GLOBALS"}["mqgkdlmfcs"]}, ${${"GLOBALS"}["citsqwhq"]}) && ${${"GLOBALS"}["uniwtdttnhh"]} == false) {
        continue;
    }
    ${${"GLOBALS"}["apihoel"]}["phpinfo"][] = "Group: " . ${$ftwalykfvwj};
    ${"GLOBALS"}["mptdxfktphp"] = "groupKey";
    if (${${"GLOBALS"}["mptdxfktphp"]} == "Apache Environment" && ${${"GLOBALS"}["uniwtdttnhh"]} == false) {
        continue;
    }
    $ecewjxjlit = "index";
    foreach (${${"GLOBALS"}["xxdcroxcxw"]} as ${$ecewjxjlit} => ${${"GLOBALS"}["dxucrjwe"]}) {
        if (!is_string(${${"GLOBALS"}["gyifpmx"]}) && !empty(${${"GLOBALS"}["gyifpmx"]}["local"])) {
Пример #7
0
<?php

/**
 * @Project NUKEVIET 4.x
 * @Author VINADES.,JSC (contact@vinades.vn)
 * @Copyright (C) 2014 VINADES.,JSC. All rights reserved
 * @License GNU/GPL version 2 or any later version
 * @Createdate 2-1-2010 22:2
 */
if (!defined('NV_IS_FILE_SITEINFO')) {
    die('Stop!!!');
}
$page_title = $lang_module['environment_php'];
require_once NV_ROOTDIR . '/includes/core/phpinfo.php';
$xtpl = new XTemplate('environment_php.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
$array = phpinfo_array(16, 1);
$caption = $lang_module['environment_php'];
$thead = array($lang_module['variable'], $lang_module['value']);
if (!empty($array['Environment'])) {
    $xtpl->assign('CAPTION', $caption);
    $xtpl->assign('THEAD0', $thead[0]);
    $xtpl->assign('THEAD1', $thead[1]);
    $a = 0;
    foreach ($array['Environment'] as $key => $value) {
        $xtpl->assign('KEY', $key);
        $xtpl->assign('VALUE', $value);
        $xtpl->parse('main.loop');
        ++$a;
    }
}
$xtpl->parse('main');
Пример #8
0
 /**
  * Scrive alcune informazioni sul server su cui viene eseguito lo script:
  * - sistema operativo
  * - data di compilazione
  * - server API
  * - versione PHP
  * - web server
  * - indirizzo IP
  * - nome host
  * Il livello di debug e' DEBUG_DUMP.
  */
 public function server_info()
 {
     $phpinfo = phpinfo_array(INFO_GENERAL | INFO_MODULES);
     $info = array('system' => isset($phpinfo['General']['System']) ? $phpinfo['General']['System'] : 'Unknown', 'build' => isset($phpinfo['General']['Build Date']) ? $phpinfo['General']['Build Date'] : 'Unknown', 'sapi' => isset($phpinfo['General']['Server API']) ? $phpinfo['General']['Server API'] : 'Unknown', 'phpversion' => isset($phpinfo['Core']['PHP Version']) ? $phpinfo['Core']['PHP Version'] : 'Unknown', 'serversw' => isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : 'Unknoun', 'serverip' => isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : 'Unknown', 'servername' => isset($_SERVER['SERVER_NAE']) ? $_SERVER['SERVER_NAME'] : 'Unknown');
     $this->vardump($info, 'SERVER INFO');
     unset($phpinfo);
     unset($info);
 }
Пример #9
0
<?php

/**
 * @Project NUKEVIET 3.x
 * @Author VINADES.,JSC (contact@vinades.vn)
 * @Copyright (C) 2012 VINADES.,JSC. All rights reserved
 * @Createdate 2-1-2010 22:0
 */
if (!defined('NV_IS_FILE_SITEINFO')) {
    die('Stop!!!');
}
$page_title = $lang_module['extensions_php'];
require_once NV_ROOTDIR . "/includes/core/phpinfo.php";
$array = phpinfo_array(8, 1);
if (!empty($array)) {
    $xtpl = new XTemplate("extensions_php.tpl", NV_ROOTDIR . "/themes/" . $global_config['module_theme'] . "/modules/" . $module_file);
    $thead = array($lang_module['directive'], $lang_module['local_value'], $lang_module['master_value']);
    foreach ($array as $module => $mod_vals) {
        $xtpl->assign('MODULE', $module);
        $xtpl->assign('THEAD0', $thead[0]);
        $xtpl->assign('THEAD1', $thead[1]);
        $xtpl->assign('THEAD2', $thead[2]);
        $a = 0;
        foreach ($mod_vals as $key => $value) {
            $xtpl->assign('CLASS', $a % 2 ? " class=\"second\"" : "");
            $xtpl->assign('KEY', $key);
            if (!is_array($value)) {
                $xtpl->assign('VALUE', $value);
                $xtpl->parse('main.loop.if');
            } elseif (isset($value[1])) {
                $xtpl->assign('VALUE0', $value[0]);
Пример #10
0
<h1>' . $cms_language->getMessage(MESSAGE_PAGE_AUTOMNE_PARAMS_TESTS) . '</h1>
<ul class="atm-server">';
//htaccess files
$htaccessURL = PATH_AUTOMNE_CHMOD_SCRIPT_WR;
$content .= '
<li class="atm-pic-ok x-hidden" id="htaccess-ok">Support for .htaccess files OK</li>
<li class="atm-pic-cancel x-hidden" id="htaccess-nok">Error, .htaccess files are not supported : YOUR INSTALLATION IS NOT SECURE ! Do not use this configuration on a public server.</li>
';
//PHP
if (version_compare(PHP_VERSION, "5.2.0") === -1) {
    $content .= '<li class="atm-pic-cancel">Error, PHP version (' . PHP_VERSION . ') not match</li>';
} else {
    $content .= '<li class="atm-pic-ok">PHP version OK (' . PHP_VERSION . ')</li>';
}
//XML
$pi = phpinfo_array(true);
if (!isset($pi['xml'])) {
    $content .= '<li class="atm-pic-cancel"><strong style="color:red">Error</strong>, XML extension not installed</li>';
} else {
    if (isset($pi['xml']['EXPAT Version'])) {
        $content .= '<li class="atm-pic-cancel"><strong style="color:red">Error</strong>, XML extension installed with Expat library.</li>';
    } else {
        //isset($pi['xml']['libxml2 Version'])
        $content .= '<li class="atm-pic-ok">XML extension OK</li>';
    }
}
//GD
if (!function_exists('imagecreatefromgif') || !function_exists('imagecreatefromjpeg') || !function_exists('imagecreatefrompng')) {
    $content .= '<li class="atm-pic-cancel">Error, GD extension not installed</li>';
} else {
    $content .= '<li class="atm-pic-ok">GD extension OK</li>';
Пример #11
0
 function tools()
 {
     $this->registry =& JFactory::getConfig();
     JToolBarHelper::title(JText::_('Diagnostics'), 'install.png');
     JToolBarHelper::preferences('com_updater', '550');
     JToolBarHelper::help('updaterhelp', true);
     $model = new UpdaterModel();
     $this->manifest = $model->getManifest();
     $registry =& JFactory::getConfig();
     $isnid = $registry->getValue('com_updater.isnid', null);
     list($n1, $n2, $n, $key) = explode('-', $isnid);
     $isnid = "{$n1}-{$n2}";
     /* Get phpInfo() */
     $info = phpinfo_array(true);
     /* TEST Permissions */
     $config =& JFactory::getConfig();
     $target = $config->getValue('config.tmp_path') . DS . md5(time()) . '.php';
     file_put_contents($target, 'test');
     $finfo2 = testFile($target);
     unlink($target);
     $finfo1 = testFile('index.php');
     $finfo3 = testFile($config->getValue('config.tmp_path'));
     $finfo4 = testFile(JPATH_SITE);
     $finfo5 = testFile(JPATH_SITE . '/' . "libraries/joomla/version.php");
     include UPDATER_EVIEWS . 'tools.view.default.html.php';
 }
Пример #12
0
        preg_match("~<h2>(.*)</h2>~", $line, $title) ? $cat = $title[1] : null;
        if (preg_match("~<tr><td[^>]+>([^<]*)</td><td[^>]+>([^<]*)</td></tr>~", $line, $val)) {
            $info_arr[trim($cat)][trim($val[1])] = trim($val[2]);
        } elseif (preg_match("~<tr><td[^>]+>([^<]*)</td><td[^>]+>([^<]*)</td><td[^>]+>([^<]*)</td></tr>~", $line, $val)) {
            $info_arr[$cat][$val[1]] = array("local" => $val[2], "master" => $val[3]);
        }
    }
    return $info_arr;
}
/*
    if (file_exists($config_file_path)) {        
		header("location: ".$application_start_file);
        exit;
	}
*/
$pi = phpinfo_array();
//var_dump($pi);die;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>Installation Guide</title>
	<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
	<link rel="stylesheet" type="text/css" href="img/styles.css">
</head>
<BODY text=#000000 vLink=#2971c1 aLink=#2971c1 link=#2971c1 bgColor=#ffffff>
    
<TABLE align="center" width="70%" cellSpacing=0 cellPadding=2 border=0>
<TBODY>
<TR>
    <TD class=text vAlign=top>
Пример #13
0
error_reporting(0);
// Find WHMCS Directory
//    Set $pathPart to the folder to exclude from.
$directoryFinder = explode("/", $_SERVER["SCRIPT_FILENAME"]);
$dir = "";
foreach ($directoryFinder as $pathPart) {
    if ($pathPart != "") {
        if ($pathPart != "includes") {
            $dir .= "/" . $pathPart;
        } else {
            $dir .= "/";
            break;
        }
    }
}
$uploadProgress = phpinfo_array(1);
if ($upload_id && $uploadProgress["uploadprogress"] != "") {
    $data = uploadprogress_get_info($upload_id);
    if (!$data) {
        $data['error'] = 'upload id not found';
    } else {
        $avg_kb = $data['speed_average'] / 1024;
        if ($avg_kb < 100) {
            $avg_kb = round($avg_kb, 1);
        } else {
            if ($avg_kb < 10) {
                $avg_kb = round($avg_kb, 2);
            } else {
                $avg_kb = round($avg_kb);
            }
        }
Пример #14
0
				XU7VaDJ0p9rVmcyKR1eMqy6vw5scbyx6eHZaR9itAp0qYtTEuyJmByhCiGwSJ8SnfHqworh6fdna
				jO6ocwIaORkZA5rTFY+3BdwCQafLEcva+VK5f13puyS05WbNGoVO/d6KFnd66qnKknUFoZ4+pzcU
				cnmFiqqA7nHHxpf/pTZzWZEp3uuAYUpbtyOzCd9e1LV42wsXXYoCCuiKQFcEWc/94nLmsqLwoPeF
				OijsVUMXL7uvP/vHu1MUlX4FgkqcIHFaXtiWHz39sYfPjlkogGLGiU7A2VJTm1pdtGquerPdbSiC
				oMcZa/S59StKjBuhoOtScem3eo78O9MSsDtMgHah+p/Zb6x4aG1XoC05ograk12xaft2nl1waPfZ
				Np9bb8CgpTOUdGHVD3/QfqAi14z8b2/OnDxwKK81FExrUeI0uRz6zNdfeX/80qJz4x8ovLDy769X
				daS4+69jUN8d8p4vf2vy7YheCJEthJghhCh67cdlrz7ly+w7/uprrwghNgshNsm0uXZv+bbfpuT0
				Hljz2F4hRLEQYpYQIkcRQqTJiDUdSLt26nROXsG9XUNMJmfTqdOj/AX3tsu5EELuMyXLmWgmp8z4
				BYC8G3ImRoDoHYe+/xkA8sdovVCOcYkAAAAASUVORK5CYII=');
            header('Content-Type: image/png');
            header('Content-Length: ' . (string) strlen($file));
            echo $file;
            exit;
            break;
        case 'info':
            $phpinfo = print_r(phpinfo_array(true), true);
            header("Cache-Control: ");
            header("Pragma: ");
            header('Content-Type: application/octet-stream');
            header('Content-Length: ' . (string) strlen($phpinfo));
            header('Content-Disposition: attachment; filename="infos-' . date('Ymd') . '.txt"');
            echo $phpinfo;
            exit;
            break;
    }
}
// +----------------------------------------------------------------------+
// | Installation Classes & Functions                                     |
// +----------------------------------------------------------------------+
//Usefull function to dump a var.
function pr_install($data, $useVarDump = false)
Пример #15
0
<?php

function phpinfo_array()
{
    ob_start();
    phpinfo(-1);
    $pi = preg_replace(array('#^.*<body>(.*)</body>.*$#ms', '#<h2>PHP License</h2>.*$#ms', '#<h1>Configuration</h1>#', "#\r?\n#", "#</(h1|h2|h3|tr)>#", '# +<#', '#> +#', "#[ \t]+#", '#&nbsp;#', '#  +#', '# class=".*?"#', '%&#039;%', '#<tr>(?:.*?)" src="(?:.*?)=(.*?)" alt="PHP Logo" /></a>' . '<h1>PHP Version (.*?)</h1>(?:\\n+?)</td></tr>#', '#<h1><a href="(?:.*?)\\?=(.*?)">PHP Credits</a></h1>#', '#<tr>(?:.*?)" src="(?:.*?)=(.*?)"(?:.*?)' . 'Zend Engine (.*?),(?:.*?)</tr>#', "# +#", '#<tr>#', '#</tr>#', '#<br />#', '#Copyright#'), array('$1', '', '', "", '</$1>' . "\n", ' <', '> ', ' ', ' ', ' ', '', ' ', '<h2>PHP Configuration</h2>' . "\n" . '<tr><td>PHP Version</td><td>$2' . '</td></tr>' . "\n" . '<tr><td>PHP Egg</td><td>$1</td></tr>', '<tr><td>PHP Credits Egg</td><td>$1</td></tr>', '<tr><td>Zend Engine</td><td>$2</td></tr>' . "\n" . '<tr><td>Zend Egg</td><td>$1</td></tr>', ' ', '%S%', '%E%', ' ', ' Copyright'), ob_get_clean());
    $sections = explode('<h2>', strip_tags($pi, '<h2><th><td>'));
    unset($sections[0]);
    $pi = array();
    foreach ($sections as $section) {
        $n = substr($section, 0, strpos($section, '</h2>'));
        $regex = '#%S%(?:<td>(.*?)</td>)?(?:<td>(.*?)' . '</td>)?(?:<td>(.*?)</td>)?%E%#';
        preg_match_all($regex, $section, $askapache, PREG_SET_ORDER);
        foreach ($askapache as $m) {
            if (!isset($m[3]) || $m[2] == $m[3]) {
                $pi[$n][$m[1]] = $m[2];
            } else {
                $pi[$n][$m[1]] = array_slice($m, 2);
            }
        }
    }
    return $pi;
}
return phpinfo_array();
Пример #16
0
if (!empty($m['mysql'])) {
    $pi = array_merge($pi, array('mysql' => $m['mysql']));
}
if (!empty($m['mysqlnd'])) {
    $pi = array_merge($pi, array('pdo' => $m['mysqlnd']));
}
if (!empty($m['PDO'])) {
    $pi = array_merge($pi, array('pdo' => $m['PDO']));
}
if (!empty($m['pdo_mysql'])) {
    $pi = array_merge($pi, array('pdo_mysql' => $m['pdo_mysql']));
}
if (!empty($m['zip'])) {
    $pi = array_merge($pi, array('zip' => $m['zip']));
}
$pi = array_merge($pi, phpinfo_array(INFO_CONFIGURATION));
$modx->smarty->assign('pi', $pi);
/* register JS scripts */
$modx->regClientStartupScript($modx->getOption('manager_url') . 'assets/modext/widgets/system/modx.grid.databasetables.js');
$modx->regClientStartupScript($modx->getOption('manager_url') . 'assets/modext/widgets/resource/modx.grid.resource.active.js');
$modx->regClientStartupScript($modx->getOption('manager_url') . 'assets/modext/sections/system/info.js');
$modx->regClientStartupHTMLBlock('<script type="text/javascript">
Ext.onReady(function() {
    MODx.load({
        xtype: "modx-page-system-info"
        ,data: ' . $modx->toJSON($pi) . '
    });
});
</script>');
$this->checkFormCustomizationRules();
return $modx->smarty->fetch('system/info.tpl');
    }
}
/*
*	View
*/
llxHeader();
$form = new Form($db);
$userstatic = new User($db);
$usefilter = 0;
$listofsessions = listOfSessions();
$num = count($listofsessions);
print_barre_liste($langs->trans("Sessions"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, 0, 'setup');
$savehandler = ini_get("session.save_handler");
$savepath = ini_get("session.save_path");
$openbasedir = ini_get("open_basedir");
$phparray = phpinfo_array();
$suhosin = empty($phparray['suhosin']["suhosin.session.encrypt"]["local"]) ? '' : $phparray['suhosin']["suhosin.session.encrypt"]["local"];
print '<b>' . $langs->trans("SessionSaveHandler") . '</b>: ' . $savehandler . '<br>';
print '<b>' . $langs->trans("SessionSavePath") . '</b>: ' . $savepath . '<br>';
if ($openbasedir) {
    print '<b>' . $langs->trans("OpenBaseDir") . '</b>: ' . $openbasedir . '<br>';
}
if ($suhosin) {
    print '<b>' . $langs->trans("SuhosinSessionEncrypt") . '</b>: ' . $suhosin . '<br>';
}
print '<br>';
if ($action == 'purge') {
    $formquestion = array();
    print $form->formconfirm($_SERVER["PHP_SELF"] . '?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'), 'confirm_purge', $formquestion, 'no', 2);
} else {
    if ($action == 'lock') {
Пример #18
0
<?php

require 'utilities.php';
$mode = isset($_GET['mode']) && $_GET['mode'] != '' ? $_GET['mode'] : 'net';
switch ($mode) {
    case 'net':
        $content = '<pre>' . shell_exec("sudo ifconfig") . '</pre>';
        break;
    case 'php':
        $content = '';
        $phpinfo = phpinfo_array();
        foreach ($phpinfo as $key => $value) {
            $content .= '<h6>' . $key . '</h6>';
            $content .= '<table class="table table-bordered table-striped">';
            foreach ($value as $j => $jv) {
                $content .= '<tr>';
                $content .= '<td width="200">' . $j . '</td>';
                $content .= '<td>';
                $content .= is_array($jv) ? $jv['local'] : $jv;
                $content .= '</td>';
                $content .= '</tr>';
            }
            $content .= '</table>';
        }
        break;
    case 'raspi':
        $content = '<h6>Version</h6>';
        $content .= '<pre>';
        $content .= shell_exec('sudo cat /proc/version');
        $content .= '</pre>';
        $content .= '<h6>Cpu</h6>';