Changeset 3149


Ignore:
Timestamp:
05/16/12 17:33:04 (12 months ago)
Author:
squidly
Message:

Bugfix: corrections de notices php au niveau du panel

Location:
alternc/trunk/bureau
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • alternc/trunk/bureau/admin/adm_add.php

    r2749 r3149  
    4040$fields = array ( 
    4141        "canpass"   => array ("request", "integer", 1), 
     42        "login"   => array ("request", "string", null), 
     43        "pass"   => array ("request", "string", null), 
     44        "passconf"   => array ("request", "string", null), 
     45        "notes"   => array ("request", "string", null), 
     46        "nom"   => array ("request", "string", null), 
     47        "prenom"   => array ("request", "string", null), 
     48        "nmail"   => array ("request", "string", null), 
    4249); 
    4350getFields($fields); 
     
    4855<br /> 
    4956<?php 
    50 if ($error) { 
     57if (isset($error) && $error) { 
    5158        echo "<p class=\"error\">$error</p>"; 
    5259} 
     
    7481<tr> 
    7582       <th><label for="notes"><?php __("Notes"); ?></label></th> 
    76        <td><textarea name="notes" id="notes" class="int" cols="32" rows="5"><?php echo $notes; ?></textarea></td> 
     83       <td><textarea name="notes" id="notes" class="int" cols="32" rows="5"><?php  ehe($notes); ?></textarea></td> 
    7784</tr> 
    7885<tr> 
  • alternc/trunk/bureau/admin/adm_doadd.php

    r2786 r3149  
    6060   * 1 = force = ne tient pas compte du whois ou des droits de tld 
    6161   */ 
    62   if (($create_dom == 1)  && !is_null($create_dom_list)) { 
     62  if (isset($create_dom) && ($create_dom == 1)  && !is_null($create_dom_list)) { 
    6363    // make sure we don't have multiple dots there 
    6464    $dom->lock(); 
  • alternc/trunk/bureau/admin/dom_add.php

    r2693 r3149  
    5151exit(); 
    5252} 
    53 if ($error) echo "<p class=\"error\">$error</p>"; 
     53if (isset($error) && $error) echo "<p class=\"error\">$error</p>"; 
    5454?> 
    5555<form method="post" action="dom_doadd.php" id="main"> 
  • alternc/trunk/bureau/admin/ftp_add.php

    r2724 r3149  
    4141<br /> 
    4242<?php 
    43         if ($error) { 
     43        if (isset($error) && $error) { 
    4444                echo "<p class=\"error\">$error</p>"; 
    4545                if ($fatal) { 
  • alternc/trunk/bureau/admin/ftp_edit.php

    r3135 r3149  
    4444        } 
    4545} 
    46  
    4746?> 
    4847<h3><?php __("Editing an FTP account"); ?></h3> 
     
    5857<tr><th><input type="hidden" name="id" value="<?php echo $id ?>" /> 
    5958<label for="login"><?php __("Username"); ?></label></th><td> 
    60         <select class="inl" name="prefixe"><?php $ftp->select_prefix_list($r["prefixe"]); ?></select>&nbsp;<b>_</b>&nbsp;<input type="text" class="int" name="login" id="login" value="<?php ehe($r["login"]); ?>" size="20" maxlength="64" /> 
     59        <select class="inl" name="prefixe"><?php $ftp->select_prefix_list($r["prefixe"]); ?></select>&nbsp;<b>_</b>&nbsp;<input type="text" class="int" name="login" id="login" value="<?php ehe($r[0]["login"]); ?>" size="20" maxlength="64" /> 
    6160</td></tr> 
    62 <tr><th><label for="dir"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="dir" id="dir" value="<?php ehe($r["dir"]); ?>" size="20" maxlength="64" /> 
     61<tr><th><label for="dir"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="dir" id="dir" value="<?php ehe($r[0]["dir"]); ?>" size="20" maxlength="64" /> 
    6362 
    6463<script type="text/javascript"> 
  • alternc/trunk/bureau/admin/sql_del.php

    r2786 r3149  
    3131include_once ("head.php"); 
    3232 
    33 if ($confirm=="y") { 
     33if(!isset($error)){ 
     34        $error=""; 
     35} 
     36if (isset($confirm) && $confirm=="y" ) { 
    3437  reset($_POST); 
    3538  while (list($key,$val)=each($_POST)) { 
  • alternc/trunk/bureau/admin/sql_list.php

    r2863 r3149  
    9494                <tr><th><?php __("Username"); ?></th><td><code><?php echo $mem->user["login"]; ?></code></td></tr> 
    9595                <tr><th><label for="pass"><?php __("Password"); ?></label></th><td><code><input class="int" type="password" name="pass" id="pass" value="" /></code></td></tr> 
    96                 <tr><th><?php __("SQL Server"); ?></th><td><code><?php echo $mysql->server; ?></code></td></tr> 
     96                <tr><th><?php __("SQL Server"); ?></th><td><code><?php echo $L_MYSQL_HOST; ?></code></td></tr> 
    9797                <tr><th><?php __("Database"); ?></th><td><code><?php echo $mem->user["login"]; ?></code></td></tr> 
    9898        <tr class="trbtn"><td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create my main database"); ?>" /></td></tr> 
  • alternc/trunk/bureau/admin/sql_users_add.php

    r2705 r3149  
    4848<br /> 
    4949<?php 
    50         if ($error) { 
     50        if (isset($error) && $error) { 
    5151                echo "<p class=\"error\">$error</p>"; 
    5252                if ($fatal) { 
  • alternc/trunk/bureau/admin/sql_users_del.php

    r2705 r3149  
    2929*/ 
    3030require_once("../class/config.php"); 
    31  
    32 if ($confirm=="y") { 
     31if(!isset($error)){ 
     32        $error=""; 
     33} 
     34if (isset($confirm) && ($confirm=="y")) { 
    3335  reset($_POST); 
    3436  while (list($key,$val)=each($_POST)) { 
  • alternc/trunk/bureau/class/m_admin.php

    r3106 r3149  
    12251225    if (!$pol["allowlogin"]) { 
    12261226      // We do misc check on password versus login :  
    1227       $l2=str_replace("_","@",$l2); 
    1228       $l2=str_replace(".","@",$l2); 
    12291227      $logins=explode("@",$login); 
    12301228      $logins[]=$login; 
  • alternc/trunk/bureau/class/m_ftp.php

    r3132 r3149  
    120120    if ($db->num_rows()) { 
    121121      $db->next_record(); 
    122       $tr=preg_match("/^\/var\/alternc\/html\/.\/[^\/]*\/(.*)$/", $db->f("homedir"),$match);                  /*"*/ 
     122      $tr=preg_match("/^\/var\/alternc\/html\/.\/[^\/]*\/(.*)$/", $db->f("homedir"),$match); 
    123123      $lg=explode("_",$db->f("name")); 
    124       if (!is_array($lg)) { 
     124      if ((!is_array($lg)) || (count($lg)!=2)) { 
    125125              $lg[0]=$db->f("name"); 
    126126              $lg[1]=""; 
    127127      } 
    128       return array( 
     128      $r[]=array( 
    129129                   "id"=>$db->f("id"), 
    130130                   "prefixe"=> $lg[0], 
     
    132132                   "dir"=>$match[1] 
    133133                   ); 
     134        return $r; 
    134135    } else { 
    135136      $err->raise("ftp",2); 
  • alternc/trunk/bureau/class/m_mail.php

    r3135 r3149  
    9898    $err->log("mail","enum_domains_mail"); 
    9999    $db->query("select * from address where domain_id=$dom_id order by address asc;"); 
     100    if (!$db->num_rows()) { 
     101      //TODO verifier numero erreur 
     102      $err->raise("mysql",19); 
     103      return false; 
     104    } 
    100105    while($db->next_record()){ 
    101106      $this->enum_domain_mails[]=$db->Record; 
    102107    } 
     108     
    103109    return $this->enum_domain_mails; 
    104110  } 
     
    380386 
    381387 
    382  
    383388} /* Class m_mail */ 
    384389 
Note: See TracChangeset for help on using the changeset viewer.