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

PHP SendPress_Option类代码示例

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

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



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

示例1: save

 function save()
 {
     $_POST['post_type'] = SendPress_Data::email_post_type();
     // Update post 37 (37!)
     $my_post = _wp_translate_postdata(true);
     $system_emails = SendPress_Option::base_get('system-emails');
     $my_post['post_status'] = 'sp-systememail';
     $my_post['post_content'] = SendPress_Data::get_sysemail_content($_POST['email_type']);
     // Update the post into the database
     wp_update_post($my_post);
     update_post_meta($my_post['ID'], '_sendpress_subject', $_POST['post_subject']);
     update_post_meta($my_post['ID'], '_sendpress_template', $_POST['template']);
     update_post_meta($my_post['ID'], '_sendpress_status', 'private');
     update_post_meta($my_post['ID'], '_sendpress_system', 'new');
     update_post_meta($my_post['ID'], '_system_email_type', $_POST['email_type']);
     update_post_meta($my_post['ID'], '_system_default', $_POST['default']);
     if ($_POST['default']) {
         //set default system e-mail for this type
         SendPress_Data::set_system_email_default($my_post['ID'], $_POST['email_type']);
     }
     SendPress_Email::set_default_style($my_post['ID']);
     //clear the cached file.
     delete_transient('sendpress_email_html_' . $my_post['ID']);
     if (!in_array($_POST['email_type'], $system_emails)) {
         $system_emails[] = $_POST['email_type'];
     }
     SendPress_Option::base_set('system-emails', $system_emails);
     SendPress_Admin::redirect('Settings_Emailedit', array('emailID' => $my_post['ID']));
     //$this->save_redirect( $_POST  );
 }
开发者ID:pmatheus,项目名称:participacao-sitebase,代码行数:30,代码来源:class-sendpress-view-settings-systememailcreate.php


示例2: send_email

 function send_email($to, $subject, $html, $text, $istest = false, $sid, $list_id, $report_id)
 {
     //$user = SendPress_Option::get( 'mandrilluser' );
     //$pass = SendPress_Option::get( 'mandrillpass' );
     $from_email = SendPress_Option::get('fromemail');
     //$hdr = new SendPress_SendGrid_SMTP_API();
     $m = SendPress_Option::get_sender('sendpress');
     //$hdr->addFilterSetting('dkim', 'domain', SendPress_Manager::get_domain_from_email($from_email) );
     //$phpmailer->AddCustomHeader(sprintf( 'X-SMTPAPI: %s', $hdr->asJSON() ) );
     $info = array("X-SP-METHOD" => "WPED.co", "X-SP-LIST" => $list_id, "X-SP-REPORT" => $report_id, "X-SP-SUBSCRIBER" => $sid, "X-SP-DOMAIN" => home_url());
     $url = 'https://gateway.wped.co/send/';
     //$url = 'http://spnl.dev/';
     $verify_ssl = true;
     if (isset($m['verifyssl']) && $m['verifyssl'] == 'donotverify') {
         $verify_ssl = false;
         $url = 'http://api.wped.co/send';
     }
     $message = array('to' => array(array('email' => $to)), 'subject' => $subject, 'html' => $html, 'text' => $text, 'from_email' => $from_email, 'from_name' => SendPress_Option::get('fromname'), 'headers' => $info, 'inline_css' => true, 'subaccount' => $m['sendpress-key'], 'metadata' => array('sender' => 'SPNL', 'return' => home_url()));
     $response = wp_remote_post($url, array('method' => 'POST', 'timeout' => 45, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array('Content-Type' => 'application/json'), 'body' => json_encode($message), 'sslverify' => $verify_ssl, 'cookies' => array()));
     if (is_wp_error($response)) {
         $error_message = $response->get_error_message();
         SPNL()->log->add('WPED Sending', $error_message, 0, 'sending');
         return false;
     } else {
         return true;
     }
     return false;
 }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:28,代码来源:class-sendpress-sender-spnl.php


