当前位置: 首页>>代码示例>>PHP>>正文


PHP get_nonce函数代码示例

本文整理汇总了PHP中get_nonce函数的典型用法代码示例。如果您正苦于以下问题:PHP get_nonce函数的具体用法?PHP get_nonce怎么用?PHP get_nonce使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_nonce函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: nonce

function nonce($action = null)
{
    echo get_nonce($action);
}
开发者ID:asalce,项目名称:wp-ci,代码行数:4,代码来源:wpci_helper.php

示例2: htmlentities

echo $i18n['ADD_COMPONENT'];
?>
</a>
		<div class="clear"></div>
	</div>
	
	<form class="manyinputs" action="<?php 
echo htmlentities($_SERVER['PHP_SELF'], ENT_QUOTES);
?>
" method="post" accept-charset="utf-8" >
		<input type="hidden" id="id" value="<?php 
echo @$count;
?>
" />
		<input type="hidden" id="nonce" name="nonce" value="<?php 
echo get_nonce("modify_components");
?>
" />
		<p><input type="submit" class="submit" name="submitted" id="button" value="<?php 
echo $i18n['SAVE_COMPONENTS'];
?>
" /> &nbsp;&nbsp;<?php 
echo $i18n['OR'];
?>
&nbsp;&nbsp; <a class="cancel" href="theme.php"><?php 
echo $i18n['CANCEL'];
?>
</a></p>

		<div id="divTxt"></div> 
		<?php 
开发者ID:RobAnt,项目名称:GetSimple-Plugins,代码行数:31,代码来源:components.php

示例3: exec_action

			<div class="edit-nav clearfix" >
				<?php 
exec_action(get_filename_id() . '-edit-nav');
?>
			</div>		
			<?php 
exec_action(get_filename_id() . '-body');
?>
			
			<!-- user form -->
			<form class="largeform" action="<?php 
myself();
?>
" method="post" accept-charset="utf-8" >
			<input id="nonce" name="nonce" type="hidden" value="<?php 
echo get_nonce("save_profile");
?>
" />
			<?php 
if ($adding === true) {
    ?>
 <input id="add" name="add" type="hidden" value="1" /> <?php 
}
?>
		
			<div class="leftsec">
				<p><label for="user" ><?php 
i18n('LABEL_USERNAME');
?>
:</label><input class="text" id="user" name="user" type="text" <?php 
echo $adding === true ? '' : 'readonly';
开发者ID:CodeCharming,项目名称:GetSimpleCMS,代码行数:31,代码来源:profile.php

示例4: get_pages_menu_content

function get_pages_menu_content($parent, $menu, $level)
{
    global $pagesSorted;
    $items = array();
    foreach ($pagesSorted as $page) {
        $items[(string) $page['url']] = $page;
    }
    if (count($items) > 0) {
        foreach ($items as $page) {
            $dash = "";
            if ($page['parent'] != '') {
                $parentdata = getXML(GSDATAPAGESPATH . $page['parent'] . '.xml');
                $parentTitle = $parentdata->parent;
                $dash = "<b>" . $parentTitle . "</b>:" . $page['parent'] . " ";
            }
            $menu .= '<tr id="tr-' . $page['url'] . '" >';
            if ($page['title'] == '') {
                $page['title'] = '[No Title] &nbsp;&raquo;&nbsp; <em>' . $page['url'] . '</em>';
            }
            if ($page['menuStatus'] != '') {
                $page['menuStatus'] = ' <sup>[' . i18n_r('MENUITEM_SUBTITLE') . ']</sup>';
            } else {
                $page['menuStatus'] = '';
            }
            if ($page['private'] != '') {
                $page['private'] = ' <sup>[' . i18n_r('PRIVATE_SUBTITLE') . ']</sup>';
            } else {
                $page['private'] = '';
            }
            if ($page['url'] == 'index') {
                $homepage = ' <sup>[' . i18n_r('HOMEPAGE_SUBTITLE') . ']</sup>';
            } else {
                $homepage = '';
            }
            $menu .= '<td class="pagetitle">' . $dash . '<a title="' . i18n_r('EDITPAGE_TITLE') . ': ' . cl($page['title']) . '" href="cedit.php?id=' . $page['url'] . '" >' . cl($page['title']) . '</a><span class="showstatus toggle" >' . $homepage . $page['menuStatus'] . $page['private'] . '</span></td>';
            $menu .= '<td style="width:80px;text-align:right;" ><span>' . shtDate($page['pubDate']) . '</span></td>';
            $menu .= '<td class="secondarylink" >';
            $menu .= '<a title="' . i18n_r('VIEWPAGE_TITLE') . ': ' . cl($page['title']) . '" target="_blank" href="' . find_url($page['url'], $page['parent']) . '">#</a>';
            $menu .= '</td>';
            if ($page['url'] != 'index') {
                $menu .= '<td class="delete" ><a class="delconfirm" href="cdeletefile.php?id=' . $page['url'] . '&amp;nonce=' . get_nonce("cdelete", "cdeletefile.php") . '" title="' . i18n_r('DELETEPAGE_TITLE') . ': ' . cl($page['title']) . '" >&times;</a></td>';
            } else {
                $menu .= '<td class="delete" ></td>';
            }
            $menu .= '</tr>';
        }
    }
    return $menu;
}
开发者ID:Emmett-Brown,项目名称:linea,代码行数:49,代码来源:template_functions.php

