notifications updates
Showing
3 changed files
with
12 additions
and
2 deletions
| ... | @@ -194,8 +194,11 @@ function display_page() { | ... | @@ -194,8 +194,11 @@ function display_page() { |
| 194 | , 'meta_value' => 'pending' | 194 | , 'meta_value' => 'pending' |
| 195 | ); | 195 | ); |
| 196 | 196 | ||
| 197 | $entries = get_posts($args); | ||
| 197 | 198 | ||
| 198 | foreach(get_posts($args) as $entry) { | 199 | |
| 200 | |||
| 201 | foreach($entries as $entry) { | ||
| 199 | $id = $entry->ID; | 202 | $id = $entry->ID; |
| 200 | 203 | ||
| 201 | $details = get_post_meta($id,'details',true); | 204 | $details = get_post_meta($id,'details',true); | ... | ... |
| ... | @@ -47,12 +47,13 @@ print "</pre>"; | ... | @@ -47,12 +47,13 @@ print "</pre>"; |
| 47 | <tr> | 47 | <tr> |
| 48 | <td><?php echo $entry->post_title; ?></td> | 48 | <td><?php echo $entry->post_title; ?></td> |
| 49 | <td><?php echo date("M j, Y @ h:i A",strtotime($entry->execute_date)); ?></td> | 49 | <td><?php echo date("M j, Y @ h:i A",strtotime($entry->execute_date)); ?></td> |
| 50 | <td><?php echo $sendto; ?></td> | 50 | <td><?php echo ucwords($sendto); ?></td> |
| 51 | <td><?php if ($entry->is_email): ?><img src="<?php echo Tools\url('assets/images/accept.png', __FILE__)?>" /><?php endif;?></td> | 51 | <td><?php if ($entry->is_email): ?><img src="<?php echo Tools\url('assets/images/accept.png', __FILE__)?>" /><?php endif;?></td> |
| 52 | <td><?php if ($entry->is_system): ?><img src="<?php echo Tools\url('assets/images/accept.png', __FILE__)?>" /><?php endif;?></td> | 52 | <td><?php if ($entry->is_system): ?><img src="<?php echo Tools\url('assets/images/accept.png', __FILE__)?>" /><?php endif;?></td> |
| 53 | <td> | 53 | <td> |
| 54 | 54 | ||
| 55 | <?php | 55 | <?php |
| 56 | |||
| 56 | if (strtotime($entry->execute_date) > time()):?> | 57 | if (strtotime($entry->execute_date) > time()):?> |
| 57 | <a href="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $entry->ID; ?>">edit</a> | 58 | <a href="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $entry->ID; ?>">edit</a> |
| 58 | | <a href="/wp-admin/admin.php?page=notifications&action=delete&page_id=<?php echo $entry->ID; ?>" onclick="return confirm('Are you sure?');">delete</a></td> | 59 | | <a href="/wp-admin/admin.php?page=notifications&action=delete&page_id=<?php echo $entry->ID; ?>" onclick="return confirm('Are you sure?');">delete</a></td> | ... | ... |
| ... | @@ -64,6 +64,11 @@ use Tz\WordPress\Tools; | ... | @@ -64,6 +64,11 @@ use Tz\WordPress\Tools; |
| 64 | <td>Sent To:</td> | 64 | <td>Sent To:</td> |
| 65 | <td> | 65 | <td> |
| 66 | 66 | ||
| 67 | <?php | ||
| 68 | if ($entry->details['sendto'] == "report" ): ?> | ||
| 69 | <input type="hidden" name="sendto" value="<?php echo $entry->details['sendto']; ?>"/> | ||
| 70 | <span style="color:#999;"><em>Report Generated</em></span> | ||
| 71 | <?php else: ?> | ||
| 67 | <select name="sendto" class="wide-input-field"> | 72 | <select name="sendto" class="wide-input-field"> |
| 68 | <option value="allusers" <?php echo ($validation->set_value('sendto',$entry->details['sendto'])=="allusers") ? 'selected="selected"' : "";?>>All Users</option> | 73 | <option value="allusers" <?php echo ($validation->set_value('sendto',$entry->details['sendto'])=="allusers") ? 'selected="selected"' : "";?>>All Users</option> |
| 69 | <optgroup label="By Group:"> | 74 | <optgroup label="By Group:"> |
| ... | @@ -72,6 +77,7 @@ use Tz\WordPress\Tools; | ... | @@ -72,6 +77,7 @@ use Tz\WordPress\Tools; |
| 72 | <?php endforeach; ?> | 77 | <?php endforeach; ?> |
| 73 | </optgroup> | 78 | </optgroup> |
| 74 | </select> | 79 | </select> |
| 80 | <?php endif; ?> | ||
| 75 | 81 | ||
| 76 | 82 | ||
| 77 | <?php echo $validation->form_error('sendto');?> | 83 | <?php echo $validation->form_error('sendto');?> | ... | ... |
-
Please register or sign in to post a comment