diff --git a/bureau/admin/adm_panel.php b/bureau/admin/adm_panel.php index ae048ec4..3e9b8b47 100644 --- a/bureau/admin/adm_panel.php +++ b/bureau/admin/adm_panel.php @@ -1,13 +1,5 @@ enabled) { diff --git a/bureau/class/class_system_bind.php b/bureau/class/class_system_bind.php index 7d2cb9c0..34d045b4 100644 --- a/bureau/class/class_system_bind.php +++ b/bureau/class/class_system_bind.php @@ -1,6 +1,28 @@ cache_conf_db; } + /** * Return full path of the zone configuration file * @@ -72,6 +89,7 @@ class system_bind { return $this->zone_file_directory.$domain; } + /** * * @param string $domain @@ -89,6 +107,7 @@ class system_bind { return $this->cache_zone_file[$domain] ; } + /** * * @param string $domain @@ -113,6 +132,7 @@ class system_bind { return max(array($calc,$old)) + 1 ; } + /** * Return lines that are after ;;; END ALTERNC AUTOGENERATE CONFIGURATION * @@ -131,6 +151,7 @@ class system_bind { return $this->cache_get_persistent[$domain]; } + /** * * @return string @@ -139,6 +160,7 @@ class system_bind { return file_get_contents($this->ZONE_TEMPLATE); } + /** * * @global m_dom $dom @@ -157,6 +179,7 @@ class system_bind { else return $this->cache_domain_summary; } + /** * * @param string $domain @@ -172,6 +195,7 @@ class system_bind { return true; } + /** * Generate the domain DKIM key * @@ -202,6 +226,7 @@ class system_bind { return true; // FIXME handle error } + /** * Refresh DKIM configuration: be sure to list the domain having a private key (and only them) */ @@ -259,6 +284,8 @@ class system_bind { } } + + /** * * @param string $domain @@ -273,6 +300,7 @@ class system_bind { return @file_get_contents($keyfile); } + /** * Conditionnal generation autoconfig entry for outlook / thunderbird * If entry with the same name allready exist, skip it. @@ -349,6 +377,7 @@ class system_bind { return $zone; } + /** * * @param string $domain @@ -360,6 +389,7 @@ class system_bind { } } + /** * return true if zone is locked * @@ -374,6 +404,7 @@ class system_bind { return false; } + /** * * @global m_mysql $db @@ -401,6 +432,7 @@ class system_bind { return true; // fixme add tests } + /** * Delete the zone configuration file * @@ -416,6 +448,7 @@ class system_bind { return true; } + /** * * @global m_hooks $hooks @@ -446,6 +479,7 @@ class system_bind { return true; } + /** * Regenerate bind configuration and load it * @@ -478,6 +512,7 @@ class system_bind { return true; } + /** * */ @@ -485,7 +520,6 @@ class system_bind { _("The zone file of this domain is locked. Contact your administrator."); } -} // class +} /* Class system_bind */ -?> diff --git a/bureau/class/config.php b/bureau/class/config.php index 7e571425..89bc42ed 100755 --- a/bureau/class/config.php +++ b/bureau/class/config.php @@ -1,14 +1,6 @@ - Merci de revenir plus tard."; - exit(); - } - /* */ if (ini_get("safe_mode")) { echo _("SAFE MODE IS ENABLED for the web panel ! It's a bug in your php or apache configuration, please fix it !!"); @@ -71,7 +56,7 @@ if (isset($http_auth)) { } } if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) { - // Gruiiik + // Gruiiik does http-auth : simulate a posted-login/pass $_REQUEST["username"] = $_SERVER['PHP_AUTH_USER']; $_REQUEST["password"] = $_SERVER['PHP_AUTH_PW']; } @@ -88,9 +73,11 @@ $host = getenv("HTTP_HOST"); /* Global variables (AlternC configuration) */ require_once(dirname(__FILE__) . "/local.php"); -// Define constants from vars of /etc/alternc/local.sh -// The you can't choose where is the AlternC Panel +/** + * Define constants from vars of /etc/alternc/local.sh + * The you can't choose where is the AlternC Panel + */ define("DEFAULT_PASS_SIZE", 10); define('ALTERNC_MAIL', "$L_ALTERNC_MAIL"); define('ALTERNC_HTML', "$L_ALTERNC_HTML"); @@ -116,14 +103,12 @@ require_once($root . "/class/functions.php"); require_once($root . "/class/variables.php"); -// Classe h�rit�e de la classe db de la phplib. -/** - * Class for MySQL management in the bureau +/** + * Class for MySQL management in the panel * * This class heriting from the db class of the phplib manages * the connection to the MySQL database. - */ - + */ class DB_system extends DB_Sql { function __construct() { global $L_MYSQL_HOST,$L_MYSQL_DATABASE,$L_MYSQL_LOGIN,$L_MYSQL_PWD; @@ -132,22 +117,23 @@ class DB_system extends DB_Sql { } $db = new DB_system(); -// $db = new Sql($L_MYSQL_DATABASE, $L_MYSQL_HOST, $L_MYSQL_LOGIN, $L_MYSQL_PWD); // Current User ID = the user whose commands are made on behalf of. $cuid = 0; $classes = array(); -/* CLASSES PHP : automatic include : */ + +/* PHP CLASSES : automatic include : */ foreach (glob($root . "class/m_*.php") as $di) { if (preg_match("#${root}class/m_(.*)\\.php$#", $di, $match)) { // $ $classes[] = $match[1]; require_once($di); } } + /* THE DEFAULT CLASSES ARE : - dom, ftp, mail, quota, bro, admin, mem, mysql, err, variables + dom, ftp, mail, quota, bro, admin, mem, mysql, messages, variables */ // Load file for the system class. @@ -160,7 +146,7 @@ foreach (glob($root . "class/class_system_*.php") as $fcs) { require_once($fcs); } -/* Language */ +/* Language environment setup */ include_once("lang_env.php"); $mem = new m_mem(); @@ -181,9 +167,10 @@ if ((variable_get('force_https', '0', "This variable is set to 0 (default) if us } } -// CHECK CSRF for ALL POSTS : -// you MUST add csrf_get(); after ALL