示例5: foreach

    foreach ($fields as $key => $value) {
        $r[] = rawurlencode($key) . "=" . rawurlencode($value);
    }
    return implode($delim, $r);
    //return complete base string
}
/**
 * Returns typical headers needed for a request
 * @param $consumer_key
 * @param $nonce
 */
function auth_headers($consumer_key, $nonce = '')
{
    return array('oauth_consumer_key' => $consumer_key, 'oauth_nonce' => $nonce, 'oauth_signature_method' => 'HMAC-SHA1', 'oauth_timestamp' => time(), 'oauth_version' => '1.0');
}
$nonce = get_nonce('https://api.elucidat.com/v2/releases/launch', $api_key, $api_secret);
$headers = auth_headers($api_key, $nonce);
$fields = array('release_code' => $release_code, 'name' => $learner_name, 'email_address' => $learner_email);
$result = call_elucidat($headers, $fields, 'GET', 'https://api.elucidat.com/v2/releases/launch', $api_secret);
?>
<!DOCTYPE html>
<!--[if IE 6]>         <html class="no-js ie6 ie-lt9"> <![endif]-->
<!--[if IE 7]>         <html class="no-js ie7 ie-lt9"> <![endif]-->
<!--[if IE 8]>         <html class="no-js ie8 ie-lt9"> <![endif]-->
<!--[if IE 9]>         <html class="no-js ie9"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Elucidat website integration example</title>
        <!-- viewport behaviour IMPORTANT -->
开发者ID:elucidat,项目名称:website-integration-example,代码行数:31,代码来源:index.php

示例6: get_template

get_template('header', cl($SITENAME) . ' &raquo; ' . i18n_r('GENERAL_SETTINGS'));
?>
	
<?php 
include 'template/include-nav.php';
?>

<div class="bodycontent clearfix">
	
	<div id="maincontent">
		<form class="largeform" action="<?php 
myself();
?>
" method="post" accept-charset="utf-8" >
		<input id="nonce" name="nonce" type="hidden" value="<?php 
echo get_nonce("save_settings");
?>
" />
		
		<div class="main">
		<h3><?php 
i18n('WEBSITE_SETTINGS');
?>
</h3>
		
		<div class="leftsec">
			<p><label for="sitenameinput" ><?php 
i18n('LABEL_WEBSITE');
?>
:</label><input class="text" id="sitenameinput" name="sitename" type="text" value="<?php 
if (isset($SITENAME1)) {
开发者ID:Vin985,项目名称:clqweb,代码行数:31,代码来源:settings.php

示例7: doNotify

        doNotify(i18n_r('FLUSHCACHE-SUCCESS'), 'success');
        break;
    case 'del-error':
        doNotify('<b>' . i18n_r('ERROR') . ':</b> ' . i18n_r('ER_PROBLEM_DEL') . '.', 'error');
        break;
    case 'comp-success':
        doNotify(i18n_r('ER_COMPONENT_SAVE') . '. <a href="components.php?undo&nonce=' . get_nonce("undo") . '">' . i18n_r('UNDO') . '</a>', 'success');
        break;
    case 'comp-restored':
        doNotify(i18n_r('ER_COMPONENT_REST') . '. <a href="components.php?undo&nonce=' . get_nonce("undo") . '">' . i18n_r('UNDO') . '</a>', 'success');
        break;
    case 'profile-restored':
        doNotify(i18n_r('ER_PROFILE_RESTORED') . '. <a href="profile.php?undo&nonce=' . get_nonce("undo") . '&userid=' . $userid . '">' . i18n_r('UNDO') . '</a>', 'success');
        break;
    case 'settings-restored':
        doNotify(i18n_r('ER_OLD_RESTORED') . '. <a href="settings.php?undo&nonce=' . get_nonce("undo") . '">' . i18n_r('UNDO') . '</a>', 'success');
        break;
    default:
        if (isset($error)) {
            doNotify('<b>' . i18n_r('ERROR') . ':</b> ' . $error, 'error');
        } elseif (isset($_GET['cancel'])) {
            doNotify(i18n_r('ER_CANCELLED_FAIL'), 'error');
        } elseif (isset($_GET['logout'])) {
            doNotify(i18n_r('MSG_LOGGEDOUT'), 'info');
        } elseif (!empty($err)) {
            doNotify('<b>' . i18n_r('ERROR') . ':</b> ' . $err, 'error');
        } elseif (isset($success)) {
            doNotify($success, 'success');
        }
        break;
}
开发者ID:promil23,项目名称:GetSimpleCMS,代码行数:31,代码来源:error_checking.php