示例3: prerender

 function prerender()
 {
     $ip = $_SERVER['REMOTE_ADDR'];
     //print_r($info);
     $info = $this->data();
     if (isset($info->id)) {
         $lists = SendPress_Data::get_list_ids_for_subscriber($info->id);
         //$lists = explode(',',$info->listids);
         foreach ($lists as $list) {
             $status = SendPress_Data::get_subscriber_list_status($list->listID, $info->id);
             if ($status->statusid == 1) {
                 SendPress_Data::update_subscriber_status($list->listID, $info->id, '2');
             }
         }
         SPNL()->db("Subscribers_Tracker")->open($info->report, $info->id, 4);
     }
     if (SendPress_Option::get('confirm-page') == 'custom') {
         $page = SendPress_Option::get('confirm-page-id');
         if ($page != false) {
             $plink = get_permalink($page);
             if ($plink != "") {
                 wp_safe_redirect(esc_url_raw($plink));
                 exit;
             }
         }
     }
 }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:27,代码来源:class-sendpress-public-view-confirm.php


示例4: save

 function save()
 {
     if (isset($_POST['send-date']) && $_POST['send-date'] == 'later') {
         $send_at = $_POST['date-pickit'] . " " . $_POST['send-later-time'];
     } else {
         $send_at = '0000-00-00 00:00:00';
     }
     if (isset($_POST['test-add'])) {
         $csvadd = "email,firstname,lastname\n" . trim($_POST['test-add']);
         $data = SendPress_Data::subscriber_csv_post_to_array($csvadd);
     } else {
         $data = false;
     }
     $listids = isset($_POST['listIDS']) ? $_POST['listIDS'] : array();
     SendPress_Option::set('current_send_' . $_POST['post_ID'], array('listIDS' => $listids, 'testemails' => $data, 'send_at' => $send_at));
     SendPress_Option::set('current_send_subject_' . $_POST['post_ID'], $_POST['post_subject']);
     if (isset($_POST['test_report'])) {
         update_post_meta($_POST['post_ID'], 'istest', true);
     } else {
         update_post_meta($_POST['post_ID'], 'istest', false);
     }
     if (isset($_POST['google-campaign-name'])) {
         update_post_meta($_POST['post_ID'], 'google-campaign-name', $_POST['google-campaign-name']);
     }
     if (isset($_POST['submit']) && $_POST['submit'] == 'save-next') {
         SendPress_Admin::redirect('Emails_Send_Confirm', array('emailID' => $_GET['emailID']));
     } else {
         SendPress_Admin::redirect('Emails_Style', array('emailID' => $_GET['emailID']));
     }
 }
开发者ID:radscheit,项目名称:unicorn,代码行数:30,代码来源:class-sendpress-view-emails-send.php


示例5: prerender

 function prerender()
 {
     $ip = $_SERVER['REMOTE_ADDR'];
     //print_r($info);
     $info = $this->data();
     if (isset($info->listids)) {
         $lists = explode(',', $info->listids);
         foreach ($lists as $list_id) {
             if ($list_id > 0) {
                 $status = SendPress_Data::get_subscriber_list_status($list_id, $info->id);
                 if (!isset($status) || $status->status != '2') {
                     SendPress_Data::update_subscriber_status($list_id, $info->id, '2');
                 }
             }
         }
     }
     if (SendPress_Option::get('confirm-page') == 'custom') {
         $page = SendPress_Option::get('confirm-page-id');
         if ($page != false) {
             $plink = get_permalink($page);
             if ($plink != "") {
                 wp_safe_redirect(esc_url_raw($plink));
                 exit;
             }
         }
     }
 }
开发者ID:radscheit,项目名称:unicorn,代码行数:27,代码来源:class-sendpress-public-view-confirm.php


示例6: external

 static function external($template_id, $email_id, $subscriber_id, $example)
 {
     $canspam = SendPress_Option::get('canspam');
     if ($canspam != '' && $canspam != false) {
         return nl2br($canspam);
     }
     return '';
 }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:8,代码来源:class-sendpress-tag-canspam.php


示例7: module_deactivate_sendpress_pro

 function module_deactivate_sendpress_pro()
 {
     $path = $_POST['plugin_path'];
     $pro_options = SendPress_Option::get('pro_plugins');
     if (!preg_match('/sendpress-pro.php/i', $path)) {
         if (preg_match('/sendpress-pro/i', $path)) {
             //make sure the plugin loads from sendpress pro
             $pro_options[$path] = false;
             SendPress_Option::set('pro_plugins', $pro_options);
         }
     } else {
         deactivate_plugins($path);
     }
 }
开发者ID:pmatheus,项目名称:participacao-sitebase,代码行数:14,代码来源:class-sendpress-view-pro.php


