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


PHP XSRFToken函数代码示例

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


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

示例1: gettext

?>
		<a href="http://www.zenphoto.org/news/category/extensions" alt="Zenphoto extensions section"> <?php 
echo gettext('Find more plugins');
?>
</a>
	</p>
	<p class='notebox'><?php 
echo gettext("<strong>Note:</strong> Support for a particular plugin may be theme dependent! You may need to add the plugin theme functions if the theme does not currently provide support.");
?>
	</p>
	<form class="dirty-check" id="form_plugins" action="?action=saveplugins&amp;page=plugins&amp;tab=<?php 
echo html_encode($subtab);
?>
" method="post" autocomplete="off">
		<?php 
XSRFToken('saveplugins');
?>
		<input type="hidden" name="saveplugins" value="yes" />
		<input type="hidden" name="subpage" value="<?php 
echo $subpage;
?>
" />
		<p class="buttons">
			<button type="submit" value="<?php 
echo gettext('Apply');
?>
"><img src="images/pass.png" alt="" /><strong><?php 
echo gettext("Apply");
?>
</strong></button>
			<button type="reset" value="<?php 
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:admin-plugins.php

示例2: zp_apply_filter

    ?>
						</form>

					</div>
					<!-- end of tab_plugin div -->
					<?php 
}
if ($subtab == 'security' && zp_loggedin(ADMIN_RIGHTS)) {
    ?>
					<div id="tab_security" class="tabbox">
						<?php 
    zp_apply_filter('admin_note', 'options', $subtab);
    ?>
						<form class="dirty-check" id="form_options" action="?action=saveoptions" method="post" autocomplete="off">
							<?php 
    XSRFToken('saveoptions');
    ?>
							<input type="hidden" name="savesecurityoptions" value="yes" />
							<table class="options">
								<tr>
									<td colspan="3">
										<p class="buttons">
											<button type="submit" value="<?php 
    echo gettext('save');
    ?>
"><img src="images/pass.png" alt="" /><strong><?php 
    echo gettext("Apply");
    ?>
</strong></button>
											<button type="reset" value="<?php 
    echo gettext('reset');
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:31,代码来源:admin-options.php

示例3: zp_apply_filter

			<div id="tab_users" class="tabbox">
				<?php 
zp_apply_filter('admin_note', 'users', $subtab);
$groups = array();
$subscription = 86400 * getOption('user_expiry_interval');
$now = time();
$warnInterval = $now + getOption('user_expiry_warn_interval') * 86400;
?>
				<p>
				<?php 
echo gettext("Manage user expiry.");
?>
				</p>
				<form action="?action=expiry" method="post" autocomplete="off" >
					<?php 
XSRFToken('expiry');
?>
					<span class="buttons">
						<button type="submit" title="<?php 
echo gettext("Apply");
?>
"><img src="../../images/pass.png" alt="" /><strong><?php 
echo gettext("Apply");
?>
</strong></button>
						<button type="reset" title="<?php 
echo gettext("Reset");
?>
"><img src="../../images/reset.png" alt="" /><strong><?php 
echo gettext("Reset");
?>
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:user-expiry-tab.php

示例4: gettext

            echo ' style="display:none"';
        }
        ?>
>
								<form class="dirty-check" name="publish_pages" action="" method="post"><?php 
        echo gettext('Pages:');
        ?>
									<label id="autocheck_page">
										<input type="checkbox" name="checkAllpage" onclick="$('.pagecheck').prop('checked', checked);" />
										<span id="autotext_page"><?php 
        echo gettext('all');
        ?>
</span>
									</label>
									<?php 
        XSRFToken('publishContent');
        ?>
									<input type="hidden" name="publish" value="pages" />
									<ul class="schedulealbumchecklist">
										<?php 
        echo $output;
        ?>
									</ul>
									<br class="clearall" />
									<div class="buttons pad_button">
										<button class="tooltip" type="submit" title="<?php 
        echo gettext("Publish waiting pages.");
        ?>
">
											<img src="<?php 
        echo WEBPATH . '/' . ZENFOLDER;
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:31,代码来源:publishContent.php

