コード例 #1
0
<?php

$current_page = 'config';
include "header.inc.php";
?>

	<h2 id="marker-config">Configuration</h2>
	<form class="nss-admin-form" method="post">
		<input type="hidden" name="action" value="update_config">
		<input type='hidden' name='nss_root' value='<?php 
echo getNssRoot();
?>
'>
		<div class='row'>
			<label>Debug mode</label>
			<div class="field-area">
				<input type="radio" value="1" name="debug_mode" <?php 
if ($nss->get('debug_mode') === true) {
    echo "checked='checked'";
}
?>
/> On
				<input type="radio" value="0" name="debug_mode" <?php 
if ($nss->get('debug_mode') === false) {
    echo "checked='checked'";
}
?>
/> Off
				<div class="field-info">If debug mode is on, you see warnings and errors on top of your stream.</div>
			</div>
		</div>
コード例 #2
0
    echo $license_owner;
    ?>
</span></div>
				</div>	
				<div class='row '>
					<label>Preview</label>
					<div class="field-area"><span class="info"><a href="<?php 
    echo getNssRoot() . NSS_CONTENT . 'themes/' . $nss->get('theme') . '/';
    ?>
" target="_blank">Preview</a></span></div>
				</div>
							
			</form>
			<h2>Login</h2>
			<?php 
    if ($nss_root != getNssRoot()) {
        ?>
				<div class="nss-admin-container error">
					<div class="row"><strong>URL conflict detected</strong> - Login to fix that issue </div>
				</div>
			<?php 
    }
    ?>
			<?php 
    if (isset($login_error)) {
        ?>
				<div class="nss-admin-container error">
						<div class="row">This password is wrong!</div>
					</div>
			<?php 
    }
コード例 #3
0
			<div class="field-area">
				<div class="field-info">
					<span id="atc-expires" class="info"><?php 
    echo $_GET['expires'];
    ?>
</span>
				</div>
			</div>
		</div>
	</form>
	<?php 
} else {
    ?>
	<form class="nss-admin-form" action="https://api.neosmart-stream.com/index.php" method="post">
		<input type="hidden" name="return_url" value="<?php 
    echo getNssRoot() . 'nss-admin/atc.php';
    ?>
">
		<input type="hidden" name="key" value="<?php 
    echo $license_key;
    ?>
">
		<input type="hidden" name="site" value="<?php 
    echo $current_site;
    ?>
">
		<input type="hidden" name="action" value="create_access_token">
		<div class="row">
			<input type="submit" class="submit" value="Create Access Token">
		</div>
	</form>
コード例 #4
0
include '../setup.php';
include "functions.php";
$permissionError = testFilePermissions();
$serverError = testServerSettings();
/****************************************************************************
* Login/Logout
*****************************************************************************/
if (array_key_exists('logout', $_REQUEST)) {
    $_SESSION['nss_admin_password'] = false;
}
if (!is_logged_in($nss)) {
    header('Location: ' . getNssRoot() . '?error=1');
    die;
}
if (!$nss->testLicenseSyntax()) {
    header('Location: ' . getNssRoot() . '?error=3');
    die;
}
cl($nss);
/****************************************************************************
* Global Vars
*****************************************************************************/
//Password
$admin_password = $nss->get('admin_password');
//Abspath
$protocol = array_key_exists('HTTPS', $_SERVER) ? "https://" : "http://";
$absolute_path = substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/nss-admin/') + 1);
//Config
$nss_root = $nss->get('nss_root');
$cache_time = $nss->get('cache_time');
$debug_mode = $nss->get('debug_mode');
コード例 #5
0
function cl($nss)
{
    if (!$nss->testNSS()) {
        $nss->apiRequest('file_conflict');
        header('Location: ' . getNssRoot() . '?error=2');
        die;
    } else {
        return false;
    }
}