• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getXSRFToken函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: elFinder_tinymce

function elFinder_tinymce($discard)
{
    $file = FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/elFinder/elfinder.php?XSRFToken=' . getXSRFToken('elFinder');
    ?>
	<script type="text/javascript">
		// <!-- <![CDATA[
		function elFinderBrowser(field_name, url, type, win) {
			tinymce.activeEditor.windowManager.open({
				file: '<?php 
    echo $file;
    ?>
', // use an absolute path!
				title: 'elFinder 2.0',
				width: 900,
				height: 450,
				close_previous: 'no',
				inline: 'yes', // This parameter only has an effect if you use the inlinepopups plugin!
				popup_css: false, // Disable TinyMCE's default popup CSS
				resizable: 'yes'
			}, {
				setUrl: function(url) {
					win.document.getElementById(field_name).value = url;
				}
			});
			return false;
		}
		// ]]> -->
	</script>

	<?php 
    return 'elFinderBrowser';
}
开发者ID:rb26,项目名称:zenphoto,代码行数:32,代码来源:elFinder.php


示例2: gettext

echo gettext('Zenphoto License agreement');
?>
</h1>
		<div id="container">
			<p class="notebox">
				<?php 
printf(gettext('This license is in English because the <em>Free Software Foundation</em> does not approve translations as officially valid. Unofficial translations are available <a href="%s">here</a>.'), 'http://www.gnu.org/licenses/old-licenses/gpl-2.0-translations.html');
?>
			</p>
			<?php 
if (!getOption('license_accepted')) {
    $_SESSION['license_return'] = getRequestURI();
    ?>
				<p class="buttons">
					<a href="<?php 
    echo FULLWEBPATH . '/' . ZENFOLDER . '/license.php?licenseAccept&amp;XSRFToken=' . getXSRFToken('ZenphotoLicense');
    ?>
" alt="<?php 
    echo gettext('You must accept this license to continue to use Zenphoto.');
    ?>
"><?php 
    echo gettext('I agree to these terms and conditions');
    ?>
</a>
				</p>
				<br class="clearall" />
				<?php 
}
?>
			<br class="clearall" />
			<div class="tabbox">
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:license.php


