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


PHP SendPress_Data::nonce_field方法代码示例

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


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

示例1: html

    function html($sp)
    {
        global $sendpress_html_templates;
        //print_r($sendpress_html_templates[$_GET['templateID']]);
        $postdata = get_post($_GET['templateID']);
        //print_r( $postdata );
        ?>
    <form method="post" name="post" >
    <input type="hidden" value="<?php 
        echo $_GET['templateID'];
        ?>
" name="templateID" />
     
   	<div class="pull-right">
     <a href="<?php 
        echo SendPress_Admin::link('Emails_Tempstyle', array('templateID' => $_GET['templateID']));
        ?>
"><?php 
        _e('Back to Template', 'sendpress');
        ?>
</a>&nbsp;&nbsp;&nbsp;<button class="btn btn-primary " type="submit" value="save" name="submit"><i class="icon-white icon-ok"></i> <?php 
        echo __('Save', 'sendpress');
        ?>
</button>
   	</div>
   <h2><?php 
        echo $postdata->post_title;
        ?>
 <?php 
        _e('Template Footer', 'sendpress');
        ?>
</h2><br>
     <div class="tab-pane fade in active" id="home"><?php 
        wp_editor(get_post_meta($postdata->ID, '_footer_content', true), 'footer-content');
        ?>
</div>

		<?php 
        SendPress_Data::nonce_field();
        ?>
     </form><br><br><?php 
        _e('Default Content', 'sendpress');
        ?>
<textarea class="form-control" rows="3">
<?php 
        echo SendPress_Tag_Footer_Content::content();
        ?>
</textarea>
<br>



<?php 
        echo spnl_get_emails_tags_list();
        $this->popup();
        ?>


<?php 
    }
开发者ID:anirut,项目名称:sendpress,代码行数:60,代码来源:class-sendpress-view-emails-footer.php

示例2: html

    function html($sp)
    {
        global $post_ID, $post;
        $view = isset($_GET['view']) ? $_GET['view'] : '';
        if (isset($_GET['emailID'])) {
            $emailID = SPNL()->validate->int($_GET['emailID']);
            $post = get_post($emailID);
            $post_ID = $post->ID;
        }
        ?>
<form method="post">
<input type="hidden" id="post_ID" name="post_ID" value="<?php 
        echo $post->ID;
        ?>
" />
<h2><?php 
        _e('Cancel Scheduled Email', 'sendpress');
        ?>
</h2>
<div class='well'>
    <?php 
        $info = get_post_meta($post->ID, '_send_time', true);
        ?>
   <p><?php 
        _e('Subject', 'sendpress');
        ?>
: <?php 
        echo $post->post_title;
        ?>
</p>
   <p><?php 
        _e('Date', 'sendpress');
        ?>
: <?php 
        echo date_i18n('Y/m/d @ h:i A', strtotime($info));
        ?>
</p>
    <?php 
        SendPress_Data::nonce_field();
        ?>
    <button class="btn" value="cancel" name="submit"><?php 
        _e('Cancel', 'sendpress');
        ?>
</button>
    <button class="btn btn-danger" value="delete" name="submit"><?php 
        _e('Delete Scheduled Email', 'sendpress');
        ?>
</button>
</div>
</form>
		<?php 
    }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:52,代码来源:class-sendpress-view-emails-send-cancel.php

示例3: html

    function html($sp)
    {
        global $sendpress_html_templates;
        //print_r($sendpress_html_templates[$_GET['templateID']]);
        $templateID = SPNL()->validate->int($_GET['templateID']);
        $postdata = get_post($templateID);
        //print_r( $postdata );
        ?>
    <form method="post" name="post" >
    <input type="hidden" value="<?php 
        echo $templateID;
        ?>
" name="templateID" />
     
   	<div class="pull-right">
     <a href="<?php 
        echo SendPress_Admin::link('Emails_Tempstyle', array('templateID' => $templateID));
        ?>
"><?php 
        _e('Back to Template', 'sendpress');
        ?>
</a>&nbsp;&nbsp;&nbsp;<button class="btn btn-primary " type="submit" value="save" name="submit"><i class="icon-white icon-ok"></i> <?php 
        echo __('Save', 'sendpress');
        ?>
</button>
   	</div>
   <h2><?php 
        echo $postdata->post_title;
        ?>
 <?php 
        _e('Template Page Header', 'sendpress');
        ?>
</h2><br>
     <div class="tab-pane fade in active" id="home"><?php 
        wp_editor(get_post_meta($postdata->ID, '_header_page', true), 'header-content');
        ?>
</div>

		<?php 
        SendPress_Data::nonce_field();
        ?>
     </form>

<?php 
        $this->popup();
    }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:46,代码来源:class-sendpress-view-emails-headerpage.php

