Beispiel #1
0
					for="">Cron Start Time</label>
				</td>
				<td class="settingInput" id="bottomBorderNone"><div><?php 
if (get_option('xyz_em_cronStartTime') != 0) {
    echo xyz_local_date_time("d-m-Y H:i:s", get_option('xyz_em_cronStartTime'));
} else {
    echo "NA";
}
?>
</div></td>
				<td scope="row" class=" settingInput" id="bottomBorderNone"><label
					for="">Cron End Time</label>
				</td>
				<td class="settingInput" id="bottomBorderNone"><div><?php 
if (get_option('xyz_em_CronEndTime') != 0) {
    echo xyz_local_date_time("d-m-Y H:i:s", get_option('xyz_em_CronEndTime'));
} else {
    echo "NA";
}
?>
</div></td>
			</tr>
		</table>
	</fieldset>

</div>
<?php 
function pendingEmailCount()
{
    global $wpdb;
    $xyz_em_pendingCount = $wpdb->get_results("SELECT ea.id,ea.email,em.status FROM " . $wpdb->prefix . "xyz_em_email_address ea INNER JOIN " . $wpdb->prefix . "xyz_em_address_list_mapping em ON ea.id=em.ea_id WHERE em.status='-1'");
        $starttime = $entry->start_time;
        if ($starttime != "Never") {
            echo xyz_local_date_time("F j, Y, g:i a", $starttime);
        } else {
            echo $starttime;
        }
        ?>
</td>
				<td><?php 
        $time = $entry->last_fired_time;
        if ($time == "Never") {
            echo $time;
        } elseif ($time == 0) {
            echo 'Restarted';
        } else {
            echo xyz_local_date_time("F j, Y, g:i a", $time);
        }
        ?>
</td>

				<td><?php 
        if ($entry->status == 1) {
            echo "Active";
        }
        if ($entry->status == 0) {
            echo "Paused";
        }
        if ($entry->status == -1) {
            echo "Pending";
        }
        if ($entry->status == 2) {
								<?php 
        }
        ?>
						</select>H <select id="minute_end" name="xyz_em_minute_end" id="select">
		
								<?php 
        for ($i = 0; $i <= 59; $i++) {
            ?>
								<option value="<?php 
            echo $i;
            ?>
"
								<?php 
            if (isset($_POST['xyz_em_minute_end']) && $_POST['xyz_em_minute_end'] == $i) {
                echo 'selected';
            } elseif (xyz_local_date_time("i", $details->end_time) == $i) {
                echo 'selected';
            }
            ?>
>
								<?php 
            echo $i;
            ?>
								</option>
								<?php 
        }
        ?>
						</select>M
							</div>
						</div>
					</div>
Beispiel #4
0
    function xyz_em_dashboard_widget()
    {
        global $wpdb;
        ?>
<div>
<fieldset
style="width: 98%; border: 1px solid #F7F7F7; padding: 10px 0px 15px 10px;">
<legend>Email Address Statistics</legend>
<table class="widefat" style="width: 99%;">
<tr valign="top">
<td scope="row" style="width:20%;" id="bottomBorderNone"><label
for="">Pending&nbsp;:</label>
</td>
<td class="settingInput" id="bottomBorderNone">
<?php 
        $xyz_em_pendingCount = $wpdb->get_results("SELECT ea.id,ea.email,em.status FROM " . $wpdb->prefix . "xyz_em_email_address ea INNER JOIN " . $wpdb->prefix . "xyz_em_address_list_mapping em ON ea.id=em.ea_id WHERE em.status='-1'");
        echo count($xyz_em_pendingCount);
        ?>
</td>

<td scope="row" style="width:20%;" id="bottomBorderNone"><label
for="">Active&nbsp;:</label>
</td>
<td class="settingInput" id="bottomBorderNone">
<?php 
        $xyz_em_activeCount = $wpdb->get_results("SELECT ea.id,ea.email,em.status FROM " . $wpdb->prefix . "xyz_em_email_address ea INNER JOIN " . $wpdb->prefix . "xyz_em_address_list_mapping em ON ea.id=em.ea_id WHERE em.status='1'");
        echo count($xyz_em_activeCount);
        ?>
</td>


<td scope="row" style="width:20%;" id="bottomBorderNone" ><label
for="">Unsubscribed&nbsp;:</label>
</td>
<td class="settingInput" id="bottomBorderNone">
<?php 
        $xyz_em_unsubscribedCount = $wpdb->get_results("SELECT ea.id,ea.email,em.status FROM " . $wpdb->prefix . "xyz_em_email_address ea INNER JOIN " . $wpdb->prefix . "xyz_em_address_list_mapping em ON ea.id=em.ea_id WHERE em.status='0'");
        echo count($xyz_em_unsubscribedCount);
        ?>
 </td>

</tr>
</table>
</fieldset>

<fieldset
style="width: 98%; border: 1px solid #F7F7F7; padding: 10px 0px 15px 10px;">
<legend>Queue Statistics</legend>
<table class="widefat" style="width: 99%;">
<tr valign="top">
<td scope="row" style="width:80%;" id="bottomBorderNone"><label
for="">Email Fired In Current Hour / Hourly Email Sending Limit &nbsp;:</label>
</td>
<td class="settingInput" id="bottomBorderNone"><div  style="margin-left:10px;"><?php 
        echo get_option('xyz_em_hourly_email_sent_count');
        ?>
 / <?php 
        echo get_option('xyz_em_hesl');
        ?>
</div></td>

</tr>
</table>
</fieldset>

<fieldset
style="width: 98%; border: 1px solid #F7F7F7; padding: 10px 0px 15px 10px;">
<legend>Campaign Statistics</legend>
<table class="widefat" style="width: 99%;">
<tr valign="top">
<td scope="row" style="width:20%;" id="bottomBorderNone"><label
for="">Pending&nbsp;:</label>
</td>
<td class="settingInput" id="bottomBorderNone">
<?php 
        $xyz_em_pendingCampaignCount = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "xyz_em_email_campaign  WHERE status='-1'");
        echo count($xyz_em_pendingCampaignCount);
        ?>
</td>
<td scope="row" style="width:20%;" id="bottomBorderNone"><label
for="">Active&nbsp;:</label>
</td>
<td class="settingInput" id="bottomBorderNone">
<?php 
        $xyz_em_activeCampaignCount = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "xyz_em_email_campaign  WHERE status='1'");
        echo count($xyz_em_activeCampaignCount);
        ?>
