Esempio n. 1
0
} else {
    echo $message->subject;
}
?>
</h3>
        <p class="message-date"><?php 
echo mysql2date('d/m/y', $message->date);
?>
</p>
	</div>
	<div class="message-sender">                                
    	<p><?php 
if ($box == 'sendbox') {
    echo gym_get_display_name($message->post_author);
} else {
    echo gym_get_display_name($message->sender);
}
?>
 <span>&lt;<?php 
if ($box == 'sendbox') {
    echo gmgt_get_emailid_byuser_id($message->post_author);
} else {
    echo gmgt_get_emailid_byuser_id($message->sender);
}
?>
&gt;</span></p>
    </div>
    <div class="message-content">
    	<p><?php 
if ($box == 'sendbox') {
    echo $message->post_content;
Esempio n. 2
0
			<div class="clear"></div>
			<div class="col-md-6 col-sm-6 col-xs-12">
			<?php 
global $wpdb;
$table_attendance = $wpdb->prefix . 'gmgt_attendence';
$table_class = $wpdb->prefix . 'gmgt_class_schedule';
//$sdate = $_REQUEST['sdate'];
//$edate = $_REQUEST['edate'];
$sdate = '2015-09-01';
$edate = '2015-09-10';
$chart_array = array();
$report_2 = $wpdb->get_results("SELECT  at.user_id,\n\t\t\t\t\tSUM(case when `status` ='Present' then 1 else 0 end) as Present,\n\t\t\t\t\tSUM(case when `status` ='Absent' then 1 else 0 end) as Absent\n\t\t\t\t\tfrom {$table_attendance} as at where at.attendence_date >  DATE_SUB(NOW(), INTERVAL 1 WEEK)  AND at.role_name = 'staff_member' GROUP BY at.user_id");
$chart_array[] = array(__('Staff Member', 'gym_mgt'), __('Present', 'gym_mgt'), __('Absent', 'gym_mgt'));
if (!empty($report_2)) {
    foreach ($report_2 as $result) {
        $user_name = gym_get_display_name($result->user_id);
        $chart_array[] = array("{$user_name}", (int) $result->Present, (int) $result->Absent);
    }
}
$options = array('title' => __('Staff Attendance Report', 'gym_mgt'), 'titleTextStyle' => array('color' => '#66707e', 'fontSize' => 14, 'bold' => true, 'italic' => false, 'fontName' => 'open sans'), 'legend' => array('position' => 'right', 'textStyle' => array('color' => '#66707e', 'fontSize' => 14, 'bold' => true, 'italic' => false, 'fontName' => 'open sans')), 'hAxis' => array('title' => __('Staff Member', 'gym_mgt'), 'titleTextStyle' => array('color' => '#66707e', 'fontSize' => 14, 'bold' => true, 'italic' => false, 'fontName' => 'open sans'), 'textStyle' => array('color' => '#66707e', 'fontSize' => 10), 'maxAlternation' => 2), 'vAxis' => array('title' => __('No of Staff Member', 'gym_mgt'), 'minValue' => 0, 'maxValue' => 5, 'format' => '#', 'titleTextStyle' => array('color' => '#66707e', 'fontSize' => 14, 'bold' => true, 'italic' => false, 'fontName' => 'open sans'), 'textStyle' => array('color' => '#66707e', 'fontSize' => 12)), 'colors' => array('#22BAA0', '#f25656'));
$GoogleCharts = new GoogleCharts();
$chart = $GoogleCharts->load('column', 'attendance_report_staff')->get($chart_array, $options);
?>
				<div class="panel panel-white">
					<div class="panel-heading">
						<h3 class="panel-title"><?php 
_e('Staff Attendance', 'gym_mgt');
?>
</h3>						
					</div>
					<div class="panel-body">
Esempio n. 3
0
            </th>
            </tr>
 		<?php 
$offset = 0;
if (isset($_REQUEST['pg'])) {
    $offset = $_REQUEST['pg'];
}
$message = gmgt_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>
            	<span><?php 
        if (get_post_meta($msg_post->ID, 'message_for', true) == 'user') {
            echo gym_get_display_name(get_post_meta($msg_post->ID, 'message_gmgt_user_id', true));
        } else {
            echo get_post_meta($msg_post->ID, 'message_for', true);
        }
        ?>
</span>
            </td>
            <td>
            	<span><?php 
        if (get_post_meta($msg_post->ID, 'gmgt_class_id', true) != "" && get_post_meta($msg_post->ID, 'gmgt_class_id', true) == 'all') {
            _e('All', 'gym_mgt');
        } elseif (get_post_meta($msg_post->ID, 'gmgt_class_id', true) != "") {
            echo gmgt_get_class_name(get_post_meta($msg_post->ID, 'gmgt_class_id', true));
        }
        ?>
</span>
Esempio n. 4
0
                  <?php 
_e('Descripción', 'gym_mgt');
?>
            </th>
            </tr>
 		<?php 
$message = gmgt_get_inbox_message(get_current_user_id(), $limit, $max);
foreach ($message as $msg) {
    ?>
 			 <tr>
 			<!-- <td class="hidden-xs">
            	<span><div class="checker"><span class=""><input type="checkbox" class="checkbox-mail"></span></div></span>
            </td>
            -->
            <td><?php 
    echo gym_get_display_name($msg->sender);
    //echo get_user_name_byid($msg->sender);
    ?>
</td>
             <td>
                 <a href="?dashboard=user&page=message&tab=view_message&from=inbox&id=<?php 
    echo $msg->message_id;
    ?>
"> <?php 
    echo $msg->subject;
    ?>
</a>
            </td>
            <td><?php 
    echo $msg->message_body;
    ?>
Esempio n. 5
0
    ?>
">
       <?php 
    $workoutmember_id = 0;
    if (isset($_REQUEST['workoutmember_id'])) {
        $workoutmember_id = $_REQUEST['workoutmember_id'];
    }
    $view = 0;
    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'view') {
        $view = 1;
        ?>
			<div class="panel-body"> 
		<form method="post" class="form-horizontal">  
         <div class="col-md-12">
				 		<h2><?php 
        echo gym_get_display_name($_REQUEST['workoutmember_id']) . ' entrenamiento';
        ?>
</h2>
				 		</div>
        <div class="form-group">
			<label class="col-sm-1 control-label" for="curr_date"><?php 
        _e('Date', 'gym_mgt');
        ?>
</label>
			<div class="col-sm-3">
			<input id="curr_date" class="form-control" type="text" value="<?php 
        if (isset($_POST['tcurr_date'])) {
            echo $_POST['tcurr_date'];
        } else {
            echo date("Y-m-d");
        }
Esempio n. 6
0
				</span> 
				<span class="shiptitle"><?php 
_e('More Info', 'gym_mgt');
?>
</span>		
			</span>
			<div class="table_row">
				<div class="col-md-6 col-sm-12 table_td">
					<i class="fa fa-user"></i> <?php 
_e('Staff Member', 'gym_mgt');
?>
	
				</div>
				<div class="col-md-6 col-sm-12 table_td">
					<span class="txt_color"><?php 
echo gym_get_display_name($user_info->staff_id);
?>
</span>
				</div>
			</div>
			<div class="table_row">
				<div class="col-md-6 col-sm-12 table_td">
					<i class="fa fa-heart"></i><?php 
_e('Interest Area', 'gym_mgt');
?>
				</div>
				<div class="col-md-6 col-sm-12 table_td">
					<span class="txt_color"><?php 
echo get_the_title($user_info->intrest_area);
?>
</span>
Esempio n. 7
0
</script>
     <?php 
if ($active_tab == 'addworkout') {
    $workoutmember_id = 0;
    if (isset($_REQUEST['workoutmember_id'])) {
        $workoutmember_id = $_REQUEST['workoutmember_id'];
    }
    $view = 0;
    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'view') {
        $view = 1;
        ?>
			
		<form method="post" class="form-horizontal">  
         <div class="col-md-12">
				 		<h2><?php 
        echo gym_get_display_name($_REQUEST['workoutmember_id']) . '\'s Workout';
        ?>
</h2>
				 		</div>
        <div class="form-group">
			<label class="col-sm-1 control-label" for="curr_date"><?php 
        _e('Date', 'gym_mgt');
        ?>
</label>
			<div class="col-sm-3">
			<input id="curr_date" class="form-control" type="text" value="<?php 
        if (isset($_POST['tcurr_date'])) {
            echo $_POST['tcurr_date'];
        } else {
            echo date("Y-m-d");
        }
Esempio n. 8
0
function gmgt_measurement_view()
{
    $obj_workout = new Gmgtworkout();
    $curr_user_id = get_current_user_id();
    $obj_gym = new Gym_management($curr_user_id);
    $user_id = $_REQUEST['user_id'];
    $measurement_data = $obj_workout->get_all_measurement_by_userid($user_id);
    ?>
		<div class="form-group"> 	<a href="#" class="close-btn badge badge-success pull-right">X</a>
			<h4 class="modal-title" id="myLargeModalLabel">
				<?php 
    echo gym_get_display_name($user_id) . __(' Medición', 'gym_mgt');
    ?>
			</h4>
		</div>
		<hr>
		<div class="panel-body">
			<div class="table-responsive box-scroll">
        		<table id="measurement_list" class="display table" cellspacing="0" width="100%">
		        	 <thead>
		            	<tr>						
						<th><?php 
    _e('Measurement', 'gym_mgt');
    ?>
</th>
						<th><?php 
    _e('Result', 'gym_mgt');
    ?>
</th>			
					    <th><?php 
    _e('Record Date', 'gym_mgt');
    ?>
</th>		
					     <th><?php 
    _e('Action Date', 'gym_mgt');
    ?>
</th>				            
		            	</tr>		            	 
		        	</thead>
		        	<tbody>
		        	<?php 
    if (!empty($measurement_data)) {
        foreach ($measurement_data as $retrieved_data) {
            ?>
			        		<tr id="row_<?php 
            echo $retrieved_data->measurment_id;
            ?>
">
			        			<td class="recorddate"><?php 
            echo $retrieved_data->result_measurment;
            ?>
</td>
								<td class="duration"><?php 
            echo $retrieved_data->result;
            ?>
</td>
								<td class="result"><?php 
            echo $retrieved_data->result_date;
            ?>
</td>
								<td class="result">
								<?php 
            if ($obj_gym->role == 'Administrator') {
                ?>
								<a href="?page=gmgt_workout&tab=addmeasurement&action=edit&measurment_id=<?php 
                echo $retrieved_data->measurment_id;
                ?>
" class="btn btn-info">
								<?php 
            } else {
                ?>
								<a href="?dashboard=user&page=workouts&tab=addmeasurement&action=edit&measurment_id=<?php 
                echo $retrieved_data->measurment_id;
                ?>
" class="btn btn-info">
								<?php 
            }
            _e('Edit', 'gym_mgt');
            ?>
</a>
								 <a href="#" class="btn btn-danger measurement_delete" data-val="<?php 
            echo $retrieved_data->measurment_id;
            ?>
"><?php 
            _e('Delete', 'gym_mgt');
            ?>
</a>
								</td>
			        		</tr>
		        		<?php 
        }
    } else {
        ?>
		        		<tr>
		        		<td colspan=3> <?php 
        _e('No Record Found', 'gym_mgt');
        ?>
</td>
		        		</tr>
		        	<?php 
    }
    ?>
		        	</tbody>
		        	
		        </table>
		</div>
		<?php 
    die;
}