示例4: html


//.........这里部分代码省略.........
        ?>
</h2>
	</div>
	<!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->
	<form method="post" enctype="multipart/form-data" accept-charset="utf-8" >
		<?php 
        $row = 1;
        $header = array();
        $file = trim(SendPress_Data::read_file_to_str(get_post_meta($list_id_clean, 'csv_import', true)));
        $subscribers = SendPress_Data::csv_to_array($file);
        $total = count($subscribers);
        ?>
    <?php 
        _e('We found', 'sendpress');
        ?>
 <?php 
        echo $total;
        ?>
 <?php 
        _e('lines in your csv', 'sendpress');
        ?>
.
    <table cellspacing="0" class="table  table-bordered table-striped table-condensed" >
                    <thead>
                        <tr class="thead">
                            <th><?php 
        _e('Import Fields:', 'sendpress');
        ?>
</th>
                            <?php 
        $columns = array("noimport" => __("Don't Import", 'sendpress'), 'email' => __('Email', 'sendpress'), 'firstname' => __('First name', 'sendpress'), 'lastname' => __('Last name', 'sendpress'), 'ip' => __('IP address', 'sendpress'), 'status' => __('Status', 'sendpress'));
        $i = 0;
        $emailcolumnmatched = false;
        //print_r($subscribers);
        foreach ($subscribers[0] as $key => $val) {
            /* try to automatically match columns */
            $selected = "";
            $value = str_replace(array(" ", "-", "_"), "", strtolower($val));
            echo "<th>" . $this->dropdown($value, $i) . "</th>";
            $i++;
        }
        ?>
                        </tr>
                    </thead>
<?php 
        $placeholder = false;
        if ($total > 5) {
            $loop = 4;
            $placeholder = true;
        } else {
            $loop = 5;
        }
        for ($i = 0; $i < $loop; $i++) {
            $line = '<tr>';
            $line .= "<td>{$i}</td>";
            $cols = 0;
            foreach ($subscribers[$i] as $key => $value) {
                $cols++;
                $line .= "<td>{$value}</td>";
            }
            $line .= "</tr>";
            echo $line;
        }
        if ($placeholder == true) {
            echo "<tr>";
            for ($i = 0; $i <= $cols; $i++) {
                echo "<td>...</td>";
            }
            echo "</tr>";
            $last = end($subscribers);
            if (empty($last[0])) {
                $total--;
                $last = prev($subscribers);
                if (empty($last[0])) {
                    $total--;
                    $last = prev($subscribers);
                }
            }
            $line = '<tr>';
            $line .= "<td>{$total}</td>";
            foreach ($last as $key => $value) {
                $line .= "<td>{$value}</td>";
            }
            $line .= "</tr>";
            echo $line;
        }
        ?>
 	</table>
 <button type="submit" class="btn btn-primary"><?php 
        _e('Start Import', 'sendpress');
        ?>
</button>
    
<?php 
        SendPress_Data::nonce_field();
        ?>
	   </form>

<?php 
    }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:101,代码来源:class-sendpress-view-subscribers-csvprep.php

示例5: html

    function html($sp)
    {
        ?>
  <?php 
        if (SendPress_Option::get('import_error', false) == true) {
            ?>
	<div class="alert alert-danger">
  <?php 
            _e('We had a problem saving your upload', 'sendpress');
            ?>
.
  </div>
  <?php 
        }
        ?>
  <div id="taskbar" class="lists-dashboard rounded group"> 
	<h2><?php 
        _e('Import CSV to ', 'sendpress');
        echo get_the_title($_GET['listID']);
        ?>
</h2>
	</div>
<div class="boxer">
	<div class="boxer-inner">
	<!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->
	<form method="post" enctype="multipart/form-data" accept-charset="utf-8" >
		<!-- For plugins, we also need to ensure that the form posts back to our current page -->
	    <input type="hidden" name="listID" value="<?php 
        echo SPNL()->validate->int($_GET['listID']);
        ?>
" />
	   	<table>
	   	<tr>
    <td class="left_label"> <?php 
        echo $label;
        ?>
    </td>
    <td>
        <input type="file" name="uploadfiles[]" id="uploadfiles" size="35" class="uploadfiles" />
        <input class="button-primary" type="submit" name="uploadfile" id="uploadfile_btn" value="Upload"  />
     
    </td>
  </tr> 
 	</table>
   
<?php 
        SendPress_Option::set('import_error', false);
        SendPress_Data::nonce_field();
        ?>
	   </form>
</div>
</div>
<?php 
    }
开发者ID:pmatheus,项目名称:participacao-sitebase,代码行数:54,代码来源:class-sendpress-view-subscribers-csvimport.php

示例6: html


//.........这里部分代码省略.........
 >When someone subscribes to the list...</option>
<!--<option value="user-new" <?php 
        if ($options['type'] == 'user-new') {
            echo "selected";
        }
        ?>
 >When a new WordPress user is added to your site...</option>-->
</select>
<select name="" id="params-list">
<?php 
        $post_args = array('post_type' => 'sendpress_list', 'numberposts' => -1, 'offset' => 0, 'orderby' => 'post_title', 'order' => 'DESC');
        $current_lists = get_posts($post_args);
        foreach ($current_lists as $list) {
            $t = '';
            $tlist = '';
            echo "<option value=" . $list->ID . "> " . $list->post_title . " <small>(" . SendPress_Data::get_count_subscribers($list->ID) . ")</small></option>";
        }
        ?>
</select>
<input type="text"  name="sp-delay" style="width:30px; <?php 
        if ($options['when'] == 'immediate') {
            echo "display:none;";
        }
        ?>
"   class="text" id="timer" value="<?php 
        echo $options['delay'];
        ?>
" />
<select name="sp-timing"  id="when-to-send" >
<option value="immediate" <?php 
        if ($options['when'] == 'immediate') {
            echo "selected";
        }
        ?>
  >immediately.</option>
<option value="hours" <?php 
        if ($options['when'] == 'hours') {
            echo "selected";
        }
        ?>
  >hour(s) after.</option>
<option value="days" <?php 
        if ($options['when'] == 'days') {
            echo "selected";
        }
        ?>
  >day(s) after.</option>
<option value="weeks" <?php 
        if ($options['when'] == 'weeks') {
            echo "selected";
        }
        ?>
  >week(s) after.</option>
</select>

<br><br>
</div>
<div class="sp-25">
<br><br>

</div>
</div>
<script>
(function($){
	$(document).ready(function($){
		$('#params-auto').change(function(){
			var it = $(this);
			var v = it.val();
			
		});


		$('#when-to-send').change(function(){
			var it = $(this);
			var v = it.val();
			if(v !== 'immediate'){
				$('#timer').show();
			} else {
				$('#timer').hide();
			}


		});
	});


}(jQuery));


</script>




	<?php 
        SendPress_Data::nonce_field();
        ?>
        </form>
	<?php 
    }
开发者ID:radscheit,项目名称:unicorn,代码行数:101,代码来源:class-sendpress-view-emails-autoedit.php

示例7: html


//.........这里部分代码省略.........
        _e('Insert', 'sendpress');
        ?>
</button></td>
    </tr>
    <tr>
    	<td><?php 
        _e('Website Description', 'sendpress');
        ?>
</td>
      	<td>*|SITE:DECRIPTION|*</td>
      	<td class="text-right"><button class="btn btn-xs btn-success sp-insert-code"  data-code="*|SITE:DESCRIPTION|*"><?php 
        _e('Insert', 'sendpress');
        ?>
</button></td>
    </tr>
    
  </tbody>
</table>
<h3><?php 
        _e('Date and Time', 'sendpress');
        ?>
