コード例 #1
0
ファイル: install.php プロジェクト: BGCX261/zibo-svn-to-git
/**
 * Runs this installation script
 * @return null
 */
function run()
{
    $action = null;
    if (array_key_exists('action', $_GET)) {
        $action = $_GET['action'];
    }
    try {
        $baseUrl = getBaseUrl();
        $url = getBaseUrl() . str_replace(__DIR__, '', __FILE__);
        $content = '<p>This script will help you download and launch the latest Zibo installation.</p>';
        $requirements = checkRequirements();
        if ($requirements) {
            $content .= '<div class="error">';
            $content .= '<p>Not all requirements are met, please solve the following issues:</p>';
            $content .= '<ul>';
            foreach ($requirements as $requirement) {
                $content .= '<li>' . $requirement . '</li>';
            }
            $content .= '</ul>';
            $content .= '</div>';
            $content .= '<form action="' . $url . '"><input type="submit" value="Check again" /></form>';
        } else {
            if (!$action) {
                $content .= '<p class="success">All the requirements are met.</p>';
                $content .= '<p>The script is ready to download Zibo.</p>';
                $content .= '<p>Zibo download:<br /><code><a href="' . PACKAGE . '">' . PACKAGE . '</a></code></p>';
                $content .= '<p>Installation directory:<br /><code>' . getInstallationDirectory() . '</code></p>';
                $content .= '<form action="' . $url . '?action=download" method="post"><input type="submit" value="Proceed" /></form>';
            } elseif ($action == 'download') {
                downloadAndUnpack();
                header('Location: ' . $baseUrl);
            }
        }
    } catch (Exception $exception) {
        $content = '<div class="error"><pre>';
        $content .= $exception->getMessage() . "\n" . $exception->getTraceAsString();
        $content .= '</pre></div>';
    }
    echo renderOutput($content);
}
コード例 #2
0
ファイル: install.php プロジェクト: lifecom/test
function outConfirm($module)
{
    if (!$module) {
        $body = '<p>Installation not found</p>';
    } else {
        $info = getInfo();
        $body = '<p>' . $info . '</p>';
        $check = checkRequirements();
        if ($check['result']) {
            $body .= '<form>' . '<p>Install file: <input type="text" name="install_file" value="' . $module['filename'] . '" readonly />' . '<p>Do you want continue?</p>' . '<p><input type="submit" name="confirm_install" value=" YES " /></form>';
        } else {
            $msg = '<p><b>ATTENTION!</b></p>';
            if (!$check['status']['php_version']) {
                $msg .= 'You need <b>PHP 5.0</b> or more (current version is ' . PHP_VERSION . ')<br />';
            }
            if (!$check['status']['mb_string']) {
                $msg .= 'You need <b>mbstring</b> extension<br />';
            }
            $body .= $msg . '<p>LiveStreet cannot work correctly in this environment</p>' . '<p>Installation was cancelled</p>' . ':-(';
        }
    }
    outHTML($body);
}
コード例 #3
0
		.delete { color: white; position: absolute; left:  20px; display: block; width: 200px; text-align: center; top: 270px;}
		.act    { color: white; position: absolute; left: 240px; display: block; width: 200px; text-align: center; top: 270px;}
		.defer  { color: white; position: absolute; left: 460px; display: block; width: 200px; text-align: center; top: 270px;}
		.ignore { color: white; position: absolute; left: 680px; display: block; width: 200px; text-align: center; top: 270px;}
		form { padding: 0 20px;}
	</style>
	<link rel="apple-touch-icon" href="http://triagemail.com/images/apple-icon.png"/>
  </head>
  <body id="triagemail-com">
	<h1>triagemail.com</h1>
	<form action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="post">