示例8: antixss

        $plugin = antixss($pluginid);
        change_plugin($pluginid);
        redirect('plugins.php');
    }
}
// Variable settings
login_cookie_check();
$counter = 0;
$table = null;
$pluginfiles = getFiles(GSPLUGINPATH);
sort($pluginfiles);
$needsupdate = false;
foreach ($pluginfiles as $fi) {
    $pathExt = pathinfo($fi, PATHINFO_EXTENSION);
    $pathName = pathinfo_filename($fi);
    $setNonce = '&amp;nonce=' . get_nonce("set", "plugins.php");
    if ($pathExt == "php") {
        if ($live_plugins[$fi] == 'true') {
            $cls_Enabled = 'hidden';
            $cls_Disabled = '';
            $trclass = 'enabled';
        } else {
            $cls_Enabled = '';
            $cls_Disabled = 'hidden';
            $trclass = 'disabled';
        }
        $api_data = json_decode(get_api_details('plugin', $fi));
        $updatelink = null;
        if (is_object($api_data) && $api_data->status == 'successful') {
            if ($api_data->version > $plugin_info[$pathName]['version']) {
                $updatelink = '<br /><a class="updatelink" href="' . $api_data->path . '" target="_blank">' . i18n_r('UPDATE_AVAILABLE') . ' ' . $api_data->version . '</a>';
开发者ID:google-code-backups,项目名称:get-simple-cms,代码行数:31,代码来源:plugins.php

示例9: tsl

$count = "0";
$path = tsl(GSBACKUPSPATH . 'zip/');
$filenames = getFiles($path);
natsort($filenames);
rsort($filenames);
foreach ($filenames as $file) {
    if ($file[0] != ".") {
        $timestamp = explode('_', $file);
        $name = lngDate($timestamp[0]);
        clearstatcache();
        $ss = stat($path . $file);
        $size = fSize($ss['size']);
        echo '<tr>
								<td><a title="' . i18n_r('DOWNLOAD') . ' ' . $name . '" href="download.php?file=' . $path . $file . '&amp;nonce=' . get_nonce("archive", "download.php") . '">' . $name . '</a></td>
								<td style="width:70px;text-align:right;" ><span>' . $size . '</span></td>
								<td class="delete" ><a class="delconfirm" title="' . i18n_r('DELETE_ARCHIVE') . ': ' . $name . '?" href="deletefile.php?zip=' . $file . '&amp;nonce=' . get_nonce("delete", "deletefile.php") . '">&times;</a></td>
							  </tr>';
        $count++;
    }
}
?>
			</table>
			<p><em><b><span id="pg_counter"><?php 
echo $count;
?>
</span></b> <?php 
i18n('TOTAL_ARCHIVES');
?>
</em></p>
		</div>
	</div>
开发者ID:Emmett-Brown,项目名称:linea,代码行数:31,代码来源:archive.php

示例10: die

    $nonce = $_GET['nonce'];
    if (!check_nonce($nonce, "undo", "support.php")) {
        die("CSRF detected!");
    }
    $ufile = 'cp_settings.xml';
    undo($ufile, $path, $bakpath);
    header('Location: support.php?rest=true');
}
if (isset($_GET['restored'])) {
    $restored = 'true';
} else {
    $restored = 'false';
}
// were changes submitted?
if (isset($_POST['submitted'])) {
    $success = $i18n['SETTINGS_UPDATED'] . '. <a href="support.php?undo&nonce=' . get_nonce("restore", "support.php") . '">' . $i18n['UNDO'] . '</a>';
}
?>

<?php 
get_template('header', cl($SITENAME) . ' &raquo; ' . $i18n['SUPPORT']);
?>
	
	<h1><a href="<?php 
echo $SITEURL;
?>
" target="_blank" ><?php 
echo cl($SITENAME);
?>
</a> <span>&raquo;</span> <?php 
echo $i18n['SUPPORT'];
开发者ID:RobAnt,项目名称:GetSimple-Plugins,代码行数:31,代码来源:support.php

示例11: elseif

} elseif ($err == 'false') {
    echo '<div class="updated">' . $i18n['ER_SETTINGS_UPD'] . '. <a href="settings.php?undo&nonce=' . get_nonce("undo") . '">' . $i18n['UNDO'] . '</a></div>';
} elseif ($restored == 'true') {
    echo '<div class="updated">' . $i18n['ER_OLD_RESTORED'] . '. <a href="settings.php?undo&nonce=' . get_nonce("undo") . '">' . $i18n['UNDO'] . '</a></div>';
} elseif (@$_GET['rest'] == 'true') {
    echo '<div class="updated">' . $i18n['ER_OLD_RESTORED'] . '. <a href="support.php?undo&nonce=' . get_nonce("undo", "support.php") . '">' . $i18n['UNDO'] . '</a></div>';
} elseif ($err == 'true') {
    echo '<div class="error"><b>' . $i18n['ERROR'] . ':</b> ' . @$msg . '</div>';
} elseif ($update == 'pwd-success') {
    echo '<div class="updated">' . $i18n['ER_NEW_PWD_SENT'] . '. <a href="index.php">' . $i18n['LOGIN'] . '</a></div>';
} elseif ($update == 'pwd-error') {
    echo '<div class="error"><b>' . $i18n['ERROR'] . ':</b> ' . $i18n['ER_SENDMAIL_ERR'] . '.</div>';
} elseif ($update == 'del-success') {
    echo '<div class="updated">' . $i18n['ER_FILE_DEL_SUC'] . ': <b>' . $_GET['id'] . '</b></div>';
} elseif ($update == 'del-error') {
    echo '<div class="error"><b>' . $i18n['ERROR'] . ':</b> ' . $i18n['ER_PROBLEM_DEL'] . '.</div>';
} elseif ($update == 'comp-success') {
    echo '<div class="updated">' . $i18n['ER_COMPONENT_SAVE'] . '. <a href="components.php?undo&nonce=' . get_nonce("undo") . '">' . $i18n['UNDO'] . '</a></div>';
} elseif ($update == 'comp-restored') {
    echo '<div class="updated">' . $i18n['ER_COMPONENT_REST'] . '. <a href="components.php?undo&nonce=' . get_nonce("undo") . '">' . $i18n['UNDO'] . '</a></div>';
} elseif (isset($_GET['cancel'])) {
    echo '<div class="error">' . $i18n['ER_CANCELLED_FAIL'] . '</div>';
} elseif (isset($error)) {
    echo '<div class="error">' . $error . '</div>';
} elseif (isset($success)) {
    echo '<div class="updated">' . $success . '</div>';
} elseif (isset($_GET['err'])) {
    echo '<div class="error"><b>' . $i18n['ERROR'] . ':</b> ' . $_GET['err'] . '</div>';
} elseif (isset($_GET['success'])) {
    echo '<div class="updated">' . $_GET['success'] . '</div>';
}
开发者ID:RobAnt,项目名称:GetSimple-Plugins,代码行数:31,代码来源:error_checking.php

示例12: i18n

	
	<div id="maincontent">
		<div class="main" >
		
		<h3><?php 
i18n('RESET_PASSWORD');
?>
</h3>
		<p class="desc"><?php 
i18n('MSG_PLEASE_EMAIL');
?>
</p>
		
		<form class="login" action="" method="post" >
			<input name="nonce" id="nonce" type="hidden" value="<?php 
echo get_nonce("reset_password");
?>
"/>
			<p><b><?php 
i18n('LABEL_USERNAME');
?>
:</b><br /><input class="text" name="username" type="text" value="" /></p>
			<p><input class="submit" type="submit" name="submitted" value="<?php 
echo i18n_r('SEND_NEW_PWD');
?>
" /></p>
		</form>
		<p class="cta"><a href="<?php 
echo $SITEURL;
?>
"><?php 
开发者ID:kix23,项目名称:GetSimpleCMS,代码行数:30,代码来源:resetpassword.php

示例13: trim

?>
</a>
</div>

<div style="width:770px;margin:0px auto 2px auto;padding:0px 0px 0px 0px;color:black;font-size:18px;font-weight:bold;"><?php 
echo $t_ct_code;
?>
</div>
<form  method="post" action="codetester.php" style="width:760px;margin:0px auto 0px auto;padding:10px;background-color:#EEEEEE;-moz-border-radius:2px;-khtml-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;">
	<textarea name="sourcecode" rows="10" style="width:748px;margin:0px;padding:5px;border:1px solid #c0c0c0;"><?php 
echo '' . trim(file_get_contents('codesource.php'));
?>
</textarea>
	<input type="hidden" name="to" value="interpretcode" />
        <input type="hidden" name="nonce" value="<?php 
echo get_nonce();
/* Russell, 2012-11-10 */
?>
" />
	<input type="submit" value="Interpret the code" class="submit" style="width:150px;margin:4px 0px 0px 0px;padding:0px;border:solid 1px silver;cursor:pointer;-moz-border-radius:2px;-khtml-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;" />
</form>

<br />
<div style="width:770px;margin:0px auto 2px auto;padding:0px 0px 0px 0px;color:black;font-size:18px;font-weight:bold;"><?php 
echo $t_ct_codeinterpreted;
?>
</div>
<div style="width:760px;margin:0px auto 0px auto;padding:10px;font-size:12px;background-color:#FFF3AF;-moz-border-radius:2px;-khtml-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;"><?php 
include 'codesource.php';
?>
</div>
开发者ID:relliance,项目名称:easyphp-codetester-fix,代码行数:31,代码来源:codetester.php

示例14: tsl

$count = "0";
$path = tsl(GSBACKUPSPATH . 'zip/');
$filenames = getFiles($path);
natsort($filenames);
rsort($filenames);
foreach ($filenames as $file) {
    if ($file != "." && $file != ".." && $file != ".htaccess") {
        $timestamp = explode('_', $file);
        $name = shtDate($timestamp[0]);
        clearstatcache();
        $ss = @stat($path . $file);
        $size = fSize($ss['size']);
        echo '<tr>
							<td><a title="Download Archive ' . $name . '" target="_blank" href="download.php?file=' . $path . $file . '&nonce=' . get_nonce("archive", "download.php") . '">' . $name . '</a></td>
							<td style="width:70px;text-align:right;" ><span>' . $size . '</span></td>
							<td class="delete" ><a class="delconfirm" title="Delete Archive ' . $name . '?" href="deletefile.php?zip=' . $file . '&nonce=' . get_nonce("delete", "deletefile.php") . '">X</a></td>
						  </tr>';
        $count++;
    }
}
?>
		</table>
		<p><em><b><?php 
echo $count;
?>
</b> <?php 
echo $i18n['TOTAL_ARCHIVES'];
?>
</em></p>
		</div>
	</div>
开发者ID:RobAnt,项目名称:GetSimple-Plugins,代码行数:31,代码来源:archive.php

示例15: getPublishedPageHead

function getPublishedPageHead($editing = true, $path = '')
{
    global $id, $draftExists, $pageExists;
    echo '<h3 class="floated">' . ($editing ? i18n_r('PAGE_EDIT_MODE') : i18n_r('CREATE_NEW_PAGE')) . '</h3>';
    if (getDef('GSUSEDRAFTS', true) && $pageExists && getDef('GSSDRAFTSPUBLISHEDTAG', true)) {
        echo '<div class="title label label-ok unselectable">' . i18n_r('LABEL_PUBLISHED') . '</div>';
    }
    echo '<!-- pill edit navigation -->', "\n", '<div class="edit-nav clearfix" >';
    if ($editing) {
        echo '<a class="pageview" href="' . $path . '" target="_blank" accesskey="' . find_accesskey(i18n_r('VIEW')) . '" >' . i18n_r('VIEW') . '</a>';
        if ($path != '') {
            echo '<a class="pageclone" href="pages.php?id=' . $id . '&amp;action=clone&amp;nonce=' . get_nonce("clone", "pages.php") . '" >' . i18n_r('CLONE') . '</a>';
        }
    }
    exec_action(get_filename_id() . '-edit-nav');
    echo "\n</div>";
}
开发者ID:HelgeSverre,项目名称:GetSimpleCMS,代码行数:17,代码来源:edit.php


注:本文中的get_nonce函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。