From 81f1cee077f4ebd5413bf207670659298912568d Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Mon, 19 Jul 2004 09:33:21 +0000 Subject: [PATCH] one more + obsolete one --- etat_migration | 4 ++-- htdocs/admin/admin_trombino.php | 40 ++++++++++++++++++++++++++++++++++++++ templates/admin/admin_trombino.tpl | 32 ++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 htdocs/admin/admin_trombino.php create mode 100644 templates/admin/admin_trombino.tpl diff --git a/etat_migration b/etat_migration index 3b30f1e..7e19069 100644 --- a/etat_migration +++ b/etat_migration @@ -16,8 +16,6 @@ ------+-------------------------------------------+---------------- Etat | Ancien nom | Nouveau nom ------+-[ admin ]---------------------------------+---------------- -; | admin/admin_trombino.php | -; | admin/correction_adr.php | ; | admin/evenements.php | ------+-[ marketing ]-----------------------------+---------------- ; | admin/utilisateurs_identification.php | marketing/ @@ -93,6 +91,7 @@ xx | AccesPermanentOn.php | cookie_on.php xx | acces_redirect.php | carva_redirect.php xx | acces_smtp.php | - xx | acces_wap.php | - +xx | admin/admin_trombino.php | xx | admin/ax-xorg.php | - xx | admin/deces_promo.php | - xx | admin/envoidirect.php | marketing/envoidirect.php @@ -184,6 +183,7 @@ xx | trezo/gere_operations.php | - xx | trezo/index.php | - xx | vcard.php | - ------+-------------------------------------------+---------------- +x!! | admin/correction_adr.php | x!! | admin/logger_events.php | géré par logger.php x!! | admin/logger_user.php | géré par logger.php x!! | admin/newsletter_form.inc.php | - diff --git a/htdocs/admin/admin_trombino.php b/htdocs/admin/admin_trombino.php new file mode 100644 index 0000000..67fbb8e --- /dev/null +++ b/htdocs/admin/admin_trombino.php @@ -0,0 +1,40 @@ +db->query("SELECT username,promo FROM auth_user_md5 WHERE user_id = '" . $_REQUEST["uid"] . "'"); +list($username, $promo) = mysql_fetch_row($q); + +if (isset($_REQUEST["action"])) { + switch ($_REQUEST["action"]) { + + case "ecole": + header("Content-type: image/jpeg"); + readfile("/home/web/trombino/photos".$promo."/".$username.".jpg"); + exit; + break; + + case "valider": + $handle = fopen ($_FILES['userfile']['tmp_name'], "r"); + $data = fread ($handle, filesize ($_FILES['userfile']['tmp_name'])); + fclose ($handle); + list($x, $y) = getimagesize($_FILES['userfile']['tmp_name']); + $mimetype = substr($_FILES['userfile']['type'], 6); + unlink($_FILES['userfile']['tmp_name']); + $globals->db->query( + "REPLACE INTO photo + SET uid='".$_REQUEST["uid"]."', + attachmime = '".$mimetype."', + attach='".addslashes($data)."', + x='".$x."', y='".$y."'"); + break; + + case "supprimer": + $globals->db->query("DELETE FROM photo WHERE uid = '".$_REQUEST["uid"]."'"); + break; + } +} + +$page->assign('username', $username); +$page->run(); +?> diff --git a/templates/admin/admin_trombino.tpl b/templates/admin/admin_trombino.tpl new file mode 100644 index 0000000..da9b5e3 --- /dev/null +++ b/templates/admin/admin_trombino.tpl @@ -0,0 +1,32 @@ +{* $Id: admin_trombino.tpl,v 1.1 2004-07-19 09:33:21 x2000habouzit Exp $ *} + +
+ Gestion du trombino +
+ +{dynamic} +

+Photo actuelle de {$username} +

+ + +
+ +

+Supprimer cette photo +

+ +

+Voir sa photo de trombi récupérée à l'école (si disponible) +

+ +
+ + + + +
+ +{/dynamic} + +{* vim:set et sw=2 sts=2 sws=2: *} -- 2.1.4