<th scope="col" id="tags" class="manage-column column-tags" style="">Parent No.</th> <th scope="col" id="date" class="manage-column column-date sortable asc" style=""> Source </th> <th scope="col" id="date" class="manage-column column-date sortable asc" style=""> Reg. Date </th> <th scope="col" id="date" class="manage-column column-date sortable asc" style=""> Course Date </th> <th scope="col" id="date" class="manage-column column-date sortable asc" style=""> Invoice No. </th> <th scope="col" id="date" class="manage-column column-date sortable asc" style=""> Status </th> </tr> </thead> <tbody id="the-list"> <?php foreach ($user_protege as $protege_id) { $protege_orders = User::getOrdersByDate($protege_id, $date_type); if (!empty($protege_orders)) { $protege_form_id = User::getRegistrationFormID($protege_id); $protege_form = User::getRegistrationForm($protege_form_id); $protege_status = ''; $ptotege_invoice = ''; $protege_course_start = ''; foreach ($protege_orders as $order) { $order_obj = new \WC_Order($order->ID); $order_items = $order_obj->get_items(); $protege_course_id = db::getEntryMeta($order->ID, $user_fields['course']); $ptotege_invoice = db::getEntryMeta($order->ID, '_transaction_id')[0]; if ($protege_course_id) { $stages = Course::getChilds($protege_course_id); foreach ($stages as $stage) { $stage_name = Event::getNameByID($stage->ID); if ($stage_name === 'INT') { $protege_course_start = date('Y-m-d', db::getEntryMeta($stage->ID, $stage_type_fields['start'])[0]); break;
<!--<td>Childs Mobile</td>--> <td>Childs Birth Cert. No.</td> <td>Emergency Name</td> <td>Mobile No.</td> <td>Adventure Consultant</td> <td>Protege Assessment</td> <td>Savant Assessment</td> <td>Protege Form Data</td> </tr> </thead> <tbody> <?php foreach ($users as $user_obj) { $user_id = $user_obj->user_id; $user_form_id = User::getMeta($user_id, $user_fields['registration-form']); $user_form = User::getRegistrationForm($user_form_id); $assessment_protege_id = User::getMeta($user_id, $user_fields['assessment-protege'] . $raw_stage_name); $assessment_savant_id = User::getMeta($user_id, $user_fields['assessment-savant'] . $raw_stage_name); $assessment_protege_fields = SiteHelper::protege_assessment_relation(); $assessment_savant_fields = SiteHelper::savant_assessment_relation(); $assessment_protege_form_id = $assessment_protege_fields[$raw_stage_name]['form-id']; $assessment_savant_form_id = $assessment_savant_fields[$raw_stage_name]['form-id']; $assessment_protege_fields_id = $assessment_protege_fields[$raw_stage_name]['fields']; $assessment_savant_fields_id = $assessment_savant_fields[$raw_stage_name]['fields']; $protege_model = \RGFormsModel::get_lead($assessment_protege_id); $savant_model = \RGFormsModel::get_lead($assessment_savant_id); $protege_link_text = 'Edit'; $savant_link_text = 'Edit'; $user_consultant = User::getByCode($user_form[36]); if ($raw_stage_name === 'PRE') { foreach ($assessment_savant_fields_id as $id) {
public function getConfirmedByCountry($stage_id) { $stage_name = $this->getNameByID($stage_id); $stage_fields = $this->addition_fields_list(); $users_bought_stage = User::getBoughtStage($stage_fields['name'] . $stage_name, $stage_id); $stage_counter = array('SG' => 0, 'MYR' => 0); foreach ($users_bought_stage as $user_obj) { $user_id = $user_obj->ID; $user_form_id = User::getRegistrationFormID($user_id); $user_country = User::getRegistrationForm($user_form_id)[11] === 'singapore' ? $stage_counter['SG']++ : $stage_counter['MYR']++; } $response1 = $stage_counter['SG'] > 0 ? $stage_counter['SG'] . 'SG' : '0SG'; $response2 = $stage_counter['MYR'] > 0 ? $stage_counter['MYR'] . 'MYR' : '0MYR'; #$response = !empty($response1) && !empty($response2) ? $response1 . ' - ' . $response2 : empty($response1) && !empty($response2) ? $response2 : !empty($response1) && empty($response2) ? $response1 : 0; $response = $response1 . ' - ' . $response2; return $response; }