* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: xorg.common.inc.php,v 1.9 2004-11-22 06:50:03 x2000habouzit Exp $
+ $Id: xorg.common.inc.php,v 1.10 2004-11-22 07:48:49 x2000habouzit Exp $
***************************************************************************/
// {{{ defines
define("AUTH_COOKIE", $i++);
define("AUTH_MDP", $i++);
+define("PERMS_EXT", "ext");
define("PERMS_USER", "user");
define("PERMS_ADMIN", "admin");
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: insert.password.inc.php,v 1.6 2004-11-17 10:12:45 x2000habouzit Exp $
+ $Id: insert.getName.php,v 1.1 2004-11-22 07:48:50 x2000habouzit Exp $
***************************************************************************/
-function smarty_insert_getName() {
+function smarty_insert_getName()
+{
global $globals;
- if(empty($_COOKIE['ORGuid'])) return "";
+ if (empty($_COOKIE['ORGuid'])) {
+ return "";
+ }
$res = $globals->db->query("SELECT prenom FROM auth_user_md5 WHERE user_id='{$_COOKIE['ORGuid']}'");
- if(list($prenom) = mysql_fetch_row($res)) {
+ if (list($prenom) = mysql_fetch_row($res)) {
mysql_free_result($res);
return $prenom;
}
return "";
}
-function smarty_insert_getUsername() {
- global $globals;
- if(isset($_COOKIE['ORGuid'])) $id = $_COOKIE['ORGuid'];
- if(isset($_SESSION['uid'])) $id = $_SESSION['uid'];
- if(empty($id)) return "";
- $res = $globals->db->query("SELECT alias
- FROM aliases
- WHERE id='$id' AND (type='a_vie' OR type='alias')
- ORDER BY !FIND_IN_SET('epouse',flags), LENGTH(alias) LIMIT 1");
- if(list($uname) = mysql_fetch_row($res)) {
- mysql_free_result($res);
- return $uname;
- }
- return "";
-}
?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************
+ $Id: insert.getUserName.php,v 1.1 2004-11-22 07:48:50 x2000habouzit Exp $
+ ***************************************************************************/
+
+function smarty_insert_getUsername()
+{
+ global $globals;
+ if (isset($_COOKIE['ORGuid'])) {
+ $id = $_COOKIE['ORGuid'];
+ }
+ if (isset($_SESSION['uid'])) {
+ $id = $_SESSION['uid'];
+ }
+ if (empty($id)) {
+ return "";
+ }
+ $res = $globals->db->query("SELECT alias
+ FROM aliases
+ WHERE id='$id' AND (type IN ('a_vie','alias') AND FIND_IN_SET('bestalias', flags))");
+ if (list($uname) = mysql_fetch_row($res)) {
+ mysql_free_result($res);
+ return $uname;
+ }
+ return "";
+}
+?>
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: password_prompt.tpl,v 1.24 2004-11-13 13:17:08 x2000habouzit Exp $
+ $Id: password_prompt.tpl,v 1.25 2004-11-22 07:48:50 x2000habouzit Exp $
***************************************************************************}
<noscript>
{min_auth level="cookie"}
<p>
<strong>Merci de rentrer ton mot de passe pour démarrer une connexion au site.</strong>
-Si tu n'es pas {insert name="getName" script="insert.password.inc.php"}, change le login ci-dessous, ou rends-toi sur
+Si tu n'es pas {insert name="getName"}, change le login ci-dessous, ou rends-toi sur
<a href="{"inscription/"|url}">la page d'inscription</a>.
</p>
{/min_auth}
</td>
<td>
<input type="text" name="username" size="20" maxlength="50"
- value="{insert name="getUserName" script="insert.password.inc.php"}" />
+ value="{insert name="getUserName"}" />
</td>
</tr>
<tr>