<?php 
if (!checkRequirements()) {
    echo '<div class="error">This version of PHP does NOT have the required libraries. Please see triagemail.com for more information.</div>';
} else {
    if ($_POST['logout']) {
        // distroy all the variable and logout
        unset($_SESSION['username']);
        unset($_SESSION['password']);
        unset($_SESSION['connectionString']);
        unset($_SESSION['inTriage']);
        unset($_SESSION['msg_num']);
        unset($_SESSION['unread_list']);
        echo '<div class="message">' . translate('Logged out', $lang) . '</div>';
        renderLogin($device, $lang);
    } elseif ($_SESSION['inTriage']) {
        // need to reconnect and create an $mbox
        $mbox = imap_open($_SESSION['connectString'], $_SESSION['username'], $_SESSION['password']);
コード例 #4
0
 /**
  *
  *
  * @param $ThemeName
  * @return bool
  * @throws Gdn_UserException
  */
 public function testTheme($ThemeName)
 {
     // Get some info about the currently enabled theme.
     $EnabledTheme = $this->enabledThemeInfo();
     $EnabledThemeFolder = val('Folder', $EnabledTheme, '');
     $OldClassName = $EnabledThemeFolder . 'ThemeHooks';
     // Make sure that the theme's requirements are met
     $ApplicationManager = new Gdn_ApplicationManager();
     $EnabledApplications = $ApplicationManager->enabledApplications();
     $NewThemeInfo = $this->getThemeInfo($ThemeName);
     $ThemeName = val('Index', $NewThemeInfo, $ThemeName);
     $RequiredApplications = val('RequiredApplications', $NewThemeInfo, false);
     $ThemeFolder = val('Folder', $NewThemeInfo, '');
     checkRequirements($ThemeName, $RequiredApplications, $EnabledApplications, 'application');
     // Applications
     // If there is a hooks file, include it and run the setup method.
     $ClassName = "{$ThemeFolder}ThemeHooks";
     $HooksFile = val("HooksFile", $NewThemeInfo, null);
     if (!is_null($HooksFile) && file_exists($HooksFile)) {
         include_once $HooksFile;
         if (class_exists($ClassName)) {
             $ThemeHooks = new $ClassName();
             $ThemeHooks->Setup();
         }
     }
     // If there is a hooks in the old theme, include it and run the ondisable method.
     if (class_exists($OldClassName)) {
         $ThemeHooks = new $OldClassName();
         if (method_exists($ThemeHooks, 'OnDisable')) {
             $ThemeHooks->OnDisable();
         }
     }
     return true;
 }
コード例 #5
0
ファイル: Step2.php プロジェクト: abhinay100/forma_app
<h2><?php 
echo Lang::t('_TITLE_STEP2');
?>
</h2>

<?php 
$php_conf = ini_get_all();
$cl = checkRequirements();
?>

<h3><?php 
echo Lang::t('_SERVERINFO');
?>
</h3>
<ul class="info">
	<li><?php 
echo Lang::t('_SERVER_SOFTWARE');
?>
: <span><?php 
echo $_SERVER['SERVER_SOFTWARE'];
?>
</span></li>
	<li class="<?php 
echo $cl['php'];
?>
"><?php 
echo Lang::t('_PHPVERSION');
?>
: <span><?php 
echo phpversion();
?>
コード例 #6
0
ファイル: index.php プロジェクト: dabielkabuto/eventum
define('APP_ERROR_LOG', APP_LOG_PATH . '/errors.log');
define('APP_LOCKS_PATH', APP_VAR_PATH . '/lock');
define('APP_LOCAL_PATH', APP_CONFIG_PATH);
define('APP_RELATIVE_URL', '../');
header('Content-Type: text/html; charset=' . APP_CHARSET);
$have_config = file_exists(APP_CONFIG_PATH . '/config.php') && filesize(APP_CONFIG_PATH . '/config.php');
// get out if already configured
if ($have_config) {
    header('Location: ../');
    exit(0);
}
if (defined('APP_INC_PATH')) {
    set_include_path(APP_INC_PATH . PATH_SEPARATOR . get_include_path());
}
require_once APP_PATH . '/autoload.php';
list($warnings, $errors) = checkRequirements();
if ($warnings || $errors) {
    Misc::displayRequirementErrors(array_merge($errors, $warnings), 'Eventum Setup');
    if ($errors) {
        exit(1);
    }
}
$tpl = new Template_Helper();
if (@$_POST['cat'] == 'install') {
    $res = install();
    $tpl->assign('result', $res);
    // check for the optional IMAP extension
    $tpl->assign('is_imap_enabled', function_exists('imap_open'));
}
$full_url = dirname($_SERVER['PHP_SELF']);
$pieces = explode('/', $full_url);
コード例 #7
0
 /**
  * Check that the requirements for an application have been enabled.
  *
  * @param string $applicationName The name of the application to check.
  */
 public function checkRequirements($applicationName)
 {
     $AvailableApplications = $this->availableApplications();
     $RequiredApplications = val('RequiredApplications', val($applicationName, $AvailableApplications, array()), false);
     $EnabledApplications = $this->enabledApplications();
     checkRequirements($applicationName, $RequiredApplications, $EnabledApplications, 'application');
 }
コード例 #8
0
ファイル: index.php プロジェクト: juliogallardo1326/proc
</table>

</body>
</html>';
    }
    return $html;
}
if (stristr(PHP_OS, 'darwin')) {
    ini_set("include_path", ".:./../include/pear/");
} elseif (stristr(PHP_OS, 'win')) {
    ini_set("include_path", ".;./../include/pear/");
} else {
    ini_set("include_path", ".:./../include/pear/");
}
include_once "File/Util.php";
$html = checkRequirements();
if (!empty($html)) {
    echo $html;
    exit;
}
include_once "../include/Smarty/Smarty.class.php";
$tpl = new Smarty();
$tpl->template_dir = '../templates/en';
$tpl->compile_dir = "../templates_c";
$tpl->config_dir = '';
function replace_table_prefix($str)
{
    global $HTTP_POST_VARS;
    return str_replace('%TABLE_PREFIX%', $HTTP_POST_VARS['db_table_prefix'], $str);
}
function getErrorMessage($type, $message)