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


PHP fRequest::generateCSRFToken方法代码示例

本文整理汇总了PHP中fRequest::generateCSRFToken方法的典型用法代码示例。如果您正苦于以下问题:PHP fRequest::generateCSRFToken方法的具体用法?PHP fRequest::generateCSRFToken怎么用?PHP fRequest::generateCSRFToken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fRequest的用法示例。


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

示例1: User

        $logUser = new User($log->getUserId());
        $userURL = ' by <a href="/members/member.php?id=' . $log->getUserId() . '">' . htmlspecialchars($logUser->getFullName()) . '</a>';
    }
    echo '<li><span class="light-color">' . date('g:ia jS M', $log->getTimestamp()) . '</span> | ' . str_replace('Mailing List', '<a target="_blank" href="' . $project->getMailingListURL() . '">Mailing List</a>', $log->getDetails()) . $userURL . '</li>';
}
?>
</ul>
<?php 
if ($user->getId() != $project->getUserId() || $user->isAdmin()) {
    ?>
<hr/>
<form class="form-inline" role="form" method="post">
	<strong>Update Status</strong><br/>
	<p><small>Status changes are notified to the mailing list (except for archived).</small></p>
	<input type="hidden" name="token" value="<?php 
    echo fRequest::generateCSRFToken();
    ?>
" />
	<select class="form-control" name="state">
		<option value="" disabled selected></option>
		<?php 
    foreach ($states as $state) {
        $newStatus = $state->getName();
        if ($newStatus != $project->getState() && $project->canTransitionStates($project->getState(), $newStatus)) {
            echo '<option value="' . $state->getName() . '" ';
            if ($project->getState() == $state->getName()) {
                echo 'selected';
            }
            echo '>' . $state->getName() . '</option>';
        }
    }
开发者ID:increpare,项目名称:hackspace-foundation-sites,代码行数:31,代码来源:details.php

示例2: if

              <div class="input">             
                  <input id="dashboard-background_color" class="span3" type="text" size="30" name="background_color" value="<?=$dashboard->encodeBackgroundColor(); ?>" />
              </div>
            </div><!-- /clearfix -->            
	    <div class="clearfix">
             <label for="dashboard-refresh_rate">Refresh Rate<em>*</em> (in seconds)</label>
             <div class="input">
               <input id="dashboard-refresh_rate" class="span3" type="text" size="30" name="refresh_rate" value="<?=$dashboard->getRefreshRate(); ?>" />
             </div>
            </div>
            <div class="actions span4">
	      <input class="btn primary" type="submit" value="Save" />
              <input class="btn" type="submit" name="action::delete" value="Delete" />
              <a href="<?=Dashboard::makeUrl('view',$dashboard); ?>" class="btn">View</a>
              <div class="required"><em>*</em> Required field</div>
	      <input type="hidden" name="token" value="<?=fRequest::generateCSRFToken(); ?>" />
              <input type="hidden" name="user_id" value="<?=fSession::get('user_id'); ?>" />
            </div>
         </fieldset>
       </div>       
     </form>
    </div>
    <div class="span10">   
   <? if ($action == 'edit') { ?>
   <p class="info"><a href="<?=Graph::makeURL('add',$dashboard); ?>">Add Graph</a></p>
 <?php
   try {
	$graphs->tossIfEmpty();
	$affected = fMessaging::retrieve('affected', fURL::get());
	?>
    <div>
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:31,代码来源:add_edit_dashboard.php

示例3:

			</style>
			
			
			
			<!-- MAIN CONTAINER -->
			<div id="ja-container" class="wrap ja-r2">
				<div class="main clearfix"><div class="notification success" style="display:none;" >
								Se ha agregado exitosamente. 
							</div>
							<div class="notification errorBox" style="display:none;" >
								Ha ocurrido un error, revise la informaci&oacute;n. 
							</div>
							<br/>
					<form action="../do.php" method="post" id="add">
						<input type="hidden" name="request_token" value="<?php 
echo fRequest::generateCSRFToken(SITE . "do.php");
?>
" />
						
						<input type="hidden" name="whatToDo" value="observatorio_add" />
						
						<table  class="contenttoc" style="float:left">
						
						
						<tr>
								<td><label> Nombre </label></td>
								<td><input type="text" name="title" size="80" /></td>
								
						
							</tr>
							<tr>
开发者ID:nevermind89x,项目名称:Mi-morelia,代码行数:31,代码来源:add.php

示例4: echo

').submit(); return false;">Clone</a>
                                <input type="hidden" name="token" value="<?php 
            echo fRequest::generateCSRFToken("/graphs.php");
            ?>
" />
                            </form> |
                            <div id="form_clone_into_<?php 
            echo (int) $graph->getGraphId();
            ?>
" style="display:none;">
                                <form id="" method="post" action="<?php 
            echo Graph::makeURL('clone_into', $graph);
            ?>
" class="inline no-margin">
                                    <input type="hidden" name="token" value="<?php 
            echo fRequest::generateCSRFToken("/graphs.php");
            ?>
" />
                                    Select destination : 
                                    <select name="dashboard_dest_id">
                                        <?php 
            foreach (Dashboard::findAll() as $dashboard_dest) {
                if ($dashboard_dest->prepareDashboardId() != $graph->prepareDashboardId()) {
                    ?>
                                        <option value="<?php 
                    echo (int) $dashboard_dest->getDashboardId();
                    ?>
"><?php 
                    echo $dashboard_dest->prepareName();
                    ?>
</option>
开发者ID:nagyist,项目名称:Tattle,代码行数:31,代码来源:add_edit_dashboard.php

示例5: echo

            echo Line::makeURL('delete', $line);
            ?>
">Delete</a> |
        <form id="form_clone_<?php 
            echo (int) $line->getLineId();
            ?>
" method="post" action="<?php 
            echo Line::makeURL('clone', $line);
            ?>
" class="inline no-margin">
        	<a href="#" onclick="$('#form_clone_<?php 
            echo (int) $line->getLineId();
            ?>
').submit(); return false;">Clone</a>
        	<input type="hidden" name="token" value="<?php 
            echo fRequest::generateCSRFToken("/lines.php");
            ?>
" />
        </form>
        </td>
         <?php 
            if ($number_of_lines > 1) {
                ?>
	        <td>
	        	<?php 
                if ($index == 0) {
                    ?>
	        		<span class="disabled"><i class="glyphicon glyphicon-arrow-up pointer"></i></span>
	        	<?php 
                } else {
                    ?>
开发者ID:nagyist,项目名称:Tattle,代码行数:31,代码来源:add_edit_graph.php

示例6: if

                 <input id="dashboard-graph_height"  class="span3" type="text" size="30" name="graph_height" value="<?php echo $dashboard->encodeGraphHeight() ?>" />
            </div><!-- /clearfix -->           
            </div>
            <div class="clearfix">
              <label for="dashboard-background_color">Background Color<em>*</em></label>
              <div class="input">             
                  <input id="dashboard-background_color" class="span3" type="text" size="30" name="background_color" value="<?php echo $dashboard->encodeBackgroundColor() ?>" />
              </div>
            </div><!-- /clearfix -->            
	    <div class="actions span4">
	      <input class="btn primary" type="submit" value="Save" />
              <input class="btn" type="submit" name="action::delete" value="Delete" />
              <a href="<?php echo Dashboard::makeUrl('view',$dashboard);?>" class="btn">View</a>
              
              <div class="required"><em>*</em> Required field</div>
	      <input type="hidden" name="token" value="<?php echo fRequest::generateCSRFToken() ?>" />
              <input type="hidden" name="user_id" value="<?php echo fSession::get('user_id'); ?>" />
            </div>
         </fieldset>
       </div>       
     </form>
    </div>
    <div class="span10">   
   <? if ($action == 'edit') { ?>
   <p class="info"><a href="<?php echo Graph::makeURL('add',$dashboard) ?>">Add Graph</a></p>
 <?php
   try {
	$graphs->tossIfEmpty();
	$affected = fMessaging::retrieve('affected', fURL::get());
	?>
    <div>
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:31,代码来源:add_edit_dashboard.php


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