/** * Check Login Cookie * * @since 1.0 * @uses $cookie_login * @uses cookie_check * @uses redirect */ function login_cookie_check() { global $cookie_login; if (cookie_check()) { create_cookie(); } else { redirect($cookie_login . '?redirect=' . myself(FALSE)); } }
if ($random != '') { echo '<div class="updated">' . i18n_r('NOTE_USERNAME') . ' <b>' . stripslashes($_POST['user']) . '</b> ' . i18n_r('NOTE_PASSWORD') . ' <b>' . $random . '</b>  » <a href="support.php">' . i18n_r('EMAIL_LOGIN') . '</a></div>'; $_POST = null; } ?> <?php if ($kill == '') { ?> <div class="main" > <h3><?php echo $site_full_name . ' ' . i18n_r('INSTALLATION'); ?> </h3> <form action="<?php myself(); ?> " method="post" accept-charset="utf-8" > <input name="siteurl" type="hidden" value="<?php echo $fullpath; ?> " /> <input name="lang" type="hidden" value="<?php echo $LANG; ?> " /> <p><label for="sitename" ><?php i18n('LABEL_WEBSITE'); ?> :</label><input class="text" id="sitename" name="sitename" type="text" value="<?php if (isset($_POST['sitename'])) {
<div class="wrapper"> <?php include 'template/error_checking.php'; ?> <div class="bodycontent clearfix"> <div id="maincontent"> <div class="main" > <h3><?php echo cl($SITENAME); ?> </h3> <?php exec_action('index-login'); ?> <form class="login" action="<?php echo myself(false) . '?' . htmlentities($_SERVER['QUERY_STRING'], ENT_QUOTES); ?> " method="post"> <p><b><?php i18n('USERNAME'); ?> :</b><br /><input type="text" class="text" id="userid" name="userid" /></p> <p><b><?php i18n('PASSWORD'); ?> :</b><br /><input type="password" class="text" id="pwd" name="pwd" /></p> <p><input type="submit" name="submitted" class="submit" value="<?php i18n('LOGIN'); ?> " /></p> </form>
/** * Get Filename ID * * Returns the filename of the current file, minus .php * * @since 1.0 * @uses myself * * @return string */ function get_filename_id() { $path = myself(FALSE); $file = basename($path, ".php"); return $file; }
/** * Check Login Cookie * * @since 1.0 * @uses $cookie_login * @uses cookie_check * @uses redirect */ function login_cookie_check() { global $cookie_login; if (cookie_check()) { create_cookie(); } else { $qstring = filter_queryString(array('id')); $redirect_url = $cookie_login . '?redirect=' . myself(false) . '?' . $qstring; redirect($redirect_url); } }
$ASSETURL = $SITEURL; } /** * Include other files depending if they are needed or not */ require_once GSADMININCPATH . 'cookie_functions.php'; require_once GSADMININCPATH . 'assets.php'; include_once GSADMININCPATH . 'plugin_functions.php'; // include core plugin for page caching, requires plugin functions for hooks // @todo must stay after plugin_function for now, since it requires plugin_functions include_once GSADMININCPATH . 'caching_functions.php'; init_pageCache(); if ($SAFEMODE) { if (isset($_REQUEST['safemodeoff']) && is_logged_in()) { disableSafeMode(); redirect(myself(false)); } else { $SAFEMODE = true; debugLog("SAFEMODE ON"); $load['plugin'] = false; loadPluginData(); } } // load plugins functions if (isset($load['plugin']) && $load['plugin']) { if (function_exists('plugin_preload_callout')) { plugin_preload_callout(); } // @callout plugin_preload_callout callout before loading plugin files // Include plugins files in global scope loadPluginData();
/** * outputs a ul nested tree from directory array * @param array $array directoryToMultiArray() * @param boolean $hideEmpty omit empty directories if true * @return string */ function editor_array2ul($array, $hideEmpty = true, $recurse = true) { global $allowed_extensions, $template_file, $template; $cnt = 0; $out = "<ul>"; foreach ($array as $key => $elem) { if (!is_array($elem['value'])) { // Is a file $ext = lowercase(pathinfo($elem['value'], PATHINFO_EXTENSION)); if (in_array($ext, $allowed_extensions)) { $filename = $elem['value']; $filepath = $elem['path']; $filenamefull = substr(strstr($filepath . $filename, getRelPath(GSTHEMESPATH) . $template . '/'), strlen(getRelPath(GSTHEMESPATH) . $template . '/')); $open = editor_fileIsOpen($elem['path'], $elem['value']) ? ' open' : ''; if ($filename == GSTEMPLATEFILE) { $ext = 'theme'; $filename = i18n_r('DEFAULT_TEMPLATE'); } $link = myself(false) . '?t=' . $template . '&f=' . $filenamefull; $out .= '<li><a href="' . $link . '"class="file ext-' . $ext . $open . '">' . $filename . "</a></li>"; } } else { if ($recurse) { // Is a folder // Are we showing/hiding empty folders. // WILL NOT hide empty folders that contain at least 1 subfolder $empty = ''; if (count($elem['value']) == 0) { if ($hideEmpty) { continue; } $empty = ' dir-empty'; // empty folder class } $out .= '<li><a class="directory' . $empty . '">' . $key . '</a>' . editor_array2ul($elem['value']) . '</li>'; } } } $out = $out . "</ul>"; return $out; }
/** * Check Login Cookie * * @since 1.0 * @uses $cookie_login * @uses cookie_check * @uses redirect */ function login_cookie_check() { global $cookie_login; if (cookie_check()) { create_cookie(); } else { $qstring = filter_queryString(explode(',', getDef('GSLOGINQSALLOWED'))); $redirect_url = $cookie_login . '?redirect=' . myself(false) . '?' . $qstring; redirect($redirect_url); } }