Changeset 1803
- Timestamp:
- 04/29/07 22:45:51 (1 year ago)
- Files:
-
- alternc/branches/franck-desktop/bureau/admin/adm_add.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/adm_defquotas.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/adm_doadd.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/adm_dodefquotas.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/adm_doedit.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/adm_doms.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/adm_dorenew.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/adm_edit.php (modified) (4 diffs)
- alternc/branches/franck-desktop/bureau/admin/adm_list.php (modified) (8 diffs)
- alternc/branches/franck-desktop/bureau/admin/adm_login.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/adm_mxaccount.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/adm_slaveaccount.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/adm_slaveip.php (modified) (3 diffs)
- alternc/branches/franck-desktop/bureau/admin/adm_tld.php (modified) (3 diffs)
- alternc/branches/franck-desktop/bureau/admin/adm_tldadd.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/adm_tlddoadd.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/adm_usersquota.php (added)
- alternc/branches/franck-desktop/bureau/admin/adm_variables.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/aws_add.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/aws_doadd.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/aws_doedit.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/aws_edit.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/aws_list.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/aws_pass.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/aws_users.php (modified) (3 diffs)
- alternc/branches/franck-desktop/bureau/admin/bro_editor.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/bro_main.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/bro_pref.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/bro_tgzdown.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/browseforfolder.php (modified) (3 diffs)
- alternc/branches/franck-desktop/bureau/admin/dom_add.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/dom_doadd.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/dom_edit.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/dom_subdel.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/dom_subdodel.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/dom_subdoedit.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/dom_subedit.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/foot.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/ftp_add.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/ftp_del.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/ftp_doadd.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/ftp_doedit.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/ftp_edit.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/ftp_list.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/head.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/hta_add.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/hta_adduser.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/hta_del.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/hta_doadd.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/hta_doadduser.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/hta_doedituser.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/hta_edit.php (modified) (3 diffs)
- alternc/branches/franck-desktop/bureau/admin/hta_edituser.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/hta_list.php (modified) (3 diffs)
- alternc/branches/franck-desktop/bureau/admin/images/arrow.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/arrow2.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/bigtrash.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes/mainBox-bl.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes/mainBox-br.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes/mainBox-dot.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes/mainBox-tl.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes/mainBox-tr.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes/menuBox-bl.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes/menuBox-br.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes/menuBox-dot.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes/menuBox-tl.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes/menuBox-tr.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes/menuBoxBottom.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/boxes/menuBoxTop.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/configure.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/connect.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/connectalt.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/delete.png (modified) (previous)
- alternc/branches/franck-desktop/bureau/admin/images/deletealt.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/disabled.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/dom.png (modified) (previous)
- alternc/branches/franck-desktop/bureau/admin/images/edit.png (modified) (previous)
- alternc/branches/franck-desktop/bureau/admin/images/editalt.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/enabled.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/enabledalt.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/home.png (modified) (previous)
- alternc/branches/franck-desktop/bureau/admin/images/lock.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/members.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/mysql.png (modified) (previous)
- alternc/branches/franck-desktop/bureau/admin/images/mysqlmenu.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/quota.png (modified) (previous)
- alternc/branches/franck-desktop/bureau/admin/images/quotaalt.png (added)
- alternc/branches/franck-desktop/bureau/admin/images/quotamenu.png (added)
- alternc/branches/franck-desktop/bureau/admin/index.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/js/alternc.js (modified) (4 diffs)
- alternc/branches/franck-desktop/bureau/admin/js/jquery.js (added)
- alternc/branches/franck-desktop/bureau/admin/login.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/mail_add.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/mail_del.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/mail_doadd.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/mail_dodel.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/mail_doedit.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/mail_edit.php (modified) (3 diffs)
- alternc/branches/franck-desktop/bureau/admin/mail_list.php (modified) (4 diffs)
- alternc/branches/franck-desktop/bureau/admin/main.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/mem_admin.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/mem_logout.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/mem_param.php (modified) (5 diffs)
- alternc/branches/franck-desktop/bureau/admin/menu.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/menu_adm.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/menu_aide.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/menu_aws.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/menu_brouteur.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/menu_dom.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/menu_ftp.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/menu_mail.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/menu_mailman.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/menu_mem.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/menu_quota.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/menu_sql.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/menu_sta2.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/menu_web.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/menu_webalizer.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/mman_add.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/mman_del.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/mman_doadd.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/mman_dodel.php (added)
- alternc/branches/franck-desktop/bureau/admin/mman_list.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/mman_members.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/quota_show.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/quota_show_all.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/quotas_users.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/sql_add.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/sql_del.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/sql_doadd.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/sql_getparam.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/sql_list.php (modified) (3 diffs)
- alternc/branches/franck-desktop/bureau/admin/sql_pass.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/sql_passchg.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/sql_users_add.php (modified) (4 diffs)
- alternc/branches/franck-desktop/bureau/admin/sql_users_del.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/sql_users_doadd.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/sql_users_list.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/sta2_add_raw.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/sta2_del_raw.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/sta2_doadd_raw.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/sta2_doedit_raw.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/sta2_edit_raw.php (modified) (2 diffs)
- alternc/branches/franck-desktop/bureau/admin/sta2_list.php (modified) (1 diff)
- alternc/branches/franck-desktop/bureau/admin/styles/boxes.css (added)
- alternc/branches/franck-desktop/bureau/admin/styles/style.css (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
alternc/branches/franck-desktop/bureau/admin/adm_add.php
r1797 r1803 39 39 40 40 $fields = array ( 41 "login" => array ("request", "string", ""), 42 "pass" => array ("request", "string", ""), 43 "passconf" => array ("request", "string", ""), 41 44 "canpass" => array ("request", "integer", 1), 45 "prenom" => array ("request", "string", ""), 46 "nom" => array ("request", "string", ""), 47 "nmail" => array ("request", "string", ""), 42 48 ); 43 49 getFields($fields); … … 52 58 <form method="post" action="adm_doadd.php"> 53 59 <table border="1" cellspacing="0" cellpadding="4"> 54 <tr><th><label for="login"><?php __("Username"); ?></label></th><td> 55 <input type="text" class="int" name="login" id="login" value="<?php echo $login; ?>" size="20" maxlength="64" /> 56 </td></tr> 57 <tr> 58 <th><label for="pass"><?php __("Initial password"); ?></label></th> 59 <td><input type="password" id="pass" name="pass" class="int" value="<?php echo $pass; ?>" size="20" maxlength="64" /></td> 60 <tr> 61 <th><label for="login"><?php __("Username"); ?></label></th> 62 <td><input type="text" class="int" name="login" id="login" value="<?php echo $login; ?>" size="20" maxlength="64" /></td> 63 </tr> 64 <tr> 65 <th><label for="pass"><?php __("Initial password"); ?></label></th> 66 <td><input type="password" id="pass" name="pass" class="int" value="<?php echo $pass; ?>" size="20" maxlength="64" /></td> 67 </tr> 68 <tr> 69 <th><label for="passconf"><?php __("Confirm password"); ?></label></th> 70 <td><input type="password" id="passconf" name="passconf" class="int" value="<?php echo $passconf; ?>" size="20" maxlength="64" /></td> 71 </tr> 72 <tr> 73 <th><label for="canpass"><?php __("Can he change its password"); ?></label></th> 74 <td> 75 <select class="inl" name="canpass" id="canpass"> 76 <?php 77 78 for($i = 0; $i < count($bro->l_icons); $i++) 79 { 80 echo "<option value=\"" . $i . "\""; 81 if ($canpass == $i) 82 echo " selected=\"selected\""; 83 echo ">" . _($bro->l_icons[$i]) . "</option>"; 84 } 85 86 ?> 87 </select> 88 </td> 89 </tr> 90 <tr> 91 <th><label for="nom"><?php echo _("Surname")."</label> / <label for=\"prenom\">"._("First Name"); ?></label></th> 92 <td><input class="int" type="text" id="nom" name="nom" value="<?php echo $nom; ?>" size="20" maxlength="128" /> / <input type="text" name="prenom" id="prenom" value="<?php echo $prenom; ?>" class="int" size="20" maxlength="128" /></td> 93 </tr> 94 <tr> 95 <th><label for="nmail"><?php __("Email address"); ?></label></th> 96 <td><input type="text" name="nmail" id="nmail" class="int" value="<?php echo $nmail; ?>" size="30" maxlength="128" /></td> 97 </tr> 98 <tr> 99 <th><label for="type"><?php __("Account type"); ?></label></th> 100 <td> 101 <select name="type" id="type" class="inl"> 102 <?php 103 104 $db->query("SELECT DISTINCT(type) FROM defquotas ORDER BY type"); 105 while($db->next_record()) 106 { 107 $type = $db->f("type"); 108 echo "<option value=\"" . $type . "\""; 109 if ($type == "default") 110 echo " selected=\"selected\""; 111 echo ">" . $type . "</option>"; 112 } 113 114 ?> 115 </select> 116 </td> 60 117 </tr> 61 <tr> 62 <th><label for="passconf"><?php __("Confirm password"); ?></label></th> 63 <td><input type="password" id="passconf" name="passconf" class="int" value="<?php echo $passconf; ?>" size="20" maxlength="64" /></td> 64 </tr> 65 <tr> 66 <th><label for="canpass"><?php __("Can he change its password"); ?></label></th> 67 <td><select class="inl" name="canpass" id="canpass"> 68 <?php 69 for($i=0;$i<count($bro->l_icons);$i++) { 70 echo "<option"; 71 if ($canpass==$i) echo " selected=\"selected\""; 72 echo " value=\"$i\">"._($bro->l_icons[$i])."</option>"; 73 } 74 ?></select> 75 </td> 76 </tr> 77 <tr> 78 <th><label for="nom"><?php echo _("Surname")."</label> / <label for=\"prenom\">"._("First Name"); ?></label></th> 79 <td><input class="int" type="text" id="nom" name="nom" value="<?php echo $nom; ?>" size="20" maxlength="128" /> / <input type="text" name="prenom" id="prenom" value="<?php echo $prenom; ?>" class="int" size="20" maxlength="128" /></td> 80 </tr> 81 <tr> 82 <th><label for="nmail"><?php __("Email address"); ?></label></th> 83 <td><input type="text" name="nmail" id="nmail" class="int" value="<?php echo $nmail; ?>" size="30" maxlength="128" /></td> 84 </tr> 85 <tr> 86 <th><label for="type"><?php __("Account type"); ?></label></th> 87 <td><select name="type" id="type" class="inl"> 88 <?php 89 $db->query("SELECT distinct(type) FROM defquotas ORDER by type"); 90 while($db->next_record()) { 91 $type = $db->f("type"); 92 echo "<option value=\"$type\""; 93 if($type == 'default') 94 echo " selected"; 95 echo ">$type</option>"; 96 } 97 ?></select> 98 </tr> 99 <? if (variable_get('hosting_tld')) { ?> 100 <tr> 101 <th colspan="2"><label><input type="checkbox" name="create_dom" value="1" /> 102 <?php print _("Create the domain username.").variable_get('hosting_tld'); ?></label></th> 118 <?php if (variable_get("hosting_tld")) { ?> 119 <tr> 120 <th colspan="2"><label><input type="checkbox" name="create_dom" value="1" /><?php print _("Create the domain username.") . variable_get("hosting_tld"); ?></label></th> 121 </tr> 122 <tr> 123 <?php } ?> 124 <td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create a new member"); ?>" /></td> 103 125 </tr> 104 <tr>105 <? } ?>106 <td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create a new member"); ?>" /></td>107 </tr>108 126 </table> 109 127 </form> alternc/branches/franck-desktop/bureau/admin/adm_defquotas.php
r1802 r1803 88 88 <h4><?php echo _("Accounts of type"). " \"" . $qname . "\"" ?></h4> 89 89 <table border="0" cellpadding="4" cellspacing="0"> 90 <tr><th><?php __("Quotas") ?></th><th><?php __("Default Value"); ?></th></tr> 90 <tr> 91 <th><?php __("Quotas") ?></th> 92 <th><?php __("Default Value"); ?></th> 93 </tr> 91 94 <?php 92 95 … … 97 100 98 101 ?> 99 <tr class="lst<?php echo $col; ?>"> 100 <td><label for="<?php echo $key; ?>"><?php echo $aqname; ?></label></td> 101 <td><input type="text" class="int" size="16" maxlength="16" name="<?php echo $key; ?>" id="<?php echo $key; ?>" value="<?php echo $q[$aqtype]; ?>" /></td></tr> 102 <tr class="lst<?php echo $col; ?>"> 103 <td><label for="<?php echo $key; ?>"><?php echo $aqname; ?></label></td> 104 <td><input type="text" class="int" size="16" maxlength="16" name="<?php echo $key; ?>" id="<?php echo $key; ?>" value="<?php echo isset($q[$aqtype]) ? $q[$aqtype] : ""; ?>" /></td> 105 </tr> 102 106 <?php 103 107 alternc/branches/franck-desktop/bureau/admin/adm_doadd.php
r802 r1803 32 32 require_once("../class/config.php"); 33 33 34 if (!$admin->enabled) { 34 $fields = array ( 35 "login" => array ("request", "string", ""), 36 "pass" => array ("request", "string", ""), 37 "passconf" => array ("request", "string", ""), 38 "canpass" => array ("request", "integer", 1), 39 "prenom" => array ("request", "string", ""), 40 "nom" => array ("request", "string", ""), 41 "nmail" => array ("request", "string", ""), 42 "create_dom" => array ("request", "string", ""), 43 "type" => array ("request", "string", ""), 44 ); 45 getFields($fields); 46 47 if (!$admin->enabled) 48 { 35 49 __("This page is restricted to authorized staff"); 36 50 exit; 37 51 } 38 52 39 if ($pass != $passconf) { 53 if ($pass != $passconf) 54 { 40 55 $error = _("Passwords do not match"); 41 include ("adm_add.php");56 include ("adm_add.php"); 42 57 exit(); 43 58 } 44 if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type))) { 45 $error=$err->errstr(); 59 60 if (!($u = $admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type))) 61 { 62 $error = $err->errstr(); 46 63 include ("adm_add.php"); 47 64 exit; 48 } else { 49 65 } 66 else 67 { 50 68 // Add here all what you want when an account is created ! 51 69 $mem->su($u); 52 70 53 71 /* 54 72 * 0 = pas d'hébergement dns, en effet, pas besoin vu que les … … 60 78 * 1 = force = ne tient pas compte du whois ou des droits de tld 61 79 */ 62 if ($create_dom) { 63 if (variable_get("hosting_tld")){64 # make sure we don't have multiple dots there 65 $dom->lock(); 66 $dom->add_domain($login.".".preg_replace("/^\.\.*/", "", variable_get("hosting_tld")),0,1,1); 67 $dom->unlock();68 } else { 69 $err->log("no 'hosting_tld' variable defined in `variables` table, not creating domain");70 }71 } 72 $ftp->add_ftp($login,"",$pass,"/"); 73 $mem->unsu();74 75 $error=_("The new member has been successfully created"); 80 if ($create_dom) 81 { 82 if (variable_get("hosting_tld")) 83 { 84 # make sure we don't have multiple dots there 85 $dom->lock(); 86 $dom->add_domain($login . "." . preg_replace("/^\.\.*/", "", variable_get("hosting_tld")), 0, 1, 1); 87 $dom->unlock(); 88 } 89 else 90 { 91 $err->log("no 'hosting_tld' variable defined in `variables` table, not creating domain"); 92 } 93 } 76 94 77 include("adm_list.php"); 78 exit; 95 $ftp->add_ftp($login, "", $pass, "/"); 96 $mem->unsu(); 97 98 $error = _("The new member has been successfully created"); 99 100 include("adm_list.php"); 101 exit; 79 102 } 103 80 104 ?> alternc/branches/franck-desktop/bureau/admin/adm_dodefquotas.php
r1797 r1803 32 32 require_once("../class/config.php"); 33 33 34 if (!$admin->enabled) { 34 if (!$admin->enabled) 35 { 35 36 __("This page is restricted to authorized staff"); 36 37 exit(); 37 38 } 38 39 39 if($_POST["action"] == "add") { 40 $type = $_POST['type']; 40 $fields = array ( 41 "action" => array ("request", "string", ""), 42 "type" => array ("request", "string", ""), 43 "del_confirm" => array ("request", "string", ""), 44 ); 45 getFields($fields); 41 46 42 if($quota->addtype($type)) { 43 $error=_("Account type"). " \"$type\" "._("added"); 44 } else { 45 $error=_("Account type"). " \"$type\" "._("could not be added"); 47 if ($action == "add") 48 { 49 if($quota->addtype($type)) 50 { 51 $error = _("Account type"). " \"" . $type . "\" " . _("added"); 52 } 53 else 54 { 55 $error = _("Account type"). " \"" . $type . "\" " . _("could not be added"); 56 } 57 include("adm_defquotas.php"); 58 exit(); 59 } 60 else if ($action == "delete") 61 { 62 if (empty($type)) 63 { 64 include("adm_defquotas.php"); 65 exit(); 66 } 67 68 if ($del_confirm == "y") 69 { 70 if($type) 71 { 72 if($quota->deltype($type)) 73 { 74 $error = _("Account type"). " \"" . $type . "\" " . _("deleted"); 75 } 76 else 77 { 78 $error = _("Account type") . " \"" . $type . "\" " . _("could not be deleted"); 79 } 80 } 81 include("adm_defquotas.php"); 82 exit(); 83 } 84 else 85 { 86 include_once("head.php"); 87 ?> 88 <h3><?php printf(_("Deleting quota %s"), $type); ?></h3> 89 90 <form action="adm_dodefquotas.php" method="post"> 91 <input type="hidden" name="action" value="delete" /> 92 <input type="hidden" name="type" value="<?php echo $type ?>" /> 93 <input type="hidden" name="del_confirm" value="y" /> 94 <p class="error"><?php __("WARNING : Confirm the deletion of the quota"); ?></p> 95 <p><?php echo $type; ?></p> 96 <blockquote> 97 <input type="submit" class="inb" name="confirm" value="<?php __("Yes"); ?>" /> 98 <input type="button" class="inb" name="cancel" value="<?php __("No"); ?>" onclick="document.location='adm_defquotas.php';" /> 99 </blockquote> 100 </form> 101 <script type="text/javascript"> 102 deploy("menu-adm"); 103 </script> 104 <?php 105 106 include_once("foot.php"); 107 exit(); 46 108 } 47 include("adm_defquotas.php"); 48 } else if($_POST["action"] == "delete") { 49 if($_POST["del_confirm"] == "y"){ 50 if($_POST['type']) { 51 if($quota->deltype($_POST['type'])) { 52 $error=_("Account type"). " \"$type\" "._("deleted"); 53 } else { 54 $error=_("Account type"). " \"$type\" "._("could not be deleted"); 55 } 56 } 57 include("adm_defquotas.php"); 58 }else{ 59 include_once("head.php"); 60 ?> 61 <h3><?php printf(_("Deleting quota %s"),$_POST["type"]); ?> : </h3> 109 } 110 else if ($action == "modify") 111 { 112 reset($_POST); 113 $c = array(); 114 foreach ($_POST as $key => $val) 115 { 116 if($key == "action") 117 continue; 62 118 63 <form action="adm_dodefquotas.php" method="post"> 64 <input type="hidden" name="action" value="delete" /> 65 <input type="hidden" name="type" value="<?php echo $_POST["type"] ?>" /> 66 <input type="hidden" name="del_confirm" value="y" /> 67 <p class="error"><?php __("WARNING : Confirm the deletion of the quota"); ?></p> 68 <p><?php echo $_POST["type"]; ?></p> 69 <blockquote> 70 <input type="submit" class="inb" name="confirm" value="<?php __("Yes"); ?>" /> 71 <input type="button" class="inb" name="cancel" value="<?php __("No"); ?>" onclick="document.location='adm_defquotas.php';" /> 72 </blockquote> 73 </form> 74 <script type="text/javascript"> 75 deploy("menu-adm"); 76 </script> 77 <?php include_once("foot.php"); ?> 78 <?php 79 } 80 } else if($_POST["action"] == "modify") { 81 reset($_POST); 82 $c=array(); 83 foreach($_POST as $key => $val) { 84 if($key == "action") 85 continue; 119 list($type, $q) = explode(":", $key, 2); 120 $c[$type][$q] = abs(intval($val)); 121 } 86 122 87 list($type, $q) = explode(":", $key, 2); 88 $c[$type][$q] = abs(intval($val)); 89 } 123 if ($quota->setdefaults($c)) 124 { 125 $error = _("Default quotas successfully changed"); 126 } 127 else 128 { 129 $error = _("Default quotas could not be set."); 130 } 131 include("adm_defquotas.php"); 132 exit(); 133 } 90 134 91 if($quota->setdefaults($c)) {92 $error=_("Default quotas successfully changed");93 } else {94 $error=_("Default quotas could not be set.");95 }96 include("adm_panel.php");97 }98 135 ?> alternc/branches/franck-desktop/bureau/admin/adm_doedit.php
r982 r1803 32 32 require_once("../class/config.php"); 33 33 34 if (!$admin->enabled) { 35 __("This page is restricted to authorized staff"); 36 exit(); 37 } 38 if (!$admin->checkcreator($uid)) { 34 if (!$admin->enabled) 35 { 39 36 __("This page is restricted to authorized staff"); 40 37 exit(); 41 38 } 42 39 43 if ($pass != $passconf) { 44 $error = _("Passwords do not match"); 45 include("adm_edit.php"); 40 $fields = array ( 41 "uid" => array ("request", "integer", 0), 42 "enabled" => array ("request", "integer", 0), 43 "pass" => array ("request", "string", ""), 44 "passconf" => array ("request", "string", ""), 45 "canpass" => array ("request", "integer", 1), 46 "prenom" => array ("request", "string", ""), 47 "nom" => array ("request", "string", ""), 48 "nmail" => array ("request", "string", ""), 49 "duration" => array ("request", "integer", 0), 50 ); 51 getFields($fields); 52 53 if (!$admin->checkcreator($uid)) 54 { 55 __("This page is restricted to authorized staff"); 46 56 exit(); 47 57 } 48 58 49 if (!$admin->update_mem($uid, $nmail, $nom, $prenom, $pass, $enabled, $canpass, $type, $duration)){ 50 $error=$err->errstr(); 51 include("adm_edit.php"); 52 } else { 53 $error=_("The member has been successfully edited"); 54 include("adm_list.php"); 59 if ($pass != $passconf) 60 { 61 $error = _("Passwords do not match"); 62 include ("adm_edit.php"); 63 exit(); 55 64 } 65 66 if (!$admin->update_mem($uid, $nmail, $nom, $prenom, $pass, $enabled, $canpass, $type, $duration)) 67 { 68 $error = $err->errstr(); 69 include ("adm_edit.php"); 70 } 71 else 72 { 73 $error = _("The member has been successfully edited"); 74 include ("adm_list.php"); 75 } 76 56 77 ?> alternc/branches/franck-desktop/bureau/admin/adm_doms.php
r1797 r1803 61 61 62 62 <tr class="lst<?php echo $col; ?>"> 63 <td><a href="adm_domlock.php?domain=<?php echo urlencode($c[$i][ domaine]); ?>"><?php64 if ($c[$i][ noerase]) __("Unlock"); else __("Lock"); ?></a></td>65 <td><?php echo $c[$i][ domaine]; ?></td>66 <td><?php echo $c[$i][ login]; ?></td>67 <td><?php if ($c[$i][ noerase]) {63 <td><a href="adm_domlock.php?domain=<?php echo urlencode($c[$i]["domaine"]); ?>"><?php 64 if ($c[$i]["noerase"]) __("Unlock"); else __("Lock"); ?></a></td> 65 <td><?php echo $c[$i]["domaine"]; ?></td> 66 <td><?php echo $c[$i]["login"]; ?></td> 67 <td><?php if ($c[$i]["noerase"]) { 68 68 echo "<img src=\"icon/encrypted.png\" width=\"16\" height=\"16\" alt=\""._("Locked Domain")."\" />"; 69 69 } ?></td> alternc/branches/franck-desktop/bureau/admin/adm_dorenew.php
r982 r1803 31 31 require_once("../class/config.php"); 32 32 33 if (!$admin->enabled) { 34 __("This page is restricted to authorized staff"); 35 exit(); 36 } 37 if (!$admin->checkcreator($uid)) { 38 __("This page is restricted to authorized staff"); 39 exit(); 33 $fields = array ( 34 "uid" => array ("request", "integer", 0), 35 "periods" => array ("request", "integer", 0), 36 ); 37 getFields($fields); 38 39 if (!$admin->enabled) 40 { 41 __("This page is restricted to authorized staff"); 42 exit(); 40 43 } 41 44 42 if (!$admin->renew_mem($_REQUEST['uid'], $_REQUEST['periods'])){ 43 $error=$err->errstr(); 44 include("adm_edit.php"); 45 } else { 46 $error=_("The member has been successfully renewed"); 47 include("adm_list.php"); 45 if (!$admin->checkcreator($uid)) 46 { 47 __("This page is restricted to authorized staff"); 48 exit(); 48 49 } 50 51 if (!$admin->renew_mem($uid, $periods)) 52 { 53 $error = $err->errstr(); 54 include ("adm_edit.php"); 55 } 56 else 57 { 58 $error = _("The member has been successfully renewed"); 59 include ("adm_list.php"); 60 } 61 49 62 ?> alternc/branches/franck-desktop/bureau/admin/adm_edit.php
r1797 r1803 39 39 40 40 $fields = array ( 41 "uid" => array ("request", "integer", 0), 41 "uid" => array ("request", "integer", 0), 42 "enabled" => array ("request", "integer", 0), 43 "pass" => array ("request", "string", ""), 44 "passconf" => array ("request", "string", ""), 45 "canpass" => array ("request", "integer", 1), 46 "prenom" => array ("request", "string", ""), 47 "nom" => array ("request", "string", ""), 48 "nmail" => array ("request", "string", ""), 49 "duration" => array ("request", "integer", 0), 50 "periods" => array ("request", "integer", 1), 42 51 ); 43 52 getFields($fields); 44 53 45 if (!$admin->checkcreator($uid)) { 54 if (!$admin->checkcreator($uid)) 55 { 46 56 __("This page is restricted to authorized staff"); 47 57 exit(); 48 58 } 49 59 50 if (!$r=$admin->get($uid)) { 51 $error=$err->errstr(); 60 if (!$r = $admin->get($uid)) 61 { 62 $error = $err->errstr(); 52 63 } 53 64 … … 55 66 <h3><?php __("Member Edition"); ?></h3> 56 67 <?php 57 if ($error) { 58 echo "<p class=\"error\">$error</p>"; 59 } 68 69 if ($error) 70 { 71 echo "<p class=\"error\">" . $error . "</p>"; 72 } 73 60 74 ?> 61 75 <form method="post" action="adm_doedit.php"> … … 111 125 <td><select name="type" id="type"> 112 126 <?php 113 $db->query("SELECT distinct(type) FROM defquotas ORDER bytype");127 $db->query("SELECT DISTINCT(type) FROM defquotas ORDER BY type"); 114 128 while($db->next_record()) { 115 129 $type = $db->f("type"); … … 131 145 </table> 132 146
