public function clear_callback() { $i = $this->distribution_model->clear_callback(); if ($i == 0) { $this->session->set_flashdata('alert', '<div class="alert alert-warning">Warning : None of the data is cleared</div>'); } else { $this->session->set_flashdata('alert', '<div class="alert alert-success">Success : ' . $i . ' data has been cleared</div>'); } redirect('distribution' . get_query_string()); }
function output() { global $db, $php_start, $main, $vars; if ($this->hide) { return; } $this->tpl['php_time'] = getmicrotime() - $php_start; $this->tpl['mysql_time'] = $db->total_time; $this->tpl['wind_version'] = format_version($vars['info']['version']); if (isset($main->userdata->privileges['admin']) && $main->userdata->privileges['admin'] === TRUE && $vars['debug']['enabled'] == TRUE) { $this->tpl['debug_mysql'] = ROOT_PATH . "debug/mysql.php?" . get_query_string(); } return template($this->tpl, __FILE__); }
public function phone($id) { $this->form_validation->set_rules('status', 'Status', 'trim'); if ($this->form_validation->run() === false) { $xdata['candidate'] = $this->telemarketing_model->get_candidate($id); $xdata['breadcrumb'] = 'reminder_telemarketing/telemarketing' . get_query_string(); $xdata['callhis'] = $this->telemarketing_model->get_call($id); $xdata['action'] = 'reminder_telemarketing/telemarketing/phone/' . $id . get_query_string(); $data['content'] = $this->load->view('telemarketing_form', $xdata, true); $this->load->view('template', $data); } else { $data = array('status' => $this->input->post('status'), 'new_contact' => $this->input->post('new_contact'), 'tlp_new' => $this->input->post('tlp_new'), 'called' => $this->input->post('called'), 'fminute' => $this->input->post('fminute'), 'push' => $this->input->post('push'), 'attend' => $this->input->post('attend'), 'email' => $this->input->post('email'), 'audit' => $this->input->post('audit'), 'valid' => $this->input->post('valid')); $this->telemarketing_model->phone($id, $data); $this->session->set_flashdata('alert', '<div class="alert alert-success">Data has been saved</div>'); redirect('reminder_telemarketing/telemarketing/phone/' . $id . get_query_string()); } }
function list_post_revisions($post) { if ($revisions = wp_get_post_revisions($post->ID)) { $items = ''; $revision_id = valid_revision_id() ? $revision_id = $_GET['revision'] : $post->ID; foreach ($revisions as $revision) { $date = wp_post_revision_title($revision, 0); $name = get_author_name($revision->post_author); $query_string = get_query_string($revision); $items .= "<li>"; if ($revision_id == $revision->ID) { $items .= "{$date} by {$name} (<em>displayed above</em>)"; } else { $items .= "<a href=\"{$query_string}\">{$date}</a> by {$name}"; } $items .= "</li>"; } return "<ul class='revision-list'>{$items}</ul>"; } }
$query_string = get_query_string($ps_parameters, "", "", false); $tree_url = $friendly_url . $friendly_extension . $query_string; } else { $ps_parameters["item_id"] = $item_id; $query_string = get_query_string($ps_parameters, "", "", false); $tree_url = get_custom_friendly_url("product_details.php") . $query_string; } $tree_title = $item_name; if ($erase_tags) { $tree_title = strip_tags($tree_title); } $breadcrumbs_tree_array[] = array($tree_url, $tree_title); } } if (isset($is_reviews) && $is_reviews) { $query_string = get_query_string($ps_parameters, "", "", false); $tree_url = get_custom_friendly_url("reviews.php") . $query_string; $tree_title = REVIEWS_MSG; if ($erase_tags) { $tree_title = strip_tags($tree_title); } $breadcrumbs_tree_array[] = array($tree_url, $tree_title); } $ic = count($breadcrumbs_tree_array) - 1; for ($i = 0; $i < $ic; $i++) { $t->set_var("tree_url", htmlspecialchars($breadcrumbs_tree_array[$i][0])); $t->set_var("tree_title", htmlspecialchars($breadcrumbs_tree_array[$i][1])); $t->set_var("tree_class", ""); $t->parse("tree", true); } if ($ic >= 0) {
/** * Gets query string, removing any Fusion News added variables. * @return string Clean string query (without any Fusion News added variables) */ function clean_query_string() { $query_string = get_query_string(); $query_string = preg_replace('/fn_[a-z]+=[0-9a-z]+&?/', '', $query_string); $query_string = str_replace('&', '&', $query_string); // Clear possible leading ampersand if (substr($query_string, -5) == '&') { $query_string = substr($query_string, 0, -5); } if (empty($query_string)) { return ''; } else { return '&' . $query_string; } }
$_SERVER['QUERY_STRING'] = get_query_string(false); // remember this request type - if we change from/to SSL we need to recheck that a cookie has been set $_SESSION['prev_request_type'] = $request_type; // remember any posted data $_SESSION['_post'] = $_POST; session_write_close(); // redirect to self with the SID in the query string header('Location: ' . ($request_type == 'SSL' ? constant('HTTPS_SERVER') : constant('HTTP_SERVER')) . $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING']); die; } // if cookies are enabled, remove the SID from the query string and redirect if (isset($_COOKIE[$session_name])) { if (isset($_GET[$session_name]) && $_GET[$session_name] != '') { // remove the SID from the query string unset($_GET[$session_name]); $_SERVER['QUERY_STRING'] = get_query_string(false); // remember any posted data $_SESSION['_post'] = $_POST; // end session session_write_close(); // redirect with clean query string header('Location: ' . ($request_type == 'SSL' ? constant('HTTPS_SERVER') : constant('HTTP_SERVER')) . $_SERVER['SCRIPT_NAME'] . ($_SERVER['QUERY_STRING'] != '' ? '?' . $_SERVER['QUERY_STRING'] : '')); die; } } // remember this request type - if we change from/to SSL we need to recheck that a cookie has been set $_SESSION['prev_request_type'] = $request_type; // JTD end dwno mod } // JTD - end Grayson's spider fix ?>
function print_footer() { global $without_close, $pgv_lang, $view, $buildindex, $pgv_changes, $DBTYPE; global $SHOW_STATS, $SCRIPT_NAME, $QUERY_STRING, $footerfile, $print_footerfile, $ALLOW_CHANGE_GEDCOM, $printlink; global $PGV_IMAGE_DIR, $theme_name, $PGV_IMAGES, $TEXT_DIRECTION, $footer_count, $DEBUG; if (!isset($footer_count)) { $footer_count = 1; } else { $footer_count++; } print "<!-- begin footer -->\n"; if ($view != "preview") { include $footerfile; } else { include $print_footerfile; print "\n\t<div id=\"backprint\" style=\"text-align: center; width: 95%\"><br />"; $backlink = $SCRIPT_NAME . "?" . get_query_string(); if (!$printlink) { print "\n\t<br /><a id=\"printlink\" href=\"javascript:;\" onclick=\"print(); return false;\">" . $pgv_lang["print"] . "</a><br />"; print "\n\t <a id=\"printlinktwo\"\t href=\"javascript:;\" onclick=\"window.location='" . $backlink . "'; return false;\">" . $pgv_lang["cancel_preview"] . "</a><br />"; } $printlink = true; print "</div>"; } if (function_exists("load_behaviour")) { load_behaviour(); } // @see function_print_lists.php print "\n\t</body>\n</html>"; }
$t->set_var("reviews_href", htmlspecialchars($reviews_url)); $t->set_var("tell_friend_href", htmlspecialchars($tell_friend_href)); $t->set_var("product_print_href", get_custom_friendly_url("product_print.php")); $t->set_var("cl", $currency["left"]); $t->set_var("cr", $currency["right"]); $t->set_var("tax_prices_type", $tax_prices_type); $t->set_var("PRODUCT_OUT_STOCK_MSG", htmlspecialchars(PRODUCT_OUT_STOCK_MSG)); $t->set_var("out_stock_alert", str_replace("'", "\\'", htmlspecialchars(PRODUCT_OUT_STOCK_MSG))); // random value srand((double) microtime() * 1000000); $random_value = rand(); $current_ts = va_timestamp(); // generate page link with query parameters $page = get_custom_friendly_url("product_details.php"); $remove_parameters = array("rnd", "cart", "item_id"); $query_string = get_query_string($_GET, $remove_parameters, "", false); $page .= $query_string; $page .= strlen($query_string) ? "&" : "?"; $cart_link = $page; $page .= "item_id=" . urlencode($item_id); $cart_link .= "rnd=" . $random_value . "&"; $t->set_var("rnd", $random_value); $t->set_var("rp_url", urlencode($page)); $t->set_var("rp", htmlspecialchars($page)); $t->set_var("current_category_id", htmlspecialchars($category_id)); if (!VA_Products::check_exists($item_id)) { $t->set_var("item", ""); $t->set_var("links_block", ""); $t->set_var("item_name", " "); $t->set_var("NO_PRODUCT_MSG", NO_PRODUCT_MSG); $t->parse("no_item", false);
$t->set_file("block_body", $html_template); $t->set_var("basket_href", get_custom_friendly_url("basket.php")); $t->set_var("current_href", $current_page); $t->set_var("checkout_href", get_custom_friendly_url("checkout.php")); $t->set_var("products_href", get_custom_friendly_url("products.php")); $t->set_var("cart_save_href", get_custom_friendly_url("cart_save.php")); $t->set_var("cart_retrieve_href", get_custom_friendly_url("cart_retrieve.php")); $t->set_var("shipping_calculator_href", get_custom_friendly_url("shipping_calculator.php")); $hide_shipping_basket = get_setting_value($settings, "hide_shipping_basket", 0); $confirm_add = get_setting_value($settings, "confirm_add", 1); $t->set_var("confirm_add", $confirm_add); // generate page link with query parameters $page = $current_page; $remove_parameters = array("rnd", "cart", "item_id", "type", "cart_id", "quantity", "new_quantity", "operation", "coupon_code", "coupon_id"); $get_vars = isset($_GET) ? $_GET : $HTTP_GET_VARS; $query_string = get_query_string($get_vars, $remove_parameters, "", true); $page .= $query_string; $page_link = $page; $page_link .= strlen($query_string) ? "&" : "?"; srand((double) microtime() * 1000000); $random_value = rand(); $user_id = get_session("session_user_id"); $user_info = get_session("session_user_info"); $user_tax_free = get_setting_value($user_info, "tax_free", 0); $user_type_id = get_session("session_user_type_id"); if (!$user_type_id) { $user_type_id = get_session("session_new_user_type_id"); } $user_discount_type = get_session("session_discount_type"); $user_discount_amount = get_session("session_discount_amount"); $tax_prices_type = get_setting_value($settings, "tax_prices_type", 0);
<?php // HEADER PARTS $user_name = isset($_SESSION['user_name']) ? $_SESSION['user_name'] : ''; $error_msg = isset($_SESSION['error_message']) && !empty($_SESSION['error_message']) ? $_SESSION['error_message'] : ''; $_SESSION['error_message'] = ''; require_once '../cores/db.php'; require_once '../cores/functions.php'; /* UI */ require_once '../cores/ui/ui-helper.php'; /** * Query Strings: */ $query_string = get_query_string(); // header('Content-type: text/html; charset=utf-8'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta content="text/html;charset=utf-8" http-equiv="Content-Type"> <!-- <?php echo SP_APP_NAME_SHORT . ' v' . SP_APP_VERSION . PHP_EOL; ?> <?php echo SP_APP_NAME_LONG . ' v' . SP_APP_VERSION . PHP_EOL; ?> Copyright <?php echo date('Y');
$n->set_parameters($products_nav_first_last, $products_nav_prev_next, $inactive_links); $page_number = $n->set_navigator("navigator", "pn_pr", $products_nav_type, $products_nav_pages, $records_per_page, $total_records, false, $pass_parameters); $total_pages = ceil($total_records / $records_per_page); // generate page link with query parameters $query_string = get_query_string($pass_parameters, "", "", false); $rp = $products_page; $rp .= $query_string; $cart_link = $rp; $cart_link .= strlen($query_string) ? "&" : "?"; $cart_link .= "rnd=" . $random_value . "&"; // set hidden parameter with category_id parameter //$hidden_parameters = $pass_parameters; //$hidden_parameters["category_id"] = $category_id; //get_query_string($hidden_parameters, "", "", true); // remove page and sorting parameters from url $details_query = get_query_string($details_parameters, array("pn_pr", "sort_ord", "sort_dir"), "", false); $product_link = get_custom_friendly_url("product_details.php") . $details_query; $product_link .= strlen($details_query) ? "&" : "?"; $product_link .= "item_id="; $reviews_link = get_custom_friendly_url("reviews.php") . $details_query; $reviews_link .= strlen($details_query) ? "&" : "?"; $reviews_link .= "item_id="; $t->set_var("rnd", $random_value); $t->set_var("rp_url", urlencode($rp)); $t->set_var("rp", htmlspecialchars($rp)); $t->set_var("total_records", $total_records); if ($total_records) { $order_columns = $s->order_columns; if ($order_columns) { $group_by = $order_columns; } else {
function friendly_url_redirect($friendly_url, $friendly_params) { global $is_friendly_url, $settings; $friendly_urls = get_setting_value($settings, "friendly_urls", 0); $friendly_url_redirect = get_setting_value($settings, "friendly_url_redirect", 0); if (!$is_friendly_url && $friendly_urls && $friendly_url_redirect && $friendly_url && sizeof($_POST) == 0) { $friendly_extension = get_setting_value($settings, "friendly_extension", ""); $query_string = get_query_string($_GET, $friendly_params); $friendly_url .= $friendly_extension . $query_string; header("HTTP/1.1 301 Moved Permanently"); header("Status: 301 Moved Permanently"); header("Location: " . $friendly_url, true, 301); exit; } }
$where .= " AND (a.short_description LIKE '%" . $db->tosql($search_values[$si], TEXT, false) . "%' "; $where .= " OR a.full_description LIKE '%" . $db->tosql($search_values[$si], TEXT, false) . "%' "; $where .= " OR a.article_title LIKE '%" . $db->tosql($search_values[$si], TEXT, false) . "%') "; } } $articles_ids = VA_Articles::find_all_ids($where, VIEW_CATEGORIES_ITEMS_PERM); $total_records = count($articles_ids); // set up variables for navigator $n = new VA_Navigator($settings["templates_dir"], "navigator.html", $articles_page); $records_per_page = get_setting_value($vars, "articles_recs", 10); $pages_number = 5; $page_number = $n->set_navigator("navigator", $page_param, SIMPLE, $pages_number, $records_per_page, $total_records, false, $pass_parameters); $total_pages = ceil($total_records / $records_per_page); // generate page link with query parameters $pass_parameters["page"] = $page; $query_string = get_query_string($pass_parameters, "article_id", "", true); $rp = $articles_page; $rp .= $query_string; $article_link = "article.php" . $query_string; $article_link .= strlen($query_string) ? "&" : "?"; $article_link .= "article_id="; $reviews_link = "articles_reviews.php" . $query_string; $reviews_link .= strlen($query_string) ? "&" : "?"; $reviews_link .= "article_id="; $t->set_var("rp_url", urlencode($rp)); $t->set_var("rp", htmlspecialchars($rp)); $t->set_var("total_records", $total_records); $t->set_var("search_string", htmlspecialchars($search_string)); $list_fields = ",," . $list_fields . ",,"; $article_fields = array("author_name", "author_email", "author_url", "link_url", "download_url", "short_description", "full_description", "keywords", "notes"); $is_OG_image_set = false;
/** * Get Request uri * * @param type $no_query_string * @return type */ function get_request_uri($no_query_string = true) { $request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null; if ($no_query_string) { $request_uri = str_replace('?' . get_query_string(), '', $request_uri); } return $request_uri; }
function _fopen_urlopen($url, $postdata, &$response, $file_name, $file_field) { $params = array(); if ($file_name && $file_field) { $boundary = '----------' . md5(time()); $content = get_post_content($boundary, $postdata, $file_name, $file_field); $header = get_http_headers_for_request($boundary, $content, $file_name, $file_field); $params = array('http' => array('method' => 'POST', 'header' => $header, 'content' => $content)); } else { if ($postdata) { $params = array('http' => array('method' => 'POST', 'header' => 'Content-Type: application/x-www-form-urlencoded', 'content' => get_query_string($postdata))); } } ini_set('user_agent', USER_AGENT); $ctx = stream_context_create($params); $fp = fopen($url, 'rb', false, $ctx); if (!$fp) { return false; } // Get status code from headers. list($unused, $response['code'], $unused) = explode(' ', $http_response_header[0], 3); $headers = array_slice($http_response_header, 1); // Convert headers into associative array. foreach ($headers as $unused => $header) { $header = explode(':', $header); $header[0] = trim($header[0]); $header[1] = trim($header[1]); $headers[strtolower($header[0])] = strtolower($header[1]); } $response['data'] = stream_get_contents($fp); }
?> </td> <td width='100'><?php echo $this->distribution_model->count_by_telemarketer_onproses($row->id); ?> </td> <td width='100'><?php echo $this->distribution_model->count_by_telemarketer_complete($row->id); ?> </td> <td width='100'><input type="number" class="form-control input-sm" name="telemarketer_<?php echo $row->id; ?> "></td> <td width='20'><?php echo anchor('reminder_distribution/distribution/clear/' . $row->id . get_query_string(), 'Clear', array('class' => 'btn btn-danger btn-sm', 'onclick' => "return confirm('Are you sure ?')")); ?> </td> </tr> <?php $i++; ?> <?php } ?> </table> </div> </div> <div class="box-footer"> <button class="btn btn-primary btn-sm" type="submit" onclick="return confirm('Are you sure ?')"><span class="glyphicon glyphicon-export"></span> Distribution</button> </div>
public function delete($id = '') { if ($id != '') { $this->schedule_model->delete($id); } $check = $this->input->post('check'); if ($check != '') { foreach ($check as $c) { $this->schedule_model->delete($c); } } $this->session->set_flashdata('alert', '<div class="alert alert-success">Delete Data Sukses</div>'); redirect('schedule' . get_query_string()); }
/** * @brief Get query string as an array * @return array An associative array with all parameters */ function get_query_string_array() { if (get_query_string() == '') { return array(); } $params = array(); foreach (explode('&', get_query_string()) as $param_token) { // Split params tokens in two $param_parts = explode('=', $param_token, 2); // Url decode parameter parts array_walk($param_parts, function (&$val) { $val = urldecode($val); }); if (count($param_parts) == 2) { $params[$param_parts[0]] = urldecode($param_parts[1]); } else { $params[$param_parts[0]] = true; } } return $params; }
public function delete() { $this->absent_model->delete(); redirect('absent' . get_query_string()); }
/** * Prints a button used to print a CPD Report * * @param string $page Page name * @param object $filter_data Current filter data */ function print_print_button($page, $filter_data = null) { global $CFG; $link = $page; if (!empty($filter_data)) { $link .= '?' . get_query_string(array("print" => 1) + (array) $filter_data); } echo '<form action="' . $page . '" method="get" target="_blank" onsubmit="return false;">'; echo '<input type="hidden" name="print" value="1" />'; echo '<input id="print_button" type="submit" value="Print" onclick="window.open(\'' . $link . '\', \'\', \'resizable=yes toolbar=no, location=no\');" />'; echo '</form>'; }
public function search() { $data = array('event' => $this->input->post('event'), 'date_from' => $this->input->post('date_from'), 'date_to' => $this->input->post('date_to')); redirect('report' . get_query_string($data)); }
function qwp_uri_login($is_op = false) { $dst_url = P("dsturl"); if (!$dst_url && !qwp_is_passport_module()) { if ($is_op) { $dst_url = qwp_uri_current_home(); } else { $query_string = get_query_string(); if ($query_string) { $dst_url = './?' . get_query_string(); } } } $passport_url = './?m=passport'; if ($dst_url) { $passport_url .= '&dsturl=' . urlencode($dst_url); } return $passport_url; }