Alternc  latest
Alternc logiel libre pour l'hébergement
1.0.1.php
Go to the documentation of this file.
1 #!/usr/bin/php
2 <?php
3 
4 // If we upgrade directly to 3.1 the panel directory change
5 $panel='';
6 if(chdir("/usr/share/alternc/panel")) $panel='/usr/share/alternc/panel';
7 elseif (chdir("/var/alternc/bureau")) $panel='/var/alternc/bureau';
8 
9 if (empty($panel)) { echo "Problem to load panel library"; exit(1); }
10 
11 require("$panel/class/config_nochk.php");
12 
13 // we go super-admin
14 $admin->enabled=1;
15 $dom->lock();
16 
17 // And we process the database changes :
18 $db->query("SELECT * FROM domaines;");
19 $domains=array();
20 while ($db->next_record()) {
21  $domains[]=array("dom"=>$db->Record["domaine"],"gesmx"=>$db->Record["gesmx"],"mx"=>$db->Record["mx"]);
22 }
23 foreach($domains as $v) {
24  if ($v["gesmx"]) {
25  $dom->alternc_add_mx_domain($v["dom"]);
26  } else {
27  $dom->set_sub_domain($v["dom"],"","mx",$v["mx"]);
28  }
29 }
30 
31 $dom->unlock();
32 
33 
34 ?>
$panel
Definition: 1.0.1.php:5
if(empty( $panel))
Definition: 1.0.1.php:9
$domains
Definition: 1.0.1.php:19
exit
Definition: adm_doadd.php:70
global $db
Definition: bootstrap.php:26
if(empty($site_name)) elseif($piwik->site_add( $site_name, $site_urls))
$dom
Definition: whois_test.php:10