</td> <td><?php if ($retrieved_data->post_type == 'hmgt_notice') { _e('Notice', 'hospital_mgt'); } if ($retrieved_data->post_type == 'hmgt_event') { _e('Event', 'hospital_mgt'); } ?> </td> <td> <?php if (get_post_meta($retrieved_data->ID, 'notice_for', true) == 'all') { echo get_post_meta($retrieved_data->ID, 'notice_for', true); } else { echo get_role_name_in_message(get_post_meta($retrieved_data->ID, 'notice_for', true)); } ?> </td> <td display="inline"> <a href="#" class="btn btn-primary view-notice" id="<?php echo $retrieved_data->ID; ?> "> <?php _e('View', 'hospital_mgt'); ?> </a> <a href="?page=hmgt_event&tab=addnotice&action=edit¬ice_id=<?php echo $retrieved_data->ID; ?> "class="btn btn-info"><?php
function hmgt_view_event() { $notice = get_post($_REQUEST['evnet_id']); //var_dump($notice); ?> <div class="form-group"> <a href="#" class="close-btn-cat badge badge-success pull-right">X</a> <h4 class="modal-title" id="myLargeModalLabel"> <?php _e('Event Detail', 'hospital_mgt'); ?> </h4> </div> <hr> <div class="panel panel-white form-horizontal"> <div class="form-group"> <label class="col-sm-3" for="notice_title"> <?php _e(' Title', 'hospital_mgt'); ?> : </label> <div class="col-sm-9"> <?php echo $notice->post_title; ?> </div> </div> <div class="form-group"> <label class="col-sm-3" for="notice_title"> <?php _e(' Comment', 'hospital_mgt'); ?> : </label> <div class="col-sm-9"> <?php echo $notice->post_content; ?> </div> </div> <div class="form-group"> <label class="col-sm-3" for="notice_title"> <?php _e('Event/Notice For', 'hospital_mgt'); ?> : </label> <div class="col-sm-9"> <?php //echo get_post_meta( $notice->ID, 'notice_for',true); if (get_post_meta($notice->ID, 'notice_for', true) == 'all') { echo get_post_meta($notice->ID, 'notice_for', true); } else { echo get_role_name_in_message(get_post_meta($notice->ID, 'notice_for', true)); } ?> </div> </div> <div class="form-group"> <label class="col-sm-3" for="notice_title"> <?php _e('Start Date', 'hospital_mgt'); ?> : </label> <div class="col-sm-9"> <?php echo get_post_meta($notice->ID, 'start_date', true); ?> </div> </div> <div class="form-group"> <label class="col-sm-3" for="notice_title"> <?php _e('End Date', 'hospital_mgt'); ?> : </label> <div class="col-sm-9"> <?php echo get_post_meta($notice->ID, 'end_date', true); ?> </div> </div> </div> <?php die; }
<?php $offset = 0; if (isset($_REQUEST['pg'])) { $offset = $_REQUEST['pg']; } $message = $obj_message->hmgt_get_send_message(get_current_user_id(), $max, $offset); foreach ($message as $msg_post) { if ($msg_post->post_author == get_current_user_id()) { ?> <tr> <td class="hidden-xs message_for"> <span><?php if (get_post_meta($msg_post->ID, 'message_for', true) == 'user') { echo hmgt_get_display_name(get_post_meta($msg_post->ID, 'message_for_userid', true)); } else { echo get_role_name_in_message(get_post_meta($msg_post->ID, 'message_for', true)); } ?> </span> </td> <td class="message_title"><a href="?dashboard=user&page=message&tab=view_message&from=sendbox&id=<?php echo $msg_post->ID; ?> "><?php echo $msg_post->post_title; ?> </a></td> <td class="messsage_body"> <?php echo $msg_post->post_content; ?>