<ul class="session_list"> <?php if (empty($_GET['tab']) || isset($_GET['tab']) && $_GET['tab'] == 'schedule') { $sql = " SELECT s.id as s_id,s.title,s.status,s.session_datetime,s.duration,u.fname,u.lname,s.exp_applied_id,s.video_duration FROM sessions as s LEFT JOIN users as u "; $sql .= " ON(s.user_id = u.id) WHERE s.user_id='" . $_SESSION['LoginUserId'] . "' and s.status IN ('2','3') ORDER BY s.id DESC"; // $query = mysql_query($sql) or die(mysql_error()); if ($query) { if (mysql_num_rows($query) > 0) { while ($fetch = mysql_fetch_assoc($query)) { ?> <li> <div class="row"> <div class="col-xs-12 col-sm-2 col-xss-2"><h5> <?php $datetime = convertTimezone($fetch['session_datetime'], $default_tz, $userTimezone['timezone']); echo formatDate($datetime); ?> </h5></div> <?php if ($fetch['status'] == '3') { ?> <div class="col-xs-12 col-sm-5 col-xss-10"><?php } else { ?> <div class="col-xs-12 col-sm-7 col-xss-10"><?php } ?> <h3> <a href="<?php
echo $userTimezone['name']; ?> "</strong><br/> </p> <section class="ChooseDatesCont availability_outer" ><!-- CHOOSE DATE CONTAINER --> <?php if (count($get_avail) > 0) { foreach ($get_avail as $avail) { $from = convertTimezone(date("Y-m-d") . " " . $avail['from'], $default_tz, $userTimezone['timezone']); $to = convertTimezone(date("Y-m-d") . " " . $avail['to'], $default_tz, $userTimezone['timezone']); ?> <div class="row availability_inner"> <div class="col-xs-12 col-md-4"> <label class="lbl">On</label> <!-- <input type="text" name="date_avail[]" class="date_pick_icon form-control pre_select" readonly="readonly" value="<?php echo date('d-m-Y', strtotime($from)); ?> "/> --> <Select name="date_avail[]" class="form-control"> <?php $change = 0; if (date("Y-m-d", strtotime($from)) < date("Y-m-d", strtotime(date("Y-m-d") . " " . $avail['from']))) {
<p><?php echo !empty($session_detail[0]['other']) ? $session_detail[0]['other'] : "--"; ?> </p> </div> <?php if ($session_detail[0]['status'] == '1') { ?> <div class="row"> <div class="col-xs-12"> <?php $userTimezone = getUserTimezone($_SESSION['LoginUserId']); $time_request = explode(",", $session_detail[0]['time_request']); foreach ($time_request as $req) { $request = convertTimezone($req, $default_tz, $userTimezone['timezone']); echo "<div class='timeslot2'><input type='checkbox' name='slot' value='" . $request . "'>" . formatDate($request) . "</div>"; } ?> <div class="Mrg30 clearfix"> <a class="Acceptbtn request_slot" href="javascript:void(0);">Accept </a> <a class="Acceptbtn alternate_btn" id="alternative_dates" href="javascript:void(0);">Request Alternative time</a> </div> <section class="ChooseDatesCont" id="public_select_date" style="display:none;"><!-- CHOOSE DATE CONTAINER --> <p><strong class="txt_lt_it">Select at least 1 (preferably 3) time slots that suit you.</strong><br/><small>(All times are in your local timezone "<?php $timezone = getUserTimezone($_SESSION['LoginUserId']); echo $timezone['name']; ?> ")</small></p>
$tag_selected = array(); } if (!isset($language_selected)) { $language_selected = array(); } if (!isset($slot_selected)) { $slot_selected = array(); } //$tag_selected = (isset(($tag_selected)))?array():$tag_selected; //$language_selected = (isset(($language_selected)))?array():$language_selected; $sql = " INSERT INTO sessions SET user_id='" . $user_id . "',category_id='" . $category_id . "', tag_id='" . implode($tag_selected, ',') . "',language_id='" . implode($language_selected, ',') . "', type='request',duration='" . $duration . "',title='" . $title . "',description='" . $description . "',question='" . $question . "',other='" . $other . "',status='1',created='" . $date . "' "; $query = mysql_query($sql); if ($query) { $session_id = mysql_insert_id(); foreach ($slot_selected as $slot_val) { $slot = convertTimezone($slot_val, $userTimezone['timezone'], $default_tz); $sql = " INSERT INTO session_time SET user_id='" . $user_id . "', session_id='" . $session_id . "', datetime='" . $slot . "' "; $query = mysql_query($sql); if (!$query) { $error[] = '1'; } } } else { $error[] = '1'; } if (in_array(1, $error)) { echo json_encode(array("status" => "error")); exit; } else { echo json_encode(array("status" => "success", "id" => $session_id)); exit;
<div class="sidebarfilter"> <ul> <li> <h5>Requested by </h5> <span class="req_by"> <span class="imgblk"> <img src="<?php echo !empty($session_detail[0]['profile_image']) ? $session_detail[0]['profile_image'] : 'images/users/default.jpg'; ?> " alt="user" /> </span> <h6><?php echo $session_detail[0]['fname'] . " " . $session_detail[0]['lname']; ?> <small>On: <?php $datetime = convertTimezone($session_detail[0]['created'], $default_tz, $userTimezone['timezone']); echo formatDate($datetime); /* if(!empty(strtotime($session_detail[0]['session_datetime']))) { echo $session_detail[0]['session_datetime']; } else { foreach(explode(",",$session_detail[0]['time_request']) as $time) { echo "<br>".$time; } } */ ?>