示例8: sendpress

 function sendpress($phpmailer)
 {
     // Set the mailer type as per config above, this overrides the already called isMail method
     $phpmailer->Mailer = 'smtp';
     // We are sending SMTP mail
     $phpmailer->IsSMTP();
     // Set the other options
     $phpmailer->Host = 'smtp.sendgrid.net';
     $phpmailer->Port = 25;
     // If we're using smtp auth, set the username & password
     $phpmailer->SMTPAuth = TRUE;
     $phpmailer->Username = SendPress_Option::get('sp_user');
     $phpmailer->Password = SendPress_Option::get('sp_pass');
     return $phpmailer;
 }
开发者ID:radscheit,项目名称:unicorn,代码行数:15,代码来源:class-sendpress-sender.php


示例9: external

 static function external($template_id, $email_id, $subscriber_id, $e)
 {
     //maybe saved link?
     $link_data = array("id" => $subscriber_id, "view" => 'manage');
     $code = SendPress_Data::encrypt($link_data);
     $link = SendPress_Manager::public_url($code);
     if (SendPress_Option::get('manage-page') == 'custom') {
         $page = SendPress_Option::get('manage-page-id');
         if ($page != false) {
             $plink = get_permalink($page);
             if ($plink != "") {
                 $link = $plink . '?spms=' . $code;
             }
         }
     }
     return $link;
 }
开发者ID:radscheit,项目名称:unicorn,代码行数:17,代码来源:class-sendpress-tag-manage-subscriptions.php


示例10: send_mail_cron

 static function send_mail_cron()
 {
     //@ini_set('max_execution_time',0);
     global $wpdb;
     $count = SendPress_Option::get('emails-per-hour');
     $count = SendPress_Option::get('wpcron-per-call', 25);
     $email_count = 0;
     $attempts = 0;
     if (SendPress_Manager::limit_reached($count)) {
         return;
     }
     SendPress_Email_Cache::build_cache();
     for ($i = 0; $i < $count; $i++) {
         $email = SendPress_Data::get_single_email_from_queue();
         if ($email != null) {
             $attempts++;
             SendPress_Data::queue_email_process($email->id);
             $result = SendPress_Manager::send_email_from_queue($email);
             $email_count++;
             if ($result) {
                 if ($result === true) {
                     $wpdb->update(SendPress_Data::queue_table(), array('success' => 1, 'inprocess' => 3), array('id' => $email->id));
                     //( $sid, $rid, $lid=null, $uid=null, $ip=null, $device_type=null, $device=null, $type='confirm' )
                     //$wpdb->update( SendPress_Data::queue_table() , array('success'=>1,'inprocess'=>3 ) , array('id'=> $email->id ));
                     //$wpdb->insert(SendPress_Data::subscriber_tracker_table() , array('subscriberID'=>$email->subscriberID,'emailID'=>$email->emailID,'sent_at' => get_gmt_from_date( date('Y-m-d H:i:s') )) );
                     SPNL()->db("Subscribers_Tracker")->add(array('subscriber_id' => intval($email->subscriberID), 'email_id' => intval($email->emailID)));
                     SendPress_Data::add_subscriber_event($email->subscriberID, $email->emailID, $email->listID, null, null, null, null, 'send');
                 } else {
                     $wpdb->update(SendPress_Data::queue_table(), array('success' => 2, 'inprocess' => 3), array('id' => $email->id));
                     SendPress_Data::add_subscriber_event($email->subscriberID, $email->emailID, $email->listID, null, null, null, null, 'bounce');
                     SendPress_Data::bounce_subscriber_by_id($email->subscriberID);
                 }
                 //$wpdb->insert( $this->subscriber_open_table(),  $senddata);
                 $count++;
                 //SendPress_Data::update_report_sent_count( $email->emailID );
             } else {
                 $wpdb->update(SendPress_Data::queue_table(), array('attempts' => $email->attempts + 1, 'inprocess' => 0, 'last_attempt' => date('Y-m-d H:i:s')), array('id' => $email->id));
             }
         } else {
             //We ran out of emails to process.
             break;
         }
         set_time_limit(30);
     }
     return;
 }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:46,代码来源:class-sendpress-queue.php


