Changeset 1802

Show
Ignore:
Timestamp:
04/19/07 11:12:58 (2 years ago)
Author:
franck
Message:

Ajout des modifications faites dans la branche principale

Files:

Legend:

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

    r1797 r1802  
    7979<?php 
    8080$col=1; 
    81 $qarray=$quota->qlist(); 
    8281$qlist=$quota->getdefaults(); 
     82$aqlist = $quota->qlist(); 
    8383reset($qlist); 
    84 foreach($qlist as $type => $q) { 
     84foreach($qlist as $qname => $q) 
     85
     86 
    8587?> 
    86 <div> 
    87 <h4><?php echo _("Accounts of type"). " \"$type\"" ?></h4> 
     88<h4><?php echo _("Accounts of type"). " \"" . $qname . "\"" ?></h4> 
    8889<table border="0" cellpadding="4" cellspacing="0"> 
    8990<tr><th><?php __("Quotas") ?></th><th><?php __("Default Value"); ?></th></tr> 
    9091<?php 
    91 foreach($q as $name => $value) { 
    92         $key = $type . ":" . $name; 
    93         $col=3-$col; 
     92 
     93        foreach($aqlist as $aqtype => $aqname) 
     94        { 
     95                $key = $qname . ":" . $aqtype; 
     96                $col=3-$col; 
     97 
    9498?> 
     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<?php 
    95103 
    96 <tr class="lst<?php echo $col; ?>"> 
    97 <td><label for="<?php echo $key; ?>"><?php echo $qarray[$name]; ?></label></td> 
    98 <td><input type="text" class="int" size="16" maxlength="16" name="<?php echo $key; ?>" id="<?php echo $name; ?>" value="<?php echo $value; ?>" /></td></tr> 
    99 <?php 
    100   } 
     104        } 
     105 
    101106?> 
    102107</table> 
    103 </div> 
    104108<?php 
     109 
    105110} 
     111 
    106112?> 
    107113<input type="submit" class="inb" value="<?php __("Edit the default quotas"); ?>" /> 
  • alternc/branches/franck-desktop/bureau/admin/bro_main.php

    r1797 r1802  
    4141  switch ($formu) { 
    4242  case 1:  // Créer le répertoire $R.$nomfich 
    43     $bro->CreateDir($R,$nomfich); 
     43    if (!$bro->CreateDir($R,$nomfich)) { 
     44      echo $err->errstr(); 
     45    } 
    4446    $p=$bro->GetPrefs(); 
    4547    break; 
    4648  case 6: // Créer le fichier $R.$nomfich 
    47     $bro->CreateFile($R,$nomfich); 
     49    if (!$bro->CreateFile($R,$nomfich)) { 
     50      echo $err->errstr(); 
     51    } 
    4852    $p=$bro->GetPrefs(); 
    4953    if ($p["createfile"]==1) { 
     
    5559  case 2:  // act vaut Supprimer Copier ou Renommer. 
    5660    if ($actdel) { 
    57       $bro->DeleteFile($d,$R); 
     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)); ?>" /> 
     79<?php } ?> 
     80    <blockquote> 
     81      <input type="submit" class="inb" name="del_confirm" value="<?php __("Yes"); ?>" />&nbsp;&nbsp; 
     82      <input type="submit" class="inb" name="cancel" value="<?php __("No"); ?>" /> 
     83    </blockquote> 
     84  </form> 
     85<?php 
     86                                include_once("foot.php"); 
     87        die(); 
     88      } 
    5889    } 
    5990    if ($actmove) { 
    60       $bro->MoveFile($d,$R,$actmoveto); 
     91      if (!$bro->MoveFile($d,$R,$actmoveto)) { 
     92        echo $err->errstr(); 
     93      } 
    6194    } 
    6295    break; 
    6396  case 4:  // Renommage Effectif... 
    64     $bro->RenameFile($R,$o,$d); // Rename $R (directory) $o (old) $d (new) names 
     97    if (!$bro->RenameFile($R,$o,$d)) { // Rename $R (directory) $o (old) $d (new) names 
     98      echo $err->errstr(); 
     99    } 
    65100    break; 
    66101  case 3:  // Upload de fichier... 
    67     $bro->UploadFile($R); 
    68     break; 
     102    if (!$bro->UploadFile($R)) { 
     103      echo $err->errstr(); 
     104    } 
     105                break; 
    69106  } 
    70107} 
  • alternc/branches/franck-desktop/bureau/admin/mail_list.php

    r1797 r1802  
    4444} 
    4545 
    46 if(!$res=$mail->enum_doms_mails($domain,1,$letter)) { 
     46if(!$res=$mail->enum_doms_mails($domain,1,$letter)) 
     47
    4748  $error=$err->errstr(); 
     49 
    4850?> 
    49 <h3><?php printf(_("Mailbox list of the domain %s"),"http://$domain"); ?> : </h3> 
     51<h3><?php printf(_("Mailbox list of the domain %s"), $domain); ?></h3> 
    5052<?php 
    5153if ($error) { 
    5254  echo "<p class=\"error\">$error</p>"; 
    5355} 
    54 echo "<p><a href=\"mail_add.php?domain=$domain\">".sprintf(_("Add a mailbox on <b>%s</b>"),$domain)."</a><br />"; 
    55 echo "   <a href=\"mail_add.php?many=1&amp;domain=$domain\">".sprintf(_("Add many mailboxes on <b>%s</b>"),$domain)."</a></p>"; 
     56echo "<p><a href=\"mail_add.php?domain=" . $domain . "\">".sprintf(_("Add a mailbox on <b>%s</b>"), $domain)."</a><br />"; 
     57echo "   <a href=\"mail_add.php?many=1&amp;domain=" . $domain . "\">".sprintf(_("Add many mailboxes on <b>%s</b>"), $domain)."</a></p>"; 
    5658 
    5759} 
     
    6062 
    6163?> 
    62 <h3><?php printf(_("Mailbox list of the domain %s"),"http://$domain"); ?> : </h3> 
     64<h3><?php printf(_("Mailbox list of the domain %s"), $domain); ?></h3> 
    6365<?php 
    6466if ($error) { 
     
    6668} 
    6769 
    68 echo "<p><a href=\"mail_add.php?domain=$domain\">".sprintf(_("Add a mailbox on <b>%s</b>"),$domain)."</a><br />"; 
    69 echo "   <a href=\"mail_add.php?many=1&amp;domain=$domain\">".sprintf(_("Add many mailboxes on <b>%s</b>"),$domain)."</a></p>"; 
     70echo "<p><a href=\"mail_add.php?domain=" . $domain . "\">".sprintf(_("Add a mailbox on <b>%s</b>"), $domain)."</a><br />"; 
     71echo "   <a href=\"mail_add.php?many=1&amp;domain=" . $domain . "\">".sprintf(_("Add many mailboxes on <b>%s</b>"), $domain)."</a></p>"; 
    7072 
    7173if(!$letters=$mail->enum_doms_mails_letters($domain)) 
  • alternc/branches/franck-desktop/bureau/class/m_mail.php

    r1797 r1802  
    109109                        $letter = ""; 
    110110    else 
    111                         $letter = "%$letter"; 
     111                        $letter .= "%"; 
    112112    $db->query("SELECT mail,pop,alias FROM mail_domain WHERE mail LIKE '".addslashes($letter)."@".addslashes($dom)."' AND uid='$cuid' AND type=0;"); 
    113113    $res=array(); $i=0;