示例3: handleSelectorChange

			<script type="text/javascript">
				// <!-- <![CDATA[
				function handleSelectorChange(type) {
					$('#add,#titlelabel,#link_row,#link,#link_label,#visible_row,#show_visible,#span_row').show();
					$('#include_li_label').hide();
					$('#type').val(type);
					$('#link_label').html('<?php 
echo js_encode(gettext('URL'));
?>
');
					$('#titlelabel').html('<?php 
echo js_encode(gettext('Title'));
?>
');
					$('#XSRFToken').val('<?php 
echo getXSRFToken('update_menu');
?>
');
					switch (type) {
						case 'all_items':
							$('#albumselector,#pageselector,#categoryselector,#custompageselector,#titleinput,#titlelabel,#link_row,#visible_row,#span_row').hide();
							$('#selector').html('<?php 
echo js_encode(gettext("All menu items"));
?>
');
							$('#description').html('<?php 
echo js_encode(gettext('This adds menu items for all zenphoto objects. (It creates a "default" menuset.)'));
?>
');
							break;
						case "galleryindex":
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:menu_tab_edit.php


示例4: query

        query($sql);
        $sql = "UPDATE " . prefix('images') . " SET `mtime`=0 {$imagewhere};";
        query($sql);
    }
    if (!empty($folder) && empty($id)) {
        echo "<p> " . sprintf(gettext("<em>%s</em> not found"), $folder) . "</p>";
    } else {
        if (empty($r)) {
            echo "<p>" . $allset . "</p>";
        } else {
            echo "<p>" . sprintf(gettext("We are all set to refresh the metadata for <em>%s</em>"), $r) . "</p>";
        }
        echo '<p>' . gettext('This process should start automatically. If not press: ') . '</p>';
        ?>
				<p><a href="<?php 
        echo $starturl . '&amp;XSRFToken=' . getXSRFToken('refresh');
        ?>
"
							title="<?php 
        echo gettext("Refresh image metadata.");
        ?>
" style="font-size: 15pt; font-weight: bold;">
						<?php 
        echo gettext("Go!");
        ?>
</a>
				</p>
				<?php 
    }
}
echo "\n" . '</div>';
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:admin-refresh-metadata.php


示例5: gettext

										<button type="reset" onclick="$('.copydelete').hide();">
											<img src="<?php 
    echo WEBPATH . '/' . ZENFOLDER;
    ?>
/images/reset.png" alt="" />
											<strong><?php 
    echo gettext("Reset");
    ?>
</strong>
										</button>
										<div class="floatright">
											<strong><a href="admin-edit.php?<?php 
    echo $admintype;
    ?>
&amp;add&amp;XSRFToken=<?php 
    echo getXSRFToken('add');
    ?>
" title="<?php 
    echo $additem;
    ?>
"><img src="<?php 
    echo WEBPATH . '/' . ZENFOLDER;
    ?>
/images/add.png" alt="" /> <?php 
    echo $additem;
    ?>
</a></strong>
											<?php 
    if (!$result->transient) {
        if (is_AdminEditPage("newscategory")) {
            ?>
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:admin-edit.php


示例6: cron_starter

/**
 * Starts a sechedule script run
 * @param string $script The script file to load
 * @param array $params "POST" parameters
 * @param bool $inline set to true to run the task "in-line". Set false run asynchronously
 */
function cron_starter($script, $params, $offsetPath, $inline = false)
{
    global $_zp_authority, $_zp_loggedin, $_zp_current_admin_obj, $_zp_HTML_cache;
    $admin = $_zp_authority->getMasterUser();
    if ($inline) {
        $_zp_current_admin_obj = $admin;
        $_zp_loggedin = $_zp_current_admin_obj->getRights();
        foreach ($params as $key => $value) {
            if ($key == 'XSRFTag') {
                $key = 'XSRFToken';
                $value = getXSRFToken($value);
            }
            $_POST[$key] = $_GET[$key] = $_REQUEST[$key] = $value;
        }
        require_once $script;
    } else {
        $auth = sha1($script . serialize($admin));
        $paramlist = 'link=' . $script;
        foreach ($params as $key => $value) {
            $paramlist .= '&' . $key . '=' . $value;
        }
        $paramlist .= '&auth=' . $auth . '&offsetPath=' . $offsetPath;
        $_zp_HTML_cache->abortHTMLCache();
        ?>
		<script type="text/javascript">
			// <!-- <![CDATA[
			$.ajax({
				type: 'POST',
				cache: false,
				data: '<?php 
        echo $paramlist;
        ?>
',
				url: '<?php 
        echo WEBPATH . '/' . ZENFOLDER;
        ?>
/cron_runner.php'
			});
			// ]]> -->
		</script>
		<?php 
    }
}
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:49,代码来源:functions.php


示例7: sprintf

                    }
                    if ($commentexists_count != 0) {
                        $postinfo .= '<li class="import-exists">' . sprintf(ngettext('%1$u comment already exists.', '%1$u comments already exist.', $commentexists_count), $commentexists_count) . '</li>';
                    }
                    if ($commentcount != 0) {
                        $postinfo .= '<li class="import-success">' . sprintf(ngettext('%1$u comment imported.', '%1$u comments imported.', $commentcount), $commentcount) . '</li>';
                    }
                } else {
                    $postinfo .= '<ul><li class="import-nothing">' . gettext('No comments to import') . '</li>';
                }
                debugLogVar('Wordpress import - Comments for "' . $post['title'] . '" (' . $post['type'] . ')', $comments);
                $postinfo .= '</ul></li>';
                $postcount++;
            }
            // posts foreach
            $metaURL = 'wordpress_import.php?refresh=' . $postcount . '&amp;dbname=' . $wp_dbname . '&amp;dbuser=' . $wp_dbbuser . '&amp;dbpass=' . $wp_dbpassword . '&amp;dbhost=' . $wp_dbhost . '&amp;tableprefix=' . $wp_prefix . '&amp;convertlinefeeds=' . getcheckboxState('convertlinefeeds') . '&amp;XSRFToken=' . getXSRFToken('wordpress');
        } else {
            // if posts are available at all
            $metaURL = '';
            // to be sure...
            $postinfo .= "<li class='import-nothing'>" . gettext("No posts or pages to import.") . "</li>";
        }
    }
    // if db data set
    $zenphoto_tabs['overview']['subtabs'] = array(gettext('Wordpress') => '');
    printAdminHeader('overview', 'wordpress');
    if (!empty($metaURL) && $postcount < $posttotalcount) {
        ?>
		<meta http-equiv="refresh" content="1; url=<?php 
        echo $metaURL;
        ?>
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:wordpress_import.php


示例8: XSRFdefender

/**
 * Checks for Cross Site Request Forgeries
 * @param string $action
 */
function XSRFdefender($action)
{
    $token = getXSRFToken($action);
    if (!isset($_REQUEST['XSRFToken']) || $_REQUEST['XSRFToken'] != $token) {
        zp_apply_filter('admin_XSRF_access', false, $action);
        header("HTTP/1.0 302 Found");
        header("Status: 302 Found");
        header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php?action=external&error&msg=' . sprintf(gettext('“%s” Cross Site Request Forgery blocked.'), $action));
        exitZP();
    }
    unset($_REQUEST['XSRFToken']);
    unset($_POST['XSRFToken']);
    unset($_GET['XSRFToken']);
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:18,代码来源:admin-functions.php


示例9: printItemsListTable

/**
 * Prints the table part of a single page item for the sortable pages list
 *
 * @param object $page The array containing the single page
 * @param bool $flag set to true to flag the element as having a problem with nesting level
 */
function printItemsListTable($item, $flag)
{
    $gallery = new Gallery();
    ?>
 <div class="page-list_row">
	<div class="page-list_title">
			<?php 
    $array = getItemTitleAndURL($item);
    printItemEditLink($item);
    ?>
		</div>
		<div class="page-list_extra"><?php 
    echo html_encode(truncate_string($array['name'], 40, '...'));
    ?>
</div>
		<div class="page-list_extra"><em><?php 
    echo $item['type'];
    ?>
</em></div>
		<div class="page-list_iconwrapper">
		<div class="page-list_icon">
			<?php 
    if ($array['protected']) {
        ?>
				<img src="../../images/lock_2.png" alt="<?php 
        echo gettext("The object of this menu is under password protection");
        ?>
" title="<?php 
        echo gettext("The object of this menu is under password protection");
        ?>
" style="border: 0px;" />
				<?php 
    } else {
        ?>
				<img src="../../images/place_holder_icon.png" alt="<?php 
        echo gettext("under password protection");
        ?>
"style="border: 0px;" />
				<?php 
    }
    ?>
		</div>
		<div class="page-list_icon">
		<?php 
    if ($item['show'] === '1') {
        ?>
			<a href="menu_tab.php?publish&amp;id=<?php 
        echo $item['id'] . "&amp;show=0";
        ?>
&amp;add&amp;XSRFToken=<?php 
        echo getXSRFToken('update_menu');
        ?>
" title="<?php 
        echo gettext('hide');
        ?>
" >
				<img src="../../images/pass.png"	alt="<?php 
        echo gettext('hide');
        ?>
" style="border: 0px;" />
			</a>
			<?php 
    } else {
        ?>
			<a href="menu_tab.php?publish&amp;id=<?php 
        echo $item['id'] . "&amp;show=1";
        ?>
&amp;add&amp;XSRFToken=<?php 
        echo getXSRFToken('update_menu');
        ?>
"  title="<?php 
        echo gettext('show');
        ?>
">
				<img src="../../images/action.png"	alt="<?php 
        echo gettext('show');
        ?>
" style="border: 0px;" />
			</a>
			<?php 
    }
    ?>
	</div>
		<div class="page-list_icon">
			<?php 
    switch ($item['type']) {
        default:
            if (!empty($array['url'])) {
                ?>
						<a href="<?php 
                echo $array['url'];
                ?>
">
							<img src="../../images/view.png" alt="<?php 
//.........这里部分代码省略.........
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:101,代码来源:menu_manager-admin-functions.php


示例10: upload_extra

function upload_extra($uploadlimit, $passedalbum)
{
    global $_zp_current_admin_obj, $upload_extensions;
    ?>
	<script type="text/javascript">
		// <!-- <![CDATA[
		if (FlashDetect.installed) {
			$(document).ready(function() {
				$('#fileUpload').uploadify({
					'uploader': '<?php 
    echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
    ?>
/uploader_flash/uploadify.swf',
					'cancelImg': 'images/fail.png',
					'script': '<?php 
    echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
    ?>
/uploader_flash/uploader.php',
					'scriptData': {
												'auth': '<?php 
    echo $_zp_current_admin_obj->getPass();
    ?>
',
												'id': '<?php 
    echo $_zp_current_admin_obj->getID();
    ?>
',
												'XSRFToken': '<?php 
    echo getXSRFToken('upload');
    ?>
'
												},
					'folder': '/',
					'multi': true,
					<?php 
    $uploadbutton = SERVERPATH . '/' . ZENFOLDER . '/locale/' . getOption('locale') . '/select_files_button.png';
    if (!file_exists($uploadbutton)) {
        $uploadbutton = SERVERPATH . '/' . ZENFOLDER . '/images/select_files_button.png';
    }
    $discard = NULL;
    $info = zp_imageDims($uploadbutton, $discard);
    if ($info['height'] > 60) {
        $info['height'] = round($info['height'] / 3);
        $rollover = "'rollover': true,";
    } else {
        $rollover = "";
    }
    $uploadbutton = str_replace(SERVERPATH, WEBPATH, $uploadbutton);
    ?>
					'buttonImg': '<?php 
    echo $uploadbutton;
    ?>
',
					'height': '<?php 
    echo $info['height'];
    ?>
',
					'width': '<?php 
    echo $info['width'];
    ?>
',
					<?php 
    echo $rollover;
    ?>
					'checkScript': '<?php 
    echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
    ?>
/uploader_flash/check.php',
					'displayData': 'speed',
					'simUploadLimit': 3,
					'sizeLimit': <?php 
    echo $uploadlimit;
    ?>
,
					'onAllComplete':	function(event, data) {
															if (data.errors) {
																return false;
															} else {
															<?php 
    if (zp_loggedin(ALBUM_RIGHTS | MANAGE_ALL_ALBUM_RIGHTS)) {
        ?>
																launchScript('admin-edit.php',['page=edit','subpage=1','tab=imageinfo','album='+encodeURIComponent($('#folderdisplay').val()),'uploaded=1','albumimagesort=id_desc']);
																<?php 
    } else {
        ?>
																launchScript('admin-upload.php',['uploaded=1']);
																<?php 
    }
    ?>
															}
														},
					'fileDesc': '<?php 
    echo gettext('Zenphoto supported file types | all files');
    ?>
',
					'fileExt': '<?php 
    $list = implode(';*.', $upload_extensions);
    echo '*.' . $list . ' | *.*';
    ?>
'
//.........这里部分代码省略.........
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:101,代码来源:upload_form.php


示例11: gettext

</p>

				<?php 
if (!extensionEnabled('downloadList')) {
    echo '<strong>' . gettext('The downloadList plugin is not active') . '</strong>';
} else {
    ?>
					<p class="buttons"><a href="?removeoutdateddownloads&amp;XSRFToken=<?php 
    echo getXSRFToken('removeoutdateddownloads');
    ?>
"><?php 
    echo gettext('Clear outdated downloads from database');
    ?>
</a></p>
					<p class="buttons"><a href="?removealldownloads&amp;XSRFToken=<?php 
    echo getXSRFToken('removealldownloads');
    ?>
"><?php 
    echo gettext('Clear all downloads from database');
    ?>
</a></p><br class="clearall" />
					<br class="clearall" /><br />
					<?php 
    printBarGraph();
}
?>

			</div>
		</div><!-- content -->
		<?php 
printAdminFooter();
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:download_statistics.php


示例12: admin_toolbox_news

    static function admin_toolbox_news($redirect, $zf)
    {
        global $_zp_CMS, $_zp_current_category, $_zp_current_article;
        if (is_NewsArticle()) {
            if (zp_loggedin(ZENPAGE_NEWS_RIGHTS) && $_zp_CMS && $_zp_CMS->news_enabled) {
                // page is a NewsArticle--provide zenpage edit, delete, and Add links
                echo "<li><a href=\"" . $zf . '/' . PLUGIN_FOLDER . "/zenpage/admin-edit.php?newsarticle&amp;edit&amp;titlelink=" . html_encode($_zp_current_article->getTitleLink()) . "&amp;subpage=object\">" . gettext("Edit Article") . "</a></li>";
                if (GALLERY_SESSION) {
                    // XSRF defense requires sessions
                    ?>
					<li>
						<a href="javascript:confirmDelete('<?php 
                    echo $zf . '/' . PLUGIN_FOLDER;
                    ?>
/zenpage/admin-news.php?del=<?php 
                    echo getNewsID();
                    ?>
&amp;XSRFToken=<?php 
                    echo getXSRFToken('delete');
                    ?>
',deleteArticle)"
							 title="<?php 
                    echo gettext("Delete article");
                    ?>
"><?php 
                    echo gettext("Delete Article");
                    ?>
	</a>
					</li>
					<?php 
                }
                echo "<li><a href=\"" . $zf . '/' . PLUGIN_FOLDER . "/zenpage/admin-edit.php?newsarticle&amp;add\">" . gettext("Add Article") . "</a></li>";
            }
            $redirect .= '&amp;title=' . urlencode($_zp_current_article->getTitlelink());
        } else {
            if (!empty($_zp_current_category)) {
                $redirect .= '&amp;category=' . $_zp_current_category->getTitlelink();
            }
        }
        return $redirect;
    }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:41,代码来源:zenpage.php


示例13: zp_apply_filter

zp_apply_filter('admin_note', 'upload', $subtab);
?>
					<h1><?php 
echo $title;
?>
</h1>
					<script type="text/javascript">
						$().ready(function () {
							var elf = $('#elfinder').elfinder({
								lang: '<?php 
echo $locale;
?>
', // language (OPTIONAL)
								customData: {
									'XSRFToken': '<?php 
echo getXSRFToken('elFinder');
?>
',
									'zp_user_auth': '<?php 
echo zp_getCookie('zp_user_auth');
?>
',
<?php 
if ($theme) {
    if (zp_loggedin(THEMES_RIGHTS) && is_dir(SERVERPATH . '/' . THEMEFOLDER . '/' . $theme)) {
        ?>
											'themeEdit': '<?php 
        echo $theme;
        ?>
',
		<?php 
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:filemanager.php


示例14: gettext

            }
            ?>
										</td>
										<td style="border-top: 4px solid #D1DBDF;" valign="top">
										<?php 
            if (!empty($groupname)) {
                $msg = gettext('Are you sure you want to delete this group?');
                ?>
											<a href="javascript:if(confirm(<?php 
                echo "'" . $msg . "'";
                ?>
)) { launchScript('',['action=deletegroup','group=<?php 
                echo addslashes($groupname);
                ?>
','XSRFToken=<?php 
                echo getXSRFToken('deletegroup');
                ?>
']); }"
																title="<?php 
                echo gettext('Delete this group.');
                ?>
" style="color: #c33;">
												<img src="../../images/fail.png" style="border: 0px;" alt="Delete" />
											</a>
											<?php 
            }
            ?>
										</td>
									</tr>
									<?php 
            $id++;
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:user_groups-tab.php


示例15: gettext

";
	var deleteAlbum2 = "<?php 
echo gettext("Are you Absolutely Positively sure you want to delete the album? THIS CANNOT BE UNDONE!");
?>
";
	function newAlbum(folder,albumtab) {
		var album = prompt('<?php 
echo gettext('New album name?');
?>
', '<?php 
echo gettext('new album');
?>
');
		if (album) {
			launchScript('',['action=newalbum','album='+folder,'name='+encodeURIComponent(album),'albumtab='+albumtab,'XSRFToken=<?php 
echo getXSRFToken('newalbum');
?>
']);
		}
	}
	function confirmAction() {
		if ($('#checkallaction').val() == 'deleteall') {
			return confirm('<?php 
echo js_encode(gettext("Are you sure you want to delete the checked items?"));
?>
');
		} else {
			return true;
		}
	}
	// ]]> -->
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:admin-edit.php


示例16: albumbutton

 static function albumbutton($html, $object, $prefix)
 {
     $html .= '<hr />';
     if (query_single_row('SELECT * FROM ' . prefix('plugin_storage') . ' WHERE `type`="cacheManager" LIMIT 1')) {
         $disable = '';
         $title = gettext('Finds images that have not been cached and creates the cached versions.');
     } else {
         $disable = ' disabled="disabled"';
         $title = gettext("You must first set the plugin options for cached image parameters.");
     }
     $html .= '<div class="button buttons tooltip" title="' . $title . '"><a href="' . WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/cacheManager/cacheImages.php?album=' . html_encode($object->name) . '&amp;XSRFToken=' . getXSRFToken('cacheImages') . '"' . $disable . '><img src="images/cache.png" />' . gettext('Cache album images') . '</a><br class="clearall" /></div>';
     return $html;
 }
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:13,代码来源:cacheManager.php


示例17: printPublishIconLink

/**
 * Prints the publish/un-published/scheduled publishing icon with a link for the pages and news articles list.
 *
 * @param string $object Object of the page or news article to check
 * @return string
 */
function printPublishIconLink($object, $type)
{
    $urladd1 = "";
    $urladd2 = "";
    $urladd3 = "";
    if ($type == "news") {
        if (isset($_GET['page'])) {
            $urladd1 = "&amp;page=" . $_GET['page'];
        }
        if (isset($_GET['date'])) {
            $urladd2 = "&amp;date=" . $_GET['date'];
        }
        if (isset($_GET['category'])) {
            $urladd3 = "&amp;category=" . $_GET['category'];
        }
    }
    if ($object->getDateTime() > date('Y-m-d H:i:s')) {
        if ($object->getShow()) {
            $title = gettext("Publish immediately (skip scheduling)");
            ?>
			<a href="?skipscheduling=1&amp;titlelink=<?php 
            echo html_encode($object->getTitlelink()) . $urladd1 . $urladd2 . $urladd3;
            ?>
&amp;XSRFToken=<?php 
            echo getXSRFToken('update');
            ?>
" title="<?php 
            echo $title;
            ?>
">
			<img src="images/clock.png" alt="<?php 
            gettext("Scheduled for published");
            ?>
" title="<?php 
            echo $title;
            ?>
" /></a>
			<?php 
        } else {
            $title = gettext("Enable scheduled publishing");
            ?>
			<a href="?publish=1&amp;titlelink=<?php 
            echo html_encode($object->getTitlelink()) . $urladd1 . $urladd2 . $urladd3;
            ?>
&amp;XSRFToken=<?php 
            echo getXSRFToken('update');
            ?>
" title="<?php 
            echo $title;
            ?>
">
			<img src="../../images/action.png" alt="<?php 
            echo gettext("Un-published");
            ?>
" title="<?php 
            echo $title;
            ?>
" /></a>
			<?php 
        }
    } else {
        if ($object->getShow()) {
            $title = gettext("Un-publish");
            ?>
			<a href="?publish=0&amp;titlelink=<?php 
            echo html_encode($object->getTitlelink()) . $urladd1 . $urladd2 . $urladd3;
            ?>
&amp;XSRFToken=<?php 
            echo getXSRFToken('update');
            ?>
" title="<?php 
            echo $title;
            ?>
">
			<img src="../../images/pass.png" alt="<?php 
            echo gettext("Published");
            ?>
" title="<?php 
            echo $title;
            ?>
" /></a>
			<?php 
        } else {
            $dt = $object->getExpireDate();
            if (empty($dt)) {
                $title = gettext("Publish");
                ?>
				<a href="?publish=1&amp;titlelink=<?php 
                echo html_encode($object->getTitlelink()) . $urladd1 . $urladd2 . $urladd3;
                ?>
&amp;XSRFToken=<?php 
                echo getXSRFToken('update');
                ?>
">
//.........这里部分代码省略.........
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:101,代码来源:zenpage-admin-functions.php


示例18: define

<?php

/**
 * This template is used to generate cache images. Running it will process the entire gallery,
 * supplying an album name (ex: loadAlbums.php?album=newalbum) will only process the album named.
 * Passing clear=on will purge the designated cache before generating cache images
 * @package plugins
 */
// force UTF-8 Ø
define('OFFSET_PATH', 3);
require_once "../../admin-globals.php";
require_once SERVERPATH . '/' . ZENFOLDER . '/template-functions.php';
require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/cacheManager/functions.php';
admin_securityChecks(NULL, $return = currentRelativeURL());
XSRFdefender('cacheDBImages');
$zenphoto_tabs['overview']['subtabs'] = array(gettext('Cache images') => PLUGIN_FOLDER . '/cacheManager/cacheImages.php?page=overview&tab=images', gettext('Cache stored images') => PLUGIN_FOLDER . '/cacheManager/cacheDBImages.php?page=overview&tab=DB&XSRFToken=' . getXSRFToken('cacheDBImages'));
printAdminHeader('overview', 'DB');
echo "\n</head>";
echo "\n<body>";
printLogoAndLinks();
echo "\n" . '<div id="main">';
printTabs();
echo "\n" . '<div id="content">';
printSubtabs('Cache');
?>
<div class="tabbox">
	<?php 
zp_apply_filter('admin_note', 'cache', '');
?>
	<p class="notebox">
		<?php 
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:cacheDBImages.php


示例19: getXSRFToken

            echo $count;
            ?>
</div>
									</td>
								</tr>
								<?php 
        }
        ?>
						</table>
						<?php 
    }
    if (zp_loggedin(ADMIN_RIGHTS)) {
        ?>
						<p class="buttons">
							<a href="?reset&amp;XSRFToken=<?php 
        echo getXSRFToken('search_statistics');
        ?>
"><?php 
        echo gettext('reset');
        ?>
</a>
						</p>
						<br class="clearall" />
						<p>
							<a href="<?php 
        echo WEBPATH . '/' . ZENFOLDER;
        ?>
/admin-options.php?tab=plugin&amp;show-search_statistics#search_statistics" ><?php 
        echo gettext('Change <em>Threshold</em> values');
        ?>
</a>
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:search_analysis.php


示例20: printItemsListTable

/**
 * Prints the table part of a single page item for the sortable pages list
 *
 * @param object $page The array containing the single page
 * @param bool $flag set to true to flag the element as having a problem with nesting level
 */
function printItemsListTable($item, $flag)
{
    global $_zp_gallery;
    $array = getItemTitleAndURL($item);
    if ($array['valid']) {
        switch ($item['type']) {
            case "album":
                $link = '<a href="../../admin-edit.php?page=edit&amp;album=' . html_encode($item['link']) . '">' . html_encode(truncate_string($item['link'], 40, '...')) . '</a>';
                break;
            case "zenpagenewsindex":
                if (!class_exists('zenpage')) {
                    $link = '<span class="notebox">' . gettext('Zenpage CMS plugin required for this item type!') . '</span>';
                }
                break;
            case "zenpagepage":
                if (class_exists('zenpage')) {
                    $link = '<a href="../zenpage/admin-edit.php?page&amp;titlelink=' . html_encode($item['link']) . '">' . html_encode(truncate_string($item['link'], 40, '...')) . '</a>';
                } else {
                    $link = '<span class="notebox">' . gettext('Zenpage CMS plugin required for this item type!') . '</span>';
                }
                break;
            case "zenpagecategory":
                if (class_exists('zenpage')) {
                    $link = '<a href="../zenpage/admin-edit.php?newscategory&amp;titlelink=' . html_encode($item['link']) . '">' . html_encode(truncate_string($item['link'], 40, '...')) . '</a>';
                } else {
                    $link = '<span class="notebox">' . gettext('Zenpage CMS plugin required for this item type!') . '</span>';
                }
                break;
            case 'customlink':
                $link = '<a href="' . html_encode($item['link']) . '">' . html_encode(truncate_string($item['link'], 40, '...')) . '</a>';
                break;
            case 'menulabel':
                $link = '';
                break;
            default:
                $link = html_encode(truncate_string($item['link'], 40, '...'));
                break;
        }
    } else {
        $link = '<span class="notebox">' . sprintf(gettext('Target does not exists in <em>%1$s</em> theme'), $array['theme']) . '</span>';
    }
    ?>
	<div class="page-list_row">
		<div class="page-list_title">
			<?php 
    printItemEditLink($item);
    ?>
		</div>
		<div class="page-list_extra">
			<em><?php 
    echo $item['type'];
    ?>
</em>
		</div>
		<div class="page-list_extra">
			<?php 
    echo $link;
    ?>
		</div>
		<div class="page-list_iconwrapper">
			<div class="page-list_icon">
				<?php 
    if ($array['protected']) {
        ?>
					<img src="../../images/lock_2.png" alt="<?php 
        echo gettext("The object of this menu is under password protection");
        ?>
" title="<?php 
        echo gettext("The object of this menu is under password protection");
        ?>
" style="border: 0px;" />
					<?php 
    } else {
        ?>
					<img src="../../images/place_holder_icon.png" alt="<?php 
        echo gettext("under password protection");
        ?>
" style="border: 0px;" />
					<?php 
    }
    ?>
			</div>
			<div class="page-list_icon">
				<?php 
    if ($item['show'] === '1') {
        ?>
					<a href="menu_tab.php?publish&amp;id=<?php 
        echo $item['id'] . "&amp;show=0";
        ?>
&amp;add&amp;XSRFToken=<?php 
        echo getXSRFToken('update_menu');
        ?>
" title="<?php 
        echo gettext('hide');
//.........这里部分代码省略.........
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:101,代码来源:menu_manager-admin-functions.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getYear函数代码示例发布时间:2022-05-15
下一篇:
PHP getXMLWriter函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap