本文整理汇总了PHP中SendPress_Data::get_statuses方法的典型用法代码示例。如果您正苦于以下问题:PHP SendPress_Data::get_statuses方法的具体用法?PHP SendPress_Data::get_statuses怎么用?PHP SendPress_Data::get_statuses使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SendPress_Data
的用法示例。
在下文中一共展示了SendPress_Data::get_statuses方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: status_select
function status_select($status, $listid)
{
$info = SendPress_Data::get_statuses();
echo '<select name="' . $listid . '-status">';
echo "<option cls value='-1' >No Status</option>";
foreach ($info as $list) {
$cls = '';
if ($status == $list->statusid) {
$cls = " selected='selected' ";
}
echo "<option {$cls} value='" . $list->statusid . "'>" . $list->status . "</option>";
}
echo '</select> ';
}
开发者ID:pmatheus,项目名称:participacao-sitebase,代码行数:14,代码来源:class-sendpress-view-subscribers-subscriber.php
示例2: status_select
function status_select()
{
$info = SendPress_Data::get_statuses();
echo '<select name="statusid">';
if (!isset($_GET['statusid'])) {
$cls = " selected='selected' ";
}
echo "<option cls value='-1' >Any Status</option>";
foreach ($info as $list) {
$cls = '';
if (isset($_GET['statusid']) && $_GET['statusid'] == $list->statusid) {
$cls = " selected='selected' ";
}
echo "<option {$cls} value='" . $list->statusid . "'>" . $list->status . "</option>";
}
echo '</select> ';
}
示例3: 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>
//.........这里部分代码省略.........