示例11: pn_select

 function pn_select($sub_id, $listid)
 {
     $pro_list = SendPress_Option::get('pro_notification_lists');
     if (isset($pro_list['post_notifications']['id']) && $listid == $pro_list['post_notifications']['id']) {
         $current = SendPress_Data::get_subscriber_meta($sub_id, 'post_notifications', $listid);
         $info = SendPress_Data::get_post_notification_types();
         echo '<select name="' . $listid . '-pn">';
         echo "<option cls value='-1' >No Status</option>";
         foreach ($info as $key => $value) {
             $cls = '';
             if ($current == $key) {
                 $cls = " selected='selected' ";
             }
             echo "<option {$cls} value='" . $key . "'>" . $value . "</option>";
         }
         echo '</select> ';
     }
 }
开发者ID:pmatheus,项目名称:participacao-sitebase,代码行数:18,代码来源:class-sendpress-view-subscribers-subscriber.php


示例12: auto_cron

 function auto_cron()
 {
     // make sure we're in wp-cron.php
     if (false !== strpos($_SERVER['REQUEST_URI'], '/wp-cron.php')) {
         // make sure a secret string is provided in the ur
         if (isset($_GET['action']) && $_GET['action'] == 'sendpress') {
             $time_start = microtime(true);
             $count = SendPress_Data::emails_in_queue();
             $bg = 0;
             if ($count > 0) {
                 SendPress_Queue::send_mail();
                 $count = SendPress_Data::emails_in_queue();
             } else {
                 SPNL()->log->prune_logs();
                 SendPress_Data::clean_queue_table();
                 //SendPress_Logging::prune_logs();
                 $bg = 1;
             }
             $attempted_count = SendPress_Option::get('autocron-per-call', 25);
             $pro = 0;
             if (defined('SENDPRESS_PRO_VERSION')) {
                 $pro = SENDPRESS_PRO_VERSION;
             }
             $stuck = SendPress_Data::emails_stuck_in_queue();
             $limit = SendPress_Manager::limit_reached();
             $emails_per_day = SendPress_Option::get('emails-per-day');
             $emails_per_hour = SendPress_Option::get('emails-per-hour');
             $hourly_emails = SendPress_Data::emails_sent_in_queue("hour");
             $emails_so_far = SendPress_Data::emails_sent_in_queue("day");
             $limits = array('autocron' => $attempted_count, 'dl' => $emails_per_day, 'hl' => $emails_per_hour, 'ds' => $emails_so_far, 'hs' => $hourly_emails);
             $time_end = microtime(true);
             $time = $time_end - $time_start;
             echo json_encode(array("background" => $bg, "queue" => $count, "stuck" => $stuck, "version" => SENDPRESS_VERSION, "pro" => $pro, "limit" => $limit, 'info' => $limits, 'time' => number_format($time, 3)));
             die;
         }
     }
 }
开发者ID:radscheit,项目名称:unicorn,代码行数:37,代码来源:class-sendpress-cron.php


示例13: html

    function html($sp)
    {
        SendPress_Tracking::event('Queue Tab');
        $testListTable = new SendPress_Queue_Errors_Table();
        $testListTable->prepare_items();
        SendPress_Option::set('no_cron_send', 'false');
        $sp->cron_start();
        $open_info = array("id" => 13, "report" => 10, "view" => "open");
        ?>

	<h2><?php 
        _e('Error history for the last 2 Weeks', 'sendpress');
        ?>
.</h2>

	<!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->
	<form id="email-filter" action="<?php 
        echo SendPress_Admin::link('Queue_Errors');
        ?>
" method="get">
		<!-- For plugins, we also need to ensure that the form posts back to our current page -->
	     <input type="hidden" name="page" value="<?php 
        echo SPNL()->validate->page($_REQUEST['page']);
        ?>
" /> 
	    <!-- Now we can render the completed list table -->
	    <?php 
        $testListTable->display();
        ?>
	    <?php 
        wp_nonce_field($sp->_nonce_value);
        ?>
	</form>
	<br>
	
<?php 
    }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:37,代码来源:class-sendpress-view-queue-errors.php


