projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Proof of concept:
[platal.git]
/
htdocs
/
trombipromo.php
diff --git
a/htdocs/trombipromo.php
b/htdocs/trombipromo.php
index
a499834
..
f7f1969
100644
(file)
--- a/
htdocs/trombipromo.php
+++ b/
htdocs/trombipromo.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-200
4
Polytechnique.org *
+ * Copyright (C) 2003-200
6
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-22,6
+22,7
@@
require_once("xorg.inc.php");
new_skinned_page('trombipromo.tpl', AUTH_COOKIE);
require_once("trombi.inc.php");
require_once("xorg.inc.php");
new_skinned_page('trombipromo.tpl', AUTH_COOKIE);
require_once("trombi.inc.php");
+$page->assign('xorg_title','Polytechnique.org - Trombi Promo');
function getList($offset,$limit) {
global $globals;
function getList($offset,$limit) {
global $globals;
@@
-37,7
+38,7
@@
function getList($offset,$limit) {
$pnb = $res->fetchOneCell();
$res = $globals->xdb->query(
$pnb = $res->fetchOneCell();
$res = $globals->xdb->query(
- "SELECT promo,user_id,a.alias AS forlife,nom,prenom
+ "SELECT promo,user_id,a.alias AS forlife,
IF(nom_usage='', nom, nom_usage) AS
nom,prenom
FROM photo AS p
INNER JOIN auth_user_md5 AS u ON u.user_id=p.uid
INNER JOIN aliases AS a ON ( u.user_id=a.id AND a.type='a_vie' )
FROM photo AS p
INNER JOIN auth_user_md5 AS u ON u.user_id=p.uid
INNER JOIN aliases AS a ON ( u.user_id=a.id AND a.type='a_vie' )
@@
-59,6
+60,9
@@
if (Env::has('xpromo')) {
$trombi->setAdmin();
$page->assign_by_ref('trombi',$trombi);
}
$trombi->setAdmin();
$page->assign_by_ref('trombi',$trombi);
}
+} else {
+ $tmp = new Trombi();
+ $page->assign("limit", $tmp->limit);
}
$page->run();
}
$page->run();