Changeset 45
- Timestamp:
- 02/21/06 23:29:17 (7 years ago)
- Files:
-
- 11 edited
-
bureau/admin/adm_list.php (modified) (3 diffs)
-
bureau/admin/ftp_list.php (modified) (2 diffs)
-
bureau/admin/mem_param.php (modified) (2 diffs)
-
bureau/class/m_bro.php (modified) (4 diffs)
-
bureau/class/m_ftp.php (modified) (3 diffs)
-
bureau/class/m_mailman.php (modified) (3 diffs)
-
bureau/class/m_quota.php (modified) (2 diffs)
-
bureau/class/m_stats.php (modified) (12 diffs)
-
bureau/class/m_sympa.php (modified) (4 diffs)
-
bureau/locales/fr_FR/LC_MESSAGES/mem.po (modified) (2 diffs)
-
todo (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bureau/admin/adm_list.php
r1 r45 1 1 <?php 2 2 /* 3 $Id: adm_list.php,v 1. 1.1.1 2003/03/26 17:41:29 rootExp $3 $Id: adm_list.php,v 1.2 2003/04/17 21:39:56 benjamin Exp $ 4 4 ---------------------------------------------------------------------- 5 5 AlternC - Web Hosting System … … 56 56 <br> 57 57 <form method="post" action="adm_dodel.php"> 58 <?php 59 60 // Depending on the admin's choice, let's show a short list or a long list. 61 62 if ($mem->user["admlist"]==0) { // Normal (large) mode 63 ?> 58 64 <table cellspacing="0" cellpadding="4"> 59 65 <tr><th colspan="4"> </th><th><?php __("Username"); ?></th><th><?php echo _("Surname")." "._("First Name")."<br>("._("Email address").")"; ?></th></tr> … … 86 92 <?php 87 93 } 94 95 } // Normal Mode 96 97 if ($mem->user["admlist"]==1) { // Short mode 98 ?> 99 <table cellspacing="0" cellpadding="4"> 100 <tr> 101 <th colspan="2"> </th><th><?php __("Username"); ?></th> 102 <th width="1" bgcolor="black"><img src="icon/pix.gif" width="1" height="1" border="0" alt=""></th> 103 <th colspan="2"> </th><th><?php __("Username"); ?></th> 104 </tr> 105 <?php 106 reset($r); 107 $col=1; 108 for($z=0;$z<round(count($r)/2);$z++) 109 { 110 $col=3-$col; 111 $val=$r[$z]; 112 ?> 113 <tr class="lst<?php echo $col; ?>"> 114 <?php if ($val["su"]) { ?> 115 <td> </td> 116 <?php } else { ?> 117 <td align="center"><input type="checkbox" class="inc" name="d[]" value="<?php echo $val["uid"]; ?>"></td> 118 <?php } ?> 119 <td align="center"> 120 <a href="adm_edit.php?uid=<?php echo $val["uid"] ?>"><?php __("E"); ?></a> 121 <a href="adm_quotaedit.php?uid=<?php echo $val["uid"] ?>"><?php __("Q"); ?></a> 122 <?php 123 if (!$val["enabled"]) 124 echo "<img src=\"icon/encrypted.png\" width=\"16\" height=\"16\" alt=\""._("Locked Account")."\">"; 125 else { 126 ?> 127 <a href="adm_login.php?id=<?php echo $val["uid"];?>" target="_parent"><?php __("C"); ?></a> 128 <?php } ?> 129 </td> 130 <td <?php if ($val["su"]) echo "style=\"color: red\""; ?>><?php echo $val["login"] ?></td> 131 <td width="1" bgcolor="black"></td> 132 <?php 133 $val=$r[$z+round(count($r)/2)]; 134 if (is_array($val)) { 135 ?> 136 <?php if ($val["su"]) { ?> 137 <td> </td> 138 <?php } else { ?> 139 <td align="center"><input type="checkbox" class="inc" name="d[]" value="<?php echo $val["uid"]; ?>"></td> 140 <?php } ?> 141 <td align="center"> 142 <a href="adm_edit.php?uid=<?php echo $val["uid"] ?>"><?php __("E"); ?></a> 143 <a href="adm_quotaedit.php?uid=<?php echo $val["uid"] ?>"><?php __("Q"); ?></a> 144 <?php 145 if (!$val["enabled"]) 146 echo "<img src=\"icon/encrypted.png\" width=\"16\" height=\"16\" alt=\""._("Locked Account")."\">"; 147 else { 148 ?> 149 <a href="adm_login.php?id=<?php echo $val["uid"];?>" target="_parent"><?php __("C"); ?></a> 150 <?php } ?> 151 </td> 152 <td <?php if ($val["su"]) echo "style=\"color: red\""; ?>><?php echo $val["login"] ?></td> 153 </tr> 154 <?php 155 } else echo "<td colspan=\"3\"></td></tr>"; 156 } // for loop 157 } // Short Mode 158 159 88 160 ?> 89 161 <tr><td colspan="6"><input type="submit" class="inb" name="submit" value="<?php __("Delete checked accounts"); ?>"></td></tr> -
bureau/admin/ftp_list.php
r1 r45 1 1 <?php 2 2 /* 3 $Id: ftp_list.php,v 1. 1.1.1 2003/03/26 17:41:29 rootExp $3 $Id: ftp_list.php,v 1.2 2003/04/17 21:39:56 benjamin Exp $ 4 4 ---------------------------------------------------------------------- 5 5 AlternC - Web Hosting System … … 68 68 <tr class="lst<?php echo $col; ?>"> 69 69 <td align="center"><input type="checkbox" class="inc" name="del_<?php echo $val["id"]; ?>" value="<?php echo $val["id"]; ?>"></td> 70 <td><a href="ftp_edit.php?id=<?php echo $val["id"] ?>"> Modifier</a></td>70 <td><a href="ftp_edit.php?id=<?php echo $val["id"] ?>"><?php __("Edit"); ?></a></td> 71 71 <td><?php echo $val["login"] ?></td> 72 72 <td><?php ecif($val["pass"],$val["pass"],_("<-No Password->")); ?></td> -
bureau/admin/mem_param.php
r1 r45 1 1 <?php 2 2 /* 3 $Id: mem_param.php,v 1. 1.1.1 2003/03/26 17:41:29 rootExp $3 $Id: mem_param.php,v 1.2 2003/04/17 21:39:56 benjamin Exp $ 4 4 ---------------------------------------------------------------------- 5 5 AlternC - Web Hosting System … … 91 91 </form> 92 92 <p> </p> 93 <?php 94 if (!$mem->user["su"]) { 95 <hr> 96 <p> 97 <?php __("Admin preferences"); ?> : 98 </p> 99 <form method="post" action="mem_admin.php"> 100 <table border="1" cellspacing="0" cellpadding="4"> 101 <tr><th><?php __("Admin list view"); ?></th><td><select name="admlist"> 102 <option value="0"<?php if $mem->user["admlist"]==0) echo " SELECTED"; ?>><?php __("Large view"); ?></option> 103 <option value="1"<?php if $mem->user["admlist"]==1) echo " SELECTED"; ?>><?php __("Short view"); ?></option> 104 </select></td></tr> 105 <tr><td align="center" colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Change my admin preferences"); ?>"></td></tr> 106 </table> 107 </form> 108 <p> </p> 109 <?php } ?> 93 110 <hr> 94 111 </body> -
bureau/class/m_bro.php
r1 r45 1 1 <?php 2 2 /* 3 $Id: m_bro.php,v 1. 1.1.1 2003/03/26 17:41:29 rootExp $3 $Id: m_bro.php,v 1.2 2003/04/17 21:39:56 benjamin Exp $ 4 4 ---------------------------------------------------------------------- 5 5 LICENSE … … 129 129 } 130 130 if (is_array($c)) { 131 usort ($c, "__sort_filelist_name");131 usort ($c, array("m_bro","_sort_filelist_name")); 132 132 return $c; 133 133 } else { … … 603 603 604 604 /* ----------------------------------------------------------------- */ 605 /** Fonction de tri perso utilisé par filelist. 606 * @access private 607 */ 608 function _sort_filelist_name($a,$b) { 609 if ($a["type"] && !$b["type"]) return 1; 610 if ($b["type"] && !$a["type"]) return -1; 611 return $a["name"]>$b["name"]; 612 } 613 614 /* ----------------------------------------------------------------- */ 605 615 /** Efface $file et tous ses sous-dossiers s'il s'agit d'un dossier 606 616 * A UTILISER AVEC PRECAUTION !!! … … 629 639 } /* Classe BROUTEUR */ 630 640 631 /* ----------------------------------------------------------------- */632 /** Fonction de tri perso utilisé par filelist.633 * @access private634 */635 function __sort_filelist_name($a,$b) {636 if ($a["type"] && !$b["type"]) return 1;637 if ($b["type"] && !$a["type"]) return -1;638 return $a["name"]>$b["name"];639 }640 641 641 ?> -
bureau/class/m_ftp.php
r1 r45 1 1 <?php 2 2 /* 3 $Id: m_ftp.php,v 1. 1.1.1 2003/03/26 17:41:29 rootExp $3 $Id: m_ftp.php,v 1.2 2003/04/17 21:39:56 benjamin Exp $ 4 4 ---------------------------------------------------------------------- 5 5 LICENSE … … 295 295 * @access private 296 296 */ 297 function del_dom($dom) {297 function alternc_del_domain($dom) { 298 298 global $db,$quota,$err; 299 299 $err->log("ftp","del_dom",$dom); … … 325 325 * @access private 326 326 */ 327 function checkquota($id=-1) {327 function alternc_quota_check($id=-1) { 328 328 global $db,$err,$quota; 329 329 $err->log("ftp","checkquota"); -
bureau/class/m_mailman.php
r1 r45 1 1 <?php 2 2 /* 3 $Id: m_mailman.php,v 1. 1.1.1 2003/03/26 17:41:29 rootExp $3 $Id: m_mailman.php,v 1.2 2003/04/17 21:39:56 benjamin Exp $ 4 4 ---------------------------------------------------------------------- 5 5 AlternC - Web Hosting System … … 199 199 fonction appelée par m_domains 200 200 *****************************************************************************/ 201 function del_dom($dom) {201 function alternc_del_domain($dom) { 202 202 global $err; 203 $err->log("mailman","del_dom ",$dom);203 $err->log("mailman","del_domain",$dom); 204 204 205 205 // Suppression des listes du domaine … … 213 213 214 214 /*****************************************************************************/ 215 function a dd_dom($dom) {215 function alternc_add_domain($dom) { 216 216 global $err; 217 $err->log("mailman","del_dom ",$dom);217 $err->log("mailman","del_domain",$dom); 218 218 return true; 219 219 } -
bureau/class/m_quota.php
r1 r45 1 1 <?php 2 2 /* 3 $Id: m_quota.php,v 1. 1.1.1 2003/03/26 17:41:29 rootExp $3 $Id: m_quota.php,v 1.2 2003/04/17 21:39:56 benjamin Exp $ 4 4 ---------------------------------------------------------------------- 5 5 AlternC - Web Hosting System … … 177 177 $err->log("quota","checkquota",$id); 178 178 if ($id==-1) $id=$this->uid; 179 // FTP 180 if (is_object($GLOBALS["ft"])) { 181 $GLOBALS["ft"]->checkquota($id); 182 } 183 // Stats 184 if (is_object($GLOBALS["st"])) { 185 $GLOBALS["st"]->checkquota($id); 186 } 187 // Domaines 188 if (is_object($GLOBALS["dm"])) { 189 $GLOBALS["dm"]->checkquota($id); 190 } 191 // ml 192 if (is_object($GLOBALS["ml"])) { 193 $GLOBALS["ml"]->checkquota($id); 194 } 179 // Check quotas for all classes : 180 for($i=0;$i<count($classes);$i++) { 181 if (method_exists($GLOBALS[$classes[$i]],"alternc_quota_check")) { 182 $GLOBALS[$classes[$i]]->alternc_quota_check($uid); 183 } 184 } 195 185 } 196 186 -
bureau/class/m_stats.php
r1 r45 1 1 <?php 2 2 /* 3 $Id: m_stats.php,v 1. 1.1.1 2003/03/26 17:41:29 rootExp $3 $Id: m_stats.php,v 1.2 2003/04/17 21:39:56 benjamin Exp $ 4 4 ---------------------------------------------------------------------- 5 5 AlternC - Web Hosting System … … 28 28 ---------------------------------------------------------------------- 29 29 */ 30 /** 31 * Classe de gestion des statistiques web webalizer / apache des hébergés 32 * 33 * Cette classe permet de gérer les statistiques web générées par webalizer 34 * dans la langue de votre choix, ainsi que les fichiers logs bruts d'apache.<br> 35 * Copyleft {@link http://alternc.net/ AlternC Team} 36 * 37 * @copyright AlternC-Team 2002-11-01 http://alternc.net/ 38 * 39 */ 30 40 class m_stats { 31 41 32 var $uid=0; /* Membre actuellement connecté */ 42 /** Membre actuellement connecté */ 43 var $uid=0; 44 33 45 var $alternc_quota_name="stats"; 46 47 /** Emplacement des fichiers de conf webalizer 48 * @access private 49 */ 34 50 var $CONFDIR="/etc/webalizer/"; 51 52 /** Emplacement du fichier patron pour recopie. 53 * @access private 54 */ 35 55 var $TEMPLATEFILE="/etc/webalizer/template.conf"; 56 57 /** Nom des langues disponibles */ 36 58 var $langname=array( 37 59 "FR"=>"Français", … … 39 61 ); 40 62 41 /* **************************************************************************** 42 m_stats([$mid]) Constructeur de la classe m_stats 43 *****************************************************************************/ 63 /* ----------------------------------------------------------------- */ 64 /** 65 * Constructeur 66 */ 44 67 function m_stats($membre=0) { 45 68 $this->uid=$membre; 46 69 } 47 70 48 /* **************************************************************************** 49 get_list() retourne un tableau contenant les jeux de stats d'un membre. 50 Le tableau est de la forme 51 $r[0-n]["id"] = numéros du jeu 52 $r[0-n]["hostname"]= domaine concerné 53 $r[0-n]["dir"]= Répertoire destination (dans le dossier du membre) 54 $r[0-n]["lang"]= Langue de production des statistiques 55 *****************************************************************************/ 71 /* ----------------------------------------------------------------- */ 72 /** 73 * Retourne un tableau contenant les jeux de statistiques d'un membre. 74 * 75 * @return array retourne un tableau indexé de tableaux associatif de la 76 * forme : 77 * $r[0-n]["id"] = numéros du jeu 78 * $r[0-n]["hostname"]= domaine concerné 79 * $r[0-n]["dir"]= Répertoire destination (dans le dossier du membre) 80 * $r[0-n]["lang"]= Langue de production des statistiques 81 */ 56 82 function get_list() { 57 83 global $db,$err; … … 77 103 } 78 104 79 /* **************************************************************************** 80 get_stats_details($login) retourne un tableau contenant les details d'un 81 jeu de statistiques gere par le membre. 82 $id est un id de jeu de stats. Retourne un tableau associatif sous la forme : 83 "id" = numéros du jeu 84 "hostname"= domaine concerné 85 "dir"= Répertoire destination (dans le dossier du membre) 86 "lang"= Langue de production des statistiques 87 *****************************************************************************/ 105 /* ----------------------------------------------------------------- */ 106 /** 107 * Retourne un tableau contenant les détails d'un jeu de statistiques 108 * d'un membre. 109 * 110 * @param integer $id Numéro du jeu de stats dont on veut les infos. 111 * @return array retourne un tableau associatif de la forme : 112 * $r["id"] = numéros du jeu 113 * $r["hostname"]= domaine concerné 114 * $r["dir"]= Répertoire destination (dans le dossier du membre) 115 * $r["lang"]= Langue de production des statistiques 116 */ 88 117 function get_stats_details($id) { 89 118 global $db,$err; … … 108 137 109 138 110 /* **************************************************************************** 111 host_list() retourne la liste des domaines / sous-domaines autorisés pour le membre. 112 *****************************************************************************/ 139 /* ----------------------------------------------------------------- */ 140 /** Retourne la liste des domaines / sous-domaines autorisés pour le membre. 141 * 142 * @return array retourne un tableau indexé des domaines / sous-domaines utilisables. 143 */ 113 144 function host_list() { 114 145 global $db,$err; … … 125 156 } 126 157 127 128 /* ****************************************************************************129 select_host_list() affiche des options select de la liste des noms de domaines autorisés pour130 le membre. sous forme de champs d'options (select)131 *****************************************************************************/158 /* ----------------------------------------------------------------- */ 159 /** 160 * Affiche des options select de la liste des noms de domaines autorisés pour 161 * le membre. sous forme de champs d'options (select) 162 */ 132 163 function select_host_list($current) { 133 164 global $db,$err; … … 141 172 } 142 173 143 144 /* ****************************************************************************145 select_lang_list() affiche des options select de la liste des langues autorisés pour146 le membre. sous forme de champs d'options (select)147 *****************************************************************************/174 /* ----------------------------------------------------------------- */ 175 /** 176 * Affiche des options select de la liste des langues autorisées pour 177 * le membre. sous forme de champs d'options (select) 178 */ 148 179 function select_lang_list($current) { 149 180 reset($this->langname); … … 155 186 } 156 187 157 /* **************************************************************************** 158 put_stats_details($id,$dir,$lang) Modifie un jeu de statistiques existant 159 $id est le numéro du jeu de statistiques 160 $dir est un chemin relatif à "/var/alternc/html/u/user" 161 *****************************************************************************/ 188 /* ----------------------------------------------------------------- */ 189 /** 190 * Modifie un jeu de statistiques existant 191 * @param integer $id est le numéro du jeu de statistiques 192 * @param string $dir est un chemin relatif à "/var/alternc/html/u/user" 193 */ 162 194 function put_stats_details($id,$dir,$stlang) { 163 195 global $db,$err,$bro,$mem; … … 185 217 } 186 218 187 /* **************************************************************************** 188 delete_stats($id) Efface un jeu de statistiques existant 189 $id est un id de jeu de statistiques 190 *****************************************************************************/ 219 /* ----------------------------------------------------------------- */ 220 /** 221 * Efface un jeu de statistiques existant. 222 * @param integer $id est le numéro du jeu de statistiques à supprimer 223 * @return string le nom du domaine du jeu ainsi effacé, ou FALSE si une erreur est survenue. 224 */ 191 225 function delete_stats($id) { 192 226 global $db,$err,$quota; … … 204 238 } 205 239 206 /* **************************************************************************** 207 add_stats($hostname,$dir,$lang) Cree un nouveau jeu de statistiques 208 $dir est le chemin d'accès racine du compte ftp dans le compte du membre 209 $lang est la langue choisie 210 $hostname est le nom de domaine sur lequel on fait des stats 211 retourne true ou false 212 *****************************************************************************/ 240 /* ----------------------------------------------------------------- */ 241 /** 242 * Cree un nouveau jeu de statistiques 243 * @param string $dir est le chemin d'accès racine du compte ftp dans le compte du membre 244 * @param string $lang est la langue choisie 245 * @param string $hostname est le nom de domaine sur lequel on fait des stats 246 * @return boolean TRUE si le jeu de stats a été créé avec succès, FALSE sinon. 247 */ 213 248 function add_stats($hostname,$dir,$lang) { 214 249 global $db,$err,$quota,$bro,$mem; … … 242 277 } 243 278 244 function add_dom($dom) {245 // on ne fait rien, les créations de domaine, ca ne nous concerne pas ...246 return true;247 }248 249 function del_dom($dom) {279 /* ----------------------------------------------------------------- */ 280 /** 281 * Fonction appellée par m_dom lorsqu'un domaine est supprimé. 282 * @param string $dom est le domaine à supprimer. 283 */ 284 function alternc_del_domain($dom) { 250 285 global $db,$quota,$err; 251 286 $err->log("stats","del_dom",$dom); … … 284 319 285 320 /* Recalcule le quota complet de l'utilisateur courant, ou de l'utilisateur $id */ 286 function checkquota($id=-1) {321 function alternc_quota_check($id=-1) { 287 322 global $db,$err,$quota; 288 323 $err->log("stats","checkquota"); -
bureau/class/m_sympa.php
r1 r45 1 1 <?php 2 2 /* 3 $Id: m_sympa.php,v 1. 1.1.1 2003/03/26 17:41:29 rootExp $3 $Id: m_sympa.php,v 1.2 2003/04/17 21:39:56 benjamin Exp $ 4 4 ---------------------------------------------------------------------- 5 5 LICENSE … … 1057 1057 * @access private 1058 1058 */ 1059 function checkquota($id=-1) {1059 function alternc_quota_check($id=-1) { 1060 1060 global $db,$err,$quota; 1061 1061 if (!$id==-1) $id=$this->uid; … … 1076 1076 fonction appelée par m_domains 1077 1077 *****************************************************************************/ 1078 function del_dom($dom) {1078 function alternc_del_domain($dom) { 1079 1079 global $err; 1080 1080 $err->log("sympa","del_dom",$dom); … … 1128 1128 * @access private 1129 1129 */ 1130 function a dd_dom($dom) {1130 function alternc_add_domain($dom) { 1131 1131 global $err; 1132 $err->log("sympa"," del_dom",$dom);1132 $err->log("sympa","add_dom",$dom); 1133 1133 //connexion ldap 1134 1134 if (!$this->_connectldap()) { -
bureau/locales/fr_FR/LC_MESSAGES/mem.po
r1 r45 2 2 # Copyright (c) 2002 the AlternC Development Team 3 3 # <tech@alternc.org> 4 # $Id: mem.po,v 1. 1.1.1 2003/03/26 17:41:29 rootExp $4 # $Id: mem.po,v 1.2 2003/04/17 21:39:57 benjamin Exp $ 5 5 6 6 msgid "err_mem_1" … … 39 39 msgstr "Aide" 40 40 41 msgid "Admin preferences" 42 msgstr "Préférences d'administrateur" 43 44 msgid "Members list view" 45 msgstr "Vue de la liste des membres" 46 47 msgid "Large view" 48 msgstr "Vue large" 49 50 msgid "Short view" 51 msgstr "Vue étroite" 52 53 msgid "Change my admin preferences" 54 msgstr "Modifier mes préférences d'administration" 55 -
todo
r6 r45 1 2 A FAIRE URGEMMENT : 3 4 - Dans m_mysql, implémenter alternc_add_member et alternc_del_member ainsi que alternc_quota_check 5 - Dans m_cron, affiner un peu le bastringue ;) 6 7 8 A faire plus tard (voire déjà fait...) : 1 9 2 10 - Statistiques calculées sur les logs de visite des sites (mes zolis scripts shells)
Note: See TracChangeset
for help on using the changeset viewer.
