X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fuserset.inc.php;h=f45cf484cac7cbaea6cc177f0c7569c62a34f6f0;hb=63f06a435ff8e9c058b1dee1eb97fff99606d490;hp=7efd5c1d3423ec001fc96752cbb4769131a4a773;hpb=04334c61ffd1e63616503bf52e90174adaa3cc86;p=platal.git diff --git a/include/userset.inc.php b/include/userset.inc.php index 7efd5c1..f45cf48 100644 --- a/include/userset.inc.php +++ b/include/userset.inc.php @@ -19,7 +19,6 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -require_once('xorg.misc.inc.php'); require_once('user.func.inc.php'); global $globals; @@ -210,6 +209,23 @@ class MinificheView extends MultipageView : ""); } + public function bounds() + { + $order = Env::v('order', $this->defaultkey); + $show_bounds = 0; + if (($order == "name") || ($order == "-name")) { + $this->bound_field = "nom"; + $show_bounds = 1; + } elseif (($order == "promo") || ($order == "-promo")) { + $this->bound_field = "promo"; + $show_bounds = -1; + } + if ($order{0} == '-') { + $show_bounds = -$show_bounds; + } + return $show_bounds; + } + public function templateName() { return 'include/plview.minifiche.tpl'; @@ -235,6 +251,23 @@ class MentorView extends MultipageView ms.secteur, ms.ss_secteur"; } + public function bounds() + { + $order = Env::v('order', $this->defaultkey); + $show_bounds = 0; + if (($order == "name") || ($order == "-name")) { + $this->bound_field = "nom"; + $show_bounds = 1; + } elseif (($order == "promo") || ($order == "-promo")) { + $this->bound_field = "promo"; + $show_bounds = -1; + } + if ($order{0} == '-') { + $show_bounds = -$show_bounds; + } + return $show_bounds; + } + public function templateName() { return 'include/plview.referent.tpl'; @@ -265,6 +298,23 @@ class TrombiView extends MultipageView return "INNER JOIN photo AS p ON (p.uid = u.user_id) "; } + public function bounds() + { + $order = Env::v('order', $this->defaultkey); + $show_bounds = 0; + if (($order == "name") || ($order == "-name")) { + $this->bound_field = "nom"; + $show_bounds = 1; + } elseif (($order == "promo") || ($order == "-promo")) { + $this->bound_field = "promo"; + $show_bounds = -1; + } + if ($order{0} == '-') { + $show_bounds = -$show_bounds; + } + return $show_bounds; + } + public function templateName() { return 'include/plview.trombi.tpl';