コード例 #1
0
<?php

$header_path = dirname(__FILE__) . '/header.php';
$header_path = apply_filters('mdrop_header_path', $header_path, 'list');
if (file_exists($header_path)) {
    require_once $header_path;
}
?>

<div id="mdrop-list">
<?php 
//$drop = MDROP_Dropbox::instance();
//$drop->upload_file_dropbox( 56, 57 );
$connect = mdrop_connect_server();
if ($connect) {
    $number_msg = $connect->check_num_msg();
}
$qery_message = mdrop_get_query_message(10);
$messages = $qery_message->posts;
$total_msg = $qery_message->found_posts;
if ($connect) {
    ?>
	<div class="postbox">
		<h3 class="mdrop-header-wrap"><?php 
    _e('Total E-mail ', 'mdrop');
    echo $number_msg;
    ?>
			<span class="mdrop-fetch-msg" style="display: none;">
				<span class="mdrop-text-fetch"><?php 
    _e('E-mail Attachment Fetch Start From ');
    ?>
コード例 #2
0
 function check_mail()
 {
     check_ajax_referer('mdrop_nonce');
     $server = mdrop_connect_server();
     $mail_count = $server->check_num_msg();
     $message_number = $mail_count - ($_POST['start'] - 1);
     $end = $_POST['end'];
     if (!$mail_count) {
         wp_send_json_success(array('request_status' => 0));
     }
     $server->new_attachment($message_number);
     $new_message_number = $_POST['start'] + 1;
     if ($new_message_number > $end) {
         wp_send_json_success(array('request_status' => 0));
     }
     wp_send_json_success(array('request_status' => 1, 'new_message_number' => $new_message_number));
 }