function weeklyreport($level, $data = array()) { switch ($level) { case 'ppda': $search_str = ' '; #Get the paginated list of bid invitations $results = paginate_list($this, $data, 'weekly_IFB_report', array('orderby' => '', 'searchstring' => '' . $search_str), 1000); # print_r($results); exit(); $table = "<div>"; if (!empty($results['page_list'])) { $table .= '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th width="5%"></th>' . '<th>Procurement Ref. No</th>' . '<th class="hidden-480">Subject of procurement</th>' . '<th class="hidden-480">Bid security</th>' . '<th class="hidden-480">Bid invitation date</th>' . '<th class="hidden-480">Addenda</th>' . '<th>Status</th>' . '<th>Published by</th>' . '<th>Date Added</th>' . '</tr>' . '</thead>' . '</tbody>'; foreach ($results['page_list'] as $row) { $this->session->unset_userdata('pdeid'); $status_str = ''; $addenda_str = '[NONE]'; $delete_str = ''; $edit_str = ''; if (!empty($level) && $level == 'active') { $delete_str = '<a title="Delete bid invitation" href="javascript:void(0);" onclick="confirmDeleteEntity(\'' . base_url() . 'bids/delete_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '\', \'Are you sure you want to delete this bid invitation?\\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.\')"><i class="icon-trash"></i></a>'; $edit_str = '<a title="Edit bid details" href="' . base_url() . 'bids/load_bid_invitation_form/i/' . encryptValue($row['bidinvitation_id']) . '"><i class="icon-edit"></i></a>'; } if ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') < 0) { $status_str = 'Bid evaluation | <a title="Select BEB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Select BEB]</a>'; } elseif ($row['bid_approved'] == 'N') { $status_str = 'Not published | <a title="Publish IFB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Publish IFB]</a>'; } elseif ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') > 0) { $status_str = 'Bidding closes in ' . get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') . ' days | <a title="view IFB document" href="' . base_url() . 'bids/view_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[View IFB]</a>'; $addenda_str = '<a title="view addenda list" href="' . base_url() . 'bids/view_addenda/b/' . encryptValue($row['bidinvitation_id']) . '">[View Addenda]</a> | <a title="Add addenda" href="' . base_url() . 'bids/load_ifb_addenda_form/b/' . encryptValue($row['bidinvitation_id']) . '">[Add Addenda]</a>'; } else { } $table .= '<tr>' . '<td></td>' . '<td>' . format_to_length($row['procurement_ref_no'], 40) . '</td>' . '<td>' . format_to_length($row['subject_of_procurement'], 50) . '</td>' . '<td>' . (is_numeric($row['bid_security_amount']) ? number_format($row['bid_security_amount'], 0, '.', ',') . ' ' . $row['bid_security_currency_title'] : (empty($row['bid_security_amount']) ? '<i>N/A</i>' : $row['bid_security_amount'])) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['invitation_to_bid_date']) . '</td>' . '<td>' . $addenda_str . '</td>' . '<td>' . $status_str . '</td>' . '<td>' . (empty($row['approver_fullname']) ? 'N/A' : $row['approver_fullname']) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['bid_dateadded']) . '</td>' . '</tr>'; } $table .= '</tbody></table>'; $table .= '<div class="pagination pagination-mini pagination-centered">' . pagination($this->session->userdata('search_total_results'), $results['rows_per_page'], $results['current_list_page'], base_url() . "bids/manage_bid_invitations/" . $level . "/p/%d") . '</div>'; } else { $table .= format_notice('WARNING: No bid invitations expiring this week'); } $table .= "</div>"; $adons = ''; //$entity = $records['pdeid']; //$this->session->set_userdata('pdeid',$entity); $datasx = $this->session->set_userdata('level', 'ppda'); $entityname = ''; $entityname = ''; $adons = date('d-m'); $level = "Procurement"; # exit('moooooo'); $titles = "Weekly report on expiring IFBs of ITP"; $body = " " . html_entity_decode($table); $permission = "view_bid_invitations"; $xcv = 0; push_permission($titles, $body, $level, $permission); #end break; case 'ifb': $search_str = ''; # code... $querys = $this->db->query("select distinct b.pdeid,b.pdename,a.* from pdes b inner join users a on a.pde = b.pdeid ")->result_array(); foreach ($querys as $row => $records) { #get the PDE ID " Idividual Pde Ids ";" $search_str = ' AND procurement_plans.pde_id="' . $records['pdeid'] . '"'; $results = paginate_list($this, $data, 'weekly_IFB_report', array('orderby' => '', 'searchstring' => '' . $search_str), 1000); # print_r($results); exit(); $table = "<div>"; if (!empty($results['page_list'])) { $table .= '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th width="5%"></th>' . '<th>Procurement Ref. No</th>' . '<th class="hidden-480">Subject of procurement</th>' . '<th class="hidden-480">Bid security</th>' . '<th class="hidden-480">Bid invitation date</th>' . '<th class="hidden-480">Addenda</th>' . '<th>Status</th>' . '<th>Published by</th>' . '<th>Date Added</th>' . '</tr>' . '</thead>' . '</tbody>'; foreach ($results['page_list'] as $row) { $this->session->unset_userdata('pdeid'); $status_str = ''; $addenda_str = '[NONE]'; $delete_str = ''; $edit_str = ''; if (!empty($level) && $level == 'active') { $delete_str = '<a title="Delete bid invitation" href="javascript:void(0);" onclick="confirmDeleteEntity(\'' . base_url() . 'bids/delete_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '\', \'Are you sure you want to delete this bid invitation?\\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.\')"><i class="icon-trash"></i></a>'; $edit_str = '<a title="Edit bid details" href="' . base_url() . 'bids/load_bid_invitation_form/i/' . encryptValue($row['bidinvitation_id']) . '"><i class="icon-edit"></i></a>'; } if ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') < 0) { $status_str = 'Bid evaluation | <a title="Select BEB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Select BEB]</a>'; } elseif ($row['bid_approved'] == 'N') { $status_str = 'Not published | <a title="Publish IFB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Publish IFB]</a>'; } elseif ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') > 0) { $status_str = 'Bidding closes in ' . get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') . ' days | <a title="view IFB document" href="' . base_url() . 'bids/view_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[View IFB]</a>'; $addenda_str = '<a title="view addenda list" href="' . base_url() . 'bids/view_addenda/b/' . encryptValue($row['bidinvitation_id']) . '">[View Addenda]</a> | <a title="Add addenda" href="' . base_url() . 'bids/load_ifb_addenda_form/b/' . encryptValue($row['bidinvitation_id']) . '">[Add Addenda]</a>'; } else { } $table .= '<tr>' . '<td></td>' . '<td>' . format_to_length($row['procurement_ref_no'], 40) . '</td>' . '<td>' . format_to_length($row['subject_of_procurement'], 50) . '</td>' . '<td>' . (is_numeric($row['bid_security_amount']) ? number_format($row['bid_security_amount'], 0, '.', ',') . ' ' . $row['bid_security_currency_title'] : (empty($row['bid_security_amount']) ? '<i>N/A</i>' : $row['bid_security_amount'])) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['invitation_to_bid_date']) . '</td>' . '<td>' . $addenda_str . '</td>' . '<td>' . $status_str . '</td>' . '<td>' . (empty($row['approver_fullname']) ? 'N/A' : $row['approver_fullname']) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['bid_dateadded']) . '</td>' . '</tr>'; } $table .= '</tbody></table>'; $table .= '<div class="pagination pagination-mini pagination-centered">' . pagination($this->session->userdata('search_total_results'), $results['rows_per_page'], $results['current_list_page'], base_url() . "bids/manage_bid_invitations/" . $level . "/p/%d") . '</div>'; } else { $table .= format_notice('WARNING: No bid invitations expiring this week'); } $table .= "</div>"; $adons = ''; $entity = $records['pdeid']; $this->session->set_userdata('pdeid', $entity); if ($records['usergroup'] > 0) { $level = $records['usergroup']; $this->session->set_userdata('usergroup', $records['usergroup']); // else // $datasx = $this->session->set_userdata('level','ppda'); } $entityname = $records['pdename']; $adons = date('d-m'); $level = "Procurement"; $titles = "Weekly report on expiring IFBs of " . $entityname . $adons; $body = " " . html_entity_decode($table); $permission = "view_bid_invitations"; $xcv = 0; push_permission($titles, $body, $level, $permission, $records['pdeid']); } break; default: # code... break; # exit(); } }
echo $row["id"]; ?> </td> <td><?php echo $row["title"]; ?> </td> <td><?php echo $row["name"]; ?> </td> <td title="<?php echo $row["time_closed"]; ?> ">πριν <?php echo get_date_diff($row["time_closed"], time()); ?> </td> <td><?php echo $admin; ?> </td> </tr> <?php } } ?> <tr class="hidden warning"> <td colspan="5" class="text-center">Δεν υπάρχουν αναφορές! :(</td> </tr> </tbody>
public function getReadableDuration() { return get_date_diff(0, $this->duration_sum) . ' (' . get_date_diff(0, $this->duration_calc) . ')'; }
$exec_link = "<a href=\"javascript:openExecutionWindow(" . "{$tcase_id},{$tcversion_id},{$tcase['build_id']}," . "{$tcase['testplan_id']},{$tcase['platform_id']},'{$whoiam}');\">" . "<img title=\"{$gui->l18n['execution']}\" src=\"{$imgSet['exec_icon']}\" /></a> "; $edit_link = "<a href=\"javascript:openTCEditWindow({$tcase_id});\">" . "<img title=\"{$gui->l18n['design']}\" src=\"{$imgSet['edit_icon']}\" /></a> "; $current_row[] = "<!-- " . sprintf("%010d", $tcase['tc_external_id']) . " -->" . $exec_history_link . $exec_link . $edit_link . htmlspecialchars($tcase['prefix']) . $gui->glueChar . $tcase['tc_external_id'] . " : " . htmlspecialchars($tcase['name']) . sprintf($gui->l18n['tcversion_indicator'], $tcase['version']); if ($show_platforms) { $current_row[] = htmlspecialchars($tcase['platform_name']); } if ($args->priority_enabled) { $current_row[] = "<!-- " . $tcase['priority'] . " -->" . $gui->priority[priority_to_level($tcase['priority'])]; } $last_execution = $tcase_mgr->get_last_execution($tcase_id, $tcversion_id, $tplan_id, $tcase['build_id'], $tcase['platform_id']); $status = $last_execution[$tcversion_id]['status']; if (!$status) { $status = $statusGui->status_code['not_run']; } $current_row[] = $statusGui->definition[$status]; $current_row[] = htmlspecialchars($tcase['creation_ts']) . " (" . get_date_diff($tcase['creation_ts']) . ")"; $rows[] = $current_row; } } /* different table id for different reports: * - Assignment Overview if $args->show_all_users is set * - Test Cases assigned to user if $args->build_id > 0 * - Test Cases assigned to me else */ $table_id = "tl_table_tc_assigned_to_me_for_tplan_"; if ($args->show_all_users) { $table_id = "tl_table_tc_assignment_overview_for_tplan_"; } if ($args->build_id) { $table_id = "tl_table_tc_assigned_to_user_for_tplan_"; }
} else { $status_str = 'IN PROGRESS'; } #if multiple providers.. $providername = $row['providernames']; if (!empty($row['joint_venture'])) { $providername = ''; $jv_info = $this->db->query('SELECT * FROM joint_venture WHERE jv = "' . $row['joint_venture'] . '"')->result_array(); if (!empty($jv_info[0]['providers'])) { $providers = $this->db->query('SELECT * FROM providers WHERE providerid IN (' . rtrim($jv_info[0]['providers'], ',') . ')')->result_array(); foreach ($providers as $provider) { $providername .= (!empty($providername) ? ', ' : '') . $provider['providernames']; } } } $table_HTML .= '<tr>' . ($formdata['contracts_report_type'] == 'AC' ? '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . custom_date_format('d M, Y', $row['date_signed']) . '</td>' : '') . (in_array($formdata['contracts_report_type'], array('CDC', 'LC')) ? '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . custom_date_format('d M, Y', $row['completion_date']) . '</td>' : '') . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . format_to_length($row['pdename'], 30) . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['procurement_ref_no'] . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['subject_of_procurement'] . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $providername . '</td>' . (in_array($formdata['contracts_report_type'], array('LC')) ? '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . get_date_diff(empty($row['actual_completion_date']) ? date('Y-m-d') : $row['actual_completion_date'], $row['completion_date'], 'days') . '</td>' : '') . (in_array($formdata['contracts_report_type'], array('CC')) ? '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . custom_date_format('d M, Y', $row['actual_completion_date']) . '</td>' : '') . (in_array($formdata['contracts_report_type'], array('CC')) ? '<td style="text-align: right; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . addCommas($row['total_amount_paid'], 0) . '</td>' : '') . '<td style="text-align: right; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . addCommas($row['total_price'], 0) . '</td>' . '</tr>'; $grand_contracts_value += $row['total_price']; $grand_total_amount_paid += $row['total_amount_paid']; } $table_HTML .= '<tr>' . ($formdata['contracts_report_type'] == 'AC' ? '<td> </td>' : '') . (in_array($formdata['contracts_report_type'], array('CDC', 'LC')) ? '<td> </td>' : '') . '<td> </td>' . '<td> </td>' . '<td> </td>' . '<td> </td>' . (in_array($formdata['contracts_report_type'], array('LC')) ? '<td> </td>' : '') . (in_array($formdata['contracts_report_type'], array('CC')) ? '<td> </td>' : '') . (in_array($formdata['contracts_report_type'], array('CC')) ? '<td style="text-align:right; font-weight:bold; font-size: 14px; font-family: Georgia">' . addCommas($grand_total_amount_paid, 0) . '</td>' : '') . '<td style="text-align:right; font-weight:bold; font-size: 16px; font-family: Georgia">' . addCommas($grand_contracts_value, 0) . '</td>' . '</tr>'; $table_HTML .= '</tbody></table>'; } elseif (!empty($formdata)) { $table_HTML .= format_notice('Your search criteria does not match any results'); } } else { if (!empty($area) && $area == 'procurement_record_details') { if (!empty($procurement_details)) { $table_HTML .= '<div class="control-group subject_of_procurement">' . '<label class="control-label">Subject of procurement:</label>' . '<div class="controls">' . (!empty($procurement_details['subject_of_procurement']) ? $procurement_details['subject_of_procurement'] : '<i>undefined</i>') . '<input type="hidden" name="procurement_details[subject_of_procurement]" value="' . $procurement_details['subject_of_procurement'] . '" />' . '</div>' . '</div>' . '<div class="control-group">' . '<label class="control-label">Financial year:</label>' . '<div class="controls">' . (!empty($procurement_details['financial_year']) ? $procurement_details['financial_year'] : '<i>undefined</i>') . '<input type="hidden" name="procurement_details[financial_year]" value="' . $procurement_details['financial_year'] . '" />' . '</div>' . '</div>' . '<div class="control-group">' . '<label class="control-label">Source of funding:</label>' . '<div class="controls">' . (!empty($procurement_details['funding_source']) ? $procurement_details['funding_source'] : '<i>undefined</i>') . '<input type="hidden" name="procurement_details[funding_source]" value="' . $procurement_details['funding_source'] . '"/>' . '</div>' . '</div>'; if (!empty($procurement_details['quantity'])) { $total_ifb_q = $procurement_details['quantity'] - $procurement_details['total_ifb_quantity']; $table_HTML .= '<div class="control-group">' . '<label class="control-label">Quantity:</label>' . '<div class="controls">' . (!empty($total_ifb_q) ? $total_ifb_q : '<i>undefined</i>') . '<input type="hidden" id="procurement_details_quantity" name="procurement_details_quantity" value="' . $total_ifb_q . '"/>' . '</div>' . '</div>';
if (empty($row['receivedby'])) { $receivedby = $returndate = '<i>N/A</i>'; } else { $receivedby = get_school_user_fullname($this, $row['receivedby']); $receivedby = $receivedby['firstname'] . ' ' . $receivedby['lastname']; $returndate = date("j M, Y", GetTimeStamp($row['returndate'])); } #Show one row at a time echo "<tr style='" . get_row_color($counter, 2) . "'>\r\r\n\t\t<td valign='top' nowrap>"; #if(check_user_access($this,'delete_deal')){ echo "<a href='javascript:void(0)' onclick=\"confirmDeleteEntity('" . base_url() . "terms/delete_term/i/" . encryptValue($row['id']) . "', 'Are you sure you want to remove this term? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.');\" title=\"Click to remove this term.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>"; #} #if(check_user_access($this,'update_deals')){ echo " <a href='" . base_url() . "terms/load_term_form/i/" . encryptValue($row['id']) . "' title=\"Click to edit this term's details.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>"; #} echo "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . date("j M, Y", GetTimeStamp($row['startdate'])) . "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . date("j M, Y", GetTimeStamp($row['expectedreturndate'])) . "</td>\t\t\t\t\r\r\n\t\t\t\t<td valign='top' nowrap>" . get_date_diff(date('m/d/Y h:i:s a', time()), $row['expectedreturndate'], 'days') . "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . $author . "</td>\r\r\n\t\t\t\t<td valign='top'>" . $returndate . "</td>\r\r\n\t\t\t\t<td valign='top'>" . $receivedby . "</td>\r\r\n\t\t\t\t<td valign='top'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\t\r\r\n\t\t\t</tr>"; $counter++; } echo "<tr>\r\r\n\t<td colspan='5' align='right' class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "deal/manage_deals/p/%d") . "</td>\r\r\n\t</tr>\r\r\n\t</table>"; } else { echo "<div>No terms have been added.</div"; } ?> </td> </tr> </table> </div>
} ?> <tr> <td><?php echo $row["id"]; ?> </td> <td><?php echo $row["title"]; ?> </td> <td title="<?php echo $row['time_submitted']; ?> ">πριν <?php echo get_date_diff($row["time_submitted"], time()); ?> </td> <td><?php echo $row["name"]; ?> </td> <td><a data-toggle="modal" data-target="#<?php echo $index; ?> " href="#">Προβολή</a></td> </tr> <!-- Modal --> <div class="modal fade report-modal" id="<?php echo $index; ?>
<?php #$page_list = array(); if (!empty($page_list)) { echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>\r\r\n <tr>\r\r\n <td class='listheader'> </td>\r\r\n <td class='listheader' nowrap>School <a class='fancybox fancybox.ajax' href='" . base_url() . "admin/load_school_form' title='Click to add a school'><img src='" . base_url() . "images/add_item.png' border='0'/></a></td>\r\r\n <td class='listheader' nowrap>Location</td>\r\r\n <td class='listheader' nowrap>Contact Phone</td>\r\r\n <td class='listheader' nowrap>Expiry Date</td>\r\r\n <td class='listheader' nowrap>Days Left</td>\r\r\n <td class='listheader' nowrap>Date Added</td>\r\r\n </tr>"; $counter = 0; foreach ($page_list as $row) { #Show one row at a time echo "<tr style='" . get_row_color($counter, 2) . "'>\r\r\n<td valign='top' nowrap>"; if (!empty($adduser) && $adduser == 'true') { echo " <a href='" . base_url() . 'admin/add_school_user/s/' . encryptValue($row['id']) . "' title=\"Click to add users to " . $row['schoolname'] . "\"><img src='" . base_url() . "images/add_user.png' border='0'/></a>"; } else { echo "<a href='javascript:void(0)' onclick=\"confirmDeleteEntity('" . base_url() . "admin/delete_school/i/" . encryptValue($row['id']) . "', 'Are you sure you want to remove this school? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.');\" title=\"Click to remove this deal.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>"; echo " <a class='fancybox fancybox.ajax' href='" . base_url() . "admin/load_school_form/i/" . encryptValue($row['id']) . "' title=\"Click to edit this school details.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>"; echo " <a onclick=\"updateFieldLayer('" . base_url() . "admin/school_users/s/" . encryptValue($row['id']) . "','','','contentdiv','');\" href='javascript:void(0)' title=\"Click to view users in this school.\"><img src='" . base_url() . "images/users_icon.png' border='0'/></a>"; } $days_left = get_date_diff(date('m/d/Y h:i:s a', time()), $row['todate'], 'days'); echo "</td>\r\r\n\r\r\n<td valign='top'>" . $row['schoolname'] . "</td>\r\r\n\r\r\n<td valign='top'>" . $row['district'] . "</td>\r\r\n \r\r\n<td valign='top' nowrap>" . $row['telephone'] . "</td>\r\r\n\r\r\n<td valign='top'>" . date("j M, Y", GetTimeStamp($row['todate'])) . "</td>\r\r\n<td valign='top'>" . ($days_left < 0 ? '<i>Expired</i>' : $days_left) . "</td>\r\r\n<td valign='top'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\t\t\r\r\n</tr>"; $counter++; } echo "<tr>\r\r\n<td colspan='5' align='right' class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "deal/manage_deals/p/%d") . "</td>\r\r\n</tr>\r\r\n</table>"; } else { echo "<div>No schools have been registered.</div"; } ?> </td> </tr> </table>
<tr> <td valign="top"> <div id="searchresults"> <?php #$page_list = array(); if (!empty($page_list)) { echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>\r\r\n \t<tr>\r\r\n\t\t\t<td class='listheader'> </td>\r\r\n \t<td class='listheader' nowrap>Student</td>\r\r\n\t\t\t<td class='listheader' nowrap>Student No</td>\r\r\n \t<td class='listheader' nowrap>Age</td>\r\r\n\t\t\t<td class='listheader' nowrap>Current Class</td>\r\r\n\t\t\t<td class='listheader' nowrap>Date Added</td>\r\r\n\t\t\t</tr>"; $counter = 0; foreach ($page_list as $row) { #Show one row at a time #Get the current class details $current_class = current_class($this, $row['id']); echo "<tr style='" . get_row_color($counter, 2) . "'>\r\r\n\t\t<td valign='top' nowrap>"; echo " <a href='" . base_url() . "students/load_registration_form/s/" . encryptValue($row['id']) . "' title=\"Click to register " . $row['firstname'] . ".\">Register student</a>"; echo "</td>\t\t\r\r\n\t\t<td valign='top'>" . $row['firstname'] . " " . $row['lastname'] . "</td>\t\t\r\r\n\t\t<td valign='top'>" . $row['studentno'] . "</td>\r\r\n\t\t<td valign='top' nowrap>" . number_format(get_date_diff($row['dob'], date('m/d/Y h:i:s a', time()), 'days') / 365, 0) . "</td>" . "<td valign='top' nowrap>" . $current_class['class'] . ", " . $current_class['term'] . " [" . $current_class['year'] . "]</td>\r\r\n\t\t<td valign='top'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\t\t\r\r\n\t\t</tr>"; $counter++; } echo "<tr>\r\r\n\t<td colspan='5' align='right' class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "students/manage_student_register/p/%d") . "</td>\r\r\n\t</tr>\r\r\n\t</table>"; } else { echo "<div>No student admissions have been made.</div"; } ?> </div> </td> </tr> </table> </div>
$current_class = current_class($this, $row['id']); echo "<tr class='listrow " . ($counter % 2 ? '' : 'grey_list_row') . "' id='student-list-row-" . $row['id'] . "'>\r\r\n\t\t<td class='leftListCell rightListCell' valign='top' nowrap>"; if ($view_leave) { echo " <a href='" . base_url() . "students/load_leave_form/s/" . encryptValue($row['id']) . "' title=\"Click to assign " . $row['firstname'] . " leave.\">Assign leave</a>"; } else { #if(check_user_access($this,'delete_deal')){ echo "<input class=\"list_checkbox\" type=\"checkbox\" name=\"selected_student[]\" id=\"selected_student_" . $row['id'] . "\" />"; #} if ($delete_students) { echo " <a href='javascript:void(0)' onclick=\"asynchDelete('" . base_url() . "students/delete_student/i/" . encryptValue($row['id']) . "', 'Are you sure you want to delete this student? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.','student-list-row-" . $row['id'] . "');\" title=\"Click to remove this student.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>"; } #if(check_user_access($this,'update_deals')){ //echo " <a onclick=\"updateFieldLayer('".base_url()."students/student_profile/i/".encryptValue($row['id'])."','','','contentdiv','');\" href='javascript:void(0)' title=\"Click to edit ".$row['firstname']."'s details.\"><img src='".base_url()."images/edit.png' border='0'/></a>"; #} } echo "</td>\t\t\r\r\n\t\t<td valign='top' id='std_name_" . $row['id'] . "'><a onclick=\"updateFieldLayer('" . base_url() . "students/student_profile/i/" . encryptValue($row['id']) . "','','','contentdiv','');\" href='javascript:void(0)' title=\"Click to edit " . $row['firstname'] . "'s details.\">" . $row['firstname'] . " " . $row['lastname'] . "</a></td>\t\r\r\n\t\t<td valign='top'>" . $row['sponsorfullname'] . "</td>\t\r\r\n\t\t<td valign='top'>" . $row['studentno'] . "</td>\r\r\n\t\t<td valign='top' nowrap>" . number_format(get_date_diff($row['dob'], date('m/d/Y h:i:s a', time()), 'days') / 365, 0) . "</td>" . ($view_leave ? "<td valign='top' nowrap id='std_class_" . $row['id'] . "'>" . $current_class['class'] . ", " . $current_class['term'] . " [" . $current_class['year'] . "]</td>" . "<td>" . (empty($row['leaves']) ? '<i>N/A</i>' : '<a href="' . base_url() . 'students/student_leave_list/i/' . encryptValue($row['id']) . '" title="click to view ' . $row['firstname'] . '\' leaves.">' . $row['leaves'] . '</a>') . "</td></tr>" : "<td valign='top'>" . $admitclass . ", " . $admitterminfo['term'] . " [" . $admitterminfo['year'] . "]</td>\r\r\n\t\t<td valign='top' id='std_class_" . $row['id'] . "' nowrap>" . $current_class['class'] . ", " . $current_class['term'] . " [" . $current_class['year'] . "]</td>\r\r\n\t\t<td class='rightListCell' valign='top'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\t\t\r\r\n\t\t</tr>"); $counter++; $current_student = $row['id']; } echo "<tr>\r\r\n\t \t <td colspan='7' align='right' class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "students/manage_students/p/%d", 'contentdiv') . "</td>\r\r\n\t\t</tr>\r\r\n\t\t</table>"; } else { echo "<div>No student admissions have been made.</div>"; } ?> </div> </td> </tr> </table>
#Get the current class details $current_class = current_class($this, $studentdetails['id']); $profile_image_src = empty($studentdetails['photo']) ? 'images/no-photo.jpg' : 'downloads/students/' . student_photo_thumb($studentdetails['photo']); echo '<img id="profile-pic" src="' . base_url() . $profile_image_src . '" class="profile-pic"/>'; ?> <div id="add-image" class="button" style="width:110px; margin-top:10px"> Upload Photo </div> <input type="hidden" name="photo" id="photo" value="" /> </td> </tr> <tr> <td class="field" nowrap> <?php echo "<div class='viewtext'>" . number_format(get_date_diff($studentdetails['dob'], date('m/d/Y h:i:s a', time()), 'days') / 365, 0) . ", " . $studentdetails['gender'] . "</div>"; ?> </td> </tr> <tr> <td class="field" nowrap> <?php echo "<div class='viewtext'>" . $current_class['class'] . "</div>"; ?> </td> </tr> <tr>
#$page_list = array(); if (!empty($page_list)) { echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>\r\r\n \t<tr>\r\r\n\t\t\t<td class='listheader'> </td>\r\r\n \t<td class='listheader' nowrap>Term <a class='fancybox fancybox.ajax' href='" . base_url() . "terms/load_term_form')' title='Click to add a term'><img src='" . base_url() . "images/add_item.png' border='0'/></a></td>\r\r\n\t\t\t<td class='listheader' nowrap>Start date</td>\r\r\n \t<td class='listheader' nowrap>End date</td>\r\r\n\t\t\t<td class='listheader' nowrap>Days left</td>\r\r\n\t\t\t<td class='listheader' nowrap>Date Added</td>\r\r\n\t\t\t</tr>"; $counter = 0; foreach ($page_list as $row) { #Show one row at a time echo "<tr id='tr_" . $row['id'] . "' class='listrow' style='" . get_row_color($counter, 2) . "'>\r\r\n\t\t<td class='leftListCell rightListCell' valign='bottom' width='1%' nowrap>"; #if(check_user_access($this,'delete_deal')){ echo "<a href='javascript:void(0)' onclick=\"asynchDelete('" . base_url() . "terms/delete_term/i/" . encryptValue($row['id']) . "', 'Are you sure you want to remove this term? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.', 'tr_" . $row['id'] . "');\" title=\"Click to remove this term.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>"; #} #if(check_user_access($this,'update_deals')){ echo " <a class='fancybox fancybox.ajax' href='" . base_url() . "terms/load_term_form/i/" . encryptValue($row['id']) . "' title=\"Click to edit this term's details.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>"; #} $days_left = get_date_diff(date('m/d/Y h:i:s a', time()), $row['enddate'], 'days'); $days_left_str = $days_left < 0 ? '<i>Term ended</i>' : $days_left; if (get_date_diff(date('m/d/Y h:i:s a', time()), $row['startdate'], 'days') > 14) { $days_left_str = "Term not started"; } elseif (get_date_diff(date('m/d/Y h:i:s a', time()), $row['startdate'], 'days') < 14 && get_date_diff(date('m/d/Y h:i:s a', time()), $row['startdate'], 'days') > 0) { $days_left_str = "Term starts in " . get_date_diff(date('m/d/Y h:i:s a', time()), $row['startdate'], 'days') . " days"; } echo "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . $row['term'] . " [" . $row['year'] . "]</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . date("j M, Y", GetTimeStamp($row['startdate'])) . "</td>\t\t\t\t\r\r\n\t\t\t\t<td valign='top' nowrap>" . date("j M, Y", GetTimeStamp($row['enddate'])) . "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . $days_left_str . "</td>\r\r\n\t\t\t\t<td class='rightListCell' valign='top'>" . date("j M, Y", GetTimeStamp($row['dateadded'])) . "</td>\t\t\r\r\n\t\t\t</tr>"; $counter++; } echo "<tr>\r\r\n\t<td colspan='5' align='right' class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "terms/manage_terms/p/%d", 'results') . "</td>\r\r\n\t</tr>\r\r\n\t</table>"; } else { echo "<div>No terms have been added.<br />Click <a class='fancybox fancybox.ajax' href='" . base_url() . "terms/load_term_form')' title='Click to add a term'><i>here</i></a> to add a term</div>"; } ?>
$edit_str = ''; if (!empty($level) && $level == 'active') { $delete_str = '<a title="Delete bid invitation" href="javascript:void(0);" onclick="confirmDeleteEntity(\'' . base_url() . 'bids/delete_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '\', \'Are you sure you want to delete this bid invitation?\\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.\')"><i class="fa fa-trash"></i></a>'; $edit_str = '<a title="Edit bid details" href="' . base_url() . 'bids/load_bid_invitation_form/i/' . encryptValue($row['bidinvitation_id']) . '"><i class="fa fa-edit"></i></a>'; } /*if($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days')<0) { $status_str = 'Bid evaluation | <a title="Select BEB" href="'. base_url() .'bids/approve_bid_invitation/i/'.encryptValue($row['bidinvitation_id']).'">[Select BEB]</a>'; } */ if ($row['bid_approved'] == 'N') { $status_str = 'Not published | <a title="Publish IFB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Publish IFB]</a>'; } elseif ($row['bid_approved'] == 'Y') { if (get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') > 0) { $status_strs = 'Bidding closes in ' . get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') . ' days'; } else { $status_strs = 'Bidding closed ' . get_date_diff($row['bid_submission_deadline'], date('Y-m-d'), 'days') . ' days ago'; } $status_str = $status_strs . '| <a title="view IFB document" href="' . base_url() . 'bids/view_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[View IFB]</a>'; $addenda_str = '<a title="view addenda list" href="' . base_url() . 'bids/view_addenda/b/' . encryptValue($row['bidinvitation_id']) . '">[View Addenda]</a> | <a title="Add addenda" href="' . base_url() . 'bids/load_ifb_addenda_form/b/' . encryptValue($row['bidinvitation_id']) . '">[Add Addenda]</a>'; } else { } print '<tr>' . '<td>' . $delete_str . ' ' . $edit_str . '</td>' . '<td>' . format_to_length($row['procurement_ref_no'], 40) . '</td>' . '<td>' . format_to_length($row['subject_of_procurement'], 50) . '</td>' . '<td>' . (is_numeric($row['bid_security_amount']) ? number_format($row['bid_security_amount'], 0, '.', ',') . ' ' . $row['bid_security_currency_title'] : (empty($row['bid_security_amount']) ? '<i>N/A</i>' : $row['bid_security_amount'])) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['invitation_to_bid_date']) . '</td>' . '<td>' . $addenda_str . '</td>' . '<td>' . $status_str . '</td>' . '<td>' . (empty($row['approver_fullname']) ? 'N/A' : $row['approver_fullname']) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['bid_dateadded']) . '</td>' . '</tr>'; } print '</tbody></table>'; print '<div class="pagination pagination-mini pagination-centered">' . pagination($this->session->userdata('search_total_results'), $page_list['rows_per_page'], $page_list['current_list_page'], base_url() . "bids/manage_bid_invitations/" . $level . "/p/%d") . '</div>'; } else { print format_notice('WARNING: No bid invitations have been added to the system'); } ?> </div>
</span> </div> <div class="widget-body" id="results"> <?php if (!empty($page_list)) { print '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th width="5%"></th>' . '<th>Procurement Ref. No</th>' . '<th class="hidden-480">PDE</th>' . '<th class="hidden-480">Procurement subject</th>' . '<th class="hidden-480">Procurement type</th>' . '<th class="hidden-480">Status</th>' . '<th>Date Added</th>' . '</tr>' . '</thead>' . '</tbody>'; foreach ($page_list as $row) { $delete_str = '<a title="Delete procurement" href="javascript:void(0);" onclick="confirmDeleteEntity(\'' . base_url() . 'bids/delete_bid_invitation/i/' . encryptValue($row['procurement_id']) . '\', \'Are you sure you want to delete this bid invitation?\\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.\')"><i class="icon-trash"></i></a>'; $edit_str = '<a title="Edit procurement details" href="' . base_url() . 'bids/load_bid_invitation_form/i/' . encryptValue($row['procurement_id']) . '"><i class="icon-edit"></i></a>'; $status_str = ''; if ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') < 0) { $status_str = 'Bid evaluation | <a title="Select BEB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bid_invitation_id']) . '">[Select BEB]</a>'; } elseif ($row['bid_approved'] == 'N') { $status_str = 'Pending Approval | <a title="Approve bid details" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bid_invitation_id']) . '">[Approve invitation]</a>'; } elseif ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') > 0) { $status_str = 'Bidding expires in ' . get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') . ' days | <a title="halt bidding" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bid_invitation_id']) . '">[Halt bidding]</a>'; } elseif ($row['initiation_status'] == 'Y') { $status_str = 'Procurement initiated | <a title="Create IFB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bid_invitation_id']) . '">[Create IFB]</a>'; } elseif ($row['initiation_status'] == 'N') { $status_str = 'Pending initiation approval | <a title="Approve initiation" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bid_invitation_id']) . '">[Approve initiation]</a>'; } else { $status_str = 'Procurement not initiated | <a title="Initiate procurement" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bid_invitation_id']) . '">[Initiate]</a>'; } print '<tr>' . '<td>' . $delete_str . ' ' . $edit_str . '</td>' . '<td>' . $row['procurement_ref_no'] . '</td>' . '<td>' . $row['pdename'] . '</td>' . '<td>' . format_to_length($row['subject_of_procurement'], 80) . '</td>' . '<td>' . $row['procurement_type'] . '</td>' . '<td>' . $status_str . '</td>' . '<td>' . custom_date_format('d M, Y', $row['date_procurement_added']) . '</td>' . '</tr>'; } print '</tbody></table>'; print '<div class="pagination pagination-mini pagination-centered">' . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "user/dashboard/p/%d") . '</div>'; } else { print format_notice('WARNING: No procurement entries have been added to the system'); } ?>
if (!empty($row['actual_completion_date']) && str_replace('-', '', $row['actual_completion_date']) > 0) { $status_str = 'COMPLETE'; } else { $status_str = 'IN PROGRESS'; } #if multiple providers.. $providername = $row['providernames']; if (!empty($row['joint_venture'])) { $providername = ''; $jv_info = $this->db->query('SELECT * FROM joint_venture WHERE jv = "' . $row['joint_venture'] . '"')->result_array(); if (!empty($jv_info[0]['providers'])) { $providers = $this->db->query('SELECT * FROM providers WHERE providerid IN (' . rtrim($jv_info[0]['providers'], ',') . ')')->result_array(); foreach ($providers as $provider) { $providername .= (!empty($providername) ? ', ' : '') . $provider['providernames']; } } } print '<tr>' . ($formdata['contracts_report_type'] == 'AC' ? '<td>' . custom_date_format('d M, Y', $row['date_signed']) . '</td>' : '') . (in_array($formdata['contracts_report_type'], array('CDC', 'LC')) ? '<td>' . custom_date_format('d M, Y', $row['completion_date']) . '</td>' : '') . '<td>' . format_to_length($row['pdename'], 30) . '</td>' . '<td>' . $row['procurement_ref_no'] . '</td>' . '<td>' . $row['subject_of_procurement'] . '</td>' . '<td>' . format_to_length($providername, 40) . '</td>' . (in_array($formdata['contracts_report_type'], array('LC')) ? '<td>' . get_date_diff(empty($row['actual_completion_date']) ? date('Y-m-d') : $row['actual_completion_date'], $row['completion_date'], 'days') . '</td>' : '') . (in_array($formdata['contracts_report_type'], array('CC')) ? '<td>' . custom_date_format('d M, Y', $row['actual_completion_date']) . '</td>' : '') . (in_array($formdata['contracts_report_type'], array('CC')) ? '<td style="text-align:right; font-family: Georgia">' . addCommas($row['total_amount_paid'], 0) . '</td>' : '') . '<td style="text-align:right; font-family: Georgia">' . addCommas($row['total_price'], 0) . '</td>' . '</tr>'; $grand_contracts_value += $row['total_price']; $grand_total_amount_paid += $row['total_amount_paid']; } print '<tr>' . ($formdata['contracts_report_type'] == 'AC' ? '<td> </td>' : '') . (in_array($formdata['contracts_report_type'], array('CDC', 'LC')) ? '<td> </td>' : '') . '<td> </td>' . '<td> </td>' . '<td> </td>' . '<td> </td>' . (in_array($formdata['contracts_report_type'], array('LC')) ? '<td> </td>' : '') . (in_array($formdata['contracts_report_type'], array('CC')) ? '<td> </td>' : '') . (in_array($formdata['contracts_report_type'], array('CC')) ? '<td style="text-align:right; font-weight:bold; font-size: 14px; font-family: Georgia">' . addCommas($grand_total_amount_paid, 0) . '</td>' : '') . '<td style="text-align:right; font-weight:bold; font-size: 14px; font-family: Georgia">' . addCommas($grand_contracts_value, 0) . '</td>' . '</tr>'; print '</tbody></table>'; print '<div class="pagination pagination-mini pagination-centered">' . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "#") . '</div>'; } elseif (!empty($formdata)) { print format_notice('WARNING: Your search criteria does not match any results'); } ?> </div> <?php }