示例5: foreach

    foreach ($owners[THEMEFOLDER] as $theme => $v) {
        if (is_array($v)) {
            $owners[THEMEFOLDER][] = $theme;
            unset($owners[THEMEFOLDER][$theme]);
        }
    }
    $owners[THEMEFOLDER] = array_unique($owners[THEMEFOLDER]);
    natcasesort($owners[THEMEFOLDER]);
}
if (empty($owners)) {
    echo gettext('No option owners have been located.');
} else {
    ?>
						<form class="dirtylistening" onReset="setClean('purge_options_form');" id="purge_options_form" action="?page=options&tab=purge" method="post" >
							<?php 
    XSRFToken('purgeOptions');
    ?>
							<input type="hidden" name="purge" value="1" />.
							<p class = "buttons" >
								<button type="submit" value="<?php 
    echo gettext('Apply');
    ?>
"> <img src="<?php 
    echo WEBPATH . '/' . ZENFOLDER;
    ?>
/images/pass.png" alt="" /> <strong><?php 
    echo gettext("Apply");
    ?>
 </strong></button >
								<button type="" "reset" value="<?php 
    echo gettext('reset');
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:purgeOptions_tab.php

示例6: gettext

?>
</p>
						</div>
					</td>

					<td valign='top'>
						<h2 class="h2_bordered_edit"><?php 
echo gettext("New tags");
?>
</h2>
						<form class="dirtylistening" onReset="setClean('form_newtags');"  name="new_tags" id="form_newtags" action="?newtags=true&amp;tagsort=<?php 
echo html_encode($tagsort);
?>
" method="post" autocomplete="off" >
							<?php 
XSRFToken('new_tags');
?>
							<div class="box-tags-unpadded">
								<ul class="tagnewlist">
									<?php 
for ($i = 0; $i < 40; $i++) {
    ?>
										<li>
											<input id="new_tag_<?php 
    echo $i;
    ?>
" name="new_tag_<?php 
    echo $i;
    ?>
" type="text" size='33'/>
										</li>
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:admin-tags.php

示例7: zp_apply_filter

zp_apply_filter('admin_note', 'categories', $subtab);
foreach ($reports as $report) {
    echo $report;
}
?>
			<h1>
			<?php 
echo gettext('Categories');
?>
<span class="zenpagestats"><?php 
printCategoriesStatistic();
?>
</span></h1>
			<form action="admin-categories.php?page=news&amp;tab=categories" method="post" id="checkeditems" name="checkeditems" onsubmit="return confirmAction();">
				<?php 
XSRFToken('checkeditems');
?>
				<input	type="hidden" name="action" id="action" value="checkeditems" />
				<input name="processcheckeditems" type="hidden" value="apply" />
				<p class="buttons">
					<button class="serialize" type="submit" title="<?php 
echo gettext('Apply');
?>
">
						<img src="../../images/pass.png" alt="" /><strong><?php 
echo gettext('Apply');
?>
</strong>
					</button>
					<?php 
if (zp_loggedin(MANAGE_ALL_NEWS_RIGHTS)) {
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:admin-categories.php

示例8: foreach

}
$subalbums = $search->getAlbums(0);
foreach ($subalbums as $folder) {
    getSubalbumImages($folder);
}
$albumname = sanitize_path($albumname);
$albumname = seoFriendly($albumname);
$old = '';
while ($old != $albumname) {
    $old = $albumname;
    $albumname = str_replace('--', '-', $albumname);
}
?>
<form class="dirty-check" action="?savealbum" method="post" autocomplete="off">
	<?php 
XSRFToken('savealbum');
?>
	<input type="hidden" name="savealbum" value="yes" />
	<table>
		<tr>
			<td><?php 
echo gettext("Album name:");
?>
</td>
			<td>
				<input type="text" size="40" name="album" value="<?php 
echo html_encode($albumname);
?>
" />
			</td>
		</tr>
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:admin-dynamic-album.php

示例9: checkCoords

?>
px; height: <?php 
echo $sizedheight;
?>
px; margin-bottom: 10px; border: 4px solid gray;">
						<!-- This is the image we're attaching Jcrop to -->
						<img src="<?php 
echo $imageurl;
?>
" id="cropbox" />
					</div>

					<!-- This is the form that our event handler fills -->
					<form class="dirty-check" name="crop" id="crop" action="?crop" onsubmit="return checkCoords();">
						<?php 
XSRFToken('thumb_crop');
?>
						<input type="hidden" size="4" id="x" name="x" value="<?php 
echo $iX;
?>
" />
						<input type="hidden" size="4" id="y" name="y" value="<?php 
echo $iY;
?>
" />
						<input type="hidden" size="4" id="x2" name="x2" value="<?php 
echo $iX + $iW;
?>
" />
						<input type="hidden" size="4" id="y2" name="y2" value="<?php 
echo $iY + $iH;
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:31,代码来源:admin-thumbcrop.php

示例10: printSubtabs

?>
		<div id="content">
			<?php 
printSubtabs();
?>
			<div id="tab_deprecated" class="tabbox">
				<h1><?php 
echo gettext("Locate calls on deprecated functions.");
?>
</h1>
				<?php 
zp_apply_filter('admin_note', 'development', '');
?>
				<form action="?action=search" method="post">
					<?php 
XSRFToken('deprecated');
?>
					<select name="target">
						<option value=1<?php 
if ($selected <= 1) {
    echo ' selected="selected"';
}
?>
>
							<?php 
echo gettext('In Themes');
?>
						</option>
						<option value=2<?php 
if ($selected == 2) {
    echo ' selected="selected"';
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:check_for_deprecated.php

示例11: gettext

/, 'title="<?php 
echo gettext('Show');
?>
"');
				$('#' + theme + '_list').hide();
			}
			$('#' + theme + '_arrow').html(html);
		}
		//]]> -->
	</script>
	<form class="dirty-check" name="size_selections" action="?select&album=<?php 
echo $alb;
?>
" method="post">
		<?php 
XSRFToken('cacheImages');
?>
		<ol class="no_bullets">
			<?php 
if (getOption('cache_full_image') && (!is_array($enabled) || in_array('*', $enabled))) {
    if (is_array($enabled)) {
        unset($enabled[array_search('*', $enabled)]);
        $checked = ' checked="checked" disabled="disabled"';
    } else {
        $checked = '';
    }
    $cachesizes++;
    ?>
				<li>
					<?php 
    if (!is_array($enabled)) {
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:31,代码来源:cacheImages.php

示例12: adminPageNav

<?php 
    if ($totalpages > 1) {
        ?>
	<div align="center">
	<?php 
        adminPageNav($pagenum, $totalpages, 'admin-comments.php', $fulltexturl);
        ?>
	</div>
	<?php 
    }
    ?>

<form name="comments" action="?action=deletecomments" method="post"	onsubmit="return confirmAction();">
	<?php 
    XSRFToken('deletecomment');
    ?>
<input type="hidden" name="subpage" value="<?php 
    echo html_encode($pagenum);
    ?>
" />
<p class="buttons"><button type="submit" title="<?php 
    echo gettext("Apply");
    ?>
"><img src="images/pass.png" alt="" /><strong><?php 
    echo gettext("Apply");
    ?>
</strong></button></p>
<p class="buttons">
<?php 
    if (!$fulltext) {
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:30,代码来源:admin-comments.php

示例13: array

    case 'assignments':
        $groups = array();
        foreach ($adminordered as $user) {
            if (!$user['valid'] && $user['name'] == 'group') {
                $groups[] = $user;
            }
        }
        ?>
						<p>
							<?php 
        echo gettext("Assign users to groups.");
        ?>
						</p>
						<form action="?action=saveauserassignments" method="post" autocomplete="off" >
							<?php 
        XSRFToken('saveauserassignments');
        ?>
							<p class="buttons">
							<button type="submit" title="<?php 
        echo gettext("Apply");
        ?>
"><img src="../../images/pass.png" alt="" /><strong><?php 
        echo gettext("Apply");
        ?>
</strong></button>
							<button type="reset" title="<?php 
        echo gettext("Reset");
        ?>
"><img src="../../images/reset.png" alt="" /><strong><?php 
        echo gettext("Reset");
        ?>
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:user_groups-tab.php

示例14: upload_form

function upload_form($uploadlimit)
{
    global $upload_extensions, $_zp_current_admin_obj;
    $navigator_user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
    if (strpos($navigator_user_agent, 'opera') !== false && strpos($navigator_user_agent, 'windows') !== false) {
        // Opera: Windows
        $sel = 0;
    } else {
        if (strpos($navigator_user_agent, 'applewebki') !== false && strpos($navigator_user_agent, 'windows') !== false) {
            // Safari: Windows
            $sel = 1;
        } else {
            if (strpos($navigator_user_agent, 'msie') !== false) {
                // Internet Explorer
                $sel = 0;
            } else {
                //	fully compliant browser
                $sel = 3;
            }
        }
    }
    switch ($sel) {
        case 0:
            //	no drag, no multiple select
            $usage = gettext('Click on the <em>Select files</em> button to use the file browser to select each file.');
            break;
        case 1:
            //	drag but no multiple select
            $usage = gettext('You may choose a file by dragging it onto <em>Select files</em> button. Or you can click on the button and use your file browser.');
            break;
        case 2:
            //	no drag, but multiple select
            $useage = gettext('Click on the <em>Select files</em> button to use the file browser to select files.');
            break;
        case 3:
            //	drag and multiple select
            $usage = gettext('You may choose files by dragging them onto <em>Select files</em> button. Or you can click on the button and use your file browser.');
            break;
    }
    ?>

	<form id="file_upload" action="uploader.php" method="POST" enctype="multipart/form-data">
    <input type="file" name="file" multiple />
    <button>Upload</button>
    <div><?php 
    echo gettext("Select files");
    ?>
</div>
		<?php 
    XSRFToken('upload');
    ?>
		<input type="hidden" name="auth" id="auth" value="<?php 
    echo $_zp_current_admin_obj->getPass();
    ?>
" />
		<input type="hidden" name="id" id="id" value="<?php 
    echo $_zp_current_admin_obj->getID();
    ?>
" />
		<input type="hidden" name="http_publishalbum" id="http_publishalbum" value="1" />
		<input type="hidden" name="http_albumtitle" id="http_albumtitle" value="" />
		<input type="hidden" name="http_folder" id="http_folder" value="/" />
	</form>
	<table id="files"></table>
	<p class="buttons" id="fileUploadbuttons" style="display: none;">
		<button id="start_uploads"><img src="images/pass.png" alt="" /><?php 
    echo gettext("Upload");
    ?>
</button>
		<button id="cancel_uploads" ><img src="images/fail.png" alt="" /><?php 
    echo gettext("Cancel");
    ?>
</button>
	</p>
	<br clear="all">
	<script type="text/javascript">
		var filecount = 0;
		var beforesendcount = 0;
		var uploadcount = 0;
		var uploaderror = false;

		$('#start_uploads').click(function () {
			$('#http_publishalbum').val($('#publishalbum').val());
			$('#http_albumtitle').val($('#albumtitle').val());
			$('#http_folder').val($('#folderdisplay').val());
			$('.file_upload_start button').click();
		});

		$('#cancel_uploads').click(function () {
			$('.file_upload_cancel button').click();
			filecount = 0;
			beforesendcount = 0;
			uploadcount = 0;
			uploaderror = false;
			$('#files').html('');
		});
		$(function () {
		    $('#file_upload').fileUploadUI({
						url: '<?php 
    echo WEBPATH . '/' . ZENFOLDER . '/' . basename(dirname(__FILE__));
//.........这里部分代码省略.........
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:101,代码来源:upload_form.php

示例15: foreach

</h2>
		<div id="overview-maint_l">
		<?php 
        foreach ($buttonlist as $button) {
            $button_icon = $button['icon'];
            ?>
			<form name="<?php 
            echo $button['formname'];
            ?>
"	action="<?php 
            echo $button['action'];
            ?>
">
				<?php 
            if (isset($button['XSRFTag']) && $button['XSRFTag']) {
                XSRFToken($button['XSRFTag']);
            }
            ?>
				<?php 
            echo $button['hidden'];
            ?>
				<div class="buttons">
					<button class="tooltip" type="submit"	title="<?php 
            echo $button['title'];
            ?>
" <?php 
            if (!$button['enable']) {
                echo 'disabled="disabled"';
            }
            ?>
>
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:admin.php


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