</th>
	</tr>
	</thead>

	<tbody id="the-list">
			<?php 
foreach ($users as $user_obj) {
    $user_id = $user_obj->user_id;
    $user_proposal = User::getMeta($user_id, $user_fields['proposals']);
    $user_course = User::getCourseID($user_id);
    if ($user_proposal) {
        continue;
    }
    $user = User::getByID($user_id)[0];
    $user_form_id = User::getMeta($user_id, $user_fields['registration-form']);
    $user_event_dates = User::getPreferedDatesID($user_form_id);
    ?>
				
				<tr id="post-1" class="iedit bsalted-proposal-row">
					<th scope="row" class="check-column">
					</th>
					<td class="post-title page-title column-title">
						<strong><?php 
    echo $user->display_name;
    ?>
</strong>
					</td>			
					<td class="author column-author"><?php 
    echo $user->user_nicename;
    ?>
</td>
Exemplo n.º 2
0
 public function getUpcommingStages()
 {
     $db = new db();
     $user_id = User::getID();
     $user_fields = User::addition_fields_list();
     $user_form_id = User::getMeta($user_id, $user_fields['registration-form']);
     // $user_form_model  = \RGFormsModel::get_lead($user_form_id);
     $user_event_dates = User::getPreferedDatesID($user_form_id);
     $events_id = $db->getPostID('\\Nerds\\Bsalted\\Entity\\EventEntity\\Event');
     $stage_fields = $this->types_fields_list();
     $current_date = date('Y-m-d');
     $dates = array();
     $filtered_events = array();
     $selectd_events = array();
     foreach ($events_id as $ev) {
         $ev_date = date('Y-m-d', db::getEntryMeta($ev->ID, $stage_fields['start']) ? db::getEntryMeta($ev->ID, $stage_fields['start'])[0] : db::getEntryMeta($ev->ID, $stage_fields['start']));
         if ($ev_date > $current_date) {
             $dates[$ev->ID] = $ev_date;
         }
     }
     asort($dates);
     $ev_dates = array_values($dates);
     foreach ($user_event_dates as $user_date) {
         $ev_date = SiteHelper::find_closest($ev_dates, $user_date);
         $filtered_events[] = $ev_date;
         $key = array_search($ev_date, $ev_dates);
         if ($key !== false && $ev_date !== null) {
             $ev_dates[$key] = null;
         }
     }
     foreach ($dates as $event_id => $event_date) {
         if (in_array($event_date, $filtered_events) && $this->stage_place_aviability($event_id)) {
             $selectd_events[$event_id] = $event_date;
         }
     }
     return $selectd_events;
 }