routeSQL : set cookies to store the search, number of elements and page
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2008 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -238,6 +238,9 @@ class routeSQL
|
|||||||
// num is the number of elements displayed by page
|
// num is the number of elements displayed by page
|
||||||
// page is the page to display
|
// page is the page to display
|
||||||
// Allow the parameters to be sent in any order
|
// Allow the parameters to be sent in any order
|
||||||
|
if (isset ($_COOKIE["num"])) $num = $_COOKIE["num"];
|
||||||
|
if (isset ($_COOKIE["page"])) $page = $_COOKIE["page"];
|
||||||
|
if (isset ($_COOKIE["search"])) $search = $_COOKIE["search"];
|
||||||
if ($p1 === "num") $num = $v1;
|
if ($p1 === "num") $num = $v1;
|
||||||
if ($p2 === "num") $num = $v2;
|
if ($p2 === "num") $num = $v2;
|
||||||
if ($p3 === "num") $num = $v3;
|
if ($p3 === "num") $num = $v3;
|
||||||
@@ -253,6 +256,10 @@ class routeSQL
|
|||||||
$page = intval ($page);
|
$page = intval ($page);
|
||||||
$num = intval ($num);
|
$num = intval ($num);
|
||||||
$search = rawurldecode ($search);
|
$search = rawurldecode ($search);
|
||||||
|
$url = "/".$this->url_prefix;
|
||||||
|
setcookie ("page", "$page", time()+3600*24*30);
|
||||||
|
setcookie ("num", "$num", time()+3600*24*30);
|
||||||
|
setcookie ("search", "$search", time()+3600*24*30);
|
||||||
//echo "PAGE=$page\n";
|
//echo "PAGE=$page\n";
|
||||||
//echo "NUM=$num\n";
|
//echo "NUM=$num\n";
|
||||||
//echo "SEARCH=$search\n";
|
//echo "SEARCH=$search\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user