本文整理汇总了PHP中remove_get函数的典型用法代码示例。如果您正苦于以下问题:PHP remove_get函数的具体用法?PHP remove_get怎么用?PHP remove_get使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了remove_get函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_where_string
$per_page = 20;
$where = get_where_string($class_name);
$total_count = $class_name::count_all_where($where);
$pagination = new Pagination($page, $per_page, $total_count);
require_once LIB_PATH . DS . 'download' . DS . 'download_csv.php';
$sql = "SELECT * FROM {$table_name} ";
$sql .= " " . get_where_string($class_name);
if (isset($order_name)) {
$sql .= " ORDER BY {$order_name} {$order_type} ";
}
$sql .= "LIMIT {$per_page} ";
$sql .= "OFFSET {$pagination->offset()}";
//echo "<p>$sql</p>";
//unset($_GET);
$result_class = $class_name::find_by_sql($sql);
$query_string = remove_get(array('view', 'page'));
$view_full_table = !empty($_GET) ? (int) $_GET["view"] : 0;
if ($view_full_table == 1) {
$page_link_view = $class_name::$page_manage . $query_string . "page=" . u($page) . "&view=" . u(0);
$page_link_text = $class_name::$page_name . " short view";
//$add_view="&view=".u(1);
$offset = "col-md-offset-2";
} else {
$page_link_view = $class_name::$page_manage . $query_string . "page=" . u($page) . "&view=" . u(1);
$page_link_text = $class_name::$page_name . " full view";
$offset = '';
}
?>
<?php
//var_dump($users)
示例2: display_table_head_new
public static function display_table_head_new($long_short = 0, $edit = true)
{
// $query_string= urldecode($_SERVER['QUERY_STRING']);
$query_string = remove_get(array('order_name', 'order_type', 'page'));
if ($long_short == 1) {
$table_field = static::$db_fields_table_display_full;
} else {
$table_field = static::$db_fields_table_display_short;
}
$output = "";
$where = get_where_string(get_called_class());
$found_count = static::count_all_where($where);
$total_count = static::count_all();
if ($found_count !== $total_count) {
// $output.="<b>Found records: <span style='color:blue;'> ".h($found_count)." of ".h($total_count)."</span></b> | ";
}
foreach ($_GET as $key => $val) {
$key_clean = str_replace("_", " ", $key);
$key_clean = ucfirst($key_clean);
if (!empty($_GET[$key]) && !in_array($key, array('page', 'view'))) {
// $output.="<b>".h($key_clean)." <span style='color:blue;'> ".h(urldecode($_GET[$key]))."</span></b> | ";
}
}
// $output.= "<tr>";
foreach ($table_field as $fieldname) {
if (property_exists(new static(), $fieldname)) {
$fieldname = str_replace("_", " ", $fieldname);
$fieldname = ucfirst($fieldname);
$output .= "<th class='text-center'>" . $fieldname . "</th>";
}
}
if ($edit) {
// $output.= "<th colspan=\"1\" class=\"text-center\" style='vertical-align:middle;'>Actions</th>";
$output .= "<th>Actions</th>";
$output .= "<th></th>";
}
// $output.= "</tr>";
return $output;
}
示例3: get_where_string
$per_page = 20;
$where = get_where_string($class_name);
$total_count = $class_name::count_all_where($where);
$pagination = new Pagination($page, $per_page, $total_count);
require_once LIB_PATH . DS . 'download' . DS . 'download_csv.php';
$sql = "SELECT * FROM {$table_name} ";
$sql .= " " . get_where_string($class_name);
if (isset($order_name)) {
$sql .= " ORDER BY {$order_name} {$order_type} ";
}
$sql .= "LIMIT {$per_page} ";
$sql .= "OFFSET {$pagination->offset()}";
//echo "<p>$sql</p>";
//unset($_GET);
$result_class = $class_name::find_by_sql($sql);
$query_string = remove_get(array('view', 'page', $class_name));
$view_full_table = !empty($_GET) ? (int) $_GET["view"] : 0;
if ($view_full_table == 1) {
$page_link_view = $class_name::$page_manage . $query_string . "page=" . u($page) . "&view=" . u(0);
$page_link_text = $class_name::$page_name . " short view";
//$add_view="&view=".u(1);
$offset = "col-md-offset-2";
} else {
$page_link_view = $class_name::$page_manage . $query_string . "page=" . u($page) . "&view=" . u(1);
$page_link_text = $class_name::$page_name . " full view";
$offset = '';
}
?>
<?php
//var_dump($users)
示例4: array
echo $home . "<br>";
$array = array();
foreach ($_GET as $key => $val) {
if ($key == 'page') {
} else {
$url_decode = urldecode($val);
$array[$key] = $url_decode;
}
}
echo "<pre>";
print_r($array);
echo "</pre>";
$new = http_build_query($array);
echo "http_build_query: " . $new . "<br>";
echo "<hr>";
$a = remove_get(array('page'));
echo $a;
?>
<h4 class="text-center"><mark><a href="<?php
echo $page_link;
?>
">my modele</a> </mark></h4>
<div class="col-md-7 col-md-offset-2 col-lg-7 col-lg-offset-2">
<div class ="background_light_blue">