Alternc
3.2
Alternc logiel libre pour l'hébergement
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
1.0.1.php
Go to the documentation of this file.
1
#!/usr/bin/php
2
<?php
3
4
// We check that mysql php module is loaded
5
if
(!function_exists(
'mysql_connect'
)) {
6
if
(!dl(
"mysql.so"
))
7
exit
(1);
8
}
9
10
// If we upgrade directly to 3.1 the panel directory change
11
$panel
=
''
;
12
if
(chdir(
"/usr/share/alternc/panel"
))
$panel
=
'/usr/share/alternc/panel'
;
13
elseif (chdir(
"/var/alternc/bureau"
))
$panel
='/var/alternc/bureau';
14
15
if
(empty(
$panel
)) { echo
"Problem to load panel library"
;
exit
(1); }
16
17
require(
"$panel/class/config_nochk.php"
);
18
19
// we go super-admin
20
$admin->enabled=1;
21
$dom
->lock();
22
23
// And we process the database changes :
24
$db
->query(
"SELECT * FROM domaines;"
);
25
$domains
=array();
26
while
(
$db
->next_record()) {
27
$domains
[]=array(
"dom"
=>
$db
->Record[
"domaine"
],
"gesmx"
=>
$db
->Record[
"gesmx"
],
"mx"
=>
$db
->Record[
"mx"
]);
28
}
29
foreach
(
$domains
as $v) {
30
if
($v[
"gesmx"
]) {
31
$dom
->alternc_add_mx_domain($v[
"dom"
]);
32
}
else
{
33
$dom
->set_sub_domain($v[
"dom"
],
""
,
"mx"
,$v[
"mx"
]);
34
}
35
}
36
37
$dom
->unlock();
38
39
40
?>
code
alternc
install
upgrades
1.0.1.php
Generated on Mon Mar 24 2014 17:14:20 for Alternc by
1.8.1.2