本文整理汇总了PHP中myself函数的典型用法代码示例。如果您正苦于以下问题:PHP myself函数的具体用法?PHP myself怎么用?PHP myself使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了myself函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: login_cookie_check
/**
* 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));
}
}
示例2: i18n_r
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'])) {
示例3: cl
<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>
示例4: get_filename_id
/**
* 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;
}
示例5: login_cookie_check
/**
* 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);
}
}
示例6: init_pageCache
$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();
示例7: editor_array2ul
/**
* 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;
}
示例8: login_cookie_check
/**
* 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);
}
}