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


PHP SendPress_Data::emails_active_in_queue方法代码示例

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


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

示例1: html

        function html($sp)
        {
            SendPress_Tracking::event('Overview Tab');
            global $wp_version;
            $classes = 'sp-welcome-panel';
            $option = get_user_meta(get_current_user_id(), 'show_sp_welcome_panel', true);
            // 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner
            $hide = 0 == $option || 2 == $option && wp_get_current_user()->user_email != get_option('admin_email');
            list($display_version) = explode('-', $wp_version);
            ?>
<br>



<div class="sp-row ">

  <div class="sp-block sp-25 sp-first"> 
    <h2 class="nomargin nopadding"><?php 
            echo SendPress_Data::bd_nice_number(SendPress_Data::get_total_subscribers());
            ?>
</h2> <p class="fwb"><?php 
            _e('Subscribers', 'sendpress');
            ?>
</p>  
  </div>
  <div class="sp-block sp-25">
    <h2 class="nomargin nopadding"><?php 
            $report = SendPress_Data::get_last_report();
            echo SendPress_Data::emails_active_in_queue();
            ?>
</h2> <p class="fwb"><?php 
            _e('Emails Actively Sending', 'sendpress');
            ?>
</small></p>
  </div>
  <div class="sp-block sp-25">
    <h2 class="nomargin nopadding"><?php 
            echo SendPress_Data::emails_maxed_in_queue();
            ?>
</h2> <p class="fwb"><?php 
            _e('Emails Stuck in Queue', 'sendpress');
            ?>
</p>
  </div>
  <div class="sp-block sp-25">
    <h2 class="nomargin nopadding"><?php 
            _e('Autocron last check', 'sendpress');
            ?>
</h2> <p class="fwb">  <?php 
            $autocron = SendPress_Option::get('autocron', 'no');
            //print_r(SendPress_Data::emails_stuck_in_queue());
            if ($autocron == 'yes') {
                $api_info = json_decode(SendPress_Cron::get_info());
                if (isset($api_info->lastcheck)) {
                    echo $api_info->lastcheck . " UTC";
                } else {
                    echo "No Data";
                }
            } else {
                echo "Not Enabled";
            }
            ?>
</p>
  </div>

</div>
<?php 
            if ($report) {
                $rec = get_post_meta($report->ID, '_send_last_count', true);
                $this->panel_start($report->post_title . " <small style='color:#333;'>" . __('This email had', 'sendpress') . " " . $rec . " " . __('Recipients', 'sendpress') . "</small>");
                $stat_type = get_post_meta($report->ID, '_stat_type', true);
                $clicks = SPNL()->db("Subscribers_Url")->clicks_email_id($report->ID);
                $clicks_total = SPNL()->db("Subscribers_Url")->clicks_total_email_id($report->ID);
                ?>

<div class="sp-row">
  <div class="sp-50 sp-first">
    <h4 style="text-align:center;"><?php 
                _e('Opens', 'sendpress');
                ?>
</h4>
      <?php 
                $this->panel_start();
                $open = 0;
                $rec = get_post_meta($report->ID, '_send_last_count', true);
                if ($report) {
                    if ($stat_type == 'new') {
                        $open = SPNL()->db("Subscribers_Tracker")->get_opens_total($report->ID);
                    } else {
                        $open = SendPress_Data::get_opens($report->ID);
                    }
                    $p = $open / $rec * 100;
                }
                ?>
        <div class="sp-row">
        <div class="sp-50 sp-first">
          <div style="float:left;">
          <div id="myStat" class="chartid" data-dimension="150" data-text="<?php 
                echo floor($p);
                ?>
//.........这里部分代码省略.........
开发者ID:richardsweeney,项目名称:sendpress,代码行数:101,代码来源:class-sendpress-view-overview.php

示例2: sendcount

 function sendcount()
 {
     $this->verify_ajax_call();
     // Create the response arrayecho SendPress_Data::emails_active_in_queue();
     //
     $count = SendPress_Data::emails_active_in_queue();
     //emails_allowed_to_send();
     //$sp = new SendPress;
     $response = array('total' => $count);
     echo json_encode($response);
     exit;
 }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:12,代码来源:class-sendpress-ajax-loader.php

示例3: sub_menu

    function sub_menu($sp = false)
    {
        ?>
		<div class="navbar navbar-default" >
			<div class="navbar-header">
			  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
      <span class="sr-only">Toggle navigation</span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>

    </button>
    <a class="navbar-brand" href="#">Queues</a>
</div>
		 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
		<ul class="nav navbar-nav">
					<li <?php 
        if (!isset($_GET['view'])) {
            ?>
class="active"<?php 
        }
        ?>
 >
				    	<a href="<?php 
        echo SendPress_Admin::link('Queue');
        ?>
"><span class="glyphicon glyphicon-open"></span>  <?php 
        _x('Active', 'Active queues', 'sendpress');
        ?>
 (<?php 
        echo SendPress_Data::emails_active_in_queue();
        ?>
)</a>
				  	</li>
				  	<li <?php 
        if (isset($_GET['view']) && $_GET['view'] === 'stuck') {
            ?>
class="active"<?php 
        }
        ?>
 >
				    	<a href="<?php 
        echo SendPress_Admin::link('Queue_Stuck');
        ?>
"><span class="glyphicon glyphicon-exclamation-sign"></span>  <?php 
        _e('Stuck', 'sendpress');
        ?>
 (<?php 
        echo SendPress_Data::emails_maxed_in_queue();
        ?>
)</a>
				  	</li>
				  	<li <?php 
        if (isset($_GET['view']) && $_GET['view'] === 'all') {
            ?>
class="active"<?php 
        }
        ?>
 >
				    	<a href="<?php 
        echo SendPress_Admin::link('Queue_All');
        ?>
"><span class="glyphicon glyphicon-time"></span>  <?php 
        _e('Send History', 'sendpress');
        ?>
</a>
				  	</li>
				  	<li <?php 
        if (isset($_GET['view']) && $_GET['view'] === 'errors') {
            ?>
class="active"<?php 
        }
        ?>
 >
				    	<a href="<?php 
        echo SendPress_Admin::link('Queue_Errors');
        ?>
"><span class="glyphicon glyphicon-warning-sign"></span>  <?php 
        _e('Send Errors', 'sendpress');
        ?>
</a>
				  	</li>
				</ul>
			</div>
		</div>
		
		<?php 
        do_action('sendpress-queue-sub-menu');
    }
开发者ID:pedro-mendonca,项目名称:sendpress,代码行数:89,代码来源:class-sendpress-view-queue.php

示例4: html

        function html($sp)
        {
            //SendPress_Template_Manager::update_template_content();
            SendPress_Tracking::event('Overview Tab');
            //print_r( SendPress_Data::get_subcribers_by_meta('test','test') );
            //echo wp_next_scheduled('wysija_cron_queue') . 'asdf';
            //SPNL()->db->subscribers_tracker->add( array('subscriber_id'=> 101, 'email_id'=> 20 ) );
            //SPNL()->db->subscribers_url->add_update( array('subscriber_id'=> 101, 'email_id'=> 20 , 'url_id' => 123 ) );
            //SPNL()->log->add(  'Email Skiped' , 'Email test',' did not have any Text.', 'sending');
            //print_r(_get_cron_array());
            global $wp_version;
            $classes = 'sp-welcome-panel';
            $option = get_user_meta(get_current_user_id(), 'show_sp_welcome_panel', true);
            // 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner
            $hide = 0 == $option || 2 == $option && wp_get_current_user()->user_email != get_option('admin_email');
            //if ( $hide )
            //	$classes .= ' hidden';
            /*
            $args = array( 'post_type' => 'sendpress_list','numberposts'     => -1,
            	    'offset'          => 0,
            	    'orderby'         => 'post_title',
            	    'order'           => 'DESC', );
            		$lists = get_posts( $args );
            $sp->send_optin(1,array('1','2','3'),$lists);
            */
            list($display_version) = explode('-', $wp_version);
            //SendPress_Template_Manager::update_template_content();
            /*
            
            
            
            echo spnl_do_email_tags( 'here is some {subscriber_list} content that should run tags' , 0 , 0 );
            
            
            SPNL()->log->add('Bad Email','This email can not be sent');
            echo "<pre>";
            print_r( SPNL()->log->get_logs() );
            echo "</pre>";
            */
            ?>
<br>



<div class="sp-row ">

  <div class="sp-block sp-25 sp-first"> 
    <h2 class="nomargin nopadding"><?php 
            echo SendPress_Data::bd_nice_number(SendPress_Data::get_total_subscribers());
            ?>
</h2> <p class="fwb"><?php 
            _e('Subscribers', 'sendpress');
            ?>
</p>  
  </div>
  <div class="sp-block sp-25">
    <h2 class="nomargin nopadding"><?php 
            $report = SendPress_Data::get_last_report();
            echo SendPress_Data::emails_active_in_queue();
            ?>
</h2> <p class="fwb"><?php 
            _e('Emails Actively Sending', 'sendpress');
            ?>
</small></p>
  </div>
  <div class="sp-block sp-25">
    <h2 class="nomargin nopadding"><?php 
            echo SendPress_Data::emails_maxed_in_queue();
            ?>
</h2> <p class="fwb"><?php 
            _e('Emails Stuck in Queue', 'sendpress');
            ?>
</p>
  </div>
  <div class="sp-block sp-25">
    <h2 class="nomargin nopadding"><?php 
            _e('Autocron last check', 'sendpress');
            ?>
</h2> <p class="fwb">  <?php 
            $autocron = SendPress_Option::get('autocron', 'no');
            //print_r(SendPress_Data::emails_stuck_in_queue());
            if ($autocron == 'yes') {
                $api_info = json_decode(SendPress_Cron::get_info());
                if (isset($api_info->lastcheck)) {
                    echo $api_info->lastcheck . " UTC";
                } else {
                    echo "No Data";
                }
            } else {
                echo "Not Enabled";
            }
            ?>
</p>
  </div>

</div>
<?php 
            if ($report) {
                $rec = get_post_meta($report->ID, '_send_last_count', true);
                $this->panel_start($report->post_title . " <small style='color:#333;'>" . __('This email had', 'sendpress') . " " . $rec . " " . __('Recipients', 'sendpress') . "</small>");
//.........这里部分代码省略.........
开发者ID:radscheit,项目名称:unicorn,代码行数:101,代码来源:class-sendpress-view-overview.php


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