示例14: enqueue

 /**
  * Enqueue styles and scripts needed for the pointers.
  */
 function enqueue()
 {
     if (!current_user_can('manage_options')) {
         return;
     }
     SendPress_Option::set('allow_tracking', '');
     $track = SendPress_Option::get('allow_tracking');
     $tour = false;
     //SendPress_Option::get( 'intro_tour' );
     if (($track == false || $track == '') && !isset($_GET['allow_tracking'])) {
         wp_enqueue_style('wp-pointer');
         wp_enqueue_script('jquery-ui');
         wp_enqueue_script('wp-pointer');
         wp_enqueue_script('utils');
         add_action('admin_print_footer_scripts', array($this, 'tracking_request'));
     } else {
         if ($tour == 'false' || $tour == false) {
             /*
             add_action( 'admin_print_footer_scripts', array( $this, 'intro_tour' ) );
             add_action( 'admin_head', array( $this, 'admin_head' ) );
             */
         }
     }
 }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:27,代码来源:class-sendpress-tour.php


示例15: html

    function html()
    {
        $icon_list = SendPress_Data::social_icons();
        $socialsize = SendPress_Option::get('socialsize', 'large');
        ?>
<form method="post" id="post" role="form">
<div  >
	<div id="button-area">  
		<input type="submit" value="<?php 
        _e('Save', 'sendpress');
        ?>
" class="btn btn-large btn-primary"/>
	</div>

</div>
<br><br><br>
<?php 
        $this->panel_start();
        ?>

<div class="sp-row">
<div class="sp-50 sp-first">
<p class="lead"><?php 
        _e('Social Icons appear in emails in Alphabetical order. If you enter a url in the box below then that icon will show in your emails.', 'sendpress');
        ?>
</p>
</div>
<div class="sp-50">
<p>
<label >
<input type="radio" name="icon-view" value="large" <?php 
        checked($socialsize, 'large');
        ?>
 /> <?php 
        _e('Large', 'sendpress');
        ?>
 ( 32px x 32px )
</label>
<br>
<label >
<input type="radio" name="icon-view" value="small" <?php 
        checked($socialsize, 'small');
        ?>
 /> <?php 
        _e('Small', 'sendpress');
        ?>
 ( 16px x 16px )
</label>
<br>
<label >
<input type="radio" name="icon-view" value="text" <?php 
        checked($socialsize, 'text');
        ?>
 /> <?php 
        _e('Text', 'sendpress');
        ?>
</label>
</p>
</div>
</div>

<div class="sp-row">
<div class="sp-50 sp-first">
<?php 
        $icons = count($icon_list);
        $link = SendPress_Option::get('socialicons');
        $firsthalf = array_slice($icon_list, 0, $icons / 2);
        $secondhalf = array_slice($icon_list, $icons / 2);
        $firsthalf = array_merge(array_flip(array('Facebook', 'LinkedIn', 'GitHub', 'Instagram')), $firsthalf);
        $secondhalf = array_merge(array_flip(array('Twitter', 'Skype', 'Vimeo', 'YouTube', 'WordPress')), $secondhalf);
        foreach ($firsthalf as $key => $value) {
            $class = "";
            if (isset($link[$key])) {
                $class = "bg-success";
            }
            ?>
	
   
   		
      
		<div class="well <?php 
            echo $class;
            ?>
">
			<div class="form-group">
			<?php 
            echo "<span class='hidden-xs hidden-sm pull-right text-muted'>" . $value . "</span>";
            ?>
 		<label for="url-<?php 
            echo $key;
            ?>
" class="control-label ">
		<img src="<?php 
            echo SENDPRESS_URL . "img/16px/" . $key . ".png";
            ?>
" />
		<img src="<?php 
            echo SENDPRESS_URL . "img/32px/" . $key . ".png";
            ?>
" />
//.........这里部分代码省略.........
开发者ID:redelivre,项目名称:jaiminho,代码行数:101,代码来源:class-jaiminho-view-emails-social.php


示例16: text_settings

    function text_settings()
    {
        ?>

<br>
<div class="well">
<?php 
        $display_correct = __("Is this email not displaying correctly?", "sendpress");
        $view = __("View it in your browser", "sendpress");
        if (SendPress_Option::get('beta')) {
            ?>
<h4 class="nomargin"><?php 
            _e('Link to browser version', 'sendpress');
            ?>
</h4>
<p><input type=radio value="" name="browerslink" checked/> <?php 
            _e('Use default', 'sendpress');
            ?>
&nbsp;&nbsp;&nbsp;<input type=radio value="" name="browerslink"/> <?php 
            _e('Use custom', 'sendpress');
            ?>
&nbsp;&nbsp;&nbsp;<input type=radio value="" name="browerslink"/> <?php 
            _e('None', 'sendpress');
            ?>
</p>
<p><input name="inbrowser" type="text" id="inbrowser" value="<?php 
            echo SendPress_Option::get('inbrowser');
            ?>
" class="regular-text sp-text"></p>
<br>
<?php 
        }
        ?>


<div style="float: right; width: 45%;">
	
</div>	
<div style="width: 45%; margin-right: 10%">
<h4 class="nomargin"><?php 
        _e('CAN-SPAM', 'sendpress');
        ?>
: <small><?php 
        _e('required in the US.', 'sendpress');
        ?>
</small>&nbsp;&nbsp;&nbsp;&nbsp;<?php 
        _e('This area displays in Email Footer', 'sendpress');
        ?>
</h4>
<textarea cols="20" rows="10" class="large-text code" name="can-spam"><?php 
        echo SendPress_Option::get('canspam');
        ?>
</textarea>
<p><?php 
        _e('Your message must include your valid physical postal address. This can be your current street address, a post office box youve registered with the U.S. Postal Service, or a private mailbox youve registered with a commercial mail receiving agency established under Postal Service regulations.', 'sendpress');
        ?>
</p>
<?php 
        _e('This is dictated under the <a href="http://business.ftc.gov/documents/bus61-can-spam-act-compliance-guide-business" target="_blank">Federal CAN-SPAM Act of 2003</a>.', 'sendpress');
        ?>
					</p>
</div>
</div>




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


示例17: html

    function html()
    {
        global $sendpress_sender_factory;
        $senders = $sendpress_sender_factory->get_all_senders();
        ksort($senders);
        $method = SendPress_Option::get('sendmethod');
        $fe = __('From Email', 'sendpress');
        $fn = __('From Name', 'sendpress');
        ?>
<!--
<div style="float:right;" >
  <a href="" class="btn btn-large btn-default" ><i class="icon-remove"></i> <?php 
        _e('Cancel', 'sendpress');
        ?>
</a> <a href="#" id="save-update" class="btn btn-primary btn-large"><i class="icon-white icon-ok"></i> <?php 
        _e('Save', 'sendpress');
        ?>
</a>
</div>
-->


<form method="post" id="post">
	<br class="clear">
	<br class="clear">
	<div class="sp-row">
		<div class="sp-50 sp-first">
			<?php 
        $this->panel_start('<span class="glyphicon glyphicon-user"></span> ' . __('Sending Email', 'sendpress'));
        ?>
			<div class="form-group">
				<label for="fromname"><?php 
        _e('From Name', 'sendpress');
        ?>
</label>
				<input name="fromname" tabindex=1 type="text" id="fromname" value="<?php 
        echo SendPress_Option::get('fromname');
        ?>
" class="form-control">
			</div>
			<div class="form-group">
				<label for="fromemail"><?php 
        _e('From Email', 'sendpress');
        ?>
</label>
				<input name="fromemail" tabindex=2 type="text" id="fromemail" value="<?php 
        echo SendPress_Option::get('fromemail');
        ?>
" class="form-control">
			</div>

			<div class="form-group">
                <label for="bounceemail"><?php 
        _e('Email de Retorno', 'jaiminho');
        ?>
</label>
                <input name="bounceemail" tabindex=3 type="text" id="bounceemail" value="<?php 
        echo SendPress_Option::get('bounce_email');
        ?>
" class="form-control">
            </div>

			<?php 
        $this->panel_end();
        ?>
		</div >
		<div class="sp-50">
			<?php 
        $this->panel_start('<span class="glyphicon glyphicon-inbox"></span> ' . __('Test Email', 'sendpress'));
        ?>

			<div class="form-group">
				<label for="testemail"><?php 
        _e('Where to send Test Email', 'sendpress');
        ?>
</label>
				<input name="testemail" type="text" id="test-email-main" value="<?php 
        echo SendPress_Option::get('testemail');
        ?>
" class="form-control"/>
			</div>
			<div class="sp-row">
				<div class="sp-50 sp-first">
					<button class="btn btn-primary btn-block" value="test" name="test" type="submit"><?php 
        _e('Send Test!', 'sendpress');
        ?>
</button>
				</div>
				<div class="sp-50">
					<button class="btn btn-danger btn-block" data-toggle="modal" data-target="#debugModal" type="button"><?php 
        _e('Debug Info', 'sendpress');
        ?>
</button>
				</div>
			</div>
			<div class="sp-row">
				<br>
				<div class="panel-group" id="accordion">
					<div class="panel panel-default">
						<div class="panel-heading">
//.........这里部分代码省略.........
开发者ID:redelivre,项目名称:jaiminho,代码行数:101,代码来源:class-jaiminho-view-settings-account.php


示例18: html

    function html($sp)
    {
        global $sendpress_sender_factory;
        $senders = $sendpress_sender_factory->get_all_senders();
        ksort($senders);
        $method = SendPress_Option::get('sendmethod');
        $fe = __('From Email', 'sendpress');
        $fn = __('From Name', 'sendpress');
        ?>
<!--
<div style="float:right;" >
  <a href="" class="btn btn-large btn-default" ><i class="icon-remove"></i> <?php 
        _e('Cancel', 'sendpress');
        ?>
</a> <a href="#" id="save-update" class="btn btn-primary btn-large"><i class="icon-white icon-ok"></i> <?php 
        _e('Save', 'sendpress');
        ?>
</a>
</div>
-->


<form method="post" id="post">
	<br class="clear">
	<br class="clear">
	<div class="sp-row">
		<div class="sp-50 sp-first">
			<?php 
        $this->panel_start('<span class="glyphicon glyphicon-user"></span> ' . __('Sending Email', 'sendpress'));
        ?>
			<div class="form-group">
				<label for="fromname"><?php 
        _e('From Name', 'sendpress');
        ?>
</label>
				<input name="fromname" tabindex=1 type="text" id="fromname" value="<?php 
        echo SendPress_Option::get('fromname');
        ?>
" class="form-control">
			</div>
			<div class="form-group">
				<label for="fromemail"><?php 
        _e('From Email', 'sendpress');
        ?>
</label>
				<input name="fromemail" tabindex=2 type="text" id="fromemail" value="<?php 
        echo SendPress_Option::get('fromemail');
        ?>
" class="form-control">
			</div>

			<?php 
        $this->panel_end();
        ?>
		</div >
		<div class="sp-50">
			<?php 
        $this->panel_start('<span class="glyphicon glyphicon-inbox"></span> ' . __('Test Email', 'sendpress'));
        ?>

			<div class="form-group">
				<label for="testemail"><?php 
        _e('Where to send Test Email', 'sendpress');
        ?>
</label>
				<input name="testemail" type="text" id="test-email-main" value="<?php 
        echo SendPress_Option::get('testemail');
        ?>
" class="form-control"/>
			</div>
			<div class="sp-row">
				<div class="sp-50 sp-first">
					<button class="btn btn-primary btn-block" value="test" name="test" type="submit"><?php 
        _e('Send Test!', 'sendpress');
        ?>
</button>
				</div>
				<div class="sp-50">
					<button class="btn btn-danger btn-block" data-toggle="modal" data-target="#debugModal" type="button"><?php 
        _e('Debug Info', 'sendpress');
        ?>
</button>
				</div>
			</div>
			<div class="sp-row">
				<br>
				<div class="panel-group" id="accordion">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h4 class="panel-title">
								<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
									<?php 
        _e('Click to View Last Error', 'sendpress');
        ?>
								</a>
							</h4>
						</div>
						<div id="collapseOne" class="panel-collapse collapse">
							<div class="panel-body">

//.........这里部分代码省略.........
开发者ID:anirut,项目名称:sendpress,代码行数:101,代码来源:class-sendpress-view-settings-account.php


示例19: html

    function html($sp)
    {
        SendPress_Tracking::event('Queue Tab');
        if (isset($_GET['cron'])) {
            $sp->fetch_mail_from_queue();
        }
        //Create an instance of our package class...
        $testListTable = new SendPress_Queue_Table();
        //Fetch, prepare, sort, and filter our data...
        $testListTable->prepare_items();
        SendPress_Option::set('no_cron_send', 'false');
        //$sp->fetch_mail_from_queue();
        $sp->cron_start();
        //echo $sp->get_key(). "<br>";
        $open_info = array("id" => 13, "report" => 10, "view" => "open");
        /*
        		$x = $sp->encrypt_data($open_info);
        
        	echo $x."<br>";
        	$x = $sp->decrypt_data($x);
        
        	print_r($x);
        		echo "<br>";
        
        	$d = $_GET['t'];
        	$x = $sp->decrypt_data($d);
        
        	print_r($x->id);
        		echo "<br>";
        	
        	
        	//echo wp_get_schedule('sendpress_cron_action_run');
        	//
        	$time_delay =  SendPress_Option::get('time-delay');
        	echo $time_delay;
        	echo date('l jS \of F Y H:i:s A',$time_delay );
        	echo "<br>";
        	$time = date('H:i:s');
        
        echo $time;//11:09
        	$time = date('H:i:s', $time_delay);
        
        echo $time;//11:09
        */
        $autocron = SendPress_Option::get('autocron', 'no');
        if ($autocron == 'yes') {
            $api_info = json_decode(SendPress_Cron::get_info());
            if (isset($api_info->active) && $api_info->active === 0) {
                echo "<p class='alert alert-danger'><strong>Oh no!</strong> It looks like AutoCron disconnected itself. To get max send speed please re-enable it <a href='" . SendPress_Admin::link('Settings_Account') . "'>here</a>.</p>";
                delete_transient('sendpress_autocron_cache');
                SendPress_Option::set('autocron', 'no');
            } else {
                if (isset($api_info->lastcheck)) {
                    echo "<p class='alert alert-success'><strong>Looking good!</strong> Autocron is running and last checked your site at:&nbsp;" . $api_info->lastcheck . " UTC</p>";
                }
            }
        } else {
            echo "<p class='alert alert-info'><strong>Howdy.</strong> It looks like AutoCron was not enabled or it disconnected itself. To get max send speed please re-enable it <a href='" . SendPress_Admin::link('Settings_Account') . "'>here</a>.</p>";
        }
        ?>

<br>
	<div id="taskbar" class="lists-dashboard rounded group"> 

	<div id="button-area">  
	<?php 
        $pause_sending = SendPress_Option::get('pause-sending', 'no');
        $txt = __('Pause Sending', 'sendpress');
        //Stop Sending for now
        if ($pause_sending == 'yes') {
            $txt = __('Resume Sending', 'sendpress');
        }
        ?>
	<div class="btn-group">
	<a class="btn btn-large btn-default " href="<?php 
        echo SendPress_Admin::link('Queue');
        ?>
&action=pause-queue" ><i class="icon-repeat icon-white "></i> <?php 
        echo $txt;
        ?>
</a>

	<a id="send-now" class="btn btn-primary btn-large " data-toggle="modal" href="#sendpress-sending"   ><i class="icon-white icon-refresh"></i> <?php 
        _e('Send Emails Now', 'sendpress');
        ?>
</a>
	</div>
	</div>
	<?php 
        $emails_per_day = SendPress_Option::get('emails-per-day');
        if ($emails_per_day == 0) {
            $emails_per_day = __('Unlimited', 'sendpress');
        }
        $emails_per_hour = SendPress_Option::get('emails-per-hour');
        $hourly_emails = SendPress_Data::emails_sent_in_queue("hour");
        $emails_so_far = SendPress_Data::emails_sent_in_queue("day");
        //print_r(SendPress_Data::emails_stuck_in_queue());
        ?>

		
//.........这里部分代码省略.........
开发者ID:pedro-mendonca,项目名称:sendpress,代码行数:101,代码来源:class-sendpress-view-queue.php


示例20: send_email

 function send_email($to, $subject, $html, $text, $istest = false, $sid, $list_id, $report_id)
 {
     $phpmailer = new SendPress_PHPMailer();
     /*
      * Make sure the mailer thingy is clean before we start,  should not
      * be necessary, but who knows what others are doing to our mailer
      */
     $phpmailer->ClearAddresses();
     $phpmailer->ClearAllRecipients();
     $phpmailer->ClearAttachments();
     $phpmailer->ClearBCCs();
     $phpmailer->ClearCCs();
     $phpmailer->ClearCustomHeaders();
     $phpmailer->ClearReplyTos();
     $charset = SendPress_Option::get('email-charset', 'UTF-8');
     $encoding = SendPress_Option::get('email-encoding', '8bit');
     $phpmailer->CharSet = $charset;
     $phpmailer->Encoding = $encoding;
     if ($charset != 'UTF-8') {
         $html = $this->change($html, 'UTF-8', $charset);
         $text = $this->change($text, 'UTF-8', $charset);
         $subject = $this->change($subject, 'UTF-8', $charset);
     }
     $from_email = SendPress_Option::get('fromemail');
     $phpmailer->From = $from_email;
     $p 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Sentinel类代码示例发布时间:2022-05-23
下一篇:
PHP SendPress_Data类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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