Changeset 1803
- Timestamp:
- 04/29/07 22:45:51 (6 years ago)
- Location:
- alternc/branches/franck-desktop/bureau/admin
- Files:
-
- 33 added
- 114 edited
-
adm_add.php (modified) (2 diffs)
-
adm_defquotas.php (modified) (2 diffs)
-
adm_doadd.php (modified) (2 diffs)
-
adm_dodefquotas.php (modified) (1 diff)
-
adm_doedit.php (modified) (1 diff)
-
adm_doms.php (modified) (1 diff)
-
adm_dorenew.php (modified) (1 diff)
-
adm_edit.php (modified) (4 diffs)
-
adm_list.php (modified) (8 diffs)
-
adm_login.php (modified) (1 diff)
-
adm_mxaccount.php (modified) (2 diffs)
-
adm_slaveaccount.php (modified) (1 diff)
-
adm_slaveip.php (modified) (3 diffs)
-
adm_tld.php (modified) (3 diffs)
-
adm_tldadd.php (modified) (1 diff)
-
adm_tlddoadd.php (modified) (1 diff)
-
adm_usersquota.php (added)
-
adm_variables.php (modified) (2 diffs)
-
aws_add.php (modified) (1 diff)
-
aws_doadd.php (modified) (1 diff)
-
aws_doedit.php (modified) (1 diff)
-
aws_edit.php (modified) (1 diff)
-
aws_list.php (modified) (1 diff)
-
aws_pass.php (modified) (2 diffs)
-
aws_users.php (modified) (3 diffs)
-
bro_editor.php (modified) (2 diffs)
-
bro_main.php (modified) (1 diff)
-
bro_pref.php (modified) (1 diff)
-
bro_tgzdown.php (modified) (2 diffs)
-
browseforfolder.php (modified) (3 diffs)
-
dom_add.php (modified) (2 diffs)
-
dom_doadd.php (modified) (2 diffs)
-
dom_edit.php (modified) (2 diffs)
-
dom_subdel.php (modified) (1 diff)
-
dom_subdodel.php (modified) (1 diff)
-
dom_subdoedit.php (modified) (1 diff)
-
dom_subedit.php (modified) (1 diff)
-
foot.php (modified) (1 diff)
-
ftp_add.php (modified) (1 diff)
-
ftp_del.php (modified) (1 diff)
-
ftp_doadd.php (modified) (1 diff)
-
ftp_doedit.php (modified) (2 diffs)
-
ftp_edit.php (modified) (2 diffs)
-
ftp_list.php (modified) (2 diffs)
-
head.php (modified) (2 diffs)
-
hta_add.php (modified) (1 diff)
-
hta_adduser.php (modified) (1 diff)
-
hta_del.php (modified) (1 diff)
-
hta_doadd.php (modified) (1 diff)
-
hta_doadduser.php (modified) (1 diff)
-
hta_doedituser.php (modified) (1 diff)
-
hta_edit.php (modified) (3 diffs)
-
hta_edituser.php (modified) (1 diff)
-
hta_list.php (modified) (3 diffs)
-
images/arrow.png (added)
-
images/arrow2.png (added)
-
images/bigtrash.png (added)
-
images/boxes (added)
-
images/boxes/mainBox-bl.png (added)
-
images/boxes/mainBox-br.png (added)
-
images/boxes/mainBox-dot.png (added)
-
images/boxes/mainBox-tl.png (added)
-
images/boxes/mainBox-tr.png (added)
-
images/boxes/menuBox-bl.png (added)
-
images/boxes/menuBox-br.png (added)
-
images/boxes/menuBox-dot.png (added)
-
images/boxes/menuBox-tl.png (added)
-
images/boxes/menuBox-tr.png (added)
-
images/boxes/menuBoxBottom.png (added)
-
images/boxes/menuBoxTop.png (added)
-
images/configure.png (added)
-
images/connect.png (added)
-
images/connectalt.png (added)
-
images/delete.png (modified) (previous)
-
images/deletealt.png (added)
-
images/disabled.png (added)
-
images/dom.png (modified) (previous)
-
images/edit.png (modified) (previous)
-
images/editalt.png (added)
-
images/enabled.png (added)
-
images/enabledalt.png (added)
-
images/home.png (modified) (previous)
-
images/lock.png (added)
-
images/members.png (added)
-
images/mysql.png (modified) (previous)
-
images/mysqlmenu.png (added)
-
images/quota.png (modified) (previous)
-
images/quotaalt.png (added)
-
images/quotamenu.png (added)
-
index.php (modified) (1 diff)
-
js/alternc.js (modified) (4 diffs)
-
js/jquery.js (added)
-
login.php (modified) (1 diff)
-
mail_add.php (modified) (2 diffs)
-
mail_del.php (modified) (2 diffs)
-
mail_doadd.php (modified) (2 diffs)
-
mail_dodel.php (modified) (2 diffs)
-
mail_doedit.php (modified) (2 diffs)
-
mail_edit.php (modified) (3 diffs)
-
mail_list.php (modified) (4 diffs)
-
main.php (modified) (1 diff)
-
mem_admin.php (modified) (2 diffs)
-
mem_logout.php (modified) (1 diff)
-
mem_param.php (modified) (5 diffs)
-
menu.php (modified) (2 diffs)
-
menu_adm.php (modified) (1 diff)
-
menu_aide.php (modified) (1 diff)
-
menu_aws.php (modified) (1 diff)
-
menu_brouteur.php (modified) (1 diff)
-
menu_dom.php (modified) (1 diff)
-
menu_ftp.php (modified) (1 diff)
-
menu_mail.php (modified) (2 diffs)
-
menu_mailman.php (modified) (1 diff)
-
menu_mem.php (modified) (1 diff)
-
menu_quota.php (modified) (1 diff)
-
menu_sql.php (modified) (1 diff)
-
menu_sta2.php (modified) (1 diff)
-
menu_web.php (modified) (1 diff)
-
menu_webalizer.php (modified) (1 diff)
-
mman_add.php (modified) (1 diff)
-
mman_del.php (modified) (1 diff)
-
mman_doadd.php (modified) (1 diff)
-
mman_dodel.php (added)
-
mman_list.php (modified) (1 diff)
-
mman_members.php (modified) (1 diff)
-
quota_show.php (modified) (1 diff)
-
quota_show_all.php (modified) (2 diffs)
-
quotas_users.php (modified) (2 diffs)
-
sql_add.php (modified) (1 diff)
-
sql_del.php (modified) (2 diffs)
-
sql_doadd.php (modified) (1 diff)
-
sql_getparam.php (modified) (2 diffs)
-
sql_list.php (modified) (3 diffs)
-
sql_pass.php (modified) (1 diff)
-
sql_passchg.php (modified) (1 diff)
-
sql_users_add.php (modified) (4 diffs)
-
sql_users_del.php (modified) (2 diffs)
-
sql_users_doadd.php (modified) (1 diff)
-
sql_users_list.php (modified) (2 diffs)
-
sta2_add_raw.php (modified) (1 diff)
-
sta2_del_raw.php (modified) (1 diff)
-
sta2_doadd_raw.php (modified) (1 diff)
-
sta2_doedit_raw.php (modified) (1 diff)
-
sta2_edit_raw.php (modified) (2 diffs)
-
sta2_list.php (modified) (1 diff)
-
styles/boxes.css (added)
-
styles/style.css (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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 </form> 133 147 <br /> 134 148 <?php if($r['duration']) { ?> 135 <p>136 149 <form method="post" action="adm_dorenew.php"> 137 150 <input type="hidden" name="uid" value="<?php echo $uid ?>" /> 138 151 <table border="1" cellspacing="0" cellpadding="4"> 139 <tr> 140 <th><label for="periods"><?php __("Renew for") ?></label></th> 141 <td><input name="periods" id="periods" type="text" size="2" value="1"/><?php echo ' ' . _('period(s)') ?></td> 142 </tr> 143 <tr> 144 <td colspan="2" align="center"><input type="submit" class="inb" name="submit" value="<?php __("Renew"); ?>" /> 145 </td> 146 </tr> 152 <tr> 153 <th><label for="periods"><?php __("Renew for") ?></label></th> 154 <td><input name="periods" id="periods" type="text" size="2" value="<?php echo $periods; ?>" /><?php echo ' ' . _('period(s)') ?></td> 155 </tr> 156 <tr> 157 <td colspan="2" align="center"><input type="submit" class="inb" name="submit" value="<?php __("Renew"); ?>" /></td> 158 </tr> 147 159 </table> 148 160 </form> 149 </p>150 161 <?php } /* Renouvellement */ ?> 151 162 152 163 <p> 153 164 <?php 154 if ($mem->user[ uid]==2000) { // PATCHBEN only admin can change su/nosu :)165 if ($mem->user["uid"]==2000) { // PATCHBEN only admin can change su/nosu :) 155 166 if ($r["su"]) { 156 167 ?> -
alternc/branches/franck-desktop/bureau/admin/adm_list.php
r1797 r1803 34 34 include_once("head.php"); 35 35 36 if (!$admin->enabled) { 36 if (!$admin->enabled) 37 { 37 38 __("This page is restricted to authorized staff"); 38 39 exit(); … … 41 42 $fields = array ( 42 43 "show" => array ("request", "string", ""), 44 "letter" => array ("request", "string", ""), 43 45 ); 44 46 getFields($fields); … … 50 52 } 51 53 52 $r =$admin->get_list($show ? 1 : 0);54 $r = $admin->get_list($show ? 1 : 0, $letter); 53 55 54 56 ?> 55 57 <h3><?php __("Member list"); ?></h3> 56 58 <?php 57 if ($error) { 58 echo "<p class=\"error\">$error</p>"; 59 } 59 60 if ($error) 61 echo "<p class=\"error\">" . $error . "</p>"; 62 60 63 ?> 61 64 <p> … … 66 69 if ($cuid == 2000) 67 70 { 68 if (!$show) { 69 echo '<a href="adm_list.php?show=all">' . _('List all the accounts') . '</a>'; 70 } else { 71 echo '<a href="adm_list.php">' . _('List only my accounts') . '</a>'; 72 } 71 if (!$show) 72 echo "<a href=\"adm_list.php?show=all\">" . _("List all the accounts") . "</a>"; 73 else 74 echo "<a href=\"adm_list.php\">" . _("List only my accounts") . "</a>"; 73 75 } 74 76 … … 79 81 </p> 80 82 <?php 81 if (!is_array($r)) { 82 echo "<p class=\"error\">"._("No account defined for now")."</p>"; 83 } else { 84 ?> 85 83 84 if (!is_array($r)) 85 { 86 echo "<p class=\"error\">" . _("No account defined for now") . "</p>"; 87 } 88 else 89 { 90 $letters = $admin->get_letters(); 91 92 for ($i = 0; $i < count($letters); $i++) 93 { 94 $val = $letters[$i]; 95 echo "<a class=\"letter" . ($letter == $val ? " letterover" : "") . "\" href=\"adm_list.php?letter=" . $val . "\">" . strtoupper($val) . "</a> "; 96 } 97 echo "<a class=\"letter" . (empty($letter) ? " letterover" : "") . "\" href=\"adm_list.php\">" . sprintf(_("All")) . "</a>"; 98 99 ?> 86 100 <form method="post" action="adm_dodel.php"> 87 101 <?php … … 90 104 91 105 if ($mem->user["admlist"]==0) { // Normal (large) mode 106 92 107 ?> 93 108 <table cellspacing="0" cellpadding="4"> 94 <tr>95 <th colspan="5"> </th>96 <th><?php __("Username"); ?></th>97 <th><?php echo _("Surname")." "._("First Name")."<br />("._("Email address").")"; ?></th>98 <th><?php __("Account type") ?></th>99 <th><?php __("Last login"); ?></th>100 <th><?php __("Last fail"); ?></th>101 <th><?php __("Last ip"); ?></th>102 <th><?php __('Expiry') ?></th>103 </tr>109 <tr> 110 <th colspan="4"> </th> 111 <th><?php __("Username"); ?></th> 112 <th><?php echo _("Surname")." "._("First Name")."<br />("._("Email address").")"; ?></th> 113 <th><?php __("Account type") ?></th> 114 <th><?php __("Last login"); ?></th> 115 <th><?php __("Last fail"); ?></th> 116 <th><?php __("Last ip"); ?></th> 117 <th><?php __('Expiry') ?></th> 118 </tr> 104 119 <?php 105 120 reset($r); 106 121 122 /* 123 <td align="center"><a href="adm_deactivate.php?uid=<?php echo $val["uid"] ?>"><img src="images/enabled<?php echo $altImg; ?>.png" alt="<?php __("Deactivate"); ?>" /></a></td> 124 */ 125 107 126 $col=1; 127 $i = 0; 108 128 while (list($key,$val)=each($r)) 109 129 { 110 130 $col=3-$col; 131 $altImg = ($i % 2 == 0 ? "" : "alt"); 132 $i++; 111 133 ?> 112 134 <tr class="lst<?php echo $col; ?>"> … … 116 138 <td align="center"><input type="checkbox" class="inc" name="d[]" value="<?php echo $val["uid"]; ?>" /></td> 117 139 <?php } ?> 118 <td align="center"><a href="adm_edit.php?uid=<?php echo $val["uid"] ?>"><?php __("Edit"); ?></a></td> 119 <td align="center"><a href="adm_quotaedit.php?uid=<?php echo $val["uid"] ?>"><?php __("Quotas"); ?></a></td> 120 <td align="center"><a href="adm_deactivate.php?uid=<?php echo $val["uid"] ?>"><?php __("Deactivate"); ?></a></td> 140 <td align="center"><a href="adm_edit.php?uid=<?php echo $val["uid"] ?>"><img src="images/edit<?php echo $altImg; ?>.png" alt="<?php echo _("Edit"); ?>" /></a></td> 141 <td align="center"><a href="adm_quotaedit.php?uid=<?php echo $val["uid"] ?>"><img src="images/quota<?php echo $altImg; ?>.png" alt="<?php echo _("Quotas"); ?>" /></a></td> 121 142 <td align="center"><?php 122 143 if (!$val["enabled"]) 123 echo "<img src=\"icon/encrypted.png\" width=\"16\" height=\"16\" alt=\""._("Locked Account")."\" />"; 124 else { 144 echo "<img src=\"images/lock" . $altImg . ".png\" alt=\"" . _("Locked Account") . "\" />"; 145 else 146 { 125 147 if($admin->checkcreator($val['uid'])) { 126 148 ?> 127 <a href="adm_login.php?id=<?php echo $val["uid"];?>" target="_parent">< ?php __("Connect as"); ?></a>149 <a href="adm_login.php?id=<?php echo $val["uid"];?>" target="_parent"><img src="images/connect<?php echo $altImg; ?>.png" alt="<?php __("Connect as"); ?>" /></a> 128 150 <?php } } ?> 129 151 </td> … … 237 259 </table> 238 260 </form> 261 <?php printf("<p>" . _("%s account(s)") . "</p>", count($r)); ?> 239 262 <?php } ?> 240 263 <script type="text/javascript"> -
alternc/branches/franck-desktop/bureau/admin/adm_login.php
r1797 r1803 68 68 <?php 69 69 70 if ($error) 71 { 72 echo "<p class=\"error\">$error</p>"; 73 include_once("foot.php"); 74 exit(); 75 } 70 if ($error) 71 { 72 echo "<p class=\"error\">" . $error . "</p>"; 73 include_once ("foot.php"); 74 exit(); 75 } 76 76 77 ?> 77 78 <script type="text/javascript"> 78 deploy("menu- ftp");79 deploy("menu-adm"); 79 80 </script> 80 81 <?php include_once("foot.php"); ?> -
alternc/branches/franck-desktop/bureau/admin/adm_mxaccount.php
r1797 r1803 35 35 } 36 36 37 $fields = array ( 38 "delaccount" => array ("request", "string", ""), 39 40 "newlogin" => array ("request", "string", ""), 41 "newpass" => array ("request", "string", ""), 42 ); 43 getFields($fields); 44 37 45 if ($delaccount) { 38 46 // Delete an account … … 45 53 if ($mail->add_slave_account($newlogin,$newpass)) { 46 54 $error=_("The requested account address has been created. It is now allowed."); 47 unset($newlogin); unset($newpass); 55 $newlogin = ""; 56 $newpass = ""; 48 57 } 49 58 } -
alternc/branches/franck-desktop/bureau/admin/adm_slaveaccount.php
r1797 r1803 53 53 if ($dom->add_slave_account($newlogin,$newpass)) { 54 54 $error=_("The requested account address has been created. It is now allowed."); 55 unset($newlogin); unset($newpass); 55 $newlogin = ""; 56 $newpass = ""; 56 57 } 57 58 } -
alternc/branches/franck-desktop/bureau/admin/adm_slaveip.php
r1797 r1803 43 43 getFields($fields); 44 44 45 if ($delip) { 45 if ($delip) 46 { 46 47 // Delete an ip address/class 47 if ($dom->del_slave_ip($delip)) { 48 $error=_("The requested ip address has been deleted. It will be denied in one hour."); 48 if ($dom->del_slave_ip($delip)) 49 { 50 $error = _("The requested ip address has been deleted. It will be denied in one hour."); 49 51 } 50 52 } 51 if ($newip) { 53 if ($newip) 54 { 52 55 // Add an ip address/class 53 if ($dom->add_slave_ip($newip,$newclass)) { 54 $error=_("The requested ip address has been added to the list. It will be allowed in one hour."); 55 unset($newip); unset($newclass); 56 if ($dom->add_slave_ip($newip,$newclass)) 57 { 58 $error = _("The requested ip address has been added to the list. It will be allowed in one hour."); 59 $newip = ""; 60 $newclass = ""; 56 61 } 57 62 } … … 62 67 <h3><?php __("Manage allowed ip for slave zone transfers"); ?></h3> 63 68 <?php 64 if ($error) {65 echo "<p class=\"error\">$error</p>";66 }67 69 68 $c=$dom->enum_slave_ip(); 70 if ($error) 71 { 72 echo "<p class=\"error\">" . $error . "</p>"; 73 } 69 74 70 if (is_array($c)) { 75 $c = $dom->enum_slave_ip(); 76 77 if (is_array($c)) 78 { 71 79 72 80 ?> … … 84 92 85 93 <tr class="lst<?php echo $col; ?>"> 86 <td class="center"><a href="adm_slaveip.php?delip=<?php echo urlencode($c[$i][ ip]); ?>"><img src="images/delete.png" alt="<?php __("Delete"); ?>" /></a></td>94 <td class="center"><a href="adm_slaveip.php?delip=<?php echo urlencode($c[$i]["ip"]); ?>"><img src="images/delete.png" alt="<?php __("Delete"); ?>" /></a></td> 87 95 <td><?php echo $c[$i]["ip"]."/".$c[$i]["class"]; ?></td> 88 96 </tr> -
alternc/branches/franck-desktop/bureau/admin/adm_tld.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 if (!$admin->enabled) { 32 if (!$admin->enabled) 33 { 33 34 __("This page is restricted to authorized staff"); 34 35 exit(); 35 36 } 36 37 37 if (is_array($sel)) { 38 $error=""; 39 for($i=0;$i<count($sel);$i++) { 40 if (!$admin->deltld($sel[$i])) { 41 $error.=_("Some TLD cannot be deleted...")." : ".$sel[$i]."<br />"; 38 $fields = array ( 39 "sel" => array ("request", "array", array()), 40 ); 41 getFields($fields); 42 43 if (is_array($sel) && !empty($sel)) 44 { 45 $error = ""; 46 for ($i = 0; $i < count($sel); $i++) 47 { 48 if (!$admin->deltld($sel[$i])) 49 { 50 $error .= _("Some TLD cannot be deleted...")." : " . $sel[$i] . "<br />"; 42 51 } 43 52 } 44 if (!$error) $error=_("The requested TLD has been deleted"); 53 if (!$error) 54 $error = _("The requested TLD has been deleted"); 45 55 } 46 56 … … 50 60 <h3><?php __("Manage allowed domains (TLD)"); ?></h3> 51 61 <?php 52 if ($error) {53 echo "<p class=\"error\">$error</p>";54 }55 62 56 $c=$admin->listtld(); 63 if ($error) 64 { 65 echo "<p class=\"error\">" .$error . "</p>"; 66 } 67 68 $c = $admin->listtld(); 57 69 58 70 ?> … … 63 75 <form method="post" action="adm_tld.php"> 64 76 <table border="0" cellpadding="4" cellspacing="0"> 65 <tr><th><?php __("Action"); ?></th><th><?php __("TLD"); ?></th><th><?php __("Allowed Mode"); ?></th></tr> 77 <tr> 78 <th><?php __("Action"); ?></th> 79 <th><?php __("TLD"); ?></th> 80 <th><?php __("Allowed Mode"); ?></th> 81 </tr> 66 82 <?php 67 $col=1; 68 for($i=0;$i<count($c);$i++) { 69 $col=3-$col; 83 84 $col = 1; 85 for ($i = 0; $i < count($c); $i++) 86 { 87 $col = 3 - $col; 88 $altImg = ($i % 2 == 0 ? "" : "alt"); 70 89 ?> 90 <tr class="lst<?php echo $col; ?>"> 91 <td><input id="sel<?php echo $i; ?>" type="checkbox" name="sel[]" class="inc" value="<?php echo $c[$i]["tld"]; ?>" /> <a href="adm_tldedit.php?tld=<?php echo urlencode($c[$i]["tld"]); ?>"><img style="padding-bottom: 5px" src="images/edit<?php echo $altImg; ?>.png" alt="<?php __("Edit"); ?>" /></a></td> 92 <td><label for="sel<?php echo $i; ?>"><?php echo $c[$i]["tld"]; ?></label></td> 93 <td><?php __($admin->tldmode[$c[$i]["mode"]]); ?></td> 94 </tr> 95 <?php 71 96 72 <tr class="lst<?php echo $col; ?>"> 73 <td><input id="sel<?php echo $i; ?>" type="checkbox" name="sel[]" class="inc" value="<?php echo $c[$i]["tld"]; ?>" /> <a href="adm_tldedit.php?tld=<?php echo urlencode($c[$i]["tld"]); ?>"><img style="padding-bottom: 5px" src="images/edit.png" alt="<?php __("Edit"); ?>" /></a></td> 74 <td><label for="sel<?php echo $i; ?>"><?php echo $c[$i]["tld"]; ?></label></td> 75 <td><?php __($admin->tldmode[$c[$i]["mode"]]); ?></td></tr> 97 } 76 98 77 <?php78 }79 99 ?> 80 <tr><td colspan="3"><input type="submit" class="inb" value="<?php __("Delete the checked TLD"); ?>" /></td></tr> 100 <tr> 101 <td colspan="3"><input type="submit" class="inb" value="<?php __("Delete the checked TLD"); ?>" /></td> 102 </tr> 81 103 </table> 82 104 </form> -
alternc/branches/franck-desktop/bureau/admin/adm_tldadd.php
r1797 r1803 37 37 include_once ("head.php"); 38 38 39 $fields = array ( 40 "tld" => array ("request", "string", ""), 41 "mode" => array ("request", "integer", 0), 42 ); 43 getFields($fields); 44 39 45 ?> 40 46 <h3><?php __("Manage allowed domains (TLD)"); ?></h3> -
alternc/branches/franck-desktop/bureau/admin/adm_tlddoadd.php
r1 r1803 35 35 } 36 36 37 if (!$admin->addtld($tld,$mode)) { 38 $error=$err->errstr(); 39 include("adm_tldadd.php"); 40 exit(); 41 } else { 42 $error=_("The TLD has been successfully added"); 43 include("adm_tld.php"); 37 $fields = array ( 38 "tld" => array ("request", "string", ""), 39 "mode" => array ("request", "integer", 0), 40 ); 41 getFields($fields); 42 43 if (!$admin->addtld($tld, $mode)) 44 { 45 $error = $err->errstr(); 46 include ("adm_tldadd.php"); 44 47 exit(); 45 48 } 49 else 50 { 51 $error = _("The TLD has been successfully added"); 52 include ("adm_tld.php"); 53 exit(); 54 } 55 46 56 ?> -
alternc/branches/franck-desktop/bureau/admin/adm_variables.php
r1797 r1803 37 37 $conf = variable_init(); 38 38 foreach ($conf as $name => $val) { 39 if (isset($ $name)) {40 variable_set($name, $ $name);39 if (isset($_REQUEST[$name])) { 40 variable_set($name, $_REQUEST[$name]); 41 41 } 42 42 } … … 65 65 <tr class="lst<?php echo $col; ?>"> 66 66 <td><?php echo $vars['name']; ?></td> 67 <td><input type="text" name="<?php echo $vars['name']?>" value="<?php echo $vars['value']?>" /></td>67 <td><input type="text" name="<?php echo $vars['name']?>" value="<?php echo addslashes($vars['value']); ?>" /></td> 68 68 <td><?php echo $vars['comment']; ?></td> 69 69 </tr> -
alternc/branches/franck-desktop/bureau/admin/aws_add.php
r1797 r1803 31 31 32 32 $fields = array ( 33 "id" => array ("request", "integer", 0), 33 "id" => array ("request", "integer", 0), 34 "hostname" => array ("request", "string", ""), 34 35 ); 35 36 getFields($fields); 36 37 37 if (!$id && !$quota->cancreate("aws")) { 38 $error=_("You cannot add any new statistics, your quota is over."); 38 if (!$id && !$quota->cancreate("aws")) 39 { 40 $error = _("You cannot add any new statistics, your quota is over."); 39 41 } 40 42 41 43 include_once("head.php"); 44 42 45 ?> 43 46 <h3><?php if (!$id) { __("New Statistics"); } else { __("Edit Statistics"); } ?></h3> 44 47 <?php 45 if ($error) { 46 echo "<p class=\"error\">$error</p></body></html>"; 47 exit(); 48 } 48 49 if ($error) 50 { 51 echo "<p class=\"error\">" . $error . "</p>"; 52 echo "</body>"; 53 echo "</html>"; 54 exit(); 55 } 56 49 57 ?> 50 58 <form method="post" action="<?php if (!$id) echo "aws_doadd.php"; else echo "aws_doedit"; ?>" id="main" name="main"> -
alternc/branches/franck-desktop/bureau/admin/aws_doadd.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 $r=$aws->add_stats($hostname,$awsusers); 33 if (!$r) { 34 $error=$err->errstr(); 35 include("aws_add.php"); 36 exit(); 37 } else { 38 $error=_("The statistics has been successfully created"); 39 include("aws_list.php"); 32 $fields = array ( 33 "hostname" => array ("request", "string", ""), 34 "awsusers" => array ("request", "array", array()), 35 ); 36 getFields($fields); 37 38 $r = $aws->add_stats($hostname, $awsusers); 39 if (!$r) 40 { 41 $error = $err->errstr(); 42 include ("aws_add.php"); 40 43 exit(); 41 44 } 45 else 46 { 47 $error = _("The statistics has been successfully created"); 48 include ("aws_list.php"); 49 exit(); 50 } 51 42 52 ?> -
alternc/branches/franck-desktop/bureau/admin/aws_doedit.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 if (!$id) { 33 $error=_("No Statistics selected!"); 34 } else { 35 $r=$aws->put_stats_details($id,$awsusers); 36 if (!$r) { 37 $error=$err->errstr(); 38 include("aws_edit.php"); 32 $fields = array ( 33 "id" => array ("request", "integer", 0), 34 "awsusers" => array ("request", "array", array()), 35 ); 36 getFields($fields); 37 38 if (!$id) 39 { 40 $error = _("No Statistics selected!"); 41 } 42 else 43 { 44 $r = $aws->put_stats_details($id, $awsusers); 45 if (!$r) 46 { 47 $error = $err->errstr(); 48 include ("aws_edit.php"); 39 49 exit(); 40 } else { 41 $error=_("The Statistics has been successfully changed"); 42 include("aws_list.php"); 50 } 51 else 52 { 53 $error = _("The Statistics has been successfully changed"); 54 include ("aws_list.php"); 43 55 exit(); 44 56 } 45 57 } 58 46 59 ?> -
alternc/branches/franck-desktop/bureau/admin/aws_edit.php
r1797 r1803 35 35 getFields($fields); 36 36 37 if (!$id) { 38 $error=_("No Statistics selected!"); 39 } else { 40 $r=$aws->get_stats_details($id); 41 if (!$r) { 42 $error=$err->errstr(); 37 if (!$id) 38 { 39 $error = _("No Statistics selected!"); 40 } 41 else 42 { 43 $r = $aws->get_stats_details($id); 44 if (!$r) 45 { 46 $error = $err->errstr(); 43 47 } 44 48 } 45 49 46 $id=$r["id"]; 47 $hostname=$r["hostname"]; 48 $awsusers=$r["users"]; 50 $_REQUEST["id"] = $r["id"]; 51 $_REQUEST["hostname"] = $r["hostname"]; 49 52 50 include ("aws_add.php");53 include ("aws_add.php"); 51 54 exit(); 52 55 -
alternc/branches/franck-desktop/bureau/admin/aws_list.php
r1797 r1803 59 59 <tr><th colspan="2"> </th><th><?php __("Domain name"); ?></th><th>Allowed Users</th><th><?php __("View"); ?></th></tr> 60 60 <?php 61 61 62 reset($r); 62 $col=1; 63 while (list($key,$val)=each($r)) 64 { 65 $col=3-$col; 63 $col = 1; 64 $i = 0; 65 while (list($key, $val) = each($r)) 66 { 67 $col = 3 - $col; 68 $altImg = ($i % 2 == 0 ? "" : "alt"); 69 $i++; 66 70 ?> 67 71 <tr class="lst<?php echo $col; ?>"> 68 72 <td><input type="checkbox" class="inc" id="del_<?php echo $val["id"]; ?>" name="del_<?php echo $val["id"]; ?>" value="<?php echo $val["id"]; ?>" /></td> 69 <td><a href="aws_edit.php?id=<?php echo $val["id"] ?>"><img src="images/edit .png" alt="<?php __("Edit"); ?>" title="<?php __("Edit"); ?>" /></a></td>73 <td><a href="aws_edit.php?id=<?php echo $val["id"] ?>"><img src="images/edit<?php echo $altImg; ?>.png" alt="<?php __("Edit"); ?>" title="<?php __("Edit"); ?>" /></a></td> 70 74 <td><label for="del_<?php echo $val["id"]; ?>"><?php echo $val["hostname"] ?></label></td> 71 75 <td><?php echo $val["users"] ?></td> -
alternc/branches/franck-desktop/bureau/admin/aws_pass.php
r1797 r1803 37 37 getFields($fields); 38 38 39 if (!$aws->login_exists($login)) { 40 $error=$err->errstr(); 39 if (!$aws->login_exists($login)) 40 { 41 $error = $err->errstr(); 41 42 include("aws_users.php"); 42 43 exit(); 43 44 } 44 45 45 if ($pass) { 46 if (!$aws->change_pass($login,$pass)) { 47 $error=$err->errstr(); 48 } else { 49 include("aws_users.php"); 46 if ($pass) 47 { 48 if (!$aws->change_pass($login, $pass)) 49 { 50 $error = $err->errstr(); 51 } 52 else 53 { 54 include ("aws_users.php"); 50 55 exit(); 51 56 } … … 57 62 <h3><?php __("Change a user's password"); ?></h3> 58 63 <?php 59 if ($error) { 64 65 if ($error) 66 { 67 60 68 ?> 61 69 <p class="error"><?php echo $error ?></p> 62 <?php } ?>70 <?php 63 71 72 } 73 74 ?> 64 75 <form method="post" action="aws_pass.php" name="main"> 65 76 <table border="1" cellspacing="0" cellpadding="4"> 66 <tr><th> 67 <?php __("Username"); ?></th><td> 68 <code><?php echo $login; ?></code> <input type="hidden" name="login" value="<?php echo $login; ?>" /> 69 </td></tr> 70 <tr><th><label for="pass"><?php __("New Password"); ?></label></th><td><input type="text" class="int" name="pass" id="pass" value="<?php echo $pass; ?>" size="20" maxlength="64" /></td></tr> 71 <tr><td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Change this user's password"); ?>" /></td></tr> 77 <tr> 78 <th><?php __("Username"); ?></th> 79 <td><code><?php echo $login; ?></code> <input type="hidden" name="login" value="<?php echo $login; ?>" /></td> 80 </tr> 81 <tr> 82 <th><label for="pass"><?php __("New Password"); ?></label></th> 83 <td><input type="password" class="int" name="pass" id="pass" value="<?php echo $pass; ?>" size="20" maxlength="64" /></td> 84 </tr> 85 <tr> 86 <td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Change this user's password"); ?>" /></td> 87 </tr> 72 88 </table> 73 89 </form> 74 <?php include_once("foot.php"); ?> 90 <?php 91 92 include_once("foot.php"); 93 94 ?> -
alternc/branches/franck-desktop/bureau/admin/aws_users.php
r1797 r1803 31 31 include_once("head.php"); 32 32 33 $nologin=false; 34 if (!$r=$aws->list_login()) { 35 $nologin=true; 36 $error=$err->errstr(); 33 $fields = array ( 34 "prefixe" => array ("request", "string", ""), 35 ); 36 getFields($fields); 37 38 $nologin = false; 39 if (!$r = $aws->list_login()) 40 { 41 $nologin = true; 42 $error = $err->errstr(); 37 43 } 38 44 … … 42 48 <form method="post" action="aws_useradd.php" name="main"> 43 49 <table border="1" cellspacing="0" cellpadding="4"> 44 <tr><th> 45 <label for="login"><?php __("Username"); ?></label></th><td> 46 <select class="inl" name="prefixe"><?php $aws->select_prefix_list($prefixe); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="" size="20" maxlength="64" /> 47 </td></tr> 48 <tr><th><label for="pass"><?php __("Password"); ?></label></th><td><input type="text" class="int" name="pass" id="pass" value="" size="20" maxlength="64" /></td></tr> 49 <tr><td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create this new awstat account."); ?>" /></td></tr> 50 <tr> 51 <th><label for="login"><?php __("Username"); ?></label></th> 52 <td> 53 <select class="inl" name="prefixe"><?php $aws->select_prefix_list($prefixe); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="" size="20" maxlength="64" /> 54 </td> 55 </tr> 56 <tr> 57 <th><label for="pass"><?php __("Password"); ?></label></th> 58 <td><input type="password" class="int" name="pass" id="pass" value="" size="20" maxlength="64" /></td> 59 </tr> 60 <tr> 61 <td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create this new awstat account."); ?>" /></td> 62 </tr> 50 63 </table> 51 64 </form> 65 <?php 66 67 if ($error) 68 { 69 70 ?> 71 <p class="error"><?php echo $error ?></p> 52 72 53 73 <?php 54 74 75 } 55 76 56 if ($error) { 77 if (!$nologin) 78 { 79 57 80 ?> 58 <p class="error"><?php echo $error ?></p>59 <?php }60 61 if (!$nologin) {62 ?>63 64 65 81 <form method="post" action="aws_userdel.php"> 66 82 <table cellspacing="0" cellpadding="4"> 67 <tr><th colspan="2"> </th><th><?php __("Username"); ?></th></tr> 83 <tr> 84 <th colspan="2"> </th> 85 <th><?php __("Username"); ?></th> 86 </tr> 68 87 <?php 69 $col=1; 70 foreach ($r as $val) { 71 $col=3-$col; 88 89 $col = 1; 90 foreach ($r as $val) 91 { 92 $col = 3 - $col; 72 93 ?> 73 94 <tr class="lst<?php echo $col; ?>"> … … 77 98 </tr> 78 99 <?php 79 } 100 101 } 102 80 103 ?> 81 <tr><td colspan="5"><input type="submit" name="submit" class="inb" value="<?php __("Delete checked accounts"); ?>" /></td></tr> 104 <tr> 105 <td colspan="5"><input type="submit" name="submit" class="inb" value="<?php __("Delete checked accounts"); ?>" /></td> 106 </tr> 82 107 </table> 83 108 </form> 84 109 <?php 85 } 110 111 } 112 113 include_once("foot.php"); 114 86 115 ?> 87 <?php include_once("foot.php"); ?> -
alternc/branches/franck-desktop/bureau/admin/bro_editor.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 $fields = array ( 33 "R" => array ("request", "string", ""), 34 "file" => array ("request", "string", ""), 35 "texte" => array ("request", "string", ""), 36 "cancel" => array ("request", "string", ""), 37 "saveret" => array ("request", "string", ""), 38 "save" => array ("request", "string", ""), 39 ); 40 getFields($fields); 41 32 42 $file=ssla($file); 33 43 $texte=ssla($texte); … … 59 69 </p> 60 70 <form action="bro_editor.php" method="post"><br /> 61 <div id="resizer" style="left: 0px; top: 0px; z-index: 54; width: 646px; height: 252px; cursor: auto;"><textarea class="int" style="font-family: <?php echo $p["editor_font"]; ?>; font-size: <?php echo $p["editor_size"]; ?>; width: 90%; height: 90%;" cols="<?php echo $p["editsizex"]; ?>" rows="<?php echo $p["editsizey"]; ?>" name="texte"><?php71 <div id="resizer" style="left: 0px; top: 0px; z-index: 54; width: <?php echo $p["editsizex"]; ?>px; height: <?php echo $p["editsizey"]; ?>px; cursor: auto;"><textarea class="int" style="font-family: <?php echo $p["editor_font"]; ?>; font-size: <?php echo $p["editor_size"]; ?>; width: 90%; height: 90%;" cols="<?php echo $p["editsizex"]; ?>" rows="<?php echo $p["editsizey"]; ?>" name="texte"><?php 62 72 $bro->content($R,$file); 63 73 ?></textarea><img src="/admin/icon/winresize.gif" alt="shift+click and drag to resize textarea" title="shift+click and drag to resize textarea" height="20" width="20" /></div><br /> -
alternc/branches/franck-desktop/bureau/admin/bro_main.php
r1802 r1803 29 29 ---------------------------------------------------------------------- 30 30 */ 31 require_once ("../class/config.php");31 require_once ("../class/config.php"); 32 32 include_once ("head.php"); 33 33 34 $p=$bro->GetPrefs(); 35 if (!$R && $p["golastdir"]) { 36 $R=$p["lastdir"]; 37 } 38 $R=$bro->convertabsolute($R,1); 34 $fields = array ( 35 "R" => array ("request", "string", ""), 36 "formu" => array ("request", "integer", 0), 37 "nomfich" => array ("request", "string", ""), 38 "o" => array ("request", "array", array()), 39 "d" => array ("request", "array", array()), 40 "actmove" => array ("request", "string", ""), 41 "actmoveto" => array ("request", "string", ""), 42 "actrename" => array ("request", "string", ""), 43 "actdel" => array ("request", "string", ""), 44 "del_confirm" => array ("request", "string", ""), 45 "cancel" => array ("request", "string", ""), 46 ); 47 getFields($fields); 48 49 $p = $bro->GetPrefs(); 50 if (!$R && $p["golastdir"]) 51 { 52 $R = $p["lastdir"]; 53 } 54 55 $R = $bro->convertabsolute($R, 1); 56 39 57 // on fait ? 40 if ($formu) { 41 switch ($formu) { 42 case 1: // Créer le répertoire $R.$nomfich 43 if (!$bro->CreateDir($R,$nomfich)) { 44 echo $err->errstr(); 45 } 46 $p=$bro->GetPrefs(); 47 break; 48 case 6: // Créer le fichier $R.$nomfich 49 if (!$bro->CreateFile($R,$nomfich)) { 50 echo $err->errstr(); 51 } 52 $p=$bro->GetPrefs(); 53 if ($p["createfile"]==1) { 54 $file=$nomfich; 55 include("bro_editor.php"); 56 exit(); 57 } 58 break; 59 case 2: // act vaut Supprimer Copier ou Renommer. 60 if ($actdel) { 61 if($del_confirm == _("Yes")) { 62 if (!$bro->DeleteFile($d,$R)) { 63 print $err->errstr(); 64 } 65 } 66 else if (!$cancel) 67 { 68 69 ?> 70 <h3><?php printf(_("Deleting files and/or directories")); ?></h3> 71 <form action="bro_main.php" method="post"> 72 <input type="hidden" name="formu" value="2" /> 73 <input type="hidden" name="actdel" value="1" /> 74 <input type="hidden" name="R" value="<?php echo $R?>" /> 75 <p class="error"><?php __("WARNING : Confirm the deletion of this files"); ?></p> 76 <?php foreach($d as $file){ ?> 77 <p><?php echo stripslashes($file); ?></p> 78 <input type="hidden" name="d[]" value="<?php echo htmlentities(stripslashes($file)); ?>" /> 58 if ($formu) 59 { 60 switch ($formu) 61 { 62 case 1: // Créer le répertoire $R.$nomfich 63 if (!$bro->CreateDir($R, $nomfich)) 64 { 65 echo $err->errstr(); 66 } 67 $p = $bro->GetPrefs(); 68 break; 69 70 case 6: // Créer le fichier $R.$nomfich 71 if (!$bro->CreateFile($R,$nomfich)) 72 { 73 echo $err->errstr(); 74 } 75 $p = $bro->GetPrefs(); 76 if ($p["createfile"] == 1) 77 { 78 $file = $nomfich; 79 include ("bro_editor.php"); 80 exit(); 81 } 82 break; 83 case 2: // act vaut Supprimer Copier ou Renommer. 84 if ($actdel) 85 { 86 if ($del_confirm == _("Yes")) 87 { 88 if (!$bro->DeleteFile($d, $R)) 89 { 90 echo $err->errstr(); 91 } 92 } 93 else if (!$cancel) 94 { 95 96 ?> 97 <h3><?php printf(_("Deleting files and/or directories")); ?></h3> 98 <form action="bro_main.php" method="post"> 99 <input type="hidden" name="formu" value="2" /> 100 <input type="hidden" name="actdel" value="1" /> 101 <input type="hidden" name="R" value="<?php echo $R?>" /> 102 <p class="error"><?php __("WARNING : Confirm the deletion of this files"); ?></p> 103 <?php foreach ($d as $file) { ?> 104 <p><?php echo stripslashes($file); ?></p> 105 <input type="hidden" name="d[]" value="<?php echo htmlentities(stripslashes($file)); ?>" /> 79 106 <?php } ?> 80 <blockquote>81 <input type="submit" class="inb" name="del_confirm" value="<?php __("Yes"); ?>" /> 82 <input type="submit" class="inb" name="cancel" value="<?php __("No"); ?>" />83 </blockquote>84 </form>107 <blockquote> 108 <input type="submit" class="inb" name="del_confirm" value="<?php __("Yes"); ?>" /> 109 <input type="submit" class="inb" name="cancel" value="<?php __("No"); ?>" /> 110 </blockquote> 111 </form> 85 112 <?php 86 include_once("foot.php"); 87 die(); 88 } 89 } 90 if ($actmove) { 91 if (!$bro->MoveFile($d,$R,$actmoveto)) { 92 echo $err->errstr(); 93 } 94 } 95 break; 96 case 4: // Renommage Effectif... 97 if (!$bro->RenameFile($R,$o,$d)) { // Rename $R (directory) $o (old) $d (new) names 98 echo $err->errstr(); 99 } 100 break; 101 case 3: // Upload de fichier... 102 if (!$bro->UploadFile($R)) { 103 echo $err->errstr(); 104 } 113 include_once("foot.php"); 114 die(); 115 } 116 } 117 if ($actmove) 118 { 119 if (!$bro->MoveFile($d, $R, $actmoveto)) 120 { 121 echo $err->errstr(); 122 } 123 } 105 124 break; 106 } 125 case 4: // Renommage Effectif... 126 if (!$bro->RenameFile($R, $o, $d)) // Rename $R (directory) $o (old) $d (new) names 127 { 128 echo $err->errstr(); 129 } 130 break; 131 case 3: // Upload de fichier... 132 if (!$bro->UploadFile($R)) 133 { 134 echo $err->errstr(); 135 } 136 break; 137 } 107 138 } 108 139 109 140 /* Creation de la liste des fichiers courants */ 110 $c=$bro->filelist($R); 111 if ($c===false) $error=$err->errstr(); 141 $c = $bro->filelist($R); 142 if ($c === false) 143 $error = $err->errstr(); 112 144 113 145 ?> -
alternc/branches/franck-desktop/bureau/admin/bro_pref.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 if ($submit) { 32 $fields = array ( 33 "submit" => array ("request", "string", ""), 34 "editsizex" => array ("request", "string", ""), 35 "editsizey" => array ("request", "string", ""), 36 "listmode" => array ("request", "string", ""), 37 "showicons" => array ("request", "string", ""), 38 "downfmt" => array ("request", "string", ""), 39 "createfile" => array ("request", "string", ""), 40 "showtype" => array ("request", "string", ""), 41 "editor_font" => array ("request", "string", ""), 42 "editor_size" => array ("request", "string", ""), 43 "golastdir" => array ("request", "string", ""), 44 ); 45 getFields($fields); 46 47 if ($submit) 48 { 33 49 $bro->SetPrefs($editsizex, $editsizey, $listmode, $showicons, $downfmt, $createfile, $showtype, $editor_font, $editor_size, $golastdir); 34 $error =_("Your preferences have been updated.");35 include ("bro_main.php");50 $error = _("Your preferences have been updated."); 51 include ("bro_main.php"); 36 52 exit; 37 53 } 38 $p=$bro->GetPrefs(); 54 55 $p = $bro->GetPrefs(); 39 56 40 57 include_once("head.php"); 41 58 42 ?> 43 <?php if ($error) echo "<font color=\"red\">$error</font><br />"; ?> 59 if ($error) 60 echo "<p class=\"error\">" . $error . "</p>"; 61 62 ?> 44 63 <h3><?php __("File editor preferences"); ?></h3> 45 64 <form action="bro_pref.php" method="post"> 46 47 65 <table cellpadding="6" border="1" cellspacing="0"> 48 <tr><td colspan="2"><h4><?php __("File editor preferences"); ?></h4></td></tr> 49 <tr><td><?php __("Horizontal window size"); ?></td><td><select class="inl" name="editsizex"> 50 <?php 51 for($i=10;$i<=200;$i+=10) { 52 echo "<option"; 53 if ($p["editsizex"]==$i) echo " selected"; 54 echo ">$i"; 55 } 56 ?></select></td></tr> 57 <tr><td><?php __("Vertical window size"); ?></td><td><select class="inl" name="editsizey"> 58 <?php 59 for($i=4;$i<=60;$i+=2) { 60 echo "<option"; 61 if ($p["editsizey"]==$i) echo " selected"; 62 echo ">$i"; 63 } 64 ?></select></td></tr> 65 <tr><td><?php __("File editor font name"); ?></td><td><select class="inl" name="editor_font"> 66 <?php 67 for($i=0;$i<count($bro->l_editor_font);$i++) { 68 echo "<option"; 69 if ($p["editor_font"]==$bro->l_editor_font[$i]) echo " selected"; 70 echo ">"._($bro->l_editor_font[$i]); 71 } 72 ?></select></td></tr> 73 <tr><td><?php __("File editor font size"); ?></td><td><select class="inl" name="editor_size"> 74 <?php 75 for($i=0;$i<count($bro->l_editor_size);$i++) { 76 echo "<option"; 77 if ($p["editor_size"]==$bro->l_editor_size[$i]) echo " selected"; 78 echo ">"._($bro->l_editor_size[$i]); 79 } 80 ?></select></td></tr> 66 <tr> 67 <td colspan="2"><h4><?php __("File editor preferences"); ?></h4></td> 68 </tr> 69 <tr> 70 <td><?php __("Horizontal window size"); ?></td> 71 <td><select class="inl" name="editsizex"> 72 <?php 73 74 for ($i = 400; $i <= 1000; $i += 100) 75 { 76 echo "<option value=\"" . $i . "\""; 77 if ($p["editsizex"] == $i) echo " selected=\"selected\""; 78 echo ">" . $i . "</option>"; 79 } 80 81 ?> 82 </select></td> 83 </tr> 84 <tr> 85 <td><?php __("Vertical window size"); ?></td> 86 <td><select class="inl" name="editsizey"> 87 <?php 88 89 for ($i = 200; $i <= 500; $i += 50) 90 { 91 echo "<option value=\"" . $i . "\""; 92 if ($p["editsizey"] == $i) 93 echo " selected=\"selected\""; 94 echo ">" . $i . "</option>"; 95 } 96 97 ?> 98 </select></td> 99 </tr> 100 <tr> 101 <td><?php __("File editor font name"); ?></td> 102 <td><select class="inl" name="editor_font"> 103 <?php 104 105 for ($i = 0; $i < count($bro->l_editor_font); $i++) 106 { 107 echo "<option value=\"" . $bro->l_editor_font[$i] . "\""; 108 if ($p["editor_font"] == $bro->l_editor_font[$i]) 109 echo " selected=\"selected\""; 110 echo ">" . _($bro->l_editor_font[$i]) . "</option>"; 111 } 112 113 ?> 114 </select></td> 115 </tr> 116 <tr> 117 <td><?php __("File editor font size"); ?></td> 118 <td><select class="inl" name="editor_size"> 119 <?php 120 121 for ($i = 0; $i < count($bro->l_editor_size); $i++) 122 { 123 echo "<option value=\"" . $bro->l_editor_size[$i] . "\""; 124 if ($p["editor_size"] == $bro->l_editor_size[$i]) 125 echo " selected=\"selected\""; 126 echo ">" . _($bro->l_editor_size[$i]) . "</option>"; 127 } 128 129 ?> 130 </select> 131 </td> 132 </tr> 81 133 </table> 134 82 135 <p> </p> 83 136 84 137 <table cellpadding="6" border="1" cellspacing="0"> 85 <tr><td colspan="2"><h4><?php __("File browser preferences"); ?></h4></td></tr> 86 <tr><td><?php __("File list view"); ?></td><td><select class="inl" name="listmode"> 87 <?php 88 for($i=0;$i<count($bro->l_mode);$i++) { 89 echo "<option"; 90 if ($p["listmode"]==$i) echo " selected"; 91 echo " value=\"$i\">"._($bro->l_mode[$i])."</option>"; 92 } 93 ?></select></td></tr> 94 <tr><td><?php __("Downloading file format"); ?></td><td><select class="inl" name="downfmt"> 95 <?php 96 for($i=0;$i<count($bro->l_tgz);$i++) { 97 echo "<option"; 98 if ($p["downfmt"]==$i) echo " selected"; 99 echo " value=\"$i\">"._($bro->l_tgz[$i])."</option>"; 100 } 101 ?></select></td></tr> 102 <tr><td><?php __("What to do after creating a file"); ?></td><td><select class="inl" name="createfile"> 103 <?php 104 for($i=0;$i<count($bro->l_createfile);$i++) { 105 echo "<option"; 106 if ($p["createfile"]==$i) echo " selected"; 107 echo " value=\"$i\">"._($bro->l_createfile[$i])."</option>"; 108 } 109 ?></select></td></tr> 110 <tr><td><?php __("Show icons?"); ?></td><td><select class="inl" name="showicons"> 111 <?php 112 for($i=0;$i<count($bro->l_icons);$i++) { 113 echo "<option"; 114 if ($p["showicons"]==$i) echo " selected"; 115 echo " value=\"$i\">"._($bro->l_icons[$i])."</option>"; 116 } 117 ?></select></td></tr> 118 <tr><td><?php __("Show file types?"); ?></td><td><select class="inl" name="showtype"> 119 <?php 120 for($i=0;$i<count($bro->l_icons);$i++) { 121 echo "<option"; 122 if ($p["showtype"]==$i) echo " selected"; 123 echo " value=\"$i\">"._($bro->l_icons[$i])."</option>"; 124 } 125 ?></select></td></tr> 126 <tr><td><?php __("Remember last visited directory?"); ?></td><td><select class="inl" name="golastdir"> 127 <?php 128 for($i=0;$i<count($bro->l_icons);$i++) { 129 echo "<option"; 130 if ($p["golastdir"]==$i) echo " selected"; 131 echo " value=\"$i\">"._($bro->l_icons[$i])."</option>"; 132 } 133 ?></select></td></tr> 134 138 <tr> 139 <td colspan="2"><h4><?php __("File browser preferences"); ?></h4></td> 140 </tr> 141 <tr> 142 <td><?php __("File list view"); ?></td> 143 <td><select class="inl" name="listmode"> 144 <?php 145 146 for ($i = 0; $i < count($bro->l_mode); $i++) 147 { 148 echo "<option value=\"" . $i . "\""; 149 if ($p["listmode"] == $i) 150 echo " selected=\"selected\""; 151 echo ">" . _($bro->l_mode[$i]) . "</option>"; 152 } 153 154 ?> 155 </select> 156 </td> 157 </tr> 158 <tr> 159 <td><?php __("Downloading file format"); ?></td> 160 <td><select class="inl" name="downfmt"> 161 <?php 162 163 for($i = 0; $i <count($bro->l_tgz); $i++) 164 { 165 echo "<option value=\"" . $i . "\""; 166 if ($p["downfmt"] == $i) 167 echo " selected=\"selected\""; 168 echo ">" . _($bro->l_tgz[$i]) . "</option>"; 169 } 170 171 ?> 172 </select> 173 </td> 174 </tr> 175 <tr> 176 <td><?php __("What to do after creating a file"); ?></td> 177 <td><select class="inl" name="createfile"> 178 <?php 179 180 for($i = 0; $i < count($bro->l_createfile); $i++) 181 { 182 echo "<option value=\"" . $i . "\""; 183 if ($p["createfile"] == $i) 184 echo " selected=\"selected\""; 185 echo ">" . _($bro->l_createfile[$i]) . "</option>"; 186 } 187 188 ?> 189 </select> 190 </td> 191 </tr> 192 <tr> 193 <td><?php __("Show icons?"); ?></td> 194 <td><select class="inl" name="showicons"> 195 <?php 196 197 for($i = 0; $i < count($bro->l_icons); $i++) 198 { 199 echo "<option value=\"" . $i . "\""; 200 if ($p["showicons"] == $i) 201 echo " selected=\"selected\""; 202 echo ">" . _($bro->l_icons[$i]) . "</option>"; 203 } 204 205 ?> 206 </select> 207 </td> 208 </tr> 209 <tr> 210 <td><?php __("Show file types?"); ?></td> 211 <td><select class="inl" name="showtype"> 212 <?php 213 214 for($i = 0; $i < count($bro->l_icons); $i++) 215 { 216 echo "<option value=\"" . $i . "\""; 217 if ($p["showtype"] == $i) 218 echo " selected=\"selected\""; 219 echo ">" . _($bro->l_icons[$i]) . "</option>"; 220 } 221 222 ?> 223 </select> 224 </td> 225 </tr> 226 <tr> 227 <td><?php __("Remember last visited directory?"); ?></td> 228 <td><select class="inl" name="golastdir"> 229 <?php 230 231 for($i = 0; $i < count($bro->l_icons); $i++) 232 { 233 echo "<option value=\"" . $i . "\""; 234 if ($p["golastdir"] == $i) 235 echo " selected=\"selected\""; 236 echo ">" . _($bro->l_icons[$i]) . "</option>"; 237 } 238 239 ?> 240 </select> 241 </td> 242 </tr> 135 243 </table> 136 244 <p><input type="submit" name="submit" class="inb" value="<?php __("Change my settings"); ?>" /></p> -
alternc/branches/franck-desktop/bureau/admin/bro_tgzdown.php
r398 r1803 30 30 require_once("../class/config.php"); 31 31 32 $p=$bro->GetPrefs(); 33 switch ($p["downfmt"]) { 32 $fields = array ( 33 "dir" => array ("request", "string", ""), 34 ); 35 getFields($fields); 36 37 $p = $bro->GetPrefs(); 38 switch ($p["downfmt"]) 39 { 34 40 case 0: 35 41 $bro->DownloadTGZ($dir); … … 45 51 break; 46 52 } 53 47 54 ?> -
alternc/branches/franck-desktop/bureau/admin/browseforfolder.php
r517 r1803 14 14 } 15 15 16 requires : ife($test,$iftrue,$iffalse) function : 16 requires : ife($test,$iftrue,$iffalse) function : 17 17 18 18 function ife($test,$true,$false="") { … … 43 43 $c=opendir($root.$rot); 44 44 $i=0; $tmp = array(); 45 while ($r=readdir($c)) { 45 while ($r=readdir($c)) { 46 46 if (is_dir($root.$rot."/".$r) && $r!="." && $r!="..") { $tmp[$i++]=$r; } 47 47 } 48 sort($tmp); 48 sort($tmp); 49 49 foreach ($tmp as $r) { 50 50 /* Ajout */ … … 67 67 $root="/var/alternc/html/".substr($mem->user["login"],0,1)."/".$mem->user["login"]."/"; 68 68 // pour utiliser 'la ou est browseforfolder', mettre dirname($HTTP_SERVER_VARS["PATH_TRANSLATED"]); 69 70 $fields = array ( 71 "file" => array ("request", "string", ""), 72 "caller" => array ("request", "string", ""), 73 "select" => array ("request", "string", ""), 74 "curdir" => array ("request", "string", ""), 75 ); 76 getFields($fields); 69 77 70 78 if (substr($file,0,1)!="/") $file="/".$file; -
alternc/branches/franck-desktop/bureau/admin/dom_add.php
r1797 r1803 32 32 include_once("head.php"); 33 33 34 if (!isset($dns)) $dns="1"; 34 $fields = array ( 35 "newdomain" => array ("request", "string", ""), 36 "dns" => array ("request", "integer", 1), 37 ); 38 getFields($fields); 35 39 36 40 ?> … … 69 73 ?> 70 74 <script type="text/javascript"> 71 document.forms['main'].newdomain.focus();72 75 deploy("menu-dom"); 73 76 </script> -
alternc/branches/franck-desktop/bureau/admin/dom_doadd.php
r1797 r1803 33 33 $fields = array ( 34 34 "newdomain" => array ("post", "string", ""), 35 "dns" => array ("post", " string", ""),35 "dns" => array ("post", "integer", 0), 36 36 ); 37 37 getFields($fields); … … 50 50 <h3><?php __("Add a domain"); ?></h3> 51 51 <p> 52 <?php printf(_("Your new domain %s has been successfully installed"),$newdomain); ?><br /> 53 <a href="main.php" target="_top"><?php __("Click here to continue"); ?></a><br /> 52 <?php printf(_("Your new domain %s has been successfully installed"),$newdomain); ?> 53 </p> 54 <p> 55 <a href="main.php" target="_top"><?php __("Click here to continue"); ?></a> 56 </p> 54 57 <?php $mem->show_help("add_domain"); ?> 55 <br />56 58 <?php 57 if (is_array($dom->dns)) { 58 echo "<br />"._("Whois result on the domain")." : <pre>"; 59 reset($dom->dns); 60 while (list($key,$val)=each($dom->dns)) { 61 echo "nameserver: $val\n"; 62 } 63 echo "</pre>"; 59 60 if (is_array($dom->dns)) 61 { 62 echo "<p>"; 63 echo _("Whois result on the domain") . " : <pre>"; 64 reset($dom->dns); 65 while (list($key, $val) = each($dom->dns)) 66 { 67 echo "nameserver: " . $val . "\n"; 64 68 } 69 echo "</pre>"; 70 echo "</p>"; 71 } 72 73 74 include_once("foot.php"); 75 65 76 ?> 66 </p>67 <?php include_once("foot.php"); ?> -
alternc/branches/franck-desktop/bureau/admin/dom_edit.php
r1797 r1803 72 72 <table cellspacing="0" cellpadding="3"> 73 73 <?php 74 $col=1; 75 for($i=0;$i<$r["nsub"];$i++) { 76 $col=3-$col; 74 75 $col = 1; 76 for ($i = 0; $i < $r["nsub"] ; $i++) 77 { 78 $col = 3 - $col; 79 $altImg = ($i % 2 == 0 ? "" : "alt"); 80 77 81 ?> 78 82 <tr class="lst<?php echo $col; ?>"> 79 83 <td class="center"> 80 <a href="dom_subedit.php?domain=<?php echo urlencode($r["name"]) ?>&sub=<?php echo urlencode($r["sub"][$i]["name"]) ?>"><img src="images/edit .png" alt="<?php __("Edit"); ?>" /></a> <a href="dom_subdel.php?domain=<?php echo urlencode($r["name"]) ?>&sub=<?php echo urlencode($r["sub"][$i]["name"]) ?>"><img src="images/delete.png" alt="<?php __("Delete"); ?>" /></a>84 <a href="dom_subedit.php?domain=<?php echo urlencode($r["name"]) ?>&sub=<?php echo urlencode($r["sub"][$i]["name"]) ?>"><img src="images/edit<?php echo $altImg; ?>.png" alt="<?php __("Edit"); ?>" /></a> <a href="dom_subdel.php?domain=<?php echo urlencode($r["name"]) ?>&sub=<?php echo urlencode($r["sub"][$i]["name"]) ?>"><img src="images/delete<?php echo $altImg; ?>.png" alt="<?php __("Delete"); ?>" /></a> 81 85 </td> 82 86 <td><a href="http://<?php ecif($r["sub"][$i]["name"],$r["sub"][$i]["name"]."."); echo $r["name"] ?>" target="_blank"><?php ecif($r["sub"][$i]["name"],$r["sub"][$i]["name"]."."); echo $r["name"] ?></a></td> … … 135 139 --> 136 140 <?php 137 if (!$r[ noerase]) {141 if (!$r["noerase"]) { 138 142 ?> 139 143 -
alternc/branches/franck-desktop/bureau/admin/dom_subdel.php
r1797 r1803 44 44 45 45 ?> 46 <h3><?php printf(_("Deleting subdomain %s"),"http://".ife($sub,$sub.".").$domain); ?> :</h3>46 <h3><?php printf(_("Deleting subdomain %s"),"http://".ife($sub,$sub.".").$domain); ?></h3> 47 47 <?php 48 48 if ($error) { -
alternc/branches/franck-desktop/bureau/admin/dom_subdodel.php
r1797 r1803 46 46 47 47 ?> 48 <h3>Suppression du sous-domaine http://<?php ecif($sub,$sub."."); echo $domain; ?> :</h3>48 <h3>Suppression du sous-domaine http://<?php ecif($sub,$sub."."); echo $domain; ?></h3> 49 49 <?php 50 50 if ($error) { -
alternc/branches/franck-desktop/bureau/admin/dom_subdoedit.php
r1 r1803 30 30 require_once("../class/config.php"); 31 31 32 $fields = array ( 33 "domain" => array ("request", "string", ""), 34 "sub" => array ("request", "string", ""), 35 "type" => array ("request", "integer", 0), 36 "sub_local" => array ("request", "string", ""), 37 "sub_url" => array ("request", "string", ""), 38 "sub_ip" => array ("request", "string", ""), 39 "action" => array ("request", "string", ""), 40 ); 41 getFields($fields); 42 32 43 $dom->lock(); 33 44 -
alternc/branches/franck-desktop/bureau/admin/dom_subedit.php
r1797 r1803 44 44 45 45 ?> 46 <h3>Edition du sous-domaine http://<?php ecif($sub,$sub."."); echo $domain; ?> :</h3>46 <h3>Edition du sous-domaine http://<?php ecif($sub,$sub."."); echo $domain; ?></h3> 47 47 <?php 48 48 if ($error) { -
alternc/branches/franck-desktop/bureau/admin/foot.php
r1797 r1803 3 3 </tr> 4 4 </table> 5 <?php endBox(); ?> 5 6 </div> <!-- div global --> 7 <?php 8 9 $tempsFin = microtimeFloat(); 10 $temps = round($tempsFin - $tempsDebut, 4); 11 12 if ($customErrorHandler) 13 { 14 $message = $queryCount . " queries<br />Generated in " . $temps . "s<br />Mem. Usage: " . format_size(memory_get_usage()); 15 16 displayPhpError($message); 17 } 18 19 ?> 6 20 </body> 7 21 </html> -
alternc/branches/franck-desktop/bureau/admin/ftp_add.php
r1797 r1803 31 31 include_once("head.php"); 32 32 33 if (!$quota->cancreate("ftp")) { 34 $error=_("You cannot add any new ftp account, your quota is over."); 35 $fatal=1; 33 if (!$quota->cancreate("ftp")) 34 { 35 $error = _("You cannot add any new ftp account, your quota is over."); 36 $fatal = 1; 36 37 } 38 39 $fields = array ( 40 "id" => array ("request", "integer", 0), 41 "prefixe" => array ("request", "string", ""), 42 "login" => array ("request", "string", ""), 43 "pass" => array ("request", "string", ""), 44 "passconf" => array ("request", "string", ""), 45 "dir" => array ("request", "string", ""), 46 ); 47 getFields($fields); 37 48 38 49 ?> 39 50 <h3><?php __("Create a new ftp account"); ?></h3> 40 51 <?php 41 if ($error) { 42 echo "<p class=\"error\">$error</p>"; 43 if ($fatal) { 44 ?> 45 <script type="text/javascript"> 46 deploy("menu-ftp"); 47 </script> 48 <?php include_once("foot.php"); ?> 49 <?php 50 exit(); 51 } 52 } 52 53 if ($error) 54 { 55 echo "<p class=\"error\">" . $error . "</p>"; 56 } 57 53 58 ?> 54 59 <form method="post" action="ftp_doadd.php" name="main"> 55 60 <table border="1" cellspacing="0" cellpadding="4"> 56 <tr><th><input type="hidden" name="id" value="<?php echo $id ?>" /> 57 <label for="login"><?php __("Username"); ?></label></th><td> 58 <select class="inl" name="prefixe"><?php $ftp->select_prefix_list($prefixe); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="<?php echo $login; ?>" size="20" maxlength="64" /> 59 </td></tr> 60 <tr><th><label for="pass"><?php __("Password"); ?></label></th><td><input type="password" class="int" name="pass" id="pass" value="<?php echo $pass; ?>" size="20" maxlength="64" /></td></tr> 61 <tr><th><label for="passconf"><?php __("Confirm password"); ?></label></th><td><input type="password" class="int" name="passconf" id="passconf" value="<?php echo $passconf; ?>" size="20" maxlength="64" /></td></tr> 62 <tr><th><label for="dir"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="dir" id="dir" value="<?php echo $dir; ?>" size="20" maxlength="255" /> 63 <script type="text/javascript"> 64 <!-- 65 document.write(" <input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.dir');\" value=\" ... \" class=\"inb\">"); 66 // --> 67 </script> 68 </td></tr> 69 <tr><td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create this new FTP account."); ?>" /></td></tr> 61 <tr> 62 <th><input type="hidden" name="id" value="<?php echo $id ?>" /><label for="login"><?php __("Username"); ?></label></th> 63 <td><select class="inl" name="prefixe"><?php $ftp->select_prefix_list($prefixe); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="<?php echo $login; ?>" size="20" maxlength="64" /></td> 64 </tr> 65 <tr> 66 <th><label for="pass"><?php __("Password"); ?></label></th> 67 <td><input type="password" class="int" name="pass" id="pass" value="<?php echo $pass; ?>" size="20" maxlength="64" /></td> 68 </tr> 69 <tr> 70 <th><label for="passconf"><?php __("Confirm password"); ?></label></th> 71 <td><input type="password" class="int" name="passconf" id="passconf" value="<?php echo $passconf; ?>" size="20" maxlength="64" /></td> 72 </tr> 73 <tr> 74 <th><label for="dir"><?php __("Folder"); ?></label></th> 75 <td> 76 <input type="text" class="int" name="dir" id="dir" value="<?php echo $dir; ?>" size="20" maxlength="255" /> 77 <script type="text/javascript"> 78 <!-- 79 document.write(" <input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.dir');\" value=\" ... \" class=\"inb\">"); 80 // --> 81 </script> 82 </td> 83 </tr> 84 <tr> 85 <td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create this new FTP account."); ?>" /></td> 86 </tr> 70 87 </table> 71 88 </form> -
alternc/branches/franck-desktop/bureau/admin/ftp_del.php
r102 r1803 30 30 require_once("../class/config.php"); 31 31 32 $error="";33 32 // On parcours les POST_VARS et on repere les del_. 34 33 reset($_POST); -
alternc/branches/franck-desktop/bureau/admin/ftp_doadd.php
r798 r1803 30 30 require_once("../class/config.php"); 31 31 32 $fields = array ( 33 "id" => array ("request", "integer", 0), 34 "prefixe" => array ("request", "string", ""), 35 "login" => array ("request", "string", ""), 36 "pass" => array ("request", "string", ""), 37 "passconf" => array ("request", "string", ""), 38 "dir" => array ("request", "string", ""), 39 ); 40 getFields($fields); 41 32 42 if ($pass != $passconf) { 33 43 $error = _("Passwords do not match"); -
alternc/branches/franck-desktop/bureau/admin/ftp_doedit.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 $fields = array ( 33 "id" => array ("request", "integer", 0), 34 "prefixe" => array ("request", "string", ""), 35 "login" => array ("request", "string", ""), 36 "pass" => array ("request", "string", ""), 37 "passconf" => array ("request", "string", ""), 38 "rep" => array ("request", "string", ""), 39 ); 40 getFields($fields); 41 32 42 if (!$id) { 33 43 $error=_("No account selected!"); … … 56 66 <div align="center"><h3><?php __("Editing an FTP account"); ?></h3></div> 57 67 <?php 58 if ($error) { 59 echo "<p class=\"error\">$error</p>"; 60 } 68 69 if ($error) 70 { 71 echo "<p class=\"error\">" . $error . "</p>"; 72 } 61 73 ?> 62 74 <script type="text/javascript"> -
alternc/branches/franck-desktop/bureau/admin/ftp_edit.php
r1797 r1803 33 33 $fields = array ( 34 34 "id" => array ("request", "integer", ""), 35 "prefixe" => array ("request", "string", ""), 36 "login" => array ("request", "string", ""), 37 "pass" => array ("request", "string", ""), 38 "passconf" => array ("request", "string", ""), 39 "rep" => array ("request", "string", ""), 35 40 ); 36 41 getFields($fields); … … 48 53 <h3><?php __("Editing an FTP account"); ?></h3> 49 54 <?php 50 if ($error) { 51 echo "<p class=\"error\">$error</p>"; 52 include_once("foot.php"); 53 exit(); 54 } 55 56 if ($error) 57 { 58 echo "<p class=\"error\">" . $error . "</p>"; 59 } 60 55 61 ?> 56 62 <form method="post" action="ftp_doedit.php" name="main"> 57 63 <table border="1" cellspacing="0" cellpadding="4"> 58 <tr><th><input type="hidden" name="id" value="<?php echo $id ?>" /> 59 <label for="login"><?php __("Username"); ?></label></th><td> 60 <select class="inl" name="prefixe"><?php $ftp->select_prefix_list($r["prefixe"]); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="<?php echo $r["login"]; ?>" size="20" maxlength="64" /> 61 </td></tr> 62 <tr><th><label for="pass"><?php __("Password"); ?></label></th><td><input type="password" class="int" name="pass" id="pass" size="20" maxlength="64" value="********"/></td></tr> 63 <tr><th><label for="passconf"><?php __("Confirm password"); ?></label></th><td><input type="password" class="int" name="passconf" id="passconf" size="20" maxlength="64" value="********"/></td></tr> 64 <tr><th><label for="rep"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="rep" id="rep" value="<?php echo $r["dir"]; ?>" size="20" maxlength="64" /> 65 66 <script type="text/javascript"> 67 <!-- 68 document.write(" <input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.rep');\" value=\" ... \" class=\"inb\">"); 69 // --> 70 </script> 71 </td></tr> 72 73 <tr><td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Change this FTP account"); ?>" /></td></tr> 64 <tr> 65 <th><input type="hidden" name="id" value="<?php echo $id ?>" /><label for="login"><?php __("Username"); ?></label></th> 66 <td> 67 <select class="inl" name="prefixe"><?php $ftp->select_prefix_list($r["prefixe"]); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="<?php echo $r["login"]; ?>" size="20" maxlength="64" /> 68 </td> 69 </tr> 70 <tr> 71 <th><label for="pass"><?php __("Password"); ?></label></th> 72 <td><input type="password" class="int" name="pass" id="pass" size="20" maxlength="64" value="********"/></td> 73 </tr> 74 <tr> 75 <th><label for="passconf"><?php __("Confirm password"); ?></label></th> 76 <td><input type="password" class="int" name="passconf" id="passconf" size="20" maxlength="64" value="********"/></td> 77 </tr> 78 <tr> 79 <th><label for="rep"><?php __("Folder"); ?></label></th> 80 <td> 81 <input type="text" class="int" name="rep" id="rep" value="<?php echo $r["dir"]; ?>" size="20" maxlength="64" /> 82 <script type="text/javascript"> 83 <!-- 84 document.write(" <input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.rep');\" value=\" ... \" class=\"inb\">"); 85 // --> 86 </script> 87 </td> 88 </tr> 89 <tr> 90 <td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Change this FTP account"); ?>" /></td> 91 </tr> 74 92 </table> 75 93 </form> -
alternc/branches/franck-desktop/bureau/admin/ftp_list.php
r1797 r1803 66 66 <tr><th colspan="2"> </th><th><?php __("Username"); ?></th><th><?php __("Folder"); ?></th></tr> 67 67 <?php 68 68 69 reset($r); 69 $col=1; 70 while (list($key,$val)=each($r)) 71 { 72 $col=3-$col; 70 $col = 1; 71 $i = 0; 72 while (list($key, $val) = each($r)) 73 { 74 $col = 3 - $col; 75 $altImg = ($i % 2 == 0 ? "" : "alt"); 76 $i++; 73 77 ?> 74 78 <tr class="lst<?php echo $col; ?>"> 75 79 <td align="center"><input type="checkbox" class="inc" id="del_<?php echo $val["id"]; ?>" name="del_<?php echo $val["id"]; ?>" value="<?php echo $val["id"]; ?>" /></td> 76 <td class="center"><a href="ftp_edit.php?id=<?php echo $val["id"] ?>"><img src="images/edit .png" alt="<?php __("Edit"); ?>" /></a></td>80 <td class="center"><a href="ftp_edit.php?id=<?php echo $val["id"] ?>"><img src="images/edit<?php echo $altImg; ?>.png" alt="<?php __("Edit"); ?>" /></a></td> 77 81 <td><label for="del_<?php echo $val["id"]; ?>"><?php echo $val["login"] ?></label></td> 78 82 <td><code>/<?php echo $val["dir"] ?></code></td> … … 89 93 <a href="ftp_add.php"><?php __("Create a new ftp account"); ?></a> 90 94 </p> 91 <?php } 95 <?php 96 97 } 92 98 93 99 $mem->show_help("ftp_list"); 100 94 101 ?> 95 102 <script type="text/javascript"> -
alternc/branches/franck-desktop/bureau/admin/head.php
r1797 r1803 33 33 <head> 34 34 <title>Bureau</title> 35 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 35 36 <link rel="stylesheet" href="styles/style.css" type="text/css" /> 36 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 37 <link rel="stylesheet" href="styles/boxes.css" type="text/css" /> 38 <script type="text/javascript" src="/admin/js/jquery.js"></script> 37 39 <script type="text/javascript" src="/admin/js/alternc.js"></script> 38 40 <script type="text/javascript" src="/admin/js/wz_dragdrop.js"></script> … … 40 42 <body> 41 43 <div id="global"> 44 <?php startBox("mainBox"); ?> 42 45 <table> 43 46 <tr> -
alternc/branches/franck-desktop/bureau/admin/hta_add.php
r1797 r1803 31 31 include_once("head.php"); 32 32 33 $fields = array ( 34 "value" => array ("request", "string", ""), 35 ); 36 getFields($fields); 37 33 38 ?> 34 39 <h3><?php __("Protect a folder"); ?></h3> -
alternc/branches/franck-desktop/bureau/admin/hta_adduser.php
r1797 r1803 39 39 <h3><?php printf(_("Adding a username in %s"),$dir); ?></h3> 40 40 <?php 41 if ($error) { 42 echo "<p class=\"error\">$error</p>"; 43 } 41 42 if ($error) 43 { 44 echo "<p class=\"error\">" . $error . "</p>"; 45 } 46 44 47 ?> 45 46 48 <form method="post" action="hta_doadduser.php"> 47 49 <table border="1" cellspacing="0" cellpadding="4"> -
alternc/branches/franck-desktop/bureau/admin/hta_del.php
r145 r1803 30 30 require_once("../class/config.php"); 31 31 32 $error=""; 33 // On parcours les POST_VARS et on repere les del_. 34 reset($_POST); 35 while (list($key,$val)=each($_POST)) { 36 if (substr($key,0,4)=="del_") { 37 // Effacement du dossier $val 38 $r=$hta->DelDir($val); 39 if (!$r) { 40 $error.=$err->errstr()."<br />"; 41 } else { 42 $error.=sprintf(_("The protected folder %s has been successfully unprotected"),$val)."<br />"; 43 } 32 $fields = array ( 33 "d" => array ("request", "array", array()), 34 ); 35 getFields($fields); 36 37 if (!is_array($d)) 38 { 39 $tmp = array($d); 40 $d = $tmp; 41 } 42 reset($d); 43 44 while (list($key, $val) = each($d)) 45 { 46 $r = $hta->DelDir($val); 47 if (!$r) 48 { 49 $error .= $err->errstr() . "<br />"; 50 } 51 else 52 { 53 $error .= sprintf(_("The protected folder %s has been successfully unprotected"), $val) . "<br />"; 44 54 } 45 55 } 46 include("hta_list.php"); 56 57 include ("hta_list.php"); 47 58 exit(); 59 48 60 ?> -
alternc/branches/franck-desktop/bureau/admin/hta_doadd.php
r1 r1803 30 30 require_once("../class/config.php"); 31 31 32 $fields = array ( 33 "dir" => array ("request", "string", ""), 34 ); 35 getFields($fields); 32 36 33 if(!$hta->CreateDir($dir)) { 34 $error=$err->errstr(); 35 include("hta_add.php"); 37 if(!$hta->CreateDir($dir)) 38 { 39 $error = $err->errstr(); 40 include ("hta_add.php"); 36 41 exit(); 37 42 } 38 43 39 include ("hta_list.php");44 include ("hta_list.php"); 40 45 exit(); 41 46 -
alternc/branches/franck-desktop/bureau/admin/hta_doadduser.php
r798 r1803 30 30 require_once("../class/config.php"); 31 31 32 if ($password != $passwordconf) { 32 $fields = array ( 33 "password" => array ("request", "string", ""), 34 "passwordconf" => array ("request", "string", ""), 35 "user" => array ("request", "string", ""), 36 "dir" => array ("request", "string", ""), 37 ); 38 getFields($fields); 39 40 if ($password != $passwordconf) 41 { 33 42 $error = _("Passwords do not match"); 34 include("hta_adduser.php");35 exit();36 }37 38 if (!$password) {39 $error=_("Please enter a password");40 43 include ("hta_adduser.php"); 41 44 exit(); 42 45 } 43 46 44 if (!$hta->add_user($user, $password,$dir)) { 45 $error=$err->errstr(); 47 if (!$password) 48 { 49 $error = _("Please enter a password"); 46 50 include ("hta_adduser.php"); 47 } else { 51 exit(); 52 } 53 54 if (!$hta->add_user($user, $password, $dir)) 55 { 56 $error = $err->errstr(); 57 include ("hta_adduser.php"); 58 } 59 else 60 { 48 61 include ("hta_edit.php"); 49 62 } 63 50 64 ?> -
alternc/branches/franck-desktop/bureau/admin/hta_doedituser.php
r1797 r1803 38 38 ); 39 39 40 if ($newpass != $newpassconf) { 40 if ($newpass != $newpassconf) 41 { 41 42 $error = _("Passwords do not match"); 42 include ("hta_edituser.php");43 include ("hta_edituser.php"); 43 44 exit(); 44 45 } 45 46 46 if (!$hta->change_pass($user,$newpass,$dir)) { 47 $error=$err->errstr(); 47 if (!$hta->change_pass($user, $newpass, $dir)) 48 { 49 $error = $err->errstr(); 48 50 } 49 51 50 52 ?> 51 <h3><?php printf(_("Change the user %s in the protected folder %s"), $user,$dir); ?></h3>53 <h3><?php printf(_("Change the user %s in the protected folder %s"), $user, $dir); ?></h3> 52 54 <?php 53 if ($error) { 54 echo "<p class=\"error\">$error</p>"; 55 } 56 else { 57 echo "<p>".sprintf(_("The password of the user %s has been successfully changed"),$user)."</p>"; 58 } 59 echo "<p><a href=\"hta_edit?dir=$dir\">"._("Click here to continue")."</a></p>"; 55 56 if ($error) 57 { 58 echo "<p class=\"error\">" . $error . "</p>"; 59 } 60 else 61 { 62 echo "<p>" . sprintf(_("The password of the user %s has been successfully changed"), $user) . "</p>"; 63 } 64 65 echo "<p><a href=\"hta_edit?dir=" . urlencode($dir) . "\">" . _("Click here to continue") . "</a></p>"; 66 67 include_once("foot.php"); 68 60 69 ?> 61 <?php include_once("foot.php"); ?> -
alternc/branches/franck-desktop/bureau/admin/hta_edit.php
r1797 r1803 36 36 getFields($fields); 37 37 38 if (!$dir) { 39 $error=_("No folder selected!"); 40 } else { 41 $r=$hta->get_hta_detail($dir); 42 if (!$r) { 43 $error=$err->errstr(); 38 if (!$dir) 39 { 40 $error = _("No folder selected!"); 41 } 42 else 43 { 44 $r = $hta->get_hta_detail($dir); 45 if (!$r) 46 { 47 $error = $err->errstr(); 44 48 } 45 49 } … … 48 52 <h3><?php printf(_("List of authorized user in folder %s"),$dir); ?></h3> 49 53 <?php 50 if (!count($r)) { 51 echo "<p class=\"error\">".sprintf(_("No authorized user in %s"),$dir)."</p>"; 52 echo "<a href=\"hta_adduser.php?dir=$dir\">"._("Add a username")."</a><br />"; 53 echo "<br /><small><a href=\"bro_main.php?R=$dir\">"._("File browser")."</a><br /></small>"; 54 include_once("foot.php"); 55 exit(); 56 } 54 55 if (!count($r)) 56 { 57 echo "<p class=\"error\">" . sprintf(_("No authorized user in %s"), $dir) . "</p>"; 58 echo "<a href=\"hta_adduser.php?dir=" . urlencode($dir) . "\">" . _("Add a username") . "</a><br />"; 59 echo "<br /><small><a href=\"bro_main.php?R=" . urlencode($dir) . "\">" . _("File browser") . "</a><br /></small>"; 60 include_once("foot.php"); 61 exit(); 62 } 57 63 reset($r); 58 64 … … 65 71 </tr> 66 72 <?php 73 67 74 $col=1; 75 for ($i = 0; $i < count($r); $i++) 76 { 77 $col = 3 - $col; 78 $altImg = ($i % 2 == 0 ? "" : "alt"); 68 79 69 for($i=0;$i<count($r);$i++){70 $col=3-$col;71 80 ?> 72 81 <tr class="lst<?php echo $col; ?>"> 73 82 <td align="center"><input type="checkbox" class="inc" name="d[]"" value="<?php echo $r[$i]?>" /></td> 74 <td><a href="hta_edituser.php?user=<?php echo $r[$i]?>&dir=<?php echo $dir?>"><img src="images/edit .png" alt="<?php __("Edit"); ?>" /></a></td>83 <td><a href="hta_edituser.php?user=<?php echo $r[$i]?>&dir=<?php echo $dir?>"><img src="images/edit<?php echo $altImg; ?>.png" alt="<?php __("Edit"); ?>" /></a></td> 75 84 <td><?php echo $r[$i]; ?></td> 76 85 </tr> 77 86 <?php 87 78 88 } 89 79 90 ?> 80 <tr><td colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("Delete the checked users"); ?>" /></td></tr> 91 <tr> 92 <td colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("Delete the checked users"); ?>" /></td> 93 </tr> 81 94 </table> 82 95 </form> 83 96 84 97 <p> 85 <a href="hta_adduser.php?dir=<?php echo $dir?>"><?php __("Add a username"); ?></a>98 <a href="hta_adduser.php?dir=<?php echo urlencode($dir) ?>"><?php __("Add a username"); ?></a> 86 99 </p> 87 100 <p> 88 <small><a href="bro_main.php?R=<?php echo $dir?>"><?php __("File browser"); ?></a></small>101 <small><a href="bro_main.php?R=<?php echo urlencode($dir) ?>"><?php __("File browser"); ?></a></small> 89 102 </p> 90 103 <?php include_once("foot.php"); ?> -
alternc/branches/franck-desktop/bureau/admin/hta_edituser.php
r1797 r1803 38 38 39 39 ?> 40 <h3><?php printf(_("Editing user %s in the protected folder %s"), $user,$dir); ?></h3>40 <h3><?php printf(_("Editing user %s in the protected folder %s"), $user, $dir); ?></h3> 41 41 <?php 42 if ($error) { 43 echo "<p class=\"error\">$error</p>"; 44 } 42 43 if ($error) 44 { 45 echo "<p class=\"error\">" . $error . "</p>"; 46 } 47 45 48 ?> 46 49 <form method="post" action="hta_doedituser.php"> 47 50 <table border="1" cellspacing="0" cellpadding="4"> 48 <tr><td><input type="hidden" name="dir" value="<?php echo $dir ?>"> 49 <input type="hidden" name="user" value="<?php echo $user ?>"> 50 <?php __("Folder"); ?></td><td><code><?php echo $dir; ?></code></td></tr> 51 <tr><td><?php __("User"); ?></td><td><code><?php echo $user; ?></code></td></tr> 52 <tr><td><label for="newpass"><?php __("New password"); ?></label></td><td><input type="password" class="int" name="newpass" id="newpass" value="" size="20" maxlength="64" /></td></tr> 53 <tr><td><label for="newpassconf"><?php __("Confirm password"); ?></label></td><td><input type="password" class="int" name="newpassconf" id="newpassconf" value="" size="20" maxlength="64" /></td></tr> 54 <tr><td colspan="2"><input type="submit" class="inb" value="<?php __("Change the password"); ?>" /></td></tr> 51 <tr> 52 <td> 53 <input type="hidden" name="dir" value="<?php echo $dir ?>"> 54 <input type="hidden" name="user" value="<?php echo $user ?>"> 55 <?php __("Folder"); ?> 56 </td> 57 <td><code><?php echo $dir; ?></code></td> 58 </tr> 59 <tr> 60 <td><?php __("User"); ?></td> 61 <td><code><?php echo $user; ?></code></td> 62 </tr> 63 <tr> 64 <td><label for="newpass"><?php __("New password"); ?></label></td> 65 <td><input type="password" class="int" name="newpass" id="newpass" value="" size="20" maxlength="64" /></td> 66 </tr> 67 <tr> 68 <td><label for="newpassconf"><?php __("Confirm password"); ?></label></td> 69 <td><input type="password" class="int" name="newpassconf" id="newpassconf" value="" size="20" maxlength="64" /></td> 70 </tr> 71 <tr> 72 <td colspan="2"><input type="submit" class="inb" value="<?php __("Change the password"); ?>" /></td> 73 </tr> 55 74 </table> 56 75 </form> 57 <?php include_once("foot.php"); ?> 76 <?php 77 78 include_once("foot.php"); 79 80 ?> -
alternc/branches/franck-desktop/bureau/admin/hta_list.php
r1797 r1803 31 31 include_once("head.php"); 32 32 33 if (!$r=$hta->ListDir()) { 34 $error=$err->errstr(); 33 if (!$r = $hta->ListDir()) 34 { 35 $error = $err->errstr(); 35 36 } 36 else { 37 else 38 { 37 39 reset($r); 38 40 } … … 41 43 <h3><?php __("Protected folders list"); ?></h3> 42 44 <?php 43 if ($error) {44 echo "<p class=\"error\">$error</p>";45 }46 45 47 if (!is_array($r)) { 48 echo "<p><a href=\"hta_add.php\">"._("Protect a folder")."</a><br />"; 49 $mem->show_help("hta_list"); 50 echo "</p>"; 51 include_once("foot.php"); 52 exit(); 53 } 46 if ($error) 47 { 48 echo "<p class=\"error\">" . $error . "</p>"; 49 } 50 51 if (!is_array($r)) 52 { 53 echo "<p><a href=\"hta_add.php\">" . _("Protect a folder") . "</a><br />"; 54 $mem->show_help("hta_list"); 55 echo "</p>"; 56 include_once("foot.php"); 57 exit(); 58 } 54 59 55 60 ?> 61 <p> 62 <?php 56 63 57 <p> 58 <?php __("help_hta_list"); 64 __("help_hta_list"); 59 65 $mem->show_help("hta_list2"); 66 60 67 ?> 61 68 </p> … … 63 70 <form method="post" action="hta_del.php"> 64 71 <table cellspacing="0" cellpadding="4"> 65 <tr><th colspan="2"> </th><th><?php __("Folder"); ?></th></tr> 72 <tr> 73 <th colspan="2"> </th> 74 <th><?php __("Folder"); ?></th> 75 </tr> 66 76 <?php 67 $col=1;68 77 78 $col = 1; 69 79 70 for($i=0;$i<count($r);$i++){ 71 $col=3-$col; 80 for ($i = 0; $i < count($r); $i++) 81 { 82 $col = 3 - $col; 83 $altImg = ($i % 2 == 0 ? "" : "alt"); 84 72 85 ?> 73 86 <tr class="lst<?php echo $col; ?>"> 74 87 <td align="center"><input type="checkbox" class="inc" name="del_<?php echo $r[$i] ?>" value="<?php echo $r[$i] ?>" /></td> 75 <td><a href="hta_edit.php?dir=<?php echo $r[$i]?>"><img src="images/edit .png" alt="<?php __("Edit"); ?>" /></a></td>88 <td><a href="hta_edit.php?dir=<?php echo $r[$i]?>"><img src="images/edit<?php echo $altImg; ?>.png" alt="<?php __("Edit"); ?>" /></a></td> 76 89 <td><code><?php echo "$r[$i]"?></code></td> 77 90 </tr> 78 <?php 79 } 91 <?php 92 93 } 94 80 95 ?> 81 <tr><td colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("Unprotect the checked folders"); ?>" /></td></tr> 96 <tr> 97 <td colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("Unprotect the checked folders"); ?>" /></td> 98 </tr> 82 99 </table> 83 100 </form> -
alternc/branches/franck-desktop/bureau/admin/index.php
r1797 r1803 37 37 38 38 $H = getenv("HTTP_HOST"); 39 39 40 ?> 40 41 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -
alternc/branches/franck-desktop/bureau/admin/js/alternc.js
r1797 r1803 10 10 function deploy(menu) 11 11 { 12 for (var i = 0; i < menulist.length; i++) 12 // for (var i = 0; i < menulist.length; i++) 13 // { 14 // if (checkObj(menulist[i])) 15 // { 16 // var div_content = new getObj(menulist[i]); 17 // var div_img = new getObj("img-" + menulist[i]); 18 // 19 // div_content.style.display = "none"; 20 // div_img.obj.src = "/admin/images/plus.png"; 21 // } 22 // } 23 24 var divImg = new getObj("img-" + menu); 25 26 if ($("#" + menu).css("display") == "block") 13 27 { 14 if (checkObj(menulist[i])) 15 { 16 var div_content = new getObj(menulist[i]); 17 var div_img = new getObj("img-" + menulist[i]); 28 $("#" + menu).animate({ 29 height: 'toggle', opacity: 'hide' 30 }, "fast"); 31 divImg.obj.src = "/admin/images/plus.png"; 32 } 33 else 34 { 35 $("#" + menu).animate({ 36 height: 'toggle', opacity: 'show' 37 }, "fast"); 38 divImg.obj.src = "/admin/images/minus.png"; 39 } 18 40 19 div_content.style.display = "none"; 20 div_img.obj.src = "/admin/images/plus.png"; 21 } 22 } 41 return; 23 42 24 43 if (menu == 0) … … 26 45 27 46 var div_content = new getObj(menu); 28 var div _img = new getObj("img-" + menu);47 var divImg = new getObj("img-" + menu); 29 48 30 49 if (menu_opened == menu) 31 50 { 32 div_content.style.display = "none"; 51 // div_content.style.display = "none"; 52 $("#" + menu).animate({ 53 height: 'toggle', opacity: 'hide' 54 }, "fast"); 33 55 div_img.obj.src = "/admin/images/plus.png"; 34 56 menu_opened = ""; … … 36 58 else 37 59 { 38 div_content.style.display = "block"; 39 div_img.obj.src = "/admin/images/minus.png"; 60 // div_content.style.display = "block"; 61 $("#" + menu).animate({ 62 height: 'toggle', opacity: 'show' 63 }, "fast"); 64 div_img.obj.src = "/admin/images/minus.png"; 40 65 menu_opened = menu; 41 66 } … … 106 131 } 107 132 } 108 -
alternc/branches/franck-desktop/bureau/admin/login.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 if (!$mem->checkid()) 32 $fields = array ( 33 "username" => array ("request", "string", ""), 34 "password" => array ("request", "string", ""), 35 "restrictip" => array ("request", "integer", 0), 36 ); 37 getFields($fields); 38 39 if (!$mem->checkid($username, $password, $restrictip)) 33 40 { 34 41 $error = $err->errstr(); -
alternc/branches/franck-desktop/bureau/admin/mail_add.php
r1797 r1803 35 35 "domain" => array ("request", "string", ""), 36 36 "many" => array ("request", "integer", 0), 37 38 "email" => array ("request", "string", ""), 39 "pop" => array ("request", "integer", 0), 40 "pass" => array ("request", "string", ""), 41 "passconf" => array ("request", "string", ""), 42 "alias" => array ("request", "string", ""), 37 43 ); 38 44 getFields($fields); 39 45 40 46 ?> 41 <h3><?php printf(_("Add a mail to the domain %s"),"http://$domain"); ?> :</h3>47 <h3><?php printf(_("Add a mail to the domain %s"),"http://$domain"); ?></h3> 42 48 <?php 43 49 if ($error) { … … 48 54 <form action="mail_doadd.php" method="post"> 49 55 <table border="1" cellspacing="0" cellpadding="4"> 50 <tr><td><input type="hidden" name="domain" value="<?php echo $domain ?>" /> 51 <label for="email"><?php __("Email address"); ?></label></td><td><input class="int" type="text" name="email" id="email" value="<?php echo $email ?>" size="20" maxlength="32" />@<?php echo $domain ?></td></tr> 52 <tr><td><label for="ispop"><?php __("Is it a POP account?"); ?></label></td><td><input id="ispop" class="inc" type="checkbox" name="pop" value="1" <?php if ($pop=="1") echo "checked=\"checked\""; ?> /></td></tr> 53 <tr><td><label for="pass"><?php __("POP password"); ?></label></td><td><input class="int" type="password" name="pass" id="pass" value="<?php echo $pass; ?>" size="20" maxlength="32" /></td></tr> 54 <tr><td><label for="passconf"><?php __("Confirm password"); ?></label></td><td><input class="int" type="password" name="passconf" id="passconf" value="<?php echo $pass; ?>" size="20" maxlength="32" /></td></tr> 55 <tr><td><label for="alias"><?php __("Other recipients"); ?></label></td><td>(<?php __("One email per line"); ?>)<br /><textarea class="int" cols="32" rows="5" name="alias" id="alias"><?php echo $alias; ?></textarea></td></tr> 56 <tr><td colspan="2"><input type="hidden" name="many" value="<?php echo intval($many); ?>" /><input type="submit" class="inb" name="submit" value="<?php __("Create this mailbox"); ?>" /></td></tr> 56 <tr> 57 <td><input type="hidden" name="domain" value="<?php echo $domain ?>" /> 58 <label for="email"><?php __("Email address"); ?></label></td> 59 <td><input class="int" type="text" name="email" id="email" value="<?php echo $email ?>" size="20" maxlength="32" />@<?php echo $domain ?></td> 60 </tr> 61 <tr> 62 <td><label for="ispop"><?php __("Is it a POP account?"); ?></label></td> 63 <td><input id="ispop" class="inc" type="checkbox" name="pop" value="1" <?php if ($pop=="1") echo "checked=\"checked\""; ?> /></td> 64 </tr> 65 <tr> 66 <td><label for="pass"><?php __("POP password"); ?></label></td> 67 <td><input class="int" type="password" name="pass" id="pass" value="<?php echo $pass; ?>" size="20" maxlength="32" /></td> 68 </tr> 69 <tr> 70 <td><label for="passconf"><?php __("Confirm password"); ?></label></td> 71 <td><input class="int" type="password" name="passconf" id="passconf" value="<?php echo $pass; ?>" size="20" maxlength="32" /></td> 72 </tr> 73 <tr> 74 <td><label for="alias"><?php __("Other recipients"); ?></label></td> 75 <td>(<?php __("One email per line"); ?>)<br /><textarea class="int" cols="32" rows="5" name="alias" id="alias"><?php echo $alias; ?></textarea></td> 76 </tr> 77 <tr> 78 <td colspan="2"><input type="hidden" name="many" value="<?php echo intval($many); ?>" /><input type="submit" class="inb" name="submit" value="<?php __("Create this mailbox"); ?>" /></td> 79 </tr> 57 80 </table> 58 81 </form> -
alternc/branches/franck-desktop/bureau/admin/mail_del.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 include_once ("head.php"); 33 34 $fields = array ( 35 "d" => array ("request", "array", array()), 36 ); 37 getFields($fields); 38 32 39 if (!is_array($d)) 33 40 { 34 $d[] = $d; 41 $tmp = array($d); 42 $d = $tmp; 35 43 } 36 44 reset($d); 37 38 include_once ("head.php");39 45 40 46 ?> … … 57 63 <p><input type="submit" class="inb" name="submit" value="<?php __("Delete the selected mailboxes"); ?>" /> - <input type="button" name="cancel" id="cancel" onclick="window.history.go(-1);" class="inb" value="<?php __("Don't delete accounts and go back to the mail list"); ?>"/> 58 64 </p> 65 </form> 59 66 60 67 <script type="text/javascript"> -
alternc/branches/franck-desktop/bureau/admin/mail_doadd.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 if ($pass != $passconf) { 32 $fields = array ( 33 "domain" => array ("request", "string", ""), 34 "many" => array ("request", "integer", 0), 35 36 "email" => array ("request", "string", ""), 37 "pop" => array ("request", "integer", 0), 38 "pass" => array ("request", "string", ""), 39 "passconf" => array ("request", "string", ""), 40 "alias" => array ("request", "string", ""), 41 ); 42 getFields($fields); 43 44 if ($pass != $passconf) 45 { 33 46 $error = _("Passwords do not match"); 34 47 include("mail_add.php"); … … 36 49 } 37 50 38 if (!$mail->add_mail($domain,$email,$pop,$pass,$alias)) { 39 $error=$err->errstr(); 40 $addok=0; 51 if (!$mail->add_mail($domain, $email, $pop, $pass, $alias)) 52 { 53 $error = $err->errstr(); 54 $addok = 0; 41 55 include ("mail_add.php"); 42 } else { 43 $addok=1; 44 $error=sprintf (_("The mailbox <b>%s</b> has been successfully created"),"$email@$domain"); 45 if ($many) { 46 unset($email,$pass,$alias); 47 include("mail_add.php"); 48 } else { 49 include("mail_list.php"); 56 } 57 else 58 { 59 $addok = 1; 60 $error = sprintf (_("The mailbox <b>%s</b> has been successfully created"),"$email@$domain"); 61 if ($many) 62 { 63 unset($_REQUEST["email"], $_REQUEST["pop"], $_REQUEST["pass"], $_REQUEST["passconf"], $_REQUEST["alias"]); 64 include ("mail_add.php"); 65 } 66 else 67 { 68 include ("mail_list.php"); 50 69 } 51 70 exit(); -
alternc/branches/franck-desktop/bureau/admin/mail_dodel.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 $fields = array ( 33 "d" => array ("request", "array", array()), 34 ); 35 getFields($fields); 36 32 37 if (!is_array($d)) 33 38 { 34 $d[] = $d; 39 $tmp = array($d); 40 $d = $tmp; 35 41 } 42 reset($d); 36 43 37 44 include_once("head.php"); … … 42 49 <?php 43 50 44 reset($d);45 51 while (list($key, $val) = each($d)) 46 52 { 47 53 if (!$mail->del_mail($val)) 48 54 { 49 $error .= sprintf(_("The mailbox <b>%s</b> does not exist!") . "<br />", $val);55 $error = sprintf(_("The mailbox <b>%s</b> does not exist!") . "<br />", $val); 50 56 echo $error; 51 57 } 52 58 else 53 59 { 54 $error .= sprintf(_("The mailbox <b>%s</b> has been deleted!") . "<br />", $val);60 $error = sprintf(_("The mailbox <b>%s</b> has been deleted!") . "<br />", $val); 55 61 echo $error; 56 62 } -
alternc/branches/franck-desktop/bureau/admin/mail_doedit.php
r798 r1803 30 30 require_once("../class/config.php"); 31 31 32 $error_edit ="";32 $error_edit = ""; 33 33 34 if ($pass != $passconf) { 34 $fields = array ( 35 "email" => array ("request", "string", ""), 36 "domain" => array ("request", "string", ""), 37 "pop" => array ("request", "integer", 0), 38 "pass" => array ("request", "string", ""), 39 "passconf" => array ("request", "string", ""), 40 "alias" => array ("request", "string", ""), 41 ); 42 getFields($fields); 43 44 if ($pass != $passconf) 45 { 35 46 $error = _("Passwords do not match"); 36 47 include ("mail_edit.php"); … … 38 49 } 39 50 40 if (!$mail->put_mail_details($email,$pop,$pass,$alias)) { 41 $error_edit=$err->errstr(); 42 $addok=0; 43 include ("mail_edit.php"); 44 45 } else { 46 $ok=sprintf(_("The mailbox <b>%s</b> has been successfully changed"),$email)."<br />"; 47 $addok=1; 48 $t=explode("@",$email); 49 $email=$t[0]; 50 $error=$ok; 51 include("mail_list.php"); 52 exit(); 51 if (!$mail->put_mail_details($email, $pop, $pass, $alias)) 52 { 53 $error_edit = $err->errstr(); 54 $addok = 0; 55 include ("mail_edit.php"); 56 } 57 else 58 { 59 $ok = sprintf(_("The mailbox <b>%s</b> has been successfully changed"), $email) . "<br />"; 60 $addok = 1; 61 $t = explode("@", $email); 62 $email = $t[0]; 63 $error = $ok; 64 include ("mail_list.php"); 65 exit(); 53 66 } 54 67 ?> -
alternc/branches/franck-desktop/bureau/admin/mail_edit.php
r1797 r1803 37 37 getFields($fields); 38 38 39 if (!$res =$mail->get_mail_details($email))39 if (!$res = $mail->get_mail_details($email)) 40 40 { 41 $error =$err->errstr();41 $error = $err->errstr(); 42 42 echo $error; 43 43 } … … 46 46 47 47 ?> 48 <h3><?php printf(_("Edit a mailbox of the domain %s"),"http://$domain"); ?> :</h3>48 <h3><?php printf(_("Edit a mailbox of the domain %s"),"http://$domain"); ?></h3> 49 49 <?php 50 if ($error_edit) {51 echo "<p class=\"error\">$error_edit</p>";52 $error_edit="";53 50 54 } else { 55 $pop=$res["pop"]; 56 $pass=$res["password"]; 57 $alias=$res["alias"]; 58 } ?> 51 if ($error) 52 echo "<p class=\"error\">" . $error . "</p>"; 59 53 54 if (isset($error_edit)) 55 { 56 echo "<p class=\"error\">" . $error_edit . "</p>"; 57 $error_edit = ""; 58 59 } 60 else 61 { 62 $pop = $res["pop"]; 63 $alias = $res["alias"]; 64 65 } 66 ?> 60 67 <form action="mail_doedit.php" method="post"> 61 68 <table border="1" cellspacing="0" cellpadding="4"> 62 <tr><th colspan="2"><input type="hidden" name="email" value="<?php echo $email; ?>" /> 63 <input type="hidden" name="domain" value="<?php echo $domain; ?>" /> 64 <?php printf(_("Edit the mailbox %s"),$email); ?></th></tr> 65 <tr><td><label for="ispop"><?php __("Is it a POP account?"); ?></label></td><td><input id="ispop" type="checkbox" class="inc" name="pop" value="1" <?php if ($pop=="1") echo "checked=\"checked\""; ?> /></td></tr> 66 <tr><td><label for="pass"><?php __("POP password"); ?></label></td><td><input type="password" class="int" name="pass" id="pass" value="<?php echo $pass; ?>" size="20" maxlength="32" /></td></tr> 67 <tr><td><label for="passconf"><?php __("Confirm password"); ?></label></td><td><input type="password" class="int" name="passconf" id="passconf" value="<?php echo $pass; ?>" size="20" maxlength="32" /></td></tr> 68 <tr><td><label for="alias"><?php __("Other recipients"); ?></label></td><td>(<?php __("One email per line"); ?>)<br /><textarea class="int" cols="32" rows="5" name="alias" id="alias"><?php echo $alias; ?></textarea></td></tr> 69 <tr><td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Change this mailbox"); ?>" /></td></tr> 69 <tr> 70 <th colspan="2"> 71 <input type="hidden" name="email" value="<?php echo $email; ?>" /> 72 <input type="hidden" name="domain" value="<?php echo $domain; ?>" /> 73 <?php printf(_("Edit the mailbox %s"), $email); ?> 74 </th> 75 </tr> 76 <tr> 77 <td><label for="ispop"><?php __("Is it a POP account?"); ?></label></td> 78 <td><input id="ispop" type="checkbox" class="inc" name="pop" value="1" <?php if ($pop == "1") echo "checked=\"checked\""; ?> /></td> 79 </tr> 80 <tr> 81 <td><label for="pass"><?php __("POP password"); ?></label></td> 82 <td><input type="password" class="int" name="pass" id="pass" value="" size="20" maxlength="32" /></td> 83 </tr> 84 <tr> 85 <td><label for="passconf"><?php __("Confirm password"); ?></label></td> 86 <td><input type="password" class="int" name="passconf" id="passconf" value="" size="20" maxlength="32" /></td> 87 </tr> 88 <tr> 89 <td><label for="alias"><?php __("Other recipients"); ?></label></td> 90 <td>(<?php __("One email per line"); ?>)<br /><textarea class="int" cols="32" rows="5" name="alias" id="alias"><?php echo $alias; ?></textarea></td> 91 </tr> 92 <tr> 93 <td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Change this mailbox"); ?>" /></td> 94 </tr> 70 95 </table> 71 96 </form> … … 74 99 </small></p> 75 100 <?php 101 76 102 } 103 77 104 ?> 78 105 <script type="text/javascript"> -
alternc/branches/franck-desktop/bureau/admin/mail_list.php
r1802 r1803 38 38 getFields($fields); 39 39 40 if (!$domain)40 if (!$domain) 41 41 { 42 42 include("main.php"); … … 44 44 } 45 45 46 if (!$res=$mail->enum_doms_mails($domain,1,$letter))46 if (!$res = $mail->enum_doms_mails($domain, 1, $letter)) 47 47 { 48 $error=$err->errstr();48 $error = $err->errstr(); 49 49 50 50 ?> 51 51 <h3><?php printf(_("Mailbox list of the domain %s"), $domain); ?></h3> 52 52 <?php 53 if ($error) { 54 echo "<p class=\"error\">$error</p>"; 55 } 56 echo "<p><a href=\"mail_add.php?domain=" . $domain . "\">".sprintf(_("Add a mailbox on <b>%s</b>"), $domain)."</a><br />"; 57 echo " <a href=\"mail_add.php?many=1&domain=" . $domain . "\">".sprintf(_("Add many mailboxes on <b>%s</b>"), $domain)."</a></p>"; 53 54 if ($error) 55 echo "<p class=\"error\">" . $error . "</p>"; 56 57 echo "<p><a href=\"mail_add.php?domain=" . $domain . "\">" . sprintf(_("Add a mailbox on <b>%s</b>"), $domain) . "</a><br />"; 58 echo "<a href=\"mail_add.php?many=1&domain=" . $domain . "\">" . sprintf(_("Add many mailboxes on <b>%s</b>"), $domain) . "</a></p>"; 58 59 59 60 } … … 64 65 <h3><?php printf(_("Mailbox list of the domain %s"), $domain); ?></h3> 65 66 <?php 66 if ($error) {67 echo "<p class=\"error\">$error</p>";68 }69 67 70 echo "<p><a href=\"mail_add.php?domain=" . $domain . "\">".sprintf(_("Add a mailbox on <b>%s</b>"), $domain)."</a><br />"; 71 echo " <a href=\"mail_add.php?many=1&domain=" . $domain . "\">".sprintf(_("Add many mailboxes on <b>%s</b>"), $domain)."</a></p>";68 if ($error) 69 echo "<p class=\"error\">" . $error . "</p>"; 72 70 73 if(!$letters=$mail->enum_doms_mails_letters($domain)) 74 $error=$err->errstr(); 75 else{ 76 for($i=0;$i<count($letters);$i++){ 77 $val=$letters[$i]; 78 echo " <a href=\"mail_list.php?domain=$domain&letter=$val\">$val </a>"; 79 } 80 echo " <a href=\"mail_list.php?domain=$domain\">".sprintf(_("All"))."</a>"; 81 } 71 echo "<p><a href=\"mail_add.php?domain=" . $domain . "\">".sprintf(_("Add a mailbox on <b>%s</b>"), $domain)."</a><br />"; 72 echo " <a href=\"mail_add.php?many=1&domain=" . $domain . "\">".sprintf(_("Add many mailboxes on <b>%s</b>"), $domain)."</a></p>"; 82 73 74 if (!$letters = $mail->enum_doms_mails_letters($domain)) 75 $error = $err->errstr(); 76 else 77 { 78 for ($i = 0; $i < count($letters); $i++) 79 { 80 $val = $letters[$i]; 81 echo "<a class=\"letter" . ($letter == $val ? " letterover" : "") . "\" href=\"mail_list.php?domain=" . $domain . "&letter=" . $val . "\">" . strtoupper($val) . "</a> "; 82 } 83 echo "<a class=\"letter" . (empty($letter) ? " letterover" : "") . "\" href=\"mail_list.php?domain=" . $domain . "\">" . sprintf(_("All")) . "</a>"; 84 } 83 85 84 86 ?> … … 86 88 87 89 <table cellspacing="0" cellpadding="4"> 90 <tr> 91 <th><input type="hidden" name="domain" value="<?php echo $domain ?>" /><?php __("Delete"); ?></th> 92 <th><?php __("Email address"); ?></th> 93 <th><?php __("Action"); ?></th> 94 <th><?php __("Size"); ?></th> 95 </tr> 96 <?php 88 97 89 <tr><th><input type="hidden" name="domain" value="<?php echo $domain ?>" /> 90 <?php __("Delete"); ?></th><th><?php __("Email address"); ?></th><th><?php __("Action"); ?></th><th><?php __("Size"); ?></th></tr> 98 $totalSize = 0; 99 $col = 1; 100 for ($i = 0; $i < $res["count"]; $i++) 101 { 102 $col = 3 - $col; 103 $val = $res[$i]; 104 $altImg = ($i % 2 == 0 ? "" : "alt"); 105 $totalSize += intval($val["size"]); 106 107 echo "<tr class=\"lst" . $col . "\">"; 108 echo "<td align=\"center\"><input class=\"inc\" type=\"checkbox\" id=\"del_" . $i . "\" name=\"d[]\" value=\"" . $val["mail"] . "\" /></td>"; 109 echo "<td><label for=\"del_" . $i . "\">" . $val["mail"] . "</label></td>"; 110 echo "<td class=\"center\"><a href=\"mail_edit.php?email=" . urlencode($val["mail"]) . "&domain=" . urlencode($domain) . "\"><img src=\"images/edit" . $altImg . ".png\" alt=\"" . _("Edit") . "\" /></a> <a href=\"mail_del.php?d[]=" . urlencode($val["mail"]) . "&domain=" . urlencode($domain) . "\"><img src=\"images/delete" . $altImg . ".png\" alt=\"" . _("Delete") . "\" /></a></td>"; 111 112 if ($val["pop"]) 113 echo "<td>" . format_size($val["size"]) . "</td>"; 114 else 115 echo "<td> </td>"; 116 117 echo "</tr>"; 118 } 119 120 ?> 121 <tr class="lst<?php echo (3 - $col); ?>"> 122 <td colspan="3" style="text-align: right; font-weight: bold;">Total</td> 123 <td><?php echo format_size($totalSize); ?></td> 124 </tr> 125 <tr> 126 <td colspan="4"><input type="submit" class="inb" name="submit" value="<?php __("Delete the selected mailboxes"); ?>" /></td> 127 </tr> 128 </table> 129 </form> 91 130 <?php 92 $col=1;93 for($i=0;$i<$res["count"];$i++) {94 $col=3-$col;95 $val=$res[$i];96 echo "<tr class=\"lst$col\">";97 echo "<td align=\"center\"><input class=\"inc\" type=\"checkbox\" id=\"del_$i\" name=\"d[]\" value=\"".$val["mail"]."\" /></td>98 <td><label for=\"del_$i\">".$val["mail"]."</label></td>99 <td class=\"center\"><a href=\"mail_edit.php?email=".urlencode($val["mail"])."&domain=".urlencode($domain)."\"><img src=\"images/edit.png\" alt=\""._("Edit")."\" /></a></td>";100 if ($val["pop"]) {101 echo "<td>".format_size($val["size"])."</td>";102 } else {103 echo "<td> </td>";104 }105 echo "</tr>";106 131 107 132 } 108 ?>109 <tr><td colspan="5"><input type="submit" class="inb" name="submit" value="<?php __("Delete the selected mailboxes"); ?>" /></td></tr>110 </table>111 </form>112 133 113 <?php114 }115 134 ?> 116 135 <script type="text/javascript"> -
alternc/branches/franck-desktop/bureau/admin/main.php
r1797 r1803 33 33 34 34 include_once("menu.php"); 35 36 $mode = 0; 35 37 36 38 // Show last login information : -
alternc/branches/franck-desktop/bureau/admin/mem_admin.php
r1797 r1803 31 31 32 32 $fields = array ( 33 "admlist" => array ("request", " string", ""),33 "admlist" => array ("request", "integer", 0), 34 34 ); 35 35 getFields($fields); 36 36 37 if (!$mem->adminpref($admlist)) { 38 $error=$err->errstr(); 39 } else { 40 $error=_("Your administrator preferences has been successfully changed."); 37 if (!$mem->adminpref($admlist)) 38 { 39 $error = $err->errstr(); 40 } 41 else 42 { 43 $error = _("Your administrator preferences has been successfully changed."); 41 44 } 42 45 … … 46 49 <h3><?php __("Admin preferences"); ?></h3> 47 50 <?php 48 if ($error) { 49 echo "<p class=\"error\">$error</p>"; 50 } 51 52 if ($error) 53 { 54 echo "<p class=\"error\">" . $error . "</p>"; 55 } 56 57 include_once("foot.php"); 58 51 59 ?> 52 <script type="text/javascript">53 deploy("menu-adm");54 </script>55 <?php include_once("foot.php"); ?> -
alternc/branches/franck-desktop/bureau/admin/mem_logout.php
r1797 r1803 42 42 <body> 43 43 <h3 style="text-align: center"><?php __("Disconnected"); ?></h3> 44 45 44 <?php __("You have been logged out of your administration desktop."); ?><br /> 46 45 <a href="index.php"><?php __("Click here to log in"); ?></a> -
alternc/branches/franck-desktop/bureau/admin/mem_param.php
r1797 r1803 32 32 include_once("head.php"); 33 33 34 if ($help_setting) { 34 $fields = array ( 35 "help_setting" => array ("request", "string", ""), 36 "showhelp" => array ("request", "integer", 0), 37 38 "oldpass" => array ("request", "string", ""), 39 "newpass" => array ("request", "string", ""), 40 "newpass2" => array ("request", "string", ""), 41 42 "newmail" => array ("request", "string", ""), 43 ); 44 getFields($fields); 45 46 47 if ($help_setting) 48 { 35 49 $mem->set_help_param($showhelp); 36 $error =_("Your help setting has been updated.");50 $error = _("Your help setting has been updated."); 37 51 } 38 52 … … 40 54 <div align="center"><h3><?php __("Settings of your account"); ?></h3></div> 41 55 <?php 42 if ($error) { 43 echo "<font color=red>$error</font>"; 44 include_once("foot.php"); 45 exit(); 46 } 56 57 if ($error) 58 { 59 echo "<p class=\"error\">" . $error . "</p>"; 60 include_once ("foot.php"); 61 exit(); 62 } 63 47 64 ?> 48 65 <hr /> … … 51 68 <?php 52 69 53 if (!$mem->user["canpass"]) { 54 __("You cannot change your password"); 55 echo "</p>"; 70 if (!$mem->user["canpass"]) 71 { 72 __("You cannot change your password"); 73 echo "</p>"; 74 } 75 else 76 { 77 __("help_chg_passwd"); 56 78 57 } else { 58 59 __("help_chg_passwd"); ?> 79 ?> 60 80 </p> 61 81 <form method="post" action="mem_passwd.php"> 62 82 <table border="1" cellspacing="0" cellpadding="4"> 63 <tr><th><?php __("Old password"); ?></th><td><input type="password" class="int" name="oldpass" value="<?php echo $oldpass; ?>" size="20" maxlength="128" /></td></tr> 64 <tr><th><?php __("New password"); ?> (1)</th><td><input type="password" class="int" name="newpass" value="<?php echo $newpass; ?>" size="20" maxlength="60" /></td></tr> 65 <tr><th><?php __("New password"); ?> (2)</th><td><input type="password" class="int" name="newpass2" value="<?php echo $newpass2; ?>" size="20" maxlength="61" /></td></tr> 66 <tr><td align="center" colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("Change my password"); ?>" /></td></tr> 83 <tr> 84 <th><?php __("Old password"); ?></th> 85 <td><input type="password" class="int" name="oldpass" value="<?php echo $oldpass; ?>" size="20" maxlength="128" /></td> 86 </tr> 87 <tr> 88 <th><?php __("New password"); ?> (1)</th> 89 <td><input type="password" class="int" name="newpass" value="<?php echo $newpass; ?>" size="20" maxlength="60" /></td> 90 </tr> 91 <tr> 92 <th><?php __("New password"); ?> (2)</th> 93 <td><input type="password" class="int" name="newpass2" value="<?php echo $newpass2; ?>" size="20" maxlength="61" /></td> 94 </tr> 95 <tr> 96 <td align="center" colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("Change my password"); ?>" /></td> 97 </tr> 67 98 </table> 68 99 </form> … … 71 102 <hr /> 72 103 <form method="post" action="mem_chgmail.php"> 73 <table border="1" cellspacing="0" cellpadding="4"> 74 <tr><td colspan="2"><?php __("Change the email of the account"); ?><br /> 75 <?php __("help_chg_mail"); ?></td></tr> 76 <tr><th><?php __("Current mailbox"); ?></th><td><big><code><?php echo $mem->user["mail"]; ?></code></big></td></tr> 77 <tr><th><?php __("New mailbox"); ?></th><td><input type="text" class="int" name="newmail" value="<?php echo $newmail; ?>" size="40" maxlength="128" /></td></tr> 78 <tr><td style="text-align: center" colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("Change my mail"); ?>" /></td></tr> 79 </table> 104 <table border="1" cellspacing="0" cellpadding="4"> 105 <tr> 106 <td colspan="2"><?php __("Change the email of the account"); ?><br /><?php __("help_chg_mail"); ?></td> 107 </tr> 108 <tr> 109 <th><?php __("Current mailbox"); ?></th> 110 <td><big><code><?php echo $mem->user["mail"]; ?></code></big></td> 111 </tr> 112 <tr> 113 <th><?php __("New mailbox"); ?></th> 114 <td><input type="text" class="int" name="newmail" value="<?php echo $newmail; ?>" size="40" maxlength="128" /></td> 115 </tr> 116 <tr> 117 <td style="text-align: center" colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("Change my mail"); ?>" /></td> 118 </tr> 119 </table> 80 120 </form> 81 121 <p> </p> 82 122 <hr /> 83 123 <form method="post" action="mem_param.php"> 84 <table border="1" cellspacing="0" cellpadding="4"> 85 <tr><td colspan="2"><?php __("Online help settings"); ?><br /> 86 <?php __("help_help_settings"); ?></td></tr> 87 <tr><th><label for="showhelp"><?php __("Do you want to see the help texts and links on each page?"); ?></label></th><td><input type="checkbox" class="inc" id="showhelp" name="showhelp" value="1" <?php if ($mem->get_help_param()) echo "checked=\"checked\""; ?> /></td></tr> 88 <tr><td align="center" colspan="3"><input type="submit" class="inb" name="help_setting" value="<?php __("Change these settings"); ?>" /></td></tr> 89 </table> 124 <table border="1" cellspacing="0" cellpadding="4"> 125 <tr> 126 <td colspan="2"><?php __("Online help settings"); ?><br /><?php __("help_help_settings"); ?></td> 127 </tr> 128 <tr> 129 <th><label for="showhelp"><?php __("Do you want to see the help texts and links on each page?"); ?></label></th> 130 <td><input type="checkbox" class="inc" id="showhelp" name="showhelp" value="1" <?php if ($mem->get_help_param()) echo "checked=\"checked\""; ?> /></td> 131 </tr> 132 <tr> 133 <td align="center" colspan="3"><input type="submit" class="inb" name="help_setting" value="<?php __("Change these settings"); ?>" /></td> 134 </tr> 135 </table> 90 136 </form> 91 137 <p> </p> 92 138 <?php 93 if ($mem->user["su"]) { 139 140 if ($mem->user["su"]) 141 { 142 94 143 ?> 95 144 <hr /> … … 99 148 <form method="post" action="mem_admin.php"> 100 149 <table border="1" cellspacing="0" cellpadding="4"> 101 <tr><th><?php __("Members list view"); ?></th><td><select name="admlist" class="inl"> 102 <option value="0"<?php if ($mem->user["admlist"]==0) echo " selected=\"selected\""; ?>><?php __("Large view"); ?></option> 103 <option value="1"<?php if ($mem->user["admlist"]==1) echo " selected=\"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> 150 <tr> 151 <th><?php __("Members list view"); ?></th> 152 <td> 153 <select name="admlist" class="inl"> 154 <option value="0"<?php if ($mem->user["admlist"]==0) echo " selected=\"selected\""; ?>><?php __("Large view"); ?></option> 155 <option value="1"<?php if ($mem->user["admlist"]==1) echo " selected=\"selected\""; ?>><?php __("Short view"); ?></option> 156 </select> 157 </td> 158 </tr> 159 <tr> 160 <td align="center" colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Change my admin preferences"); ?>" /></td> 161 </tr> 106 162 </table> 107 163 </form> -
alternc/branches/franck-desktop/bureau/admin/menu.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 $currentMenu = ""; 33 $currentPage = end(explode("/", $_SERVER["PHP_SELF"])); 34 if (ereg("^(dom|mail|ftp|sql|adm)", $currentPage, $regs)) 35 $currentMenu = "menu-" . $regs[1]; 36 32 37 ?> 33 38 <h3>Menu <?php echo $mem->user["login"]; ?></h3> 34 39 35 40 <div class="menu-box"> 36 <div class="menu-title"><img src="images/home.png" alt="Accueil / Informations" /> <a href="main.php">Accueil / Informations</a></div> 41 <div class="menu-top"></div> 42 <div class="menu-title"><img src="images/home.png" alt="<?php echo _("Front page / Informations"); ?>" /> <a href="main.php"><?php echo _("Front page / Informations"); ?></a></div> 43 <div class="menu-bottom"></div> 37 44 </div> 38 45 <?php … … 50 57 ?> 51 58 <script type="text/javascript"> 52 deploy(0);59 // deploy(0); 53 60 </script> 54 61 <p class="center"><a href="http://alternc.org"><img src="alternc.png" width="120" height="82" border="0" alt="AlternC" /></a> -
alternc/branches/franck-desktop/bureau/admin/menu_adm.php
r1797 r1803 35 35 if ($mem->checkRight()) { ?> 36 36 <div class="menu-box"> 37 <div class="menu-top"></div> 37 38 <div class="menu-title" onclick="javascript:deploy('menu-adm');"> 38 39 <script type="text/javascript"> 39 40 <!-- 40 document.write('<img src="images/plus.png" alt="" style="float: right; padding: 4px; border: 0px;" id="img-menu-adm" />');41 document.write('<img src="images/plus.png" alt="" class="imgDeploy" id="img-menu-adm" />'); 41 42 //--> 42 43 </script> 43 <img src="images/admin.png" alt="Administration" /> <span style="color: red;">Administration</span></div> 44 <div class="menu-content" id ="menu-adm"> 44 <img src="images/admin.png" alt="Administration" /> <span style="color: red;">Administration</span> 45 </div> 46 <div class="menu-bottom"></div> 47 <div class="menu-content" id="menu-adm" style="display: none;"> 45 48 <ul> 46 <li><a href="adm_list.php">< span style="color: red;"><?php __("Manage the members"); ?></span></a></li>47 <li><a href=" quotas_users.php?mode=4"><span style="color: red;"><?php __("Quotas utilisateurs"); ?></span></a></li>49 <li><a href="adm_list.php"><img src="images/members.png" alt="<?php __("Manage the members"); ?>" /> <span style="color: red;"><?php __("Manage the members"); ?></span></a></li> 50 <li><a href="adm_usersquota.php?mode=4"><img src="images/quotamenu.png" alt="<?php __("Quotas utilisateurs"); ?>" /> <span style="color: red;"><?php __("Quotas utilisateurs"); ?></span></a></li> 48 51 <?php if ($cuid == 2000) { ?> 49 <li><a href="adm_panel.php">< span style="color: red;"><?php __("Admin Control Panel"); ?></span></a></li>50 <li><a href="/admin/sql/?server=2">< span style="color: red;"><?php __("General SQL Admin"); ?></span></a></li>52 <li><a href="adm_panel.php"><img src="images/configure.png" alt="<?php __("Admin Control Panel"); ?>" /> <span style="color: red;"><?php __("Admin Control Panel"); ?></span></a></li> 53 <li><a href="/admin/sql/?server=2"><img src="images/mysqlmenu.png" alt="<?php __("General SQL Admin"); ?>" /> <span style="color: red;"><?php __("General SQL Admin"); ?></span></a></li> 51 54 <?php } ?> 52 55 </ul> -
alternc/branches/franck-desktop/bureau/admin/menu_aide.php
r1797 r1803 30 30 ?> 31 31 <div class="menu-box"> 32 <div class="menu-top"></div> 32 33 <div class="menu-title"><img src="images/help.png" alt="<?php __("Online help"); ?>" /> <a href="http://doc.alternc.org/user/" target="help"><?php __("Online help"); ?></a></div> 34 <div class="menu-bottom"></div> 33 35 </div> -
alternc/branches/franck-desktop/bureau/admin/menu_aws.php
r1797 r1803 36 36 ?> 37 37 <div class="menu-box"> 38 <div class="menu-top"></div> 38 39 <div class="menu-title"><img src="images/stat.png" alt="<?php __("Web Statistics"); ?>" /> <a href="aws_list.php"><?php __("Web Statistics"); ?></a> (<?= $q["u"]; ?>/<?= $q["t"]; ?>)</div> 40 <div class="menu-bottom"></div> 39 41 </div> 40 42 <?php } ?> -
alternc/branches/franck-desktop/bureau/admin/menu_brouteur.php
r1797 r1803 32 32 ?> 33 33 <div class="menu-box"> 34 <div class="menu-top"></div> 34 35 <div class="menu-title"><img src="images/folder.png" alt="<?php __("File browser"); ?>" /> <a href="bro_main.php"><?php __("File browser"); ?></a></div> 36 <div class="menu-bottom"></div> 35 37 </div> -
alternc/branches/franck-desktop/bureau/admin/menu_dom.php
r1797 r1803 37 37 ?> 38 38 <div class="menu-box"> 39 <div class="menu-title" id="test" onclick="javascript:deploy('menu-dom');"> 39 <div class="menu-top"></div> 40 <div class="menu-title" onclick="javascript:deploy('menu-dom');"> 40 41 <script type="text/javascript"> 41 42 <!-- 42 document.write('<img src="images/plus.png" alt="" style="float: right; padding: 4px; border: 0px;" id="img-menu-dom" />');43 document.write('<img src="images/plus.png" alt="" class="imgDeploy" id="img-menu-dom" />'); 43 44 //--> 44 45 </script> 45 46 <img src="images/dom.png" alt="<?php __("Domains"); ?>" /> <?php __("Domains"); ?> (<?= $q["u"]; ?>/<?= $q["t"]; ?>)</div> 46 <div class="menu-content" id="menu-dom"> 47 <div class="menu-bottom"></div> 48 <div class="menu-content" id="menu-dom" style="display: none;"> 47 49 <ul> 48 50 <?php if ($quota->cancreate("dom")) { ?> -
alternc/branches/franck-desktop/bureau/admin/menu_ftp.php
r1797 r1803 33 33 $q = $quota->getquota("ftp"); 34 34 35 if ($q["t"] > 0) { 35 if ($q["t"] > 0) { 36 36 37 37 ?> 38 38 <div class="menu-box"> 39 <div class="menu-top"></div> 39 40 <div class="menu-title" onclick="javascript:deploy('menu-ftp');"> 40 41 <script type="text/javascript"> 41 42 <!-- 42 document.write('<img src="images/plus.png" alt="" style="float: right; padding: 4px; border: 0px;" id="img-menu-ftp" />');43 document.write('<img src="images/plus.png" alt="" class="imgDeploy" id="img-menu-ftp" />'); 43 44 //--> 44 45 </script> 45 <img src="images/ftp.png" alt="<?php __("FTP accounts"); ?>" /> <?php __("FTP accounts"); ?> <?php if (!$quota->cancreate("ftp")) { echo '<span class="full">'; } ?>(<?= $q["u"]; ?>/<?= $q["t"]; ?>)<?php if (!$quota->cancreate("ftp")) { echo '</span>'; } ?></div> 46 <div class="menu-content" id="menu-ftp"> 46 <img src="images/ftp.png" alt="<?php __("FTP accounts"); ?>" /> <?php __("FTP accounts"); ?> <?php if (!$quota->cancreate("ftp")) { echo '<span class="full">'; } ?>(<?php echo $q["u"]; ?>/<?php echo $q["t"]; ?>)<?php if (!$quota->cancreate("ftp")) { echo '</span>'; } ?></div> 47 <div class="menu-bottom"></div> 48 <div class="menu-content" id="menu-ftp" style="display: none;"> 47 49 <ul> 48 50 <?php if ($quota->cancreate("ftp")) { ?> -
alternc/branches/franck-desktop/bureau/admin/menu_mail.php
r1797 r1803 37 37 ?> 38 38 <div class="menu-box"> 39 <div class="menu-top"></div> 39 40 <div class="menu-title" onclick="javascript:deploy('menu-mail');"> 40 41 <script type="text/javascript"> 41 42 <!-- 42 document.write('<img src="images/plus.png" alt="" style="float: right; padding: 4px; border: 0px;" id="img-menu-mail" />');43 document.write('<img src="images/plus.png" alt="" class="imgDeploy" id="img-menu-mail" />'); 43 44 //--> 44 45 </script> 45 46 <img src="images/mail.png" alt="<?php __("Mailboxes"); ?>" /> <?php __("Mailboxes"); ?> (<?= $q["u"]; ?>/<?= $q["t"]; ?>)</div> 46 <div class="menu-content" id="menu-mail"> 47 <div class="menu-bottom"></div> 48 <div class="menu-content" id="menu-mail" style="display: none;"> 47 49 <ul> 48 50 <?php 49 51 50 52 /* Enumeration des domaines en mail : */ 51 53 $domain = $mail->enum_domains(); … … 53 55 while (list($key, $val) = each($domain)) { 54 56 $res = $mail->enum_doms_mails($val, 1); 55 57 56 58 ?> 57 59 <li><a href="mail_list.php?domain=<?php echo urlencode($val) ?>"><?php echo $val ?> (<?= $res["count"]; ?>)</a></li> -
alternc/branches/franck-desktop/bureau/admin/menu_mailman.php
r1797 r1803 32 32 $q = $quota->getquota("mailman"); 33 33 34 if (isset($q["t"]) && $q["t"] > 0) { 34 if (isset($q["t"]) && $q["t"] > 0) { 35 35 ?> 36 36 <div class="menu-box"> 37 <div class="menu-top"></div> 37 38 <div class="menu-title"><img src="images/mailman.png" alt="<?php __("Mailing lists"); ?>" /> <a href="mman_list.php"><?php __("Mailing lists"); ?></a> (<?= $q["u"]; ?>/<?= $q["t"]; ?>)<br /><small><?php __("(with mailman)"); ?></small></div> 39 <div class="menu-bottom"></div> 38 40 </div> 39 41 <?php } ?> -
alternc/branches/franck-desktop/bureau/admin/menu_mem.php
r1797 r1803 30 30 ?> 31 31 <div class="menu-box"> 32 <div class="menu-top"></div> 32 33 <div class="menu-title"><img src="images/config.png" alt="<?php __("Settings"); ?>" /> <a href="mem_param.php"><?php __("Settings"); ?></a></div> 34 <div class="menu-bottom"></div> 33 35 </div> 34 36 <div class="menu-box"> 37 <div class="menu-top"></div> 35 38 <div class="menu-title"><img src="images/exit.png" alt="<?php __("Logout"); ?>" /> <a href="mem_logout.php" target="_parent"><?php __("Logout"); ?></a></div> 39 <div class="menu-bottom"></div> 36 40 </div> -
alternc/branches/franck-desktop/bureau/admin/menu_quota.php
r1797 r1803 30 30 ?> 31 31 <div class="menu-box"> 32 <div class="menu-top"></div> 32 33 <div class="menu-title"><img src="images/quota.png" alt="<?php __("Show my quotas"); ?>" /> <a href="quota_show.php"><?php __("Show my quotas"); ?></a></div> 34 <div class="menu-bottom"></div> 33 35 </div> -
alternc/branches/franck-desktop/bureau/admin/menu_sql.php
r1797 r1803 32 32 ?> 33 33 <div class="menu-box"> 34 <div class="menu-top"></div> 34 35 <div class="menu-title" onclick="javascript:deploy('menu-sql');"> 35 36 <script type="text/javascript"> 36 37 <!-- 37 document.write('<img src="images/plus.png" alt="" style="float: right; padding: 4px; border: 0px;" id="img-menu-sql" />');38 document.write('<img src="images/plus.png" alt="" class="imgDeploy" id="img-menu-sql" />'); 38 39 //--> 39 40 </script> 40 41 <img src="images/mysql.png" alt="MySQL" /> MySQL (<?= $q["u"]; ?>/<?= $q["t"]; ?>)</div> 41 <div class="menu-content" id="menu-sql"> 42 <div class="menu-bottom"></div> 43 <div class="menu-content" id="menu-sql" style="display: none;"> 42 44 <ul> 43 45 <li><a href="sql_users_list.php"><?php __("MySQL Users") ?></a></li> -
alternc/branches/franck-desktop/bureau/admin/menu_sta2.php
r1797 r1803 35 35 ?> 36 36 <div class="menu-box"> 37 <div class="menu-top"></div> 37 38 <div class="menu-title"><img src="images/stat.png" alt="<?php __("Raw web statistics"); ?>" /> <a href="sta2_list.php"><?php __("Raw web statistics"); ?></a> (<?= $q["u"]; ?>/<?= $q["t"]; ?>)</div> 39 <div class="menu-bottom"></div> 38 40 </div> 39 41 <?php } ?> -
alternc/branches/franck-desktop/bureau/admin/menu_web.php
r1797 r1803 32 32 ?> 33 33 <div class="menu-box"> 34 <div class="menu-top"></div> 34 35 <div class="menu-title"><img src="images/password.png" alt="<?php __("Protected folders"); ?>" /> <a href="hta_list.php"><?php __("Protected folders"); ?></a></div> 36 <div class="menu-bottom"></div> 35 37 </div> -
alternc/branches/franck-desktop/bureau/admin/menu_webalizer.php
r1797 r1803 35 35 ?> 36 36 <div class="menu-box"> 37 <div class="menu-top"></div> 37 38 <div class="menu-title"><img src="images/stat.png" alt="<?php __("Web Statistics"); ?>" /> <a href="webalizer_list.php"><?php __("Web Statistics"); ?></a></div> 39 <div class="menu-bottom"></div> 38 40 </div> 39 41 <?php } ?> -
alternc/branches/franck-desktop/bureau/admin/mman_add.php
r1797 r1803 31 31 include_once("head.php"); 32 32 33 if (!$quota->cancreate("mailman")) { 34 $error=$err->errstr(); 33 if (!$quota->cancreate("mailman")) 34 { 35 $error = $err->errstr(); 35 36 } 37 38 $fields = array ( 39 "id" => array ("request", "integer", 0), 40 "login" => array ("request", "string", ""), 41 "domain" => array ("request", "string", ""), 42 "owner" => array ("request", "string", ""), 43 "pass" => array ("request", "string", ""), 44 ); 45 getFields($fields); 36 46 37 47 ?> 38 48 <h3><?php __("Mailing lists"); ?></h3> 39 49 <?php 40 if ($error) { 41 echo "<p class=\"error\">$error</p>"; 42 include_once("foot.php"); 43 exit(); 44 } 50 51 if ($error) 52 { 53 echo "<p class=\"error\">" . $error . "</p>"; 54 include_once("foot.php"); 55 exit(); 56 } 57 45 58 ?> 46 59 <form method="post" action="mman_doadd.php"> 47 60 <input type="hidden" name="id" value="<?php echo $id ?>" /> 48 61 <table> 49 <tr><th><label for="login"><?php __("Email address"); ?></label></th><td> 50 <input type="text" class="int" id="login" name="login" value="<?php echo $login; ?>" size="20" maxlength="64" /><b> @ </b><select class="inl" name="domain"><?php $mailman->select_prefix_list($domain); ?></select> 51 </td></tr> 52 <tr><th><label for="owner"><?php __("Owner"); ?> *</label></th><td> 53 Email : <input type="text" class="int" id="owner" name="owner" value="<?php echo $owner; ?>" size="20" maxlength="64" /> 54 </td></tr> 55 <tr><th><label for="pass"><?php __("Initial list password"); ?> </label></th><td> 56 <input type="text" class="int" id="pass" name="pass" value="<?php echo $pass; ?>" size="20" maxlength="64" /> 57 </td></tr> 58 <tr><td colspan="2"> 59 <input type="submit" class="inb" name="submit" value="<?php __("Create the list."); ?>"/> 60 </td></tr> 62 <tr> 63 <th><label for="login"><?php __("Email address"); ?></label></th> 64 <td> 65 <input type="text" class="int" id="login" name="login" value="<?php echo $login; ?>" size="20" maxlength="64" /><b> @ </b><select class="inl" name="domain"><?php $mailman->select_prefix_list($domain); ?></select> 66 </td> 67 </tr> 68 <tr> 69 <th><label for="owner"><?php __("Owner"); ?> *</label></th> 70 <td> 71 Email : <input type="text" class="int" id="owner" name="owner" value="<?php echo $owner; ?>" size="20" maxlength="64" /> 72 </td> 73 </tr> 74 <tr> 75 <th><label for="pass"><?php __("Initial list password"); ?> </label></th> 76 <td> 77 <input type="text" class="int" id="pass" name="pass" value="<?php echo $pass; ?>" size="20" maxlength="64" /> 78 </td> 79 </tr> 80 <tr> 81 <td colspan="2"> 82 <input type="submit" class="inb" name="submit" value="<?php __("Create the list."); ?>"/> 83 </td> 84 </tr> 61 85 </table> 62 86 </form> -
alternc/branches/franck-desktop/bureau/admin/mman_del.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 $stchange =(!$quota->cancreate("mailman"));32 $stchange = (!$quota->cancreate("mailman")); 33 33 34 $error=""; 35 // On parcours les POST_VARS et on repere les del_. 36 reset($_POST); 37 while (list($key,$val)=each($_POST)) { 38 if (substr($key,0,4)=="del_") { 39 // Effacement de la ml $val 40 $r=$mailman->delete_lst($val); 41 if (!$r) { 42 $error.=$err->errstr()."<br>"; 43 } else { 44 $error.=sprintf(_("The list %s has been successfully deleted."),$r)."<br>"; 45 } 46 } 34 $fields = array ( 35 "d" => array ("request", "array", array()), 36 ); 37 getFields($fields); 38 39 if (!is_array($d)) 40 { 41 $tmp = array($d); 42 $d = $tmp; 47 43 } 48 include("mman_list.php"); 44 reset($d); 45 46 if (empty($d)) 47 { 48 include ("mman_list.php"); 49 exit(); 50 } 51 52 include_once ("head.php"); 53 54 ?> 55 <h3><?php __("Deleting mailman lists"); ?></h3> 56 <p><?php __("Please confirm the deletion of the following mailman lists:"); ?></p> 57 <form action="mman_dodel.php" method="post"> 58 <?php 59 60 foreach ($d as $id) 61 { 62 echo "<input type=\"hidden\" name=\"d[]\" value=\"" . $id . "\" />"; 63 echo $mailman->get_lst($id) . "<br />"; 64 } 65 66 ?> 67 <p><input type="submit" class="inb" name="confirm" value="<?php __("Delete the selected mailman lists"); ?>" /> - <input type="submit" name="cancel" id="cancel" class="inb" value="<?php __("Don't delete lists and go back to the mailman list"); ?>" /> 68 </p> 69 </form> 70 <?php 71 72 include_once ("foot.php"); 49 73 exit(); 74 50 75 ?> -
alternc/branches/franck-desktop/bureau/admin/mman_doadd.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 $r=$mailman->add_lst($domain,$login,$owner,$pass); 33 if (!$r) { 34 $error=$err->errstr(); 35 include("mman_add.php"); 36 exit(); 37 } else { 38 $error=_("The mailing list has been successfully created."); 39 include("mman_list.php"); 32 $fields = array ( 33 "id" => array ("request", "string", ""), 34 "login" => array ("request", "string", ""), 35 "domain" => array ("request", "string", ""), 36 "owner" => array ("request", "string", ""), 37 "pass" => array ("request", "string", ""), 38 ); 39 getFields($fields); 40 41 $r = $mailman->add_lst($domain, $login, $owner, $pass); 42 if (!$r) 43 { 44 $error = $err->errstr(); 45 include ("mman_add.php"); 40 46 exit(); 41 47 } 48 else 49 { 50 $error = _("The mailing list has been successfully created."); 51 include ("mman_list.php"); 52 exit(); 53 } 54 42 55 ?> -
alternc/branches/franck-desktop/bureau/admin/mman_list.php
r1797 r1803 66 66 ?> 67 67 <tr class="lst<?php echo $col; ?>"> 68 <td align="center"><input type="checkbox" class="inc" name="d el_<?php echo $val["id"]; ?>" value="<?php echo $val["id"]; ?>" /></td>68 <td align="center"><input type="checkbox" class="inc" name="d[]" value="<?php echo $val["id"]; ?>" /></td> 69 69 <td><?php echo $val["list"]."@".$val["domain"] ?></td> 70 70 <td> <a href="https://<?php echo $val["domain"]; ?>/cgi-bin/mailman/listinfo/<?php echo $val["name"] ?>"><?php __("Public page"); ?></a> </td> -
alternc/branches/franck-desktop/bureau/admin/mman_members.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 $fields = array ( 33 "id" => array ("request", "integer", 0), 34 ); 35 getFields($fields); 36 32 37 header("content-type: text/plain"); 33 38 header("content-disposition: attachment; filename=list.txt"); -
alternc/branches/franck-desktop/bureau/admin/quota_show.php
r1797 r1803 32 32 33 33 ?> 34 <h3><?php __("Account's quotas"); ?> :</h3>34 <h3><?php __("Account's quotas"); ?></h3> 35 35 <?php 36 36 $q=$quota->getquota(); -
alternc/branches/franck-desktop/bureau/admin/quota_show_all.php
r1797 r1803 48 48 } 49 49 50 $class = ""; 51 50 52 $class = ($class== 'lst1' ? 'lst2' : 'lst1'); 51 53 echo "<table><tr class=\"$class\">"; … … 79 81 $error = $err->errstr(); 80 82 } 83 $quota_utilise = array(); 84 $tot = array(); 81 85 foreach($sequence as $key) 82 86 { 87 if (!isset($quota_utilise[$key])) 88 $quota_utilise[$key] = 0; 89 90 if (!isset($tot[$key])) 91 $tot[$key] = 0; 92 83 93 $q = $quots[$key]; 84 94 if ($q['u'] > $q['t']) -
alternc/branches/franck-desktop/bureau/admin/quotas_users.php
r1797 r1803 26 26 </p> 27 27 <p> 28 <a href=" quotas_users.php?mode=4">Global</a><br /><br />28 <a href="adm_usersquota.php?mode=4">Global</a><br /><br /> 29 29 Détail: 30 30 <?php if ($mode==0) { ?> 31 <a href=" quotas_users.php?mode=1&sd=<?php echo $sd; ?>&usr=<?php echo $usr; ?>">En pourcentage</a>32 <a href=" quotas_users.php?mode=2&sd=<?php echo $sd; ?>&usr=<?php echo $usr; ?>">En graphique</a>31 <a href="adm_usersquota.php?mode=1&sd=<?php echo $sd; ?>&usr=<?php echo $usr; ?>">En pourcentage</a> 32 <a href="adm_usersquota.php?mode=2&sd=<?php echo $sd; ?>&usr=<?php echo $usr; ?>">En graphique</a> 33 33 <?php } elseif ($mode==1) { ?> 34 <a href=" quotas_users.php?mode=0&sd=<?php echo $sd; ?>&usr=<?php echo $usr; ?>">En Mo</a>35 <a href=" quotas_users.php?mode=2&sd=<?php echo $sd; ?>&usr=<?php echo $usr; ?>">En graphique</a>34 <a href="adm_usersquota.php?mode=0&sd=<?php echo $sd; ?>&usr=<?php echo $usr; ?>">En Mo</a> 35 <a href="adm_usersquota.php?mode=2&sd=<?php echo $sd; ?>&usr=<?php echo $usr; ?>">En graphique</a> 36 36 <?php } else { ?> 37 <a href=" quotas_users.php?mode=0&sd=<?php echo $sd; ?>&usr=<?php echo $usr; ?>">En Mo</a>38 <a href=" quotas_users.php?mode=1&sd=<?php echo $sd; ?>&usr=<?php echo $usr; ?>">En pourcentage</a>37 <a href="adm_usersquota.php?mode=0&sd=<?php echo $sd; ?>&usr=<?php echo $usr; ?>">En Mo</a> 38 <a href="adm_usersquota.php?mode=1&sd=<?php echo $sd; ?>&usr=<?php echo $usr; ?>">En pourcentage</a> 39 39 <?php } ?> 40 40 41 41 <?php if ($mode != 4) { ?> 42 42 <?php if ($usr==0) { if ($sd==0) { ?> 43 <a href=" quotas_users.php?mode=<?php echo $mode; ?>&sd=1&usr=<?php echo $usr; ?>">Afficher les domaines</a>43 <a href="adm_usersquota.php?mode=<?php echo $mode; ?>&sd=1&usr=<?php echo $usr; ?>">Afficher les domaines</a> 44 44 <?php } else { ?> 45 <a href=" quotas_users.php?mode=<?php echo $mode; ?>&sd=0&usr=<?php echo $usr; ?>">Cacher les domaines</a>45 <a href="adm_usersquota.php?mode=<?php echo $mode; ?>&sd=0&usr=<?php echo $usr; ?>">Cacher les domaines</a> 46 46 <?php } } ?> 47 47 <?php if ($usr) { ?> 48 <a href=" quotas_users.php?mode=<?php echo $mode; ?>&sd=<? echo $sd; ?>">Tous les comptes</a>48 <a href="adm_usersquota.php?mode=<?php echo $mode; ?>&sd=<? echo $sd; ?>">Tous les comptes</a> 49 49 <?php } ?> 50 50 <?php } ?> … … 249 249 250 250 // On affiche le compte et ses domaines : 251 echo "<b><a href=\" quotas_users.php?mode=".$mode."&sd=".$sd."&usr=".$c["uid"]."\">".$c["login"]."</a></b><br />\n";251 echo "<b><a href=\"adm_usersquota.php?mode=".$mode."&sd=".$sd."&usr=".$c["uid"]."\">".$c["login"]."</a></b><br />\n"; 252 252 $s=mysql_query("SELECT * FROM domaines WHERE compte='".$c["uid"]."';"); 253 253 $dc=0; // Domain Count -
alternc/branches/franck-desktop/bureau/admin/sql_add.php
r1797 r1803 31 31 include_once("head.php"); 32 32 33 if (!$quota->cancreate("mysql")) { 34 $error=_("err_mysql_1"); 35 $fatal=1; 33 if (!$quota->cancreate("mysql")) 34 { 35 $error = _("err_mysql_1"); 36 $fatal = 1; 36 37 } 38 39 $fields = array ( 40 "dbn" => array ("request", "string", ""), 41 ); 42 getFields($fields); 37 43 38 44 ?> 39 45 <h3><?php __("Create a new database"); ?></h3> 40 46 <?php 41 if ($error) { 42 echo "<p class=\"error\">$error</p>"; 43 if ($fatal) { 44 include_once("foot.php"); 45 exit(); 46 } 47 48 if ($error) 49 { 50 echo "<p class=\"error\">" . $error . "</p>"; 51 if (isset($fatal)) 52 { 53 include_once("foot.php"); 54 exit(); 47 55 } 56 } 57 48 58 ?> 49 59 <form method="post" action="sql_doadd.php" id="main"> 50 60 <table border="1" cellspacing="0" cellpadding="4"> 51 <tr><th><label for="dbn"><?php __("Database"); ?></label></th><td> 52 <?php echo $mem->user["login"]; ?> <b>_</b> <input type="text" class="int" name="dbn" id="dbn" value="<?php echo $dbn; ?>" size="20" maxlength="30" /> 53 </td></tr> 54 <tr><td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create this new database."); ?>" /></td></tr> 61 <tr> 62 <th><label for="dbn"><?php __("Database"); ?></label></th> 63 <td> 64 <?php echo $mem->user["login"]; ?> <b>_</b> <input type="text" class="int" name="dbn" id="dbn" value="<?php echo $dbn; ?>" size="20" maxlength="30" /> 65 </td> 66 </tr> 67 <tr> 68 <td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create this new database."); ?>" /></td> 69 </tr> 55 70 </table> 56 71 </form> -
alternc/branches/franck-desktop/bureau/admin/sql_del.php
r1797 r1803 31 31 include_once ("head.php"); 32 32 33 if ($confirm=="y") { 34 reset($_POST); 35 while (list($key,$val)=each($_POST)) { 36 if (substr($key,0,4)=="del_") { 37 // Effacement de la base $val 38 $r=$mysql->del_db($val); 39 if (!$r) { 40 $error.=$err->errstr()."<br />"; 41 } else { 42 $error.=sprintf(_("The database %s has been successfully deleted"),$mem->user["login"].(($val)?"_":"").$val)."<br />"; 43 } 44 } 45 } 46 include("sql_list.php"); 47 exit(); 33 $fields = array ( 34 "confirm" => array ("request", "string", ""), 35 "cancel" => array ("request", "string", ""), 36 "d" => array ("request", "array", array()), 37 ); 38 getFields($fields); 39 40 if ($cancel) 41 { 42 include ("sql_list.php"); 43 exit(); 44 } 45 46 if ($confirm == "y") 47 { 48 foreach ($d as $val) 49 { 50 $r = $mysql->del_db($val); 51 if (!$r) 52 { 53 $error .= $err->errstr() . "<br />"; 54 } 55 else 56 { 57 $error .= sprintf(_("The database %s has been successfully deleted"), $mem->user["login"] . (($val) ? "_" : "") . $val) . "<br />"; 58 } 59 } 60 61 include ("sql_list.php"); 62 exit(); 48 63 } 49 64 50 65 ?> 51 66 <h3><?php __("MySQL Databases"); ?></h3> 52 <p class="error"><?php __("WARNING"); ?>< /big><br /><?php __("Confirm the deletion of the following SQL databases"); ?><br />67 <p class="error"><?php __("WARNING"); ?><br /><?php __("Confirm the deletion of the following SQL databases"); ?><br /> 53 68 <?php __("This will delete all the tables currently in those db."); ?></p> 54 69 <form method="post" action="sql_del.php" id="main"> … … 56 71 <input type="hidden" name="confirm" value="y" /> 57 72 <?php 58 reset($_POST); 59 while (list($key,$val)=each($_POST)) { 60 if (substr($key,0,4)=="del_") { 61 echo "<input type=\"hidden\" name=\"$key\" value=\"$val\" />".$mem->user["login"].(($val)?"_":"")."$val<br />\n"; 62 } 73 74 foreach ($d as $val) 75 { 76 echo "<input type=\"hidden\" name=\"d[]\" value=\"" . $val . "\" />" . $mem->user["login"] . (($val) ? "_" : "") . $val . "<br />\n"; 63 77 } 64 78 65 79 ?> 66 80 <br /> 67 <input type="submit" class="inb" name="sub" value="<?php __("Yes"); ?>" /> - <input type=" button" class="inb" name="non" value="<?php __("No"); ?>" onclick="history.back()" />81 <input type="submit" class="inb" name="sub" value="<?php __("Yes"); ?>" /> - <input type="submit" class="inb" name="cancel" value="<?php __("No"); ?>" /> 68 82 </p> 69 83 </form> 84 <script type="text/javascript"> 85 deploy("menu-sql"); 86 </script> 70 87 <?php include_once("foot.php"); ?>> -
alternc/branches/franck-desktop/bureau/admin/sql_doadd.php
r104 r1803 30 30 require_once("../class/config.php"); 31 31 32 $fields = array ( 33 "dbn" => array ("request", "string", ""), 34 ); 35 getFields($fields); 32 36 33 if (!$quota->cancreate("mysql")) { 34 $error=_("err_mysql_1"); 35 include("sql_add.php"); 37 if (!$quota->cancreate("mysql")) 38 { 39 $error = _("err_mysql_1"); 40 include ("sql_add.php"); 36 41 exit; 37 42 } 38 43 39 if (!$mysql->add_db($dbn)) { 40 $error=$err->errstr(); 41 include("sql_add.php"); 44 if (!$mysql->add_db($dbn)) 45 { 46 $error = $err->errstr(); 47 include ("sql_add.php"); 42 48 exit; 43 49 } -
alternc/branches/franck-desktop/bureau/admin/sql_getparam.php
r1797 r1803 31 31 include_once("head.php"); 32 32 33 if (!$r=$mysql->get_dblist()) { 34 $error=$err->errstr(); 33 if (!$r = $mysql->get_dblist()) 34 { 35 $error = $err->errstr(); 35 36 } 36 37 … … 38 39 <h3><?php __("MySQL Databases"); ?></h3> 39 40 <?php 40 if ($error) { 41 echo "<p class=\"error\">$error</p><p> </p>"; 42 } 41 42 if ($error) 43 { 44 echo "<p class=\"error\">" . $error . "</p><p> </p>"; 45 } 43 46 44 47 ?> -
alternc/branches/franck-desktop/bureau/admin/sql_list.php
r1797 r1803 31 31 include_once("head.php"); 32 32 33 $r =$mysql->get_dblist();33 $r = $mysql->get_dblist(); 34 34 35 35 ?> 36 36 <h3><?php __("MySQL Databases"); ?></h3> 37 37 <?php 38 if ($error) {39 echo "<p class=\"error\">$error</p><p> </p>";40 }41 38 42 if ($r) { 39 if ($error) 40 { 41 echo "<p class=\"error\">" . $error . "</p><p> </p>"; 42 } 43 43 44 echo "<p>"._("help_sql_list_ok")."</p>"; 44 if ($r) 45 { 46 echo "<p>" . _("help_sql_list_ok") . "</p>"; 47 45 48 ?> 46 47 49 <form method="post" action="sql_del.php"> 48 50 <table cellspacing="0" cellpadding="4"> 49 <tr><th> </th><th><?php __("Database"); ?></th><th><?php __("Backup"); ?></th><th><?php __("Restore"); ?></th><th><?php __("Size"); ?></th></tr> 51 <tr> 52 <th> </th> 53 <th><?php __("Database"); ?></th> 54 <th><?php __("Backup"); ?></th> 55 <th><?php __("Restore"); ?></th> 56 <th><?php __("Size"); ?></th> 57 </tr> 58 <?php 50 59 51 <?php 52 $col=1; 53 for($i=0;$i<count($r);$i++) { 54 $val=$r[$i]; 55 $col=3-$col; 60 $col = 1; 61 for($i = 0; $i < count($r); $i++) 62 { 63 $val = $r[$i]; 64 $col = 3 - $col; 65 56 66 ?> 57 67 <tr class="lst<?php echo $col; ?>"> 58 <td align="center"><input type="checkbox" class="inc" id="del_<?php echo $val["name"]; ?>" name="d el_<?php echo $val["name"]; ?>" value="<?php echo $val["name"]; ?>" /></td>59 <td><label for="del_<?php echo $val["name"]; ?>"><?php echo $val["db"]; ?></label></td>68 <td align="center"><input type="checkbox" class="inc" id="del_<?php echo $val["name"]; ?>" name="d[]" value="<?php echo $val["name"]; ?>" /></td> 69 <td><label for="del_<?php echo $val["name"]; ?>"><?php echo $val["db"]; ?></label></td> 60 70 <td><a href="sql_bck.php?id=<?php echo $val["name"] ?>"><?php __("Backup"); ?></a></td> 61 71 <td><a href="sql_restore.php?id=<?php echo $val["name"] ?>"><?php __("Restore"); ?></a></td> … … 64 74 <?php 65 75 76 } 66 77 67 }68 78 ?> 69 <tr><td colspan="5"> 70 <input type="submit" name="sub" value="<?php __("Delete the checked databases"); ?>" class="inb" /> 71 </td></tr> 79 <tr> 80 <td colspan="5"> 81 <input type="submit" name="sub" value="<?php __("Delete the checked databases"); ?>" class="inb" /> 82 </td> 83 </tr> 72 84 </table> 73 85 </form> … … 75 87 <p> </p> 76 88 <p> 77 <?php if ($quota->cancreate("mysql")) { ?> 78 <a href="sql_add.php"><?php __("Create a new database"); ?></a><br /><br /> 79 <?php } ?> 89 <?php 90 91 if ($quota->cancreate("mysql")) 92 { 93 94 ?> 95 <a href="sql_add.php"><?php __("Create a new database"); ?></a><br /><br /> 96 <?php 97 98 } 99 100 ?> 80 101 <a href="sql_passchg.php"><?php __("Change the SQL password"); ?></a><br /><br /> 81 102 <a href="sql_getparam.php"><?php __("Get the current SQL parameters"); ?></a><br /><br /> 103 </p> 104 <?php 82 105 83 </p> 84 85 <?php 86 } else { 87 echo "<p>"._("help_sql_list_no")."</p>"; 106 } 107 else 108 { 109 echo "<p>" . _("help_sql_list_no") . "</p>"; 88 110 89 111 ?> 90 112 <form method="post" action="sql_addmain.php"> 91 113 <table cellspacing="0" cellpadding="4"> 92 <tr class="lst2"><th><?php __("Username"); ?></th><td><code><?php echo $mem->user["login"]; ?></code></td></tr> 93 <tr class="lst1"><th><label for="pass"><?php __("Password"); ?></label></th><td><code><input class="int" type="password" name="pass" id="pass" value="" /></code></td></tr> 94 <tr class="lst2"><th><?php __("SQL Server"); ?></th><td><code><?php echo $mysql->server; ?></code></td></tr> 95 <tr class="lst1"><th><?php __("Database"); ?></th><td><code><?php echo $mem->user["login"]; ?></code></td></tr> 96 <tr><td><input type="submit" class="inb" name="submit" value="<?php __("Create my main database"); ?>" /></td></tr> 114 <tr class="lst2"> 115 <th><?php __("Username"); ?></th> 116 <td><code><?php echo $mem->user["login"]; ?></code></td> 117 </tr> 118 <tr class="lst1"> 119 <th><label for="pass"><?php __("Password"); ?></label></th> 120 <td><code><input class="int" type="password" name="pass" id="pass" value="" /></code></td> 121 </tr> 122 <tr class="lst2"> 123 <th><?php __("SQL Server"); ?></th> 124 <td><code><?php echo $mysql->server; ?></code></td> 125 </tr> 126 <tr class="lst1"> 127 <th><?php __("Database"); ?></th> 128 <td><code><?php echo $mem->user["login"]; ?></code></td> 129 </tr> 130 <tr> 131 <td><input type="submit" class="inb" name="submit" value="<?php __("Create my main database"); ?>" /></td> 132 </tr> 97 133 </table> 98 134 </form> -
alternc/branches/franck-desktop/bureau/admin/sql_pass.php
r876 r1803 30 30 require_once("../class/config.php"); 31 31 32 $fields = array ( 33 "pass" => array ("request", "string", ""), 34 ); 35 getFields($fields); 32 36 33 if (!$mysql->put_mysql_details($pass)) { 34 $error=$err->errstr(); 35 include("sql_passchg.php"); 36 exit(); 37 } else { 38 $error=_("Your password has been successfully changed."); 39 include("sql_list.php"); 37 if (!$mysql->put_mysql_details($pass)) 38 { 39 $error = $err->errstr(); 40 include ("sql_passchg.php"); 40 41 exit(); 41 42 } 43 else 44 { 45 $error = _("Your password has been successfully changed."); 46 include ("sql_list.php"); 47 exit(); 48 } 49 42 50 ?> -
alternc/branches/franck-desktop/bureau/admin/sql_passchg.php
r1797 r1803 31 31 include_once("head.php"); 32 32 33 if (!$r=$mysql->get_dblist()) { 34 $error=$err->errstr(); 33 if (!$r = $mysql->get_dblist()) 34 { 35 $error = $err->errstr(); 35 36 } 37 38 $fields = array ( 39 "pass" => array ("request", "string", ""), 40 ); 41 getFields($fields); 36 42 37 43 ?> 38 44 <h3><?php __("MySQL Databases"); ?></h3> 39 45 <?php 40 if ($error) {41 echo "<p class=\"error\">$error</p><p> </p>";42 }43 46 44 echo "<p>"._("Enter the new password of your SQL database and click 'change the password' to change it")."</p>"; 47 if ($error) 48 { 49 echo "<p class=\"error\">" . $error . "</p><p> </p>"; 50 } 51 52 echo "<p>" . _("Enter the new password of your SQL database and click 'change the password' to change it") . "</p>"; 53 45 54 ?> 46 47 55 <form method="post" action="sql_pass.php"> 48 56 <table cellspacing="0" cellpadding="4"> 49 <tr class="lst2"><th><?php __("Username"); ?></th><td><code><?php echo $mem->user["login"]; ?></code></td></tr> 50 <tr class="lst1"><th><label for="pass"><?php __("Password"); ?></label></th><td><code><input class="int" type="password" name="pass" id="pass" value="" /></code></td></tr> 51 <tr class="lst2"><th><?php __("SQL Server"); ?></th><td><code><?php echo $mysql->server; ?></code></td></tr> 52 <tr class="lst1"><th><?php __("Database"); ?></th><td><code><?php echo $r[0]["db"]; ?></code></td></tr> 53 <tr><td><input type="submit" class="inb" name="submit" value="<?php __("Change the password"); ?>" /></td></tr> 57 <tr class="lst2"> 58 <th><?php __("Username"); ?></th> 59 <td><code><?php echo $mem->user["login"]; ?></code></td> 60 </tr> 61 <tr class="lst1"> 62 <th><label for="pass"><?php __("Password"); ?></label></th> 63 <td><code><input class="int" type="password" name="pass" id="pass" value="" /></code></td> 64 </tr> 65 <tr class="lst2"> 66 <th><?php __("SQL Server"); ?></th> 67 <td><code><?php echo $mysql->server; ?></code></td> 68 </tr> 69 <tr class="lst1"> 70 <th><?php __("Database"); ?></th> 71 <td><code><?php echo $r[0]["db"]; ?></code></td></tr> 72 <tr> 73 <td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Change the password"); ?>" /></td> 74 </tr> 54 75 </table> 55 76 </form> -
alternc/branches/franck-desktop/bureau/admin/sql_users_add.php
r1797 r1803 31 31 include_once("head.php"); 32 32 33 if (!$quota->cancreate("mysql_users")) { 34 $error=_("err_mysql_20"); 35 $fatal=1; 33 $fields = array ( 34 "usern" => array ("request", "string", ""), 35 ); 36 getFields($fields); 37 38 if (!$quota->cancreate("mysql_users")) 39 { 40 $error = _("err_mysql_20"); 41 $fatal = 1; 36 42 } 37 43 … … 39 45 <h3><?php __("Create a new MySQL user"); ?></h3> 40 46 <?php 41 if ($error) { 42 echo "<p class=\"error\">$error</p>"; 43 if ($fatal) { 47 48 if ($error) 49 { 50 echo "<p class=\"error\">" . $error . "</p>"; 51 if (isset($fatal)) 52 { 53 44 54 ?> 45 55 <script type="text/javascript"> … … 48 58 <?php include_once("foot.php"); ?> 49 59 <?php 50 exit(); 51 }60 61 exit(); 52 62 } 63 } 64 53 65 ?> 54 66 <form method="post" action="sql_users_doadd.php" id="main"> … … 56 68 <tr> 57 69 <th><label for="usern"><?php __("Username"); ?></label></th> 58 <td><?php echo $mem->user["login"]; ?> <b>_</b> <input type="text" class="int" name="usern" id="usern" value=" " size="20" maxlength="30" /></td>70 <td><?php echo $mem->user["login"]; ?> <b>_</b> <input type="text" class="int" name="usern" id="usern" value="<?php echo $usern; ?>" size="20" maxlength="30" /></td> 59 71 </tr> 60 72 <tr> -
alternc/branches/franck-desktop/bureau/admin/sql_users_del.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 if ($confirm=="y") { 33 reset($_POST); 34 while (list($key,$val)=each($_POST)) { 35 if (substr($key,0,4)=="del_") { 36 // Effacement de la base $val 37 $r=$mysql->del_user($val); 38 if (!$r) { 39 $error.=$err->errstr()."<br />"; 40 } else { 41 $error.=sprintf(_("The user %s has been successfully deleted"),$mem->user["login"]."_$val")."<br />"; 42 } 43 } 44 } 45 include("sql_users_list.php"); 46 exit(); 32 $fields = array ( 33 "confirm" => array ("request", "string", ""), 34 "cancel" => array ("request", "string", ""), 35 "d" => array ("request", "array", array()), 36 ); 37 getFields($fields); 38 39 if ($cancel) 40 { 41 include ("sql_users_list.php"); 42 exit(); 43 } 44 45 if ($confirm == "y") 46 { 47 foreach ($d as $val) 48 { 49 $r = $mysql->del_user($val); 50 if (!$r) 51 { 52 $error .= $err->errstr() . "<br />"; 53 } 54 else 55 { 56 $error .= sprintf(_("The user %s has been successfully deleted"), $mem->user["login"] . "_" . $val) . "<br />"; 57 } 58 } 59 60 include ("sql_users_list.php"); 61 exit(); 47 62 } 48 63 … … 57 72 <input type="hidden" name="confirm" value="y" /> 58 73 <?php 59 reset($_POST); 60 while (list($key,$val)=each($_POST)) { 61 if (substr($key,0,4)=="del_") { 62 echo "<input type=\"hidden\" name=\"$key\" value=\"$val\" />".$mem->user["login"]."_$val<br />\n"; 63 } 64 } 74 75 foreach ($d as $val) 76 echo "<input type=\"hidden\" name=\"d[]\" value=\"" . $val . "\" />" . $mem->user["login"] . "_" . $val . "<br />\n"; 65 77 66 78 ?> 67 79 <br /> 68 <input type="submit" class="inb" name="sub" value="<?php __("Yes"); ?>" /> - <input type=" button" class="inb" name="non" value="<?php __("No"); ?>" onclick="history.back()" />80 <input type="submit" class="inb" name="sub" value="<?php __("Yes"); ?>" /> - <input type="submit" class="inb" name="cancel" value="<?php __("No"); ?>" /> 69 81 </p> 70 82 </form> -
alternc/branches/franck-desktop/bureau/admin/sql_users_doadd.php
r1531 r1803 30 30 require_once("../class/config.php"); 31 31 32 $fields = array ( 33 "usern" => array ("request", "string", ""), 34 "password" => array ("request", "string", ""), 35 "passwordconf" => array ("request", "string", ""), 36 ); 37 getFields($fields); 32 38 33 if (!$quota->cancreate("mysql_users")) { 34 // $error=_("err_mysql_1"); 35 include("sql_users_add.php"); 39 if (!$quota->cancreate("mysql_users")) 40 { 41 // $error=_("err_mysql_1"); 42 include ("sql_users_add.php"); 36 43 exit; 37 44 } 38 45 39 if (!$mysql->add_user($usern,$password,$passconf)) { 40 $error=$err->errstr(); 41 include("sql_users_add.php"); 46 if (!$mysql->add_user($usern, $password, $passconf)) 47 { 48 $error = $err->errstr(); 49 include ("sql_users_add.php"); 42 50 exit; 43 51 } -
alternc/branches/franck-desktop/bureau/admin/sql_users_list.php
r1797 r1803 31 31 include_once("head.php"); 32 32 33 $r =$mysql->get_userslist();34 $rdb =$mysql->get_dblist();33 $r = $mysql->get_userslist(); 34 $rdb = $mysql->get_dblist(); 35 35 36 36 ?> 37 37 <h3><?php __("MySQL Users"); ?></h3> 38 38 <?php 39 if ($error) {40 echo "<p class=\"error\">$error</p><p> </p>";41 }42 39 43 if ($rdb) { 44 if($r){ 45 echo "<p>"._("help_sql_users_list_ok")."</p>"; 40 if ($error) 41 { 42 echo "<p class=\"error\">" . $error . "</p><p> </p>"; 43 } 44 45 if ($rdb) 46 { 47 if($r) 48 { 49 echo "<p>"._("help_sql_users_list_ok")."</p>"; 50 46 51 ?> 47 48 52 <form method="post" action="sql_users_del.php"> 49 53 <table cellspacing="0" cellpadding="4"> 50 <tr><th> </th><th><?php __("User"); ?></th><th><?php __("Rights"); ?></th></tr> 51 <?php 52 $col=1; 53 for($i=0;$i<count($r);$i++) { 54 $val=$r[$i]; 55 $col=3-$col; 56 ?> 57 <tr class="lst<?php echo $col; ?>"> 58 <td align="center"> 59 <input type="checkbox" class="inc" id="del_<?php echo $val["name"]; ?>" name="del_<?php echo $val["name"]; ?>" value="<?php echo $val["name"]; ?>" /> 60 </td> 61 <td><label for="del_<?php echo $val["name"]; ?>"><?php echo $mem->user["login"]."_".$val["name"]; ?></label></td> 62 <td><a href="sql_users_rights.php?id=<?php echo $val["name"] ?>"><?php __("Rights"); ?></a></td> 54 <tr> 55 <th> </th> 56 <th><?php __("User"); ?></th> 57 <th><?php __("Rights"); ?></th> 63 58 </tr> 64 59 <?php 65 60 61 $col = 1; 62 for($i = 0; $i < count($r); $i++) 63 { 64 $val = $r[$i]; 65 $col = 3 - $col; 66 66 67 }68 67 ?> 68 <tr class="lst<?php echo $col; ?>"> 69 <td align="center"> 70 <input type="checkbox" class="inc" id="del_<?php echo $val["name"]; ?>" name="d[]" value="<?php echo $val["name"]; ?>" /> 71 </td> 72 <td><label for="del_<?php echo $val["name"]; ?>"><?php echo $mem->user["login"]."_".$val["name"]; ?></label></td> 73 <td><a href="sql_users_rights.php?id=<?php echo $val["name"] ?>"><?php __("Rights"); ?></a></td> 74 </tr> 75 <?php 69 76 70 <tr><td colspan="5"> 71 <input type="submit" name="sub" value="<?php __("Delete the checked users"); ?>" class="inb" /> 72 </td></tr> 77 } 78 79 ?> 80 <tr> 81 <td colspan="5"> 82 <input type="submit" name="sub" value="<?php __("Delete the checked users"); ?>" class="inb" /> 83 </td> 84 </tr> 73 85 </table> 74 86 </form> … … 77 89 78 90 <?php 79 } 80 if ($quota->cancreate("mysql_users")) { 91 92 } 93 94 if ($quota->cancreate("mysql_users")) 95 { 96 81 97 ?> 82 98 <p><a href="sql_users_add.php"><?php __("Create a new MySQL user"); ?></a><br /></p> -
alternc/branches/franck-desktop/bureau/admin/sta2_add_raw.php
r1797 r1803 30 30 require_once("../class/config.php"); 31 31 32 if (!$quota->cancreate("sta2")) { 33 $error=_("You cannot add any new statistics, your quota is over."); 32 if (!$quota->cancreate("sta2")) 33 { 34 $error = _("You cannot add any new statistics, your quota is over."); 34 35 } 35 36 36 37 include_once("head.php"); 38 39 $fields = array ( 40 "id" => array ("request", "integer", 0), 41 "hostname" => array ("request", "string", ""), 42 "folder" => array ("request", "string", ""), 43 ); 44 getFields($fields); 45 37 46 ?> 38 47 <h3><?php __("New Raw Statistics (apache)"); ?></h3> 39 48 <?php 40 if ($error) { 41 echo "<p class=\"error\">$error</p>"; 42 include_once("foot.php"); 43 exit(); 44 } 49 50 if ($error) 51 { 52 echo "<p class=\"error\">" . $error . "</p>"; 53 include_once ("foot.php"); 54 exit(); 55 } 56 45 57 ?> 46 58 <form method="post" action="sta2_doadd_raw.php" id="main" name="main"> 47 59 <table border="1" cellspacing="0" cellpadding="4"> 48 <tr><th><input type="hidden" name="id" value="<?php echo $id ?>" /> 49 <label for="hostname"><?php __("Domain name"); ?></label></th><td> 50 <select class="inl" name="hostname" id="hostname"><?php $sta2->select_host_list($hostname); ?></select> 51 </td></tr> 52 <tr><th><label for="folder"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="folder" id="folder" value="<?php echo $folder; ?>" size="20" maxlength="255" /> 53 <script type="text/javascript"> 54 <!-- 55 document.write(" <input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.folder');\" value=\" ... \" class=\"inb\" />"); 56 // --> 57 </script> 58 </td></tr> 59 <tr><td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create those raw statistics"); ?>" /></td></tr> 60 <tr> 61 <th> 62 <input type="hidden" name="id" value="<?php echo $id ?>" /> 63 <label for="hostname"><?php __("Domain name"); ?></label></th> 64 <td> 65 <select class="inl" name="hostname" id="hostname"><?php $sta2->select_host_list($hostname); ?></select> 66 </td> 67 </tr> 68 <tr> 69 <th><label for="folder"><?php __("Folder"); ?></label></th> 70 <td><input type="text" class="int" name="folder" id="folder" value="<?php echo $folder; ?>" size="20" maxlength="255" /> 71 <script type="text/javascript"> 72 <!-- 73 document.write(" <input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.folder');\" value=\" ... \" class=\"inb\" />"); 74 // --> 75 </script> 76 </td> 77 </tr> 78 <tr> 79 <td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create those raw statistics"); ?>" /></td> 80 </tr> 60 81 </table> 61 82 </form> 62 <?php $mem->show_help("sta2_add"); ?> 63 <?php include_once("foot.php"); ?> 83 <?php 84 85 $mem->show_help("sta2_add"); 86 87 include_once("foot.php"); 88 89 ?> -
alternc/branches/franck-desktop/bureau/admin/sta2_del_raw.php
r272 r1803 30 30 require_once("../class/config.php"); 31 31 32 $error=""; 32 $fields = array ( 33 "d" => array ("request", "array", array()), 34 ); 35 getFields($fields); 36 37 if (!is_array($d)) 38 { 39 $tmp = array($d); 40 $d = $tmp; 41 } 42 reset($d); 43 33 44 // On parcours les POST_VARS et on repere les del_. 34 reset($_POST); 35 while (list($key,$val)=each($_POST)){36 if (substr($key,0,4)=="del_") {37 // Effacement du jeu de stats $val38 $r=$sta2->delete_stats_raw($val);39 if (!$r) {40 $error.=$err->errstr()."<br />";41 } else {42 $error.=sprintf(_("The statistics %s has been successfully deleted (the stats files must be manually deleted)"),$r)."<br />";43 }45 while (li