</h3>
  		<table class="table table-condensed table-striped">
  			
  <thead>
    <tr>
      <th><?php 
        _e('Description', 'sendpress');
        ?>
</th>
      <th><?php 
        _e('Code', 'sendpress');
        ?>
</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr>
    	<td><?php 
        _e('Current Date', 'sendpress');
        ?>
<br><small><?php 
        _e('Format based on WordPress settings', 'sendpress');
        ?>
.</small></td>
      	<td>*|DATE|*</td>
      	<td class="text-right"><button class="btn btn-xs btn-success sp-insert-code" data-code="*|DATE|*"><?php 
        _e('Insert', 'sendpress');
        ?>
</button></td>
    </tr>
     <tr>
    	<td><?php 
        _e('Current Time', 'sendpress');
        ?>
<br><small>5:16 pm</small></td>
      	<td>*|DATE:g:i a|*</td>
      	<td class="text-right"><button class="btn btn-xs btn-success sp-insert-code" data-code="*|DATE:g:i a|*"><?php 
        _e('Insert', 'sendpress');
        ?>
</button></td>
    </tr>
    <tr>
    	<td><?php 
        _e('Custom Date', 'sendpress');
        ?>
<br><small>March 10, 2001, 5:16 pm</small></td>
      	<td>*|DATE:F j, Y, g:i a|*</td>
      	<td class="text-right"><button class="btn btn-xs btn-success sp-insert-code" data-code="*|DATE:F j, Y, g:i a|*"><?php 
        _e('Insert', 'sendpress');
        ?>
</button></td>
    </tr>
  
    
  </tbody>
</table>

  </div>
 
  <div class="tab-pane" id="messages">...</div>
  <div class="tab-pane" id="settings">...</div>
</div>
		
	</div>
	<div class="modal-footer">
	 	<a href="#" class="btn btn-primary" data-dismiss="modal"><?php 
        _e('Close', 'sendpress');
        ?>
</a>
	</div>
</div>
</div>
	<?php 
        SendPress_Data::nonce_field();
        ?>
        </form>
	<?php 
    }
开发者ID:redelivre,项目名称:jaiminho,代码行数:101,代码来源:class-jaiminho-view-emails-edit.php

