Changeset 1797

Show
Ignore:
Timestamp:
04/18/07 14:48:06 (1 year ago)
Author:
franck
Message:

Mise a jour en 0.9.6.2: a tester

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • alternc/branches/franck-desktop/bureau/admin/adm_add.php

    r1653 r1797  
    3131*/ 
    3232require_once("../class/config.php"); 
     33include_once("head.php"); 
    3334 
    3435if (!$admin->enabled) { 
     
    3738} 
    3839 
    39 if (!isset($canpass)) $canpass=1; 
    40  
    41 include("head.php"); 
     40$fields = array ( 
     41        "canpass"   => array ("request", "integer", 1), 
     42); 
     43getFields($fields); 
    4244 
    4345?> 
    44 </head> 
    45 <body> 
    4646<h3><?php __("New member"); ?></h3> 
    4747<?php 
     
    6666        <th><label for="canpass"><?php __("Can he change its password"); ?></label></th> 
    6767        <td><select class="inl" name="canpass" id="canpass"> 
    68         <?php  
     68        <?php 
    6969        for($i=0;$i<count($bro->l_icons);$i++) { 
    7070          echo "<option"; 
     
    100100<tr> 
    101101        <th colspan="2"><label><input type="checkbox" name="create_dom" value="1" /> 
    102         <?php printf(_("Create the domain <b>username.%s</b>"),variable_get('hosting_tld')); ?></label></th> 
     102        <?php print _("Create the domain username.").variable_get('hosting_tld'); ?></label></th> 
    103103        </tr> 
    104104<tr> 
     
    108108</table> 
    109109</form> 
    110  
    111 </body> 
    112 </html> 
     110<script type="text/javascript"> 
     111deploy("menu-adm"); 
     112</script> 
     113<?php include_once("foot.php"); ?> 
  • alternc/branches/franck-desktop/bureau/admin/adm_deactivate.php

    r1726 r1797  
    1 <?php  
     1<?php 
    22 
    33require_once('../class/config.php'); 
    44 
    5 $uid = $_GET['uid']; 
    6 if (!$uid) { 
     5$uid = $_GET["uid"]; 
     6 
     7if (!$uid) 
     8
    79        __("Missing uid"); 
    810        exit(); 
    911} 
    10 if (!$admin->enabled || !$admin->checkcreator($uid)) { 
    11         __("This page is restricted to authorized staff"); 
     12 
     13if (!$admin->enabled || !$admin->checkcreator($uid)) 
     14
     15        __("This page is restricted to authorized staff"); 
    1216        exit(); 
    1317} 
    1418 
    15 if (!$r=$admin->get($uid)) { 
     19if (!$r=$admin->get($uid)) 
     20
    1621        __("User does not exist"); 
    1722        exit(); 
    1823} 
    1924 
     25include_once ("head.php"); 
     26 
    2027if (! ($confirmed = ($_GET['submit'] == _("Confirm")) ) ) { 
    21   print '<h2>' . _('WARNING: experimental feature, use at your own risk') . '</h2>'; 
     28  echo '<h2>' . _('WARNING: experimental feature, use at your own risk') . '</h2>'; 
    2229  __("The following domains will be deactivated and redirected to the URL entered in the following box. A backup of the domain configuration will be displayed as a serie of SQL request that you can run to restore the current configuration if you want. Click confirm if you are sure you want to deactivate all this user's domains."); 
    2330 
    2431  ?> 
    25   <form action="<?=$PHP_SELF?>" method="GET"> 
     32  <form action="<?php echo  $PHP_SELF; ?>" method="get"> 
    2633  <input type="hidden" name="uid" value="<?=$uid?>" /> 
    2734  <? __("Redirection URL:") ?> <input type="text" name="redirect" value="http://example.com/" /> 
    28   <input type="submit" name="submit" value="<?=_("Confirm")?>" /> 
     35  <input type="submit" name="submit" value="<?php echo _("Confirm"); ?>" /> 
    2936  </form><?php 
    3037 
    31   print "<h3>" . _("Domains of user: ") . $r["login"] . "</h3>"; 
     38  echo "<h3>" . _("Domains of user: ") . $r["login"] . "</h3>"; 
    3239} else { 
    3340  if (!$_GET['redirect']) { 
     
    5057 
    5158if ($confirmed) { 
    52   print "<pre>"; 
     59  echo "<pre>"; 
    5360  printf(_("-- Redirecting all domains and subdomains of the user %s to %s\n"), $r['login'], $redirect); 
    5461} 
     
    5764# 1.2 foreach domain, list the subdomains 
    5865foreach ($domains as $key => $domain) { 
    59   if (!$confirmed) print '<h4>' . $domain . '</h4><ul>'; 
     66  if (!$confirmed) echo '<h4>' . $domain . '</h4><ul>'; 
    6067  $dom->lock(); 
    6168  if (!$r=$dom->get_domain_all($domain)) { 
     
    7279    if ($type == $dom->type_local) { 
    7380      if (!$confirmed) { 
    74         print "<li>"; 
     81        echo "<li>"; 
    7582        if ($sub) { 
    76           print $sub . '.'; 
     83          echo $sub . '.'; 
    7784        } 
    78         print "$domain -> $dest</li>"; 
     85        echo "$domain -> $dest</li>"; 
    7986      } else { 
    8087 
     
    8794        $dom->lock(); 
    8895        if (!$dom->set_sub_domain($domain, $sub, $dom->type_url, "edit", $redirect)) { 
    89           print "-- error in $sub.$domain: " . $err->errstr() . "\n"; 
     96          echo "-- error in $sub.$domain: " . $err->errstr() . "\n"; 
    9097        } 
    9198        $dom->unlock(); 
     
    93100    } 
    94101  } 
    95   if (!$confirmed) print '</ul>'; 
     102  if (!$confirmed) echo '</ul>'; 
    96103} 
    97104 
    98105# 3. wrap up (?) 
    99106if ($confirmed) { 
    100   print "-- The following is a serie of SQL request you can run, as root, to revert the user's domains to their previous state.\n"; 
    101   print $backup; 
    102   print "</pre>"; 
     107  echo "-- The following is a serie of SQL request you can run, as root, to revert the user's domains to their previous state.\n"; 
     108  echo $backup; 
     109  echo "</pre>"; 
    103110} 
    104111$cuid = $old_cuid; 
     112 
     113?> 
     114<script type="text/javascript"> 
     115deploy("menu-adm"); 
     116</script> 
     117<?php include_once("foot.php"); ?> 
  • alternc/branches/franck-desktop/bureau/admin/adm_defquotas.php

    r1563 r1797  
    3737} 
    3838 
    39 include("head.php"); 
     39include_once ("head.php"); 
     40 
    4041?> 
    41 </head> 
    42 <body> 
    4342<h3><?php __("Change the default quotas"); ?></h3> 
    4443<?php 
     
    4847 
    4948?> 
    50 <p><form method="post" action="adm_dodefquotas.php"> 
    51 <input type="hidden" name="action" value="add"> 
    52 <input type="text" name="type" class="int"></td> 
     49<form method="post" action="adm_dodefquotas.php"> 
     50<p> 
     51<input type="hidden" name="action" value="add" /> 
     52<input type="text" name="type" class="int" /> 
    5353<input type="submit" class="inb" value="<?php __("Add account type"); ?>" /> 
    54 </form></p> 
     54</p> 
     55</form> 
    5556 
    56 <p><form method="post" action="adm_dodefquotas.php"> 
    57 <input type="hidden" name="action" value="delete"> 
     57<form method="post" action="adm_dodefquotas.php"> 
     58<p> 
     59<input type="hidden" name="action" value="delete" /> 
    5860<select name="type" id="type" class="inl"> 
    5961<?php 
     
    6567?></select> 
    6668<input type="submit" class="inb" value="<?php __("Delete account type"); ?>" /> 
    67 </form></p> 
     69</p> 
     70</form> 
    6871 
    6972<p> 
     
    7275 
    7376<form method="post" action="adm_dodefquotas.php"> 
    74 <input type="hidden" name="action" value="modify"> 
     77<div> 
     78<input type="hidden" name="action" value="modify" /> 
    7579<?php 
    7680$col=1; 
     81$qarray=$quota->qlist(); 
    7782$qlist=$quota->getdefaults(); 
    7883reset($qlist); 
    7984foreach($qlist as $type => $q) { 
    8085?> 
     86<div> 
    8187<h4><?php echo _("Accounts of type"). " \"$type\"" ?></h4> 
    8288<table border="0" cellpadding="4" cellspacing="0"> 
     
    8995 
    9096<tr class="lst<?php echo $col; ?>"> 
    91 <td><label for="<?php echo $key; ?>"><?php echo "quota_$name"; ?></label></td> 
     97<td><label for="<?php echo $key; ?>"><?php echo $qarray[$name]; ?></label></td> 
    9298<td><input type="text" class="int" size="16" maxlength="16" name="<?php echo $key; ?>" id="<?php echo $name; ?>" value="<?php echo $value; ?>" /></td></tr> 
    9399<?php 
     
    95101?> 
    96102</table> 
     103</div> 
    97104<?php 
    98105} 
    99106?> 
    100107<input type="submit" class="inb" value="<?php __("Edit the default quotas"); ?>" /> 
     108</div> 
    101109</form> 
    102  
    103 </body> 
    104 </html> 
     110<script type="text/javascript"> 
     111deploy("menu-adm"); 
     112</script> 
     113<?php include_once("foot.php"); ?> 
  • alternc/branches/franck-desktop/bureau/admin/adm_dodefquotas.php

    r1705 r1797  
    5757    include("adm_defquotas.php"); 
    5858  }else{ 
    59     include("head.php"); 
     59    include_once("head.php"); 
    6060    ?> 
    61     </head> 
    62     <body> 
    6361    <h3><?php printf(_("Deleting quota %s"),$_POST["type"]); ?> : </h3> 
    6462 
     
    7472      </blockquote> 
    7573    </form> 
    76     </body> 
    77     </html> 
     74                <script type="text/javascript"> 
     75                deploy("menu-adm"); 
     76                </script> 
     77                <?php include_once("foot.php"); ?> 
    7878    <?php 
    7979  } 
  • alternc/branches/franck-desktop/bureau/admin/adm_dodel.php

    r1711 r1797  
    3535} 
    3636 
    37 if($_POST["del_confirm"] == "y"){ 
    38   if (!is_array($d)) { 
    39     $d[]=$d; 
    40   } 
     37if ($_POST["del_confirm"] == "y") 
     38
     39        if (!is_array($d)) 
     40        { 
     41                $d[]=$d; 
     42        } 
    4143 
    42   reset($d); 
    43   while (list($key,$val)=each($d)) { 
    44     if (!$admin->checkcreator($val)) { 
    45       __("This page is restricted to authorized staff"); 
    46       exit(); 
    47     } 
    48     if (!($u=$admin->get($val)) || !$admin->del_mem($val)) { 
    49       $error.=sprintf(_("Member '%s' does not exist"),$val)."<br />"; 
    50     } else { 
    51       $error.=sprintf(_("Member %s successfully deleted"),$u["login"])."<br />"; 
    52     } 
    53   } 
    54   include("adm_list.php"); 
    55   exit(); 
    56 }else{ 
    57     include("head.php"); 
    58     ?> 
    59     </head> 
    60     <body> 
    61     <h3><?php printf(_("Deleting users")); ?> : </h3> 
    62     <form action="adm_dodel.php" method="post"> 
    63       <input type="hidden" name="action" value="delete" /> 
    64       <input type="hidden" name="del_confirm" value="y" /> 
    65       <p class="error"><?php __("WARNING : Confirm the deletion of the users"); ?></p> 
    66       <p> 
    67       <?php 
    68         foreach($d as $userid){ 
    69           $membre=$admin->get($userid); 
    70           echo "<input type=\"hidden\" name=\"d[]\" value=\"$userid\" />".$membre['login']."<br/>"; 
    71         } 
    72       ?> 
    73       </p> 
    74       <blockquote> 
    75         <input type="submit" class="inb" name="confirm" value="<?php __("Yes"); ?>" />&nbsp;&nbsp; 
    76         <input type="button" class="inb" name="cancel" value="<?php __("No"); ?>" onclick="document.location='adm_list.php';" /> 
    77       </blockquote> 
    78     </form> 
    79     </body> 
    80     </html> 
    81     <?php   
     44        reset($d); 
     45        while (list($key,$val)=each($d)) { 
     46                if (!$admin->checkcreator($val)) { 
     47                        __("This page is restricted to authorized staff"); 
     48                        exit(); 
     49                } 
     50                if (!($u=$admin->get($val)) || !$admin->del_mem($val)) { 
     51                        $error.=sprintf(_("Member '%s' does not exist"),$val)."<br />"; 
     52                } else { 
     53                        $error.=sprintf(_("Member %s successfully deleted"),$u["login"])."<br />"; 
     54                } 
     55        } 
     56        include ("adm_list.php"); 
     57        exit(); 
     58 
     59
     60else 
     61
     62 
     63        include_once ("head.php"); 
     64 
     65?> 
     66<h3><?php printf(_("Deleting users")); ?></h3> 
     67<form action="adm_dodel.php" method="post"> 
     68        <input type="hidden" name="action" value="delete" /> 
     69        <input type="hidden" name="del_confirm" value="y" /> 
     70        <p class="error"><?php __("WARNING : Confirm the deletion of the users"); ?></p> 
     71        <p> 
     72<?php 
     73 
     74foreach($d as $userid) 
     75
     76        $membre = $admin->get($userid); 
     77        echo "<input type=\"hidden\" name=\"d[]\" value=\"" . $userid . "\" />" . $membre['login'] . "<br />"; 
    8278} 
    8379 
    8480?> 
     81        </p> 
     82        <blockquote> 
     83                <input type="submit" class="inb" name="confirm" value="<?php __("Yes"); ?>" />&nbsp;&nbsp; 
     84                <input type="button" class="inb" name="cancel" value="<?php __("No"); ?>" onclick="document.location='adm_list.php';" /> 
     85        </blockquote> 
     86</form> 
     87<?php 
     88 
     89        include_once ("foot.php"); 
     90 
     91} 
     92 
     93?> 
  • alternc/branches/franck-desktop/bureau/admin/adm_domlock.php

    r153 r1797  
    3535} 
    3636 
     37$fields = array ( 
     38        "domain"    => array ("request", "string", ""), 
     39); 
     40getFields($fields); 
     41 
    3742if (!$admin->dom_lock($domain)) { 
    3843  $error=$err->errstr(); 
    3944} 
     45 
    4046include("adm_doms.php"); 
    4147exit; 
  • alternc/branches/franck-desktop/bureau/admin/adm_doms.php

    r1662 r1797  
    3535} 
    3636 
    37 include("head.php"); 
     37include_once ("head.php"); 
     38 
    3839?> 
    39 </head> 
    40 <body> 
    4140<h3><?php __("Manage installed domains"); ?></h3> 
    4241<?php 
     
    5251</p> 
    5352 
    54 <p><a href="<?php echo $_SERVER["SCRIPT_NAME"]; ?>"><?php __("Update this page"); ?></a></p> 
    55  
    5653<form method="post" action="adm_dodom.php"> 
    5754<table border="0" cellpadding="4" cellspacing="0"> 
     
    6461 
    6562<tr class="lst<?php echo $col; ?>"> 
    66 <td><a href="adm_domlock.php?domain=<?php echo urlencode($c[$i][domaine]); ?>"><?php  
     63<td><a href="adm_domlock.php?domain=<?php echo urlencode($c[$i][domaine]); ?>"><?php 
    6764   if ($c[$i][noerase]) __("Unlock"); else __("Lock");  ?></a></td> 
    6865<td><?php echo $c[$i][domaine]; ?></td> 
     
    7774</table> 
    7875</form> 
    79  
    80 </body> 
    81 </html> 
     76<script type="text/javascript"> 
     77deploy("menu-adm"); 
     78</script> 
     79<?php include_once("foot.php"); ?> 
  • alternc/branches/franck-desktop/bureau/admin/adm_donosu.php

    r1 r1797  
    3535} 
    3636 
     37$fields = array ( 
     38        "uid"    => array ("request", "integer", 0), 
     39); 
     40getFields($fields); 
     41 
    3742if (!$admin->su2normal($uid)) { 
    3843        $error=$err->errstr(); 
  • alternc/branches/franck-desktop/bureau/admin/adm_dosu.php

    r1 r1797  
    3535} 
    3636 
     37$fields = array ( 
     38        "uid"    => array ("request", "integer", 0), 
     39); 
     40getFields($fields); 
     41 
    3742if (!$admin->normal2su($uid)) { 
    3843        $error=$err->errstr(); 
  • alternc/branches/franck-desktop/bureau/admin/adm_edit.php

    r982 r1797  
    3131*/ 
    3232require_once("../class/config.php"); 
     33include_once("head.php"); 
    3334 
    3435if (!$admin->enabled) { 
     
    3637        exit(); 
    3738} 
     39 
     40$fields = array ( 
     41        "uid"    => array ("request", "integer", 0), 
     42); 
     43getFields($fields); 
     44 
    3845if (!$admin->checkcreator($uid)) { 
    3946        __("This page is restricted to authorized staff"); 
     
    4552} 
    4653 
    47 include("head.php"); 
    4854?> 
    49 </head> 
    50 <body> 
    5155<h3><?php __("Member Edition"); ?></h3> 
    5256<?php 
     
    8690        <th><label for="canpass"><?php __("Can he change its password"); ?></label></th> 
    8791        <td><select class="inl" name="canpass" id="canpass"> 
    88         <?php  
     92        <?php 
    8993        for($i=0;$i<count($bro->l_icons);$i++) { 
    9094          echo "<option"; 
     
    115119          echo ">$type</option>"; 
    116120        } 
    117 ?></select><label for="reset_quotas"><?php __("Reset quotas to default ?") ?></label><input type="checkbox" name="reset_quotas" id="reset_quotas"></td> 
     121?></select><label for="reset_quotas"><?php __("Reset quotas to default ?") ?></label><input type="checkbox" name="reset_quotas" id="reset_quotas" /></td> 
    118122</tr> 
    119123<tr> 
     
    148152<p> 
    149153<?php 
    150         if ($mem->user[uid]==2000) { // PATCHBEN only admin can change su/nosu :)   
     154        if ($mem->user[uid]==2000) { // PATCHBEN only admin can change su/nosu :) 
    151155if ($r["su"]) { 
    152156?> 
    153157<b><?php __("This account is a super-admin account"); ?></b><br /> 
    154 <?php if ($admin->onesu()) {  
     158<?php if ($admin->onesu()) { 
    155159  __("There is only one administrator account, you cannot turn this account back to normal"); 
    156160} else { 
     
    164168 
    165169 
    166 <p><?php  
     170<p><?php 
    167171        } 
    168172$c=$admin->get($r["creator"]); 
    169 printf(_("Account created by %s"),$c["login"]);  
     173printf(_("Account created by %s"),$c["login"]); 
    170174?> 
    171175</p> 
    172176<p><a href="adm_list.php"><?php __("Back to the account list"); ?></a></p> 
    173 </body> 
    174 </html> 
     177<script type="text/javascript"> 
     178deploy("menu-adm"); 
     179</script> 
     180<?php include_once("foot.php"); ?> 
  • alternc/branches/franck-desktop/bureau/admin/adm_list.php

    r1726