-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodules_customer_sasettings.php
77 lines (70 loc) · 2.4 KB
/
modules_customer_sasettings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* filename: $Source: /syscp/modules_customer_sa-settings.php,v $
* begin: Thursday, Dec 21 2004
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* @author Wolfgang Ziegler <nuppla@gmx.at>
* @copyright 2004 sasettings dev team
*/
define('AREA', 'customer');
require("./lib/modules/sasettings/tables.inc.php");
require("./lib/modules/sasettings/functions.php");
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require("./lib/init.php");
include("./lib/modules/sasettings/insertCss.php");
if(isset($_POST['id']))
{ $id=intval($_POST['id']);
}
elseif(isset($_GET['id']))
{ $id=intval($_GET['id']);
}
if(($page == "domains" || $page == "overview") && $action == "")
{ eval("echo \"".getTemplate("modules/sasettings/domains_top")."\";");
$result=Database::query(
'SELECT `id`, `domain` '.
'FROM `'.TABLE_PANEL_DOMAINS.'` '.
'WHERE `customerid`="'.$userinfo['customerid'].'" '.
'AND `isemaildomain`="1" '.
'AND `deactivated`="0" '.
'ORDER BY `domain` ASC'
);
while($row=$result->fetch(PDO::FETCH_ASSOC))
{ eval("echo \"".getTemplate("modules/sasettings/domains_main")."\";");
}
eval("echo \"".getTemplate("modules/sasettings/domains_bottom")."\";");
}
elseif($page == "domains" && $action == "edit")
{ $result=Database::query(
'SELECT `domain` FROM `'.TABLE_PANEL_DOMAINS.'` '.
'WHERE `id` = "'.$id.'" '.
'AND `customerid`="'.$userinfo['customerid'].'" '.
'AND `isemaildomain`="1" '.
'AND `deactivated`="0" '
);
$result=$result->fetch(PDO::FETCH_ASSOC);
if(!isset($result['domain']))
{ die("Error. You can't edit the settings for this domain.");
}
if(isset($_POST['send']) && $_POST['send']=='send')
{ //store values
saveValues($result['domain']);
}
//show the form
showEditForm($result['domain']);
}
elseif($page == "domains" && $action == "help")
{ if(isset($_GET['preferenceid']))
{ showDetailedDescription(intval($_GET['preferenceid']));
}
}
?>