示例8: html

    function html($sp)
    {
        ?>
	<div id="taskbar" class="lists-dashboard rounded group"> 
	<h2><?php 
        _e('Add Subscriber', 'sendpress');
        ?>
</h2>
	</div>
<div class="boxer">
	<div class="boxer-inner">
	<!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->
	<form id="subscriber-create" method="post">
		<!-- For plugins, we also need to ensure that the form posts back to our current page -->
	    <input type="hidden" name="action" value="create-subscriber" />
	    <input type="hidden" name="listID" value="<?php 
        echo $_GET['listID'];
        ?>
" />
	    <span class="sublabel"><?php 
        _e('Email', 'sendpress');
        ?>
:</span><input type="text" name="email" value="" class="regular-text sp-text" /><br>
	    <span class="sublabel"><?php 
        _e('Firstname', 'sendpress');
        ?>
:</span><input type="text" name="firstname" value="" class="regular-text sp-text" /><br>
	    <span class="sublabel"><?php 
        _e('Lastname', 'sendpress');
        ?>
:</span><input type="text" name="lastname" value="" class="regular-text sp-text" /><br>
	    <span class="sublabel"><?php 
        _e('Status', 'sendpress');
        ?>
:</span><select name="status">
	    			<?php 
        $results = SendPress_Data::get_statuses();
        foreach ($results as $status) {
            $selected = '';
            if ($status->status == 'Active') {
                $selected = 'selected';
            }
            echo "<option value='{$status->statusid}' {$selected}>{$status->status}</option>";
        }
        ?>

	    		</select>
	    		<br>
	  <button type="submit" class="btn btn-primary"><?php 
        _e('Submit', 'sendpress');
        ?>
</button>
	   <?php 
        SendPress_Data::nonce_field();
        ?>

	</form>
	</div>
</div>
	
	<h2><?php 
        _e('Add Subscribers', 'sendpress');
        ?>
</h2>
<div class="boxer">
	<div class="boxer-inner">	

		<div class="subscribers-create-container">

			<form id="subscribers-create" method="post">
					<!-- For plugins, we also need to ensure that the form posts back to our current page -->
				    <input type="hidden" name="action" value="create-subscribers" />
				    <input type="hidden" name="listID" value="<?php 
        echo $_GET['listID'];
        ?>
" />
				   	<textarea name="csv-add"></textarea>
				   	<button type="submit" class="btn btn-primary"><?php 
        _e('Submit', 'sendpress');
        ?>
</button>
				   	<?php 
        SendPress_Data::nonce_field();
        ?>
			</form>

			<div style="width: 25%; padding: 15px;" class="rounded box float-right">
				<?php 
        _e('Emails shoud be written in separate lines. A line could also include a name, which is separated from the email by a comma', 'sendpress');
        ?>
.<br><br>
				<strong><?php 
        _e('Correct formats', 'sendpress');
        ?>
:</strong><br>
				john@gmail.com<br>
				john@gmail.com, John<br>
				john@gmail.com, John, Doe<br>
			</div>
		</div>
//.........这里部分代码省略.........
开发者ID:radscheit,项目名称:unicorn,代码行数:101,代码来源:class-sendpress-view-subscribers-add.php

示例9: html


//.........这里部分代码省略.........
        _e('Insert', 'sendpress');
        ?>
</button></td>
			</tr>
			<tr>
			<td><?php 
        _e('Website Description', 'sendpress');
        ?>
</td>
			<td>*|SITE:DECRIPTION|*</td>
			<td class="text-right"><button class="btn btn-xs btn-success sp-insert-code"  data-code="*|SITE:DESCRIPTION|*"><?php 
        _e('Insert', 'sendpress');
        ?>
</button></td>
			</tr>

			</tbody>
			</table>
			<h3><?php 
        _e('Date and Time', 'sendpress');
        ?>
</h3>
			<table class="table table-condensed table-striped">

			<thead>
			<tr>
			<th><?php 
        _e('Description', 'sendpress');
        ?>
</th>
			<th><?php 
        _e('Code', 'sendpress');
        ?>
</th>
			<th></th>
			</tr>
			</thead>
			<tbody>
			<tr>
			<td><?php 
        _e('Current Date', 'sendpress');
        ?>
<br><small><?php 
        _e('Format based on WordPress settings', 'sendpress');
        ?>
.</small></td>
			<td>*|DATE|*</td>
			<td class="text-right"><button class="btn btn-xs btn-success sp-insert-code" data-code="*|DATE|*"><?php 
        _e('Insert', 'sendpress');
        ?>
</button></td>
			</tr>
			<tr>
			<td><?php 
        _e('Current Time', 'sendpress');
        ?>
<br><small>5:16 pm</small></td>
			<td>*|DATE:g:i a|*</td>
			<td class="text-right"><button class="btn btn-xs btn-success sp-insert-code" data-code="*|DATE:g:i a|*"><?php 
        _e('Insert', 'sendpress');
        ?>
</button></td>
			</tr>
			<tr>
			<td><?php 
        _e('Custom Date', 'sendpress');
        ?>
<br><small>March 10, 2001, 5:16 pm</small></td>
			<td>*|DATE:F j, Y, g:i a|*</td>
			<td class="text-right"><button class="btn btn-xs btn-success sp-insert-code" data-code="*|DATE:F j, Y, g:i a|*"><?php 
        _e('Insert', 'sendpress');
        ?>
</button></td>
			</tr>


			</tbody>
			</table>

			</div>

			<div class="tab-pane" id="messages">...</div>
			<div class="tab-pane" id="settings">...</div>
			</div>

			</div>
			<div class="modal-footer">
			<a href="#" class="btn btn-primary" data-dismiss="modal"><?php 
        _e('Close', 'sendpress');
        ?>
</a>
			</div>
			</div>
			</div>
			<?php 
        SendPress_Data::nonce_field();
        ?>
			</form>
			<?php 
    }
开发者ID:redelivre,项目名称:jaiminho,代码行数:101,代码来源:class-jaiminho-view-emails-templates.php


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