Ejemplo n.º 1
0
function CheckForNewPatch()
{
    global $LAST_LOCAL_PATCH, $LAST_PATCH, $PATCH_CHECK_DATE, $SYSTEM_ID, $VERSION_ID;
    global $IsInsideAdmin;
    $IsInsideAdmin = 1;
    //LoadSettings();
    $an = new nc_AdminNotice();
    $LAST_PATCH = $an->update(true);
}
Ejemplo n.º 2
0
<?php

$NETCAT_FOLDER = realpath(dirname(__FILE__) . '/../../../../') . DIRECTORY_SEPARATOR;
require_once $NETCAT_FOLDER . 'vars.inc.php';
require_once $ADMIN_FOLDER . 'function.inc.php';
require_once $ADMIN_FOLDER . 'patch/function.inc.php';
$an = new nc_AdminNotice();
$LAST_PATCH = $an->update();
?>

<div class="nc-widget-link" onclick="return nc.ui.dashboard.fullscreen(this, '<?php 
echo $ADMIN_PATH;
?>
patch/')">
	<div class="nc-text-center" style="position:absolute; left:0; top:50%; margin-top:-46px; height:82px; width:100%; line-height:90px; font-size:25px; background:url('<?php 
echo $ADMIN_PATH;
?>
dashboard/img/netcat-logo-large.png') no-repeat 50% 50%;">
		<?php 
echo $VERSION_ID;
?>
	</div>

	<div class="nc-position-tl">
		<span title="NetCat <?php 
echo BEGINHTML_VERSION;
?>
 <?php 
echo $VERSION_ID;
?>
 <?php 
Ejemplo n.º 3
0
<?php

/* $Id: index.php 8445 2012-11-21 13:49:24Z vadim $ */
error_reporting(E_ALL);
require_once "function.inc.php";
$system_env = $nc_core->get_settings();
$an = new nc_AdminNotice();
$adminNotice = $an->check();
?>
<!DOCTYPE html>
<!--[if lt IE 7]><html style="overflow-y:hidden" class="nc-ie6 nc-oldie"><![endif]-->
<!--[if IE 7]><html style="overflow-y:hidden" class="nc-ie7 nc-oldie"><![endif]-->
<!--[if IE 8]><html style="overflow-y:hidden" class="nc-ie8 nc-oldie"><![endif]-->
<!--[if gt IE 8]><!--><html style="overflow-y:hidden"><!--<![endif]-->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo $nc_core->NC_CHARSET;
?>
" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <title><?php 
echo $title ? $title : "NetCat " . BEGINHTML_VERSION . " " . $VERSION_ID . " " . $SYSTEM_NAME;
?>
</title>
    <script type='text/javascript'>
        var FIRST_TREE_MODE = '<?php 
echo $treeMode;
?>
';
    </script>
    <?php 
Ejemplo n.º 4
0
function LoadSettings()
{
    global $nc_core, $db;
    global $IsInsideAdmin, $system_env;
    global $PROJECT_NAME, $VERSION_ID, $ANY_SYSTEM_MESSAGE, $SYSTEM_ID, $ADMIN_FOLDER;
    global $SPAM_FIELD, $SPAM_MAIL, $SPAM_FROM, $SPAM_FROM_NAME, $NO_RIGHTS_MESSAGE, $PATCH_CHECK_DATE;
    global $LAST_PATCH, $LAST_LOCAL_PATCH, $SYSTEM_NAME, $SYSTEM_COLOR;
    global $HTTP_HOST, $REMOTE_ADDR, $HTTP_USER_AGENT, $HTTP_ROOT_PATH;
    global $EDITOR_TYPE, $INLINE_EDIT_CONFIRMATION, $SUB_FOLDER;
    global $REMIND_SAVE, $PACKET_OPERATIONS, $TEXTAREA_RESIZE;
    $Array = $nc_core->get_settings();
    // probably system was not installed:
    if (!sizeof($Array)) {
        // probably system was not installed
        if ($this->check_system_install()) {
            // DB error
            print "<p><b>" . NETCAT_ERROR_DB_CONNECT . "</b></p>";
            exit;
        }
    }
    $PROJECT_NAME = $Array['ProjectName'];
    $SYSTEM_ID = $Array['SystemID'];
    $VERSION_ID = $Array['VersionNumber'];
    $SPAM_FIELD = $Array['UserEmailField'];
    $SPAM_MAIL = $Array['UserEmailField'];
    $SPAM_FROM = $Array['SpamFromEmail'];
    $SPAM_FROM_NAME = $Array['SpamFromName'];
    $EDITOR_TYPE = $Array['EditorType'];
    $INLINE_EDIT_CONFIRMATION = $Array['InlineEditConfirmation'];
    $REMIND_SAVE = $Array['RemindSave'];
    $PACKET_OPERATIONS = $Array['PacketOperations'];
    $TEXTAREA_RESIZE = $Array['TextareaResize'];
    list($SYSTEM_NAME, $SYSTEM_COLOR) = nc_system_name_by_id($SYSTEM_ID);
    if (isset($Array['InstallationID']) || $Array['InstallationDateOut']) {
        $nc_core->is_trial = true;
    }
    $LAST_LOCAL_PATCH = $db->get_var("SELECT `Patch_Name` FROM `Patch` ORDER BY `Patch_Name` DESC LIMIT 1");
    $LAST_LOCAL_PATCH += 0;
    // следующий патч
    $LAST_PATCH = $Array['LastPatch'];
    // время последнего обращения за обновлениями
    $PATCH_CHECK_DATE = $Array['PatchCheck'];
    // спрашиваем раз в неделю
    $PATCH_CHECK_NEEDED = $PATCH_CHECK_DATE + 2 * 24 * 3600 < time();
    if (!$PATCH_CHECK_DATE || $PATCH_CHECK_NEEDED || $IsInsideAdmin) {
        $an = new nc_AdminNotice();
        $LAST_PATCH = $an->update();
    }
    $ANY_SYSTEM_MESSAGE = $db->get_var("SELECT COUNT(*) FROM `SystemMessage` WHERE `Checked` = 0");
    $system_env = $nc_core->get_settings();
    $system_env['Powered'] = "PHP/" . phpversion();
}