function sorting_info($columnName) { //just testing $sort_by = isset($_GET['sort_by']) ? $_GET['sort_by'] : ''; $order = isset($_GET['order']) ? $_GET['order'] : ''; if ($sort_by == $columnName && $order == 'asc') { $order = 'desc'; } else { $order = 'asc'; } $query_string = merge_query($_SERVER['QUERY_STRING'], array('sort_by' => $columnName, 'order' => $order, 'page' => 0)); $link = url_path() . "?" . $query_string; return $link; ////////////////////////////////// }
public function show($type = 'destination') { $headerData = array('title' => 'Shortages | ' . ucwords($type), 'page' => ''); //deleting the customer*****************// if (isset($_GET['del'])) { $_POST['del'] = $_GET['del']; $this->form_validation->set_rules('del', 'Shortage#', 'required|numeric|callback__is_shortage_exist'); if ($this->form_validation->run() == true) { if ($this->shortages_model->delete_shortage($_GET['del']) == true) { $this->helper_model->redirect_with_success('Shortage Removed successfully', url_path() . "?" . unset_query_string_var('del', $_SERVER['QUERY_STRING'])); } else { $this->helper_model->redirect_with_errors('Some unknown database fault happened. please try again. ', url_path() . "?" . unset_query_string_var('del', $_SERVER['QUERY_STRING'])); } } else { $this->helper_model->redirect_with_errors(validation_errors(), url_path() . "?" . unset_query_string_var('del', $_SERVER['QUERY_STRING'])); } } ////////////////////////////////////////////////////////// if (isset($_POST['commit_shortages'])) { if ($this->form_validation->run('commit_shortages') == true) { $result = $this->shortages_model->commit(); if ($result == true) { $this->helper_model->redirect_with_success('Shortages Commited successfully.'); } } else { $this->helper_model->redirect_with_errors(validation_errors()); } } $this->bodyData['someMessage'] = ''; $this->bodyData['columns'] = array(); $this->bodyData['cities'] = $this->routes_model->cities(); $this->bodyData['products'] = $this->products_model->get(); $this->bodyData['tankers'] = $this->db->get('tankers')->result(); $shortages = null; if ($type == 'destination') { $shortages = $this->shortages_model->destination(); } else { if ($type == 'decanding') { $shortages = $this->shortages_model->decanding(); } } $this->bodyData['shortages'] = $shortages; $this->load->view('components/header', $headerData); $this->load->view('shortages/show', $this->bodyData); $this->load->view('components/footer'); }
?> functions/template_dir">template_dir</a></li> <li><a class="<?php if (url_path() == 'functions/template_name') { print "active"; } ?> " href="<?php print site_url(); ?> functions/template_name">template_name</a></li> <li><a class="<?php if (url_path() == 'functions/template_url') { print "active"; } ?> " href="<?php print site_url(); ?> functions/template_url">template_url</a></li> <li><a class="<?php if (url_path() == 'functions/template_header') { print "active"; } ?> " href="<?php print site_url(); ?> functions/template_header">template_header</a></li> </ul>
print page_content('functions/_nav/db'); ?> </li> <li><a class="nav-title <?php if (url_path() == 'functions/_nav/session') { print "active"; } ?> " href="<?php print site_url(); ?> functions/_nav/session">Sessions</a> <?php print page_content('functions/_nav/session'); ?> </li> <li><a class="nav-title <?php if (url_path() == 'functions/_nav/custom_fields') { print "active"; } ?> " href="<?php print site_url(); ?> functions/_nav/custom_fields">Custom fields</a> <?php print page_content('functions/_nav/custom_fields'); ?> </li> </ul>
function locate_page_file($path = false) { if ($path == false) { $locate_file_content = url_path(); if ($locate_file_content == '') { $locate_file_content = 'README'; } } else { $locate_file_content = $path; } $locate_file_content = html_entity_decode($locate_file_content); $allowed_ext = array('.php', '.html', '.htm', '.md'); $here = dirname(__FILE__) . DIRECTORY_SEPARATOR; $possible_file = normalize_path($here . $locate_file_content, false); $possible_file = str_replace('..', '', $possible_file); $possible_file2 = $possible_file . '/README.md'; $possible_file2 = normalize_path($possible_file2, false); $possible_file3 = $possible_file . '/index.html'; $possible_file3 = normalize_path($possible_file3, false); if (is_file($possible_file)) { return $possible_file; } else { if (is_file($possible_file2)) { return $possible_file2; } else { if (is_file($possible_file3)) { return $possible_file3; } } } foreach ($allowed_ext as $ext) { $find_possible_file = $possible_file . $ext; if (is_file($find_possible_file)) { return $find_possible_file; } } return false; }
} ?> " href="<?php print site_url(); ?> functions/get_orders">get_orders</a></li> <li><a class="<?php if (url_path() == 'functions/get_order_by_id') { print "active"; } ?> " href="<?php print site_url(); ?> functions/get_order_by_id">get_order_by_id</a></li> <li><a class="<?php if (url_path() == 'functions/delete_order') { print "active"; } ?> " href="<?php print site_url(); ?> functions/delete_order">delete_order</a></li> </ul>
functions/save_content">save_content</a></li> <li><a class="<?php if (url_path() == 'functions/delete_content') { print "active"; } ?> " href="<?php print site_url(); ?> functions/delete_content">delete_content</a></li> <li><a class="<?php if (url_path() == 'functions/next_content') { print "active"; } ?> " href="<?php print site_url(); ?> functions/next_content">next_content</a></li> <li><a class="<?php if (url_path() == 'functions/prev_content') { print "active"; } ?> " href="<?php print site_url(); ?> functions/prev_content">prev_content</a></li> </ul>
?> " href="<?php print site_url(); ?> functions/url_path">url_path</a></li> <li><a class="<?php if (url_path() == 'functions/url_param') { print "active"; } ?> " href="<?php print site_url(); ?> functions/url_param">url_param</a></li> <li><a class="<?php if (url_path() == 'functions/url_segment') { print "active"; } ?> " href="<?php print site_url(); ?> functions/url_segment">url_segment</a></li> </ul>
?> functions/is_logged">is_logged</a></li> <li><a class="<?php if (url_path() == 'functions/register_url') { print "active"; } ?> " href="<?php print site_url(); ?> functions/register_url">register_url</a></li> <li><a class="<?php if (url_path() == 'functions/login_url') { print "active"; } ?> " href="<?php print site_url(); ?> functions/login_url">login_url</a></li> <li><a class="<?php if (url_path() == 'functions/forgot_password_url') { print "active"; } ?> " href="<?php print site_url(); ?> functions/forgot_password_url">forgot_password_url</a></li> </ul>
if (url_path() == 'functions/get_categories') { print "active"; } ?> " href="<?php print site_url(); ?> functions/get_categories">get_categories</a></li> <li><a class="<?php if (url_path() == 'functions/save_category') { print "active"; } ?> " href="<?php print site_url(); ?> functions/save_category">save_category</a></li> <li><a class="<?php if (url_path() == 'functions/delete_category') { print "active"; } ?> " href="<?php print site_url(); ?> functions/delete_category">delete_category</a></li> </ul>
<ul class="subnav"> <li><a class="<?php if (url_path() == 'functions/get') { print "active"; } ?> " href="<?php print site_url(); ?> functions/get">get</a></li> <li><a class="<?php if (url_path() == 'functions/save') { print "active"; } ?> " href="<?php print site_url(); ?> functions/save">save</a></li> </ul>
<ul class="subnav"> <li><a class="<?php if (url_path() == 'functions/get_custom_fields') { print "active"; } ?> " href="<?php print site_url(); ?> functions/get_custom_fields">get_custom_fields</a></li> <li><a class="<?php if (url_path() == 'functions/save_custom_field') { print "active"; } ?> " href="<?php print site_url(); ?> functions/save_custom_field">save_custom_field</a></li> </ul>
?> </div> </div> </div> <div class="mw-ui-col"> <div class="container"> <div class="content"><?php print page_content(); ?> </div> </div> </div> </div> </div> <div class="not-ready">The documentation is under development. <a style="" href="https://github.com/microweber/microweber-docs/edit/master/<?php print url_path(); ?> ">Help us by editing this page</a>.</div> <script src="<?php print site_url(); ?> assets/jquery.min.js"></script> <script src="<?php print site_url(); ?> assets/js/anchorific.min.js"></script> <script>
<li><a class="mw-ui-btn mw-ui-btn-info mw-ui-btn-big dd_class_ref <?php if (strstr(url_path(), 'modules/')) { print "active"; } ?> " href="<?php print site_url(); ?> modules/README.md" data-ref="class">Modules</a></li> <li><a class="mw-ui-btn mw-ui-btn-info mw-ui-btn-big <?php if (strstr(url_path(), 'js-css/')) { print "active"; } ?> " href="<?php print site_url(); ?> js-css/README.md">JS/CSS</a></li> <?php /* <li><a class="mw-ui-btn mw-ui-btn-info mw-ui-btn-big <?php if (strstr(url_path(), 'developer-guide/')) print "active"; ?>" href="<?php print site_url(); ?>developer-guide/README.md">OLD</a></li> */ ?>
<ul class="subnav"> <li><a class="<?php if (url_path() == 'functions/menu_tree') { print "active"; } ?> " href="<?php print site_url(); ?> functions/menu_tree">menu_tree</a></li> </ul>
</td> <td><?php echo round($shortage->rate, 2); ?> </td> <td><?php echo rupee_format(round($shortage->shortage_amount, 2)); ?> </td> <td> <a href="<?php echo base_url() . "shortages/edit/" . $shortage->shortage_id; ?> " class="edit_shortage btn btn-xs btn-warning">Edit</a> <a class="btn btn-xs btn-danger" onclick="return confirm_deleting()" href="<?php echo url_path() . "?" . merge_query($_SERVER['QUERY_STRING'], array('del' => $shortage->shortage_id)); ?> ">Del</a> <?php if ($shortage->committed == false) { ?> <a href="#commit-shortages-popup" onclick="set_shortage_id_for_commit(<?php echo $shortage->shortage_id; ?> )" class="open-commit-shortages-popup btn btn-xs btn-primary"> Commit</a> <?php } ?> </td> </tr>
<ul class="subnav"> <li><a class="<?php if (url_path() == 'functions/get_option') { print "active"; } ?> " href="<?php print site_url(); ?> functions/get_option">get_option</a></li> <li><a class="<?php if (url_path() == 'functions/save_option') { print "active"; } ?> " href="<?php print site_url(); ?> functions/save_option">save_option</a></li> </ul>
<ul class="subnav"> <li><a class="<?php if (url_path() == 'functions/session_set') { print "active"; } ?> " href="<?php print site_url(); ?> functions/session_set">session_set</a></li> <li><a class="<?php if (url_path() == 'functions/session_get') { print "active"; } ?> " href="<?php print site_url(); ?> functions/session_get">session_get</a></li> </ul>
function build_nav($tree, $url_params) { // Remove Index unset($tree['index']); $url_path = url_path(); $html = '<ul class="nav nav-list">'; foreach ($tree as $key => $val) { // Active Tree Node if (isset($url_params[0]) && $url_params[0] == $val['clean']) { array_shift($url_params); // Final Node if ($url_path == RFC3986UrlEncode($val['url'])) { $html .= '<li class="active">'; } else { $html .= '<li class="open">'; } } else { $html .= '<li>'; } if ($val['type'] == 'folder') { $html .= '<a href="#" class="aj-nav folder">' . $val['name'] . '</a>'; $html .= build_nav($val['tree'], $url_params); } else { $html .= '<a href="' . $val['url'] . '">' . $val['name'] . '</a>'; } $html .= '</li>'; } $html .= '</ul>'; return $html; }
if (url_path() == 'functions/get_pictures') { print "active"; } ?> " href="<?php print site_url(); ?> functions/get_pictures">get_pictures</a></li> <li><a class="<?php if (url_path() == 'functions/thumbnail') { print "active"; } ?> " href="<?php print site_url(); ?> functions/thumbnail">thumbnail</a></li> <li><a class="<?php if (url_path() == 'functions/save_picture') { print "active"; } ?> " href="<?php print site_url(); ?> functions/save_picture">save_picture</a></li> </ul>