</td>

<td scope="row" style="width:20%;" id="bottomBorderNone"><label
for="">Paused&nbsp;:</label>
</td>
<td class="settingInput" id="bottomBorderNone">
<?php 
        $xyz_em_pausedCampaignCount = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "xyz_em_email_campaign  WHERE status='0'");
        echo count($xyz_em_pausedCampaignCount);
        ?>
</td>

</tr>
</table>
</fieldset>
<fieldset
style="width: 98%; border: 1px solid #F7F7F7; padding: 10px 0px 15px 10px;">
<legend>Cron Execution Info</legend>
<table class="widefat" style="width: 99%;">
<tr valign="top">
<td scope="row" style="width:16%;" id="bottomBorderNone" ><label
for="">Start Time:</label>
</td>
<td style="width:34%;" id="bottomBorderNone"><?php 
        if (get_option('xyz_em_cronStartTime') != 0) {
            echo xyz_local_date_time("d-m-Y H:i:s", get_option('xyz_em_cronStartTime'));
        } else {
            echo "NA";
        }
        ?>
</td>
<td scope="row" style="width:16%;" id="bottomBorderNone"><label
for="">End Time:</label>
</td>
<td style="width:34%; " id="bottomBorderNone"><?php 
        if (get_option('xyz_em_CronEndTime') != 0) {
            echo xyz_local_date_time("d-m-Y H:i:s", get_option('xyz_em_CronEndTime'));
        } else {
            echo "NA";
        }
        ?>
</td>
</tr>
</table>
</fieldset>

</div>
<?php 
    }