Changeset 1247
- Timestamp:
- 06/29/08 00:56:27
(2 months ago)
- Author:
- rats
- Message:
GUI Update 5/5: reseller
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1241 |
r1247 |
|
| 23 | 23 | check_login(__FILE__); |
|---|
| 24 | 24 | |
|---|
| 25 | | if (Config::exists('HOSTING_PLANS_LEVEL') && Config::get('HOSTING_PLANS_LEVEL') == strtolower('admin')) { |
|---|
| | 25 | if (Config::exists('HOSTING_PLANS_LEVEL') && strtolower(Config::get('HOSTING_PLANS_LEVEL')) == 'admin') { |
|---|
| 26 | 26 | Header("Location: hp.php"); |
|---|
| 27 | | |
|---|
| 28 | 27 | die(); |
|---|
| 29 | 28 | } |
|---|
| … | … | |
| 83 | 82 | 'TR_STATUS' => tr('Available for purchasing'), |
|---|
| 84 | 83 | 'TR_TEMPLATE_DESCRIPTON' => tr('Description'), |
|---|
| 85 | | 'TR_EXAMPEL' => tr('(e.g. EUR)'), |
|---|
| | 84 | 'TR_EXAMPLE' => tr('(e.g. EUR)'), |
|---|
| 86 | 85 | 'TR_ADD_PLAN' => tr('Add plan') |
|---|
| 87 | 86 | ) |
|---|
| … | … | |
| 124 | 123 | 'HP_PAYMENT' => '', |
|---|
| 125 | 124 | 'HP_DESCRIPTION_VALUE' => '', |
|---|
| 126 | | 'TR_STATUS_NO' => 'checked', |
|---|
| 127 | | 'HP_DISK_VALUE' => '' |
|---|
| 128 | | ) |
|---|
| 129 | | ); |
|---|
| | 125 | 'TR_STATUS_YES' => '', |
|---|
| | 126 | 'TR_STATUS_NO' => 'checked', |
|---|
| | 127 | 'TR_PHP_YES' => '', |
|---|
| | 128 | 'TR_PHP_NO' => 'checked', |
|---|
| | 129 | 'TR_CGI_YES' => '', |
|---|
| | 130 | 'TR_CGI_NO' => 'checked', |
|---|
| | 131 | 'HP_DISK_VALUE' => '' |
|---|
| | 132 | )); |
|---|
| 130 | 133 | $tpl->assign('MESSAGE', ''); |
|---|
| 131 | 134 | } // End of gen_empty_hp_page() |
|---|
| … | … | |
| 258 | 261 | return false; |
|---|
| 259 | 262 | } |
|---|
| 260 | | |
|---|
| 261 | | return TRUE; |
|---|
| 262 | 263 | } // End of check_data_correction() |
|---|
| 263 | 264 | |
|---|
| … | … | |
| 304 | 305 | |
|---|
| 305 | 306 | $_SESSION['hp_added'] = '_yes_'; |
|---|
| 306 | | header("Location: ehp.php"); |
|---|
| | 307 | header("Location: hp.php"); |
|---|
| 307 | 308 | die(); |
|---|
| 308 | 309 | } |
|---|
| r1241 |
r1247 |
|
| 57 | 57 | city, |
|---|
| 58 | 58 | country, |
|---|
| | 59 | street1, |
|---|
| | 60 | street2, |
|---|
| 59 | 61 | email, |
|---|
| 60 | 62 | phone, |
|---|
| 61 | | fax, |
|---|
| 62 | | street1, |
|---|
| 63 | | street2 |
|---|
| | 63 | fax |
|---|
| 64 | 64 | from |
|---|
| 65 | 65 | admin |
|---|
| … | … | |
| 72 | 72 | $tpl->assign( |
|---|
| 73 | 73 | array( |
|---|
| 74 | | 'FIRST_NAME' => $rs->fields['fname'], |
|---|
| 75 | | 'LAST_NAME' => $rs->fields['lname'], |
|---|
| 76 | | 'FIRM' => $rs->fields['firm'], |
|---|
| 77 | | 'ZIP' => $rs->fields['zip'], |
|---|
| 78 | | 'CITY' => $rs->fields['city'], |
|---|
| 79 | | 'COUNTRY' => $rs->fields['country'], |
|---|
| 80 | | 'EMAIL' => $rs->fields['email'], |
|---|
| 81 | | 'PHONE' => $rs->fields['phone'], |
|---|
| 82 | | 'FAX' => $rs->fields['fax'], |
|---|
| 83 | | 'STREET1' => $rs->fields['street1'], |
|---|
| 84 | | 'STREET2' => $rs->fields['street2'], |
|---|
| 85 | | 'VL_MALE' => (($rs->fields['gender'] === 'M') ? 'selected' : ''), |
|---|
| 86 | | 'VL_FEMALE' => (($rs->fields['gender'] === 'F') ? 'selected' : ''), |
|---|
| 87 | | 'VL_UNKNOWN' => ((($rs->fields['gender'] === 'U') || (empty($rs->fields['gender']))) ? 'selected' : '') |
|---|
| 88 | | ) |
|---|
| 89 | | ); |
|---|
| | 74 | 'FIRST_NAME' => (($rs->fields['fname'] == null) ? '' : $rs->fields['fname']), |
|---|
| | 75 | 'LAST_NAME' => (($rs->fields['lname'] == null) ? '' : $rs->fields['lname']), |
|---|
| | 76 | 'FIRM' => (($rs->fields['firm'] == null) ? '' : $rs->fields['firm']), |
|---|
| | 77 | 'ZIP' => (($rs->fields['zip'] == null) ? '' : $rs->fields['zip']), |
|---|
| | 78 | 'CITY' => (($rs->fields['city'] == null) ? '' : $rs->fields['city']), |
|---|
| | 79 | 'COUNTRY' => (($rs->fields['country'] == null) ? '' : $rs->fields['country']), |
|---|
| | 80 | 'STREET_1' => (($rs->fields['street1'] == null) ? '' : $rs->fields['street1']), |
|---|
| | 81 | 'STREET_2' => (($rs->fields['street2'] == null) ? '' : $rs->fields['street2']), |
|---|
| | 82 | 'EMAIL' => (($rs->fields['email'] == null) ? '' : $rs->fields['email']), |
|---|
| | 83 | 'PHONE' => (($rs->fields['phone'] == null) ? '' : $rs->fields['phone']), |
|---|
| | 84 | 'FAX' => (($rs->fields['fax'] == null) ? '' : $rs->fields['fax']), |
|---|
| | 85 | 'VL_MALE' => (($rs->fields['gender'] == 'M') ? 'selected' : ''), |
|---|
| | 86 | 'VL_FEMALE' => (($rs->fields['gender'] == 'F') ? 'selected' : ''), |
|---|
| | 87 | 'VL_UNKNOWN' => ((($rs->fields['gender'] == 'U') || (empty($rs->fields['gender']))) ? 'selected' : '') |
|---|
| | 88 | ) |
|---|
| | 89 | ); |
|---|
| 90 | 90 | } |
|---|
| 91 | 91 | |
|---|
| r1241 |
r1247 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| | 3 | * ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| 4 | 4 | * |
|---|
| 5 | | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| 7 | | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| | 8 | * @link http://isp-control.net |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | | * @license |
|---|
| 11 | | * This program is free software; you can redistribute it and/or modify it under |
|---|
| 12 | | * the terms of the MPL General Public License as published by the Free Software |
|---|
| 13 | | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| 14 | | * version. |
|---|
| 15 | | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| 16 | | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| 17 | | * http://opensource.org | osi@opensource.org |
|---|
| 18 | | **/ |
|---|
| 19 | | |
|---|
| 20 | | |
|---|
| | 11 | * @license |
|---|
| | 12 | * This program is free software; you can redistribute it and/or modify it under |
|---|
| | 13 | * the terms of the MPL General Public License as published by the Free Software |
|---|
| | 14 | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| | 15 | * version. |
|---|
| | 16 | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| | 17 | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| | 18 | * http://opensource.org | osi@opensource.org |
|---|
| | 19 | */ |
|---|
| 21 | 20 | |
|---|
| 22 | 21 | require '../include/ispcp-lib.php'; |
|---|
| … | … | |
| 24 | 23 | check_login(__FILE__); |
|---|
| 25 | 24 | |
|---|
| 26 | | |
|---|
| 27 | 25 | if (!isset($_GET['domain_id'])) { |
|---|
| 28 | | |
|---|
| 29 | 26 | header( "Location: users.php" ); |
|---|
| 30 | | |
|---|
| 31 | 27 | die(); |
|---|
| 32 | 28 | } |
|---|
| 33 | 29 | |
|---|
| 34 | 30 | if (!is_numeric($_GET['domain_id'])) { |
|---|
| 35 | | |
|---|
| 36 | 31 | header( "Location: users.php" ); |
|---|
| 37 | | |
|---|
| 38 | 32 | die(); |
|---|
| 39 | | |
|---|
| 40 | 33 | } |
|---|
| 41 | | |
|---|
| 42 | 34 | |
|---|
| 43 | 35 | // so we have domain id and lets disable or enable it |
|---|
| 44 | 36 | $domain_id = $_GET['domain_id']; |
|---|
| 45 | 37 | |
|---|
| 46 | | |
|---|
| 47 | | |
|---|
| 48 | | |
|---|
| 49 | | |
|---|
| 50 | | // hopa tropa - check statsu to know if have to disable or enable it |
|---|
| | 38 | // check status to know if have to disable or enable it |
|---|
| 51 | 39 | $query = <<<SQL_QUERY |
|---|
| 52 | 40 | select |
|---|
| … | … | |
| 64 | 52 | //lets check if this reseller has rights to disable/enable this domain |
|---|
| 65 | 53 | if ($rs -> fields['domain_created_id'] != $_SESSION['user_id']){ |
|---|
| 66 | | |
|---|
| 67 | 54 | header( "Location: users.php" ); |
|---|
| 68 | 55 | die(); |
|---|
| 69 | | |
|---|
| 70 | 56 | } |
|---|
| 71 | 57 | |
|---|
| 72 | 58 | $location = 'reseller'; |
|---|
| 73 | 59 | |
|---|
| 74 | | if ($rs -> fields['domain_status'] == Config::get('ITEM_OK_STATUS')) |
|---|
| 75 | | { |
|---|
| | 60 | if ($rs -> fields['domain_status'] == Config::get('ITEM_OK_STATUS')) { |
|---|
| 76 | 61 | |
|---|
| 77 | 62 | //disable_domain ($sql, $domain_id, $rs -> fields['domain_name']); |
|---|
| 78 | 63 | $action = "disable"; |
|---|
| 79 | 64 | change_domain_status(&$sql, &$domain_id, $rs -> fields['domain_name'], $action, $location); |
|---|
| 80 | | } |
|---|
| 81 | | |
|---|
| 82 | | else if ($rs -> fields['domain_status'] == Config::get('ITEM_DISABLED_STATUS')) |
|---|
| 83 | | { |
|---|
| | 65 | } else if ($rs -> fields['domain_status'] == Config::get('ITEM_DISABLED_STATUS')) { |
|---|
| 84 | 66 | |
|---|
| 85 | 67 | //enable_domain ($sql, $domain_id, $rs -> fields['domain_name']); |
|---|
| … | … | |
| 87 | 69 | change_domain_status(&$sql, &$domain_id, $rs -> fields['domain_name'], $action, $location); |
|---|
| 88 | 70 | |
|---|
| 89 | | } |
|---|
| 90 | | else { |
|---|
| | 71 | } else { |
|---|
| 91 | 72 | |
|---|
| 92 | 73 | header( "Location: users.php" ); |
|---|
| 93 | | |
|---|
| 94 | 74 | die(); |
|---|
| 95 | 75 | } |
|---|
| r1241 |
r1247 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| | 3 | * ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| 4 | 4 | * |
|---|
| 5 | | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| 7 | | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| | 8 | * @link http://isp-control.net |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | | * @license |
|---|
| 11 | | * This program is free software; you can redistribute it and/or modify it under |
|---|
| 12 | | * the terms of the MPL General Public License as published by the Free Software |
|---|
| 13 | | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| 14 | | * version. |
|---|
| 15 | | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| 16 | | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| 17 | | * http://opensource.org | osi@opensource.org |
|---|
| 18 | | **/ |
|---|
| 19 | | |
|---|
| | 11 | * @license |
|---|
| | 12 | * This program is free software; you can redistribute it and/or modify it under |
|---|
| | 13 | * the terms of the MPL General Public License as published by the Free Software |
|---|
| | 14 | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| | 15 | * version. |
|---|
| | 16 | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| | 17 | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| | 18 | * http://opensource.org | osi@opensource.org |
|---|
| | 19 | */ |
|---|
| 20 | 20 | |
|---|
| 21 | 21 | require '../include/ispcp-lib.php'; |
|---|
| … | … | |
| 26 | 26 | |
|---|
| 27 | 27 | if (isset($_SESSION['logged_from']) && isset($_SESSION['logged_from_id']) && isset($_GET['action']) && $_GET['action'] == "go_back") { |
|---|
| 28 | | |
|---|
| 29 | 28 | change_user_interface($_SESSION['user_id'], $_SESSION['logged_from_id']); |
|---|
| 30 | | |
|---|
| 31 | 29 | } else if (isset($_SESSION['user_id']) && isset($_GET['to_id'])) { |
|---|
| 32 | 30 | |
|---|
| … | … | |
| 35 | 33 | // admin logged as reseller: |
|---|
| 36 | 34 | if (isset($_SESSION['logged_from']) && isset($_SESSION['logged_from_id'])) { |
|---|
| 37 | | |
|---|
| 38 | 35 | $from_id = $_SESSION['logged_from_id']; |
|---|
| 39 | | |
|---|
| 40 | 36 | } else {// reseller: |
|---|
| 41 | 37 | |
|---|
| … | … | |
| 47 | 43 | |
|---|
| 48 | 44 | header('Location: users.php'); |
|---|
| 49 | | |
|---|
| 50 | 45 | die(); |
|---|
| 51 | | |
|---|
| 52 | 46 | } |
|---|
| 53 | 47 | |
|---|
| … | … | |
| 59 | 53 | |
|---|
| 60 | 54 | header('Location: index.php'); |
|---|
| 61 | | |
|---|
| 62 | 55 | die(); |
|---|
| 63 | | |
|---|
| 64 | 56 | } |
|---|
| 65 | 57 | |
|---|
| r1241 |
r1247 |
|
| 35 | 35 | } |
|---|
| 36 | 36 | |
|---|
| 37 | | /* check for domain ouwns */ |
|---|
| 38 | | $query = "select domain_id from domain where domain_id=? and domain_created_id=?"; |
|---|
| | 37 | /* check for domain owns */ |
|---|
| | 38 | $query = "SELECT domain_id FROM domain WHERE domain_id=? AND domain_created_id=?"; |
|---|
| 39 | 39 | $res = exec_query($sql, $query, array($del_id, $reseller)); |
|---|
| 40 | 40 | $data = $res->FetchRow(); |
|---|
| … | … | |
| 46 | 46 | |
|---|
| 47 | 47 | /* check for mail acc in MAIN domain */ |
|---|
| 48 | | $query = "select count(mail_id) as mailnum from mail_users where domain_id=?"; |
|---|
| | 48 | $query = "SELECT COUNT(mail_id) AS mailnum FROM mail_users WHERE domain_id=?"; |
|---|
| 49 | 49 | $res = exec_query($sql, $query, array($del_id)); |
|---|
| 50 | 50 | $data = $res->FetchRow(); |
|---|
| … | … | |
| 57 | 57 | |
|---|
| 58 | 58 | /* check for ftp acc in MAIN domain */ |
|---|
| 59 | | $query = "select count(fg.gid) as ftpnum from ftp_group fg,domain d where d.domain_id=? and fg.groupname=d.domain_name"; |
|---|
| | 59 | $query = "SELECT COUNT(fg.gid) AS ftpnum FROM ftp_group fg,domain d WHERE d.domain_id=? AND fg.groupname=d.domain_name"; |
|---|
| 60 | 60 | $res = exec_query($sql, $query, array($del_id)); |
|---|
| 61 | 61 | $data = $res->FetchRow(); |
|---|
| … | … | |
| 68 | 68 | |
|---|
| 69 | 69 | /* check for alias domains */ |
|---|
| 70 | | $query = "select count(alias_id) as aliasnum from domain_aliasses where domain_id=?"; |
|---|
| | 70 | $query = "SELECT COUNT(alias_id) AS aliasnum FROM domain_aliasses WHERE domain_id=?"; |
|---|
| 71 | 71 | $res = exec_query($sql, $query, array($del_id)); |
|---|
| 72 | 72 | $data = $res->FetchRow(); |
|---|
| … | … | |
| 79 | 79 | |
|---|
| 80 | 80 | /* check for subdomains */ |
|---|
| 81 | | $query = "select count(subdomain_id) as subnum from subdomain where domain_id=?"; |
|---|
| | 81 | $query = "SELECT COUNT(subdomain_id) AS subnum FROM subdomain WHERE domain_id = ?"; |
|---|
| 82 | 82 | $res = exec_query($sql, $query, array($del_id)); |
|---|
| 83 | 83 | $data = $res->FetchRow(); |
|---|
| … | … | |
| 91 | 91 | substract_from_reseller_props($_SESSION['user_id'], $del_id); |
|---|
| 92 | 92 | |
|---|
| 93 | | $query = "update domain set domain_status='delete' where domain_id=?"; |
|---|
| | 93 | $query = "UPDATE domain SET domain_status='delete' WHERE domain_id = ?"; |
|---|
| 94 | 94 | $res = exec_query($sql, $query, array($del_id)); |
|---|
| 95 | 95 | send_request(); |
|---|
| 96 | 96 | |
|---|
| 97 | 97 | /* delete admin of this domain */ |
|---|
| 98 | | $query = "select domain_admin_id,domain_name from domain where domain_id=?"; |
|---|
| | 98 | $query = "SELECT domain_admin_id,domain_name FROM domain WHERE domain_id = ?"; |
|---|
| 99 | 99 | $res = exec_query($sql, $query, array($del_id)); |
|---|
| 100 | 100 | $dat = $res->FetchRow(); |
|---|
| 101 | 101 | |
|---|
| 102 | | $query = "delete from admin where admin_id=?"; |
|---|
| 103 | | $res = exec_query($sql, $query, array($dat[domain_admin_id])); |
|---|
| | 102 | $query = "DELETE FROM admin WHERE admin_id = ?"; |
|---|
| | 103 | $res = exec_query($sql, $query, array($dat['domain_admin_id'])); |
|---|
| 104 | 104 | |
|---|
| 105 | 105 | /* delete the quota section */ |
|---|
| 106 | | $query = "delete from quotalimits where name=?"; |
|---|
| 107 | | $res = exec_query($sql, $query, array($dat[domain_admin_id])); |
|---|
| | 106 | $query = "DELETE FROM quotalimits WHERE name = ?"; |
|---|
| | 107 | $res = exec_query($sql, $query, array($dat['domain_admin_id'])); |
|---|
| 108 | 108 | |
|---|
| 109 | | $admin_login = $_SESSION['user_logged']; |
|---|
| 110 | | write_log("$admin_login: delete domain " . $dat['domain_name']); |
|---|
| | 109 | |
|---|
| | 110 | write_log($_SESSION['user_logged'] .": deletes domain " . $dat['domain_name']); |
|---|
| 111 | 111 | |
|---|
| 112 | 112 | $_SESSION['ddel'] = '_yes_'; |
|---|
| … | … | |
| 163 | 163 | $rdisk_current -= $disk_max; |
|---|
| 164 | 164 | |
|---|
| 165 | | $rprops = "$rdmn_current;$rdmn_max;"; |
|---|
| | 165 | $rprops = "$rdmn_current;$rdmn_max;"; |
|---|
| 166 | 166 | $rprops .= "$rsub_current;$rsub_max;"; |
|---|
| 167 | 167 | $rprops .= "$rals_current;$rals_max;"; |
|---|
| r1241 |
r1247 |
|
| 80 | 80 | send_request(); |
|---|
| 81 | 81 | $admin_login = $_SESSION['user_logged']; |
|---|
| 82 | | write_log("$admin_login: delete domain alias: " . $dat['alias_name']); |
|---|
| | 82 | write_log("$admin_login: deletes domain alias: " . $dat['alias_name']); |
|---|
| 83 | 83 | |
|---|
| 84 | 84 | $_SESSION['aldel'] = '_yes_'; |
|---|
| r1241 |
r1247 |
|
| 98 | 98 | send_request(); |
|---|
| 99 | 99 | $admin_login = $_SESSION['user_logged']; |
|---|
| 100 | | write_log("$admin_login: delete subdomain: " . $dat['subdomain_name']); |
|---|
| | 100 | write_log("$admin_login: deletes subdomain: " . $dat['subdomain_name']); |
|---|
| 101 | 101 | |
|---|
| 102 | 102 | $_SESSION['dadel'] = '_yes_'; |
|---|
| r1241 |
r1247 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| 4 | | * |
|---|
| 5 | | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| 7 | | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| 9 | | * |
|---|
| 10 | | * @license |
|---|
| 11 | | * This program is free software; you can redistribute it and/or modify it under |
|---|
| 12 | | * the terms of the MPL General Public License as published by the Free Software |
|---|
| 13 | | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| 14 | | * version. |
|---|
| 15 | | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| 16 | | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| 17 | | * http://opensource.org | osi@opensource.org |
|---|
| 18 | | **/ |
|---|
| 19 | | |
|---|
| | 3 | * ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| | 4 | * |
|---|
| | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| | 8 | * @link http://isp-control.net |
|---|
| | 9 | * @author ispCP Team |
|---|
| | 10 | * |
|---|
| | 11 | * @license |
|---|
| | 12 | * This program is free software; you can redistribute it and/or modify it under |
|---|
| | 13 | * the terms of the MPL General Public License as published by the Free Software |
|---|
| | 14 | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| | 15 | * version. |
|---|
| | 16 | * You should have received a copy of the MPL Mozilla Public License along with |
|---|
| | 17 | * this program; if not, write to the Open Source Initiative (OSI) |
|---|
| | 18 | * http://opensource.org | osi@opensource.org |
|---|
| | 19 | */ |
|---|
| 20 | 20 | |
|---|
| 21 | 21 | require '../include/ispcp-lib.php'; |
|---|
| … | … | |
| 24 | 24 | |
|---|
| 25 | 25 | $tpl = new pTemplate(); |
|---|
| 26 | | $tpl -> define_dynamic('page', Config::get('RESELLER_TEMPLATE_PATH') . '/domain_statistics.tpl'); |
|---|
| 27 | | $tpl -> define_dynamic('page_message', 'page'); |
|---|
| 28 | | $tpl -> define_dynamic('logged_from', 'page'); |
|---|
| 29 | | $tpl -> define_dynamic('month_list', 'page'); |
|---|
| 30 | | $tpl -> define_dynamic('year_list', 'page'); |
|---|
| 31 | | $tpl -> define_dynamic('traffic_table', 'page'); |
|---|
| 32 | | $tpl -> define_dynamic('traffic_table_item', 'traffic_table'); |
|---|
| | 26 | $tpl->define_dynamic('page', Config::get('RESELLER_TEMPLATE_PATH') . '/domain_statistics.tpl'); |
|---|
| | 27 | $tpl->define_dynamic('page_message', 'page'); |
|---|
| | 28 | $tpl->define_dynamic('logged_from', 'page'); |
|---|
| | 29 | $tpl->define_dynamic('month_list', 'page'); |
|---|
| | 30 | $tpl->define_dynamic('year_list', 'page'); |
|---|
| | 31 | $tpl->define_dynamic('traffic_table', 'page'); |
|---|
| | 32 | $tpl->define_dynamic('traffic_table_item', 'traffic_table'); |
|---|
| 33 | 33 | |
|---|
| 34 | 34 | $theme_color = Config::get('USER_INITIAL_THEME'); |
|---|
| 35 | 35 | |
|---|
| 36 | | $tpl -> assign(array('TR_ADMIN_DOMAIN_STATISTICS_PAGE_TITLE' => tr('ispCP - Domain Statistics Data'), |
|---|
| 37 | | 'THEME_COLOR_PATH' => "../themes/$theme_color", |
|---|
| 38 | | 'THEME_CHARSET' => tr('encoding'), |
|---|
| 39 | | 'ISP_LOGO' => get_logo($_SESSION['user_id']))); |
|---|
| | 36 | $tpl->assign(array('TR_ADMIN_DOMAIN_STATISTICS_PAGE_TITLE' => tr('ispCP - Domain Statistics Data'), |
|---|
| | 37 | 'THEME_COLOR_PATH' => "../themes/$theme_color", |
|---|
| | 38 | 'THEME_CHARSET' => tr('encoding'), |
|---|
| | 39 | 'ISP_LOGO' => get_logo($_SESSION['user_id']))); |
|---|
| 40 | 40 | |
|---|
| 41 | 41 | if (isset($_POST['domain_id'])) { |
|---|
| 42 | | $domain_id = $_POST['domain_id']; |
|---|
| | 42 | $domain_id = $_POST['domain_id']; |
|---|
| 43 | 43 | } else if (isset($_GET['domain_id'])) { |
|---|
| 44 | | $domain_id = $_GET['domain_id']; |
|---|
| | 44 | $domain_id = $_GET['domain_id']; |
|---|
| 45 | 45 | } |
|---|
| 46 | 46 | |
|---|
| 47 | 47 | if (isset($_POST['month']) && isset($_POST['year'])) { |
|---|
| 48 | | $year = intval($_POST['year']); |
|---|
| 49 | | $month = intval($_POST['month']); |
|---|
| | 48 | $year = intval($_POST['year']); |
|---|
| | 49 | $month = intval($_POST['month']); |
|---|
| 50 | 50 | } else if (isset($_GET['month']) && isset($_GET['year'])) { |
|---|
| 51 | | $month = intval($_GET['month']); |
|---|
| 52 | | $year = intval($_GET['year']); |
|---|
| | 51 | $month = intval($_GET['month']); |
|---|
| | 52 | $year = intval($_GET['year']); |
|---|
| 53 | 53 | } else { |
|---|
| 54 | | $month = date("m"); |
|---|
| 55 | | $year = date("Y"); |
|---|
| | 54 | $month = date("m"); |
|---|
| | 55 | $year = date("Y"); |
|---|
| 56 | 56 | } |
|---|
| 57 | 57 | |
|---|
| 58 | 58 | if (!is_numeric($domain_id) || !is_numeric($month) || !is_numeric($year)) { |
|---|
| 59 | | header("Location: reseller_statistics.php"); |
|---|
| 60 | | die(); |
|---|
| | 59 | header("Location: reseller_statistics.php"); |
|---|
| | 60 | die(); |
|---|
| 61 | 61 | } |
|---|
| 62 | 62 | |
|---|
| 63 | 63 | function get_domain_trafic($from, $to, $domain_id) |
|---|
| 64 | 64 | { |
|---|
| 65 | | $sql = Database::getInstance(); |
|---|
| 66 | | $reseller_id = $_SESSION['user_id']; |
|---|
| 67 | | $query = <<<SQL_QUERY |
|---|
| | 65 | $sql = Database::getInstance(); |
|---|
| | 66 | $reseller_id = $_SESSION['user_id']; |
|---|
| | 67 | $query = <<<SQL_QUERY |
|---|
| 68 | 68 | select |
|---|
| 69 | 69 | domain_id |
|---|
| … | … | |
| 74 | 74 | SQL_QUERY; |
|---|
| 75 | 75 | |
|---|
| 76 | | $rs = exec_query($sql, $query, array($domain_id, $reseller_id)); |
|---|
| 77 | | if ($rs -> RecordCount() == 0) { |
|---|
| 78 | | set_page_message(tr('User does not exist or you do not have permission to access this interface!')); |
|---|
| 79 | | header('Location: reseller_user_statistics.php'); |
|---|
| 80 | | die(); |
|---|
| 81 | | } |
|---|
| 82 | | |
|---|
| 83 | | $query = <<<SQL_QUERY |
|---|
| | 76 | $rs = exec_query($sql, $query, array($domain_id, $reseller_id)); |
|---|
| | 77 | if ($rs->RecordCount() == 0) { |
|---|
| | 78 | set_page_message(tr('User does not exist or you do not have permission to access this interface!')); |
|---|
| | 79 | header('Location: reseller_user_statistics.php'); |
|---|
| | 80 | die(); |
|---|
| | 81 | } |
|---|
| | 82 | |
|---|
| | 83 | $query = <<<SQL_QUERY |
|---|
| 84 | 84 | select |
|---|
| 85 | 85 | IFNULL(sum(dtraff_web), 0) as web_dr, |
|---|
| … | … | |
| 92 | 92 | domain_id = ? and dtraff_time >= ? and dtraff_time <= ? |
|---|
| 93 | 93 | SQL_QUERY; |
|---|
| 94 | | $rs = exec_query($sql, $query, array($domain_id, $from, $to)); |
|---|
| 95 | | |
|---|
| 96 | | if($rs -> RecordCount() == 0) { |
|---|
| 97 | | return array(0,0,0,0); |
|---|
| 98 | | } else { |
|---|
| 99 | | return array($rs->fields['web_dr'], |
|---|
| 100 | | $rs->fields['ftp_dr'], |
|---|
| 101 | | $rs->fields['pop_dr'], |
|---|
| 102 | | $rs->fields['mail_dr']); |
|---|
| 103 | | } |
|---|
| 104 | | } |
|---|
| 105 | | |
|---|
| 106 | | function generate_page (&$tpl, $domain_id) |
|---|
| 107 | | { |
|---|
| 108 | | $sql = Database::getInstance(); |
|---|
| 109 | | global $month,$year; |
|---|
| 110 | | global $web_trf, $ftp_trf, $smtp_trf, $pop_trf, |
|---|
| 111 | | $sum_web, $sum_ftp, $sum_mail, $sum_pop; |
|---|
| 112 | | |
|---|
| 113 | | $fdofmnth = mktime(0,0,0,$month,1,$year); |
|---|
| 114 | | $ldofmnth = mktime(1,0,0,$month+1,0,$year); |
|---|
| 115 | | |
|---|
| 116 | | if ($month == date('m') && $year== date('Y')) { |
|---|
| 117 | | $curday = date('j'); |
|---|
| 118 | | } else { |
|---|
| 119 | | $tmp = mktime(1,0,0,$month+1,0,$year); |
|---|
| 120 | | $curday = date('j',$tmp); |
|---|
| 121 | | } |
|---|
| 122 | | |
|---|
| 123 | | $curtimestamp = time(); |
|---|
| 124 | | $firsttimestamp = mktime(0,0,0,$month,1,$year); |
|---|
| 125 | | |
|---|
| 126 | | $all[0] = 0; |
|---|
| 127 | | $all[1] = 0; |
|---|
| 128 | | $all[2] = 0; |
|---|
| 129 | | $all[3] = 0; |
|---|
| 130 | | $all[4] = 0; |
|---|
| 131 | | $all[5] = 0; |
|---|
| 132 | | $all[6] = 0; |
|---|
| 133 | | $all[7] = 0; |
|---|
| 134 | | |
|---|
| 135 | | $counter = 0; |
|---|
| 136 | | for ($i = 1; $i <= $curday; $i++) { |
|---|
| 137 | | $ftm = mktime(0,0,0,$month,$i,$year); |
|---|
| 138 | | $ltm = mktime(23,59,59,$month,$i,$year); |
|---|
| 139 | | |
|---|
| 140 | | $query = <<<SQL_QUERY |
|---|
| | 94 | $rs = exec_query($sql, $query, array($domain_id, $from, $to)); |
|---|
| | 95 | |
|---|
| | 96 | if ($rs->RecordCount() == 0) { |
|---|
| | 97 | return array(0, 0, 0, 0); |
|---|
| | 98 | } else { |
|---|
| | 99 | return array($rs->fields['web_dr'], |
|---|
| | 100 | $rs->fields['ftp_dr'], |
|---|
| | 101 | $rs->fields['pop_dr'], |
|---|
| | 102 | $rs->fields['mail_dr']); |
|---|
| | 103 | } |
|---|
| | 104 | } |
|---|
| | 105 | |
|---|
| | 106 | function generate_page (&$tpl, $domain_id) { |
|---|
| | 107 | $sql = Database::getInstance(); |
|---|
| | 108 | global $month, $year; |
|---|
| | 109 | global $web_trf, $ftp_trf, $smtp_trf, $pop_trf, |
|---|
| | 110 | $sum_web, $sum_ftp, $sum_mail, $sum_pop; |
|---|
| | 111 | |
|---|
| | 112 | $fdofmnth = mktime(0, 0, 0, $month, 1, $year); |
|---|
| | 113 | $ldofmnth = mktime(1, 0, 0, $month + 1, 0, $year); |
|---|
| | 114 | |
|---|
| | 115 | if ($month == date('m') && $year == date('Y')) { |
|---|
| | 116 | $curday = date('j'); |
|---|
| | 117 | } else { |
|---|
| | 118 | $tmp = mktime(1, 0, 0, $month + 1, 0, $year); |
|---|
| | 119 | $curday = date('j', $tmp); |
|---|
| | 120 | } |
|---|
| | 121 | |
|---|
| | 122 | $curtimestamp = time(); |
|---|
| | 123 | $firsttimestamp = mktime(0, 0, 0, $month, 1, $year); |
|---|
| | 124 | |
|---|
| | 125 | $all[0] = 0; |
|---|
| | 126 | $all[1] = 0; |
|---|
| | 127 | $all[2] = 0; |
|---|
| | 128 | $all[3] = 0; |
|---|
| | 129 | $all[4] = 0; |
|---|
| | 130 | $all[5] = 0; |
|---|
| | 131 | $all[6] = 0; |
|---|
| | 132 | $all[7] = 0; |
|---|
| | 133 | |
|---|
| | 134 | $counter = 0; |
|---|
| | 135 | for ($i = 1; $i <= $curday; $i++) { |
|---|
| | 136 | $ftm = mktime(0, 0, 0, $month, $i, $year); |
|---|
| | 137 | $ltm = mktime(23, 59, 59, $month, $i, $year); |
|---|
| | 138 | |
|---|
| | 139 | $query = <<<SQL_QUERY |
|---|
| 141 | 140 | select |
|---|
| 142 | 141 | dtraff_web,dtraff_ftp,dtraff_mail,dtraff_pop,dtraff_time |
|---|
| … | … | |
| 146 | 145 | domain_id = ? and dtraff_time >= ? and dtraff_time <= ? |
|---|
| 147 | 146 | SQL_QUERY; |
|---|
| 148 | | $rs = exec_query($sql, $query, array($domain_id, $ftm, $ltm)); |
|---|
| 149 | | |
|---|
| 150 | | $has_data = false; |
|---|
| 151 | | list($web_trf, $ftp_trf, $pop_trf, $smtp_trf) = get_domain_trafic($ftm, $ltm, $domain_id); |
|---|
| 152 | | |
|---|
| 153 | | $date_formt = Config::get('DATE_FORMAT'); |
|---|
| 154 | | if ($web_trf == 0 && $ftp_trf == 0 && $smtp_trf == 0 && $pop_trf == 0) { |
|---|
| 155 | | $tpl -> assign(array('MONTH' => $month, |
|---|
| 156 | | 'YEAR' => $year, |
|---|
| 157 | | 'DOMAIN_ID' => $domain_id, |
|---|
| 158 | | 'DATE' => date($date_formt, strtotime($year."-".$month."-".$i)), |
|---|
| 159 | | 'WEB_TRAFFIC' => 0, |
|---|
| 160 | | 'FTP_TRAFFIC' => 0, |
|---|
| 161 | | 'SMTP_TRAFFIC' => 0, |
|---|
| 162 | | 'POP3_TRAFFIC' => 0, |
|---|
| 163 | | 'ALL_TRAFFIC' => 0)); |
|---|
| 164 | | } else { |
|---|
| 165 | | if ($counter % 2 == 0) { |
|---|
| 166 | | $tpl -> assign('ITEM_CLASS', 'content'); |
|---|
| 167 | | } else { |
|---|
| 168 | | $tpl -> assign('ITEM_CLASS', 'content2'); |
|---|
| 169 | | } |
|---|
| 170 | | |
|---|
| 171 | | $sum_web += $web_trf; |
|---|
| 172 | | $sum_ftp += $ftp_trf; |
|---|
| 173 | | $sum_mail += $smtp_trf; |
|---|
| 174 | | $sum_pop += $pop_trf; |
|---|
| 175 | | |
|---|
| 176 | | $tpl -> assign(array('DATE' => date($date_formt, strtotime($year."-".$month."-".$i)), |
|---|
| 177 | | 'WEB_TRAFFIC' => sizeit($web_trf), |
|---|
| 178 | | 'FTP_TRAFFIC' => sizeit($ftp_trf), |
|---|
| 179 | | 'SMTP_TRAFFIC' => sizeit($smtp_trf), |
|---|
| 180 | | 'POP3_TRAFFIC' => sizeit($pop_trf), |
|---|
| 181 | | 'ALL_TRAFFIC' => sizeit($web_trf + $ftp_trf + $smtp_trf + $pop_trf))); |
|---|
| 182 | | $tpl -> parse('TRAFFIC_TABLE_ITEM', '.traffic_table_item'); |
|---|
| 183 | | $counter ++; |
|---|
| 184 | | } |
|---|
| 185 | | |
|---|
| 186 | | $tpl -> assign(array('MONTH' => $month, |
|---|
| 187 | | 'YEAR' => $year, |
|---|
| 188 | | 'DOMAIN_ID' => $domain_id, |
|---|
| 189 | | 'ALL_WEB_TRAFFIC' => sizeit($sum_web), |
|---|
| 190 | | 'ALL_FTP_TRAFFIC' => sizeit($sum_ftp), |
|---|
| 191 | | 'ALL_SMTP_TRAFFIC' => sizeit($sum_mail), |
|---|
| 192 | | 'ALL_POP3_TRAFFIC' => sizeit($sum_pop), |
|---|
| 193 | | 'ALL_ALL_TRAFFIC' => sizeit($sum_web + $sum_ftp + $sum_mail + $sum_pop))); |
|---|
| 194 | | |
|---|
| 195 | | $tpl -> parse('TRAFFIC_TABLE', 'traffic_table'); |
|---|
| 196 | | |
|---|
| 197 | | } |
|---|
| 198 | | } |
|---|
| 199 | | |
|---|
| | 147 | $rs = exec_query($sql, $query, array($domain_id, $ftm, $ltm)); |
|---|
| | 148 | |
|---|
| | 149 | $has_data = false; |
|---|
| | 150 | list($web_trf, $ftp_trf, $pop_trf, $smtp_trf) = get_domain_trafic($ftm, $ltm, $domain_id); |
|---|
| | 151 | |
|---|
| | 152 | $date_formt = Config::get('DATE_FORMAT'); |
|---|
| | 153 | if ($web_trf == 0 && $ftp_trf == 0 && $smtp_trf == 0 && $pop_trf == 0) { |
|---|
| | 154 | $tpl->assign(array('MONTH' => $month, |
|---|
| | 155 | 'YEAR' => $year, |
|---|
| | 156 | 'DOMAIN_ID' => $domain_id, |
|---|
| | 157 | 'DATE' => date($date_formt, strtotime($year . "-" . $month . "-" . $i)), |
|---|
| | 158 | 'WEB_TRAFFIC' => 0, |
|---|
| | 159 | 'FTP_TRAFFIC' => 0, |
|---|
| | 160 | 'SMTP_TRAFFIC' => 0, |
|---|
| | 161 | 'POP3_TRAFFIC' => 0, |
|---|
| | 162 | 'ALL_TRAFFIC' => 0)); |
|---|
| | 163 | } else { |
|---|
| | 164 | if ($counter % 2 == 0) { |
|---|
| | 165 | $tpl->assign('ITEM_CLASS', 'content'); |
|---|
| | 166 | } else { |
|---|
| | 167 | $tpl->assign('ITEM_CLASS', 'content2'); |
|---|
| | 168 | } |
|---|
| | 169 | |
|---|
| | 170 | $sum_web += $web_trf; |
|---|
| | 171 | $sum_ftp += $ftp_trf; |
|---|
| | 172 | $sum_mail += $smtp_trf; |
|---|
| | 173 | $sum_pop += $pop_trf; |
|---|
| | 174 | |
|---|
| | 175 | $tpl->assign(array('DATE' => date($date_formt, strtotime($year . "-" . $month . "-" . $i)), |
|---|
| | 176 | 'WEB_TRAFFIC' => sizeit($web_trf), |
|---|
| | 177 | 'FTP_TRAFFIC' => sizeit($ftp_trf), |
|---|
| | 178 | 'SMTP_TRAFFIC' => sizeit($smtp_trf), |
|---|
| | 179 | 'POP3_TRAFFIC' => sizeit($pop_trf), |
|---|
| | 180 | 'ALL_TRAFFIC' => sizeit($web_trf + $ftp_trf + $smtp_trf + $pop_trf))); |
|---|
| | 181 | $tpl->parse('TRAFFIC_TABLE_ITEM', '.traffic_table_item'); |
|---|
| | 182 | $counter ++; |
|---|
| | 183 | } |
|---|
| | 184 | |
|---|
| | 185 | $tpl->assign(array('MONTH' => $month, |
|---|
| | 186 | 'YEAR' => $year, |
|---|
| | 187 | 'DOMAIN_ID' => $domain_id, |
|---|
| | 188 | 'ALL_WEB_TRAFFIC' => sizeit($sum_web), |
|---|
| | 189 | 'ALL_FTP_TRAFFIC' => sizeit($sum_ftp), |
|---|
| | 190 | 'ALL_SMTP_TRAFFIC' => sizeit($sum_mail), |
|---|
| | 191 | 'ALL_POP3_TRAFFIC' => sizeit($sum_pop), |
|---|
| | 192 | 'ALL_ALL_TRAFFIC' => sizeit($sum_web + $sum_ftp + $sum_mail + $sum_pop))); |
|---|
| | 193 | |
|---|
| | 194 | $tpl->parse('TRAFFIC_TABLE', 'traffic_table'); |
|---|
| | 195 | } |
|---|
| | 196 | } |
|---|
| 200 | 197 | |
|---|
| 201 | 198 | /* |
|---|
| … | … | |
| 211 | 208 | |
|---|
| 212 | 209 | $tpl->assign(array('TR_DOMAIN_STATISTICS' => tr('Domain statistics'), |
|---|
| 213 | | 'TR_MONTH' => tr('Month'), |
|---|
| 214 | | 'TR_YEAR' => tr('Year'), |
|---|
| 215 | | 'TR_SHOW' => tr('Show'), |
|---|
| 216 | | 'TR_WEB_TRAFFIC' => tr('Web traffic'), |
|---|
| 217 | | 'TR_FTP_TRAFFIC' => tr('FTP traffic'), |
|---|
| 218 | | 'TR_SMTP_TRAFFIC' => tr('SMTP traffic'), |
|---|
| 219 | | 'TR_POP3_TRAFFIC' => tr('POP3/IMAP traffic'), |
|---|
| 220 | | 'TR_ALL_TRAFFIC' => tr('All traffic'), |
|---|
| 221 | | 'TR_ALL' => tr('All'), |
|---|
| 222 | | 'TR_DAY' => tr('Day')) |
|---|
| 223 | | ); |
|---|
| | 210 | 'TR_MONTH' => tr('Month'), |
|---|
| | 211 | 'TR_YEAR' => tr('Year'), |
|---|
| | 212 | 'TR_SHOW' => tr('Show'), |
|---|
| | 213 | 'TR_WEB_TRAFFIC' => tr('Web traffic'), |
|---|
| | 214 | 'TR_FTP_TRAFFIC' => tr('FTP traffic'), |
|---|
| | 215 | 'TR_SMTP_TRAFFIC' => tr('SMTP traffic'), |
|---|
| | 216 | 'TR_POP3_TRAFFIC' => tr('POP3/IMAP traffic'), |
|---|
| | 217 | 'TR_ALL_TRAFFIC' => tr('All traffic'), |
|---|
| | 218 | 'TR_ALL' => tr('All'), |
|---|
| | 219 | 'TR_DAY' => tr('Day')) |
|---|
| | 220 | ); |
|---|
| 224 | 221 | |
|---|
| 225 | 222 | gen_select_lists($tpl, $month, $year); |
|---|
| 226 | 223 | generate_page($tpl, $domain_id); |
|---|
| 227 | 224 | gen_page_message($tpl); |
|---|
| 228 | | $tpl -> parse('PAGE', 'page'); |
|---|
| 229 | | $tpl -> prnt(); |
|---|
| 230 | | |
|---|
| 231 | | if (Config::get('DUMP_GUI_DEBUG')) dump_gui_debug(); |
|---|
| | 225 | |
|---|
| | 226 | $tpl->parse('PAGE', 'page'); |
|---|
| | 227 | $tpl->prnt(); |
|---|
| | 228 | |
|---|
| | 229 | if (Config::get('DUMP_GUI_DEBUG')) |
|---|
| | 230 | dump_gui_debug(); |
|---|
| 232 | 231 | |
|---|
| 233 | 232 | unset_messages(); |
|---|
| | 233 | |
|---|
| 234 | 234 | ?> |
|---|
| r1241 |
r1247 |
|
| 216 | 216 | |
|---|
| 217 | 217 | $admin_login = $_SESSION['user_logged']; |
|---|
| 218 | | write_log("$admin_login: change domain alias forward: " . $rs->fields['t1.alias_name']); |
|---|
| | 218 | write_log("$admin_login: changes domain alias forward: " . $rs->fields['t1.alias_name']); |
|---|
| 219 | 219 | unset($_SESSION['edit_ID']); |
|---|
| 220 | 220 | $tpl->assign('MESSAGE', ""); |
|---|
| r1241 |
r1247 |
|
| 401 | 401 | |
|---|
| 402 | 402 | $admin_login = $_SESSION['user_logged']; |
|---|
| 403 | | write_log("$admin_login changed data/password for $dmn_user_name!"); |
|---|
| | 403 | write_log("$admin_login changes data/password for $dmn_user_name!"); |
|---|
| 404 | 404 | |
|---|
| 405 | 405 | if (isset($_POST['send_data']) && !empty($inpass)) { |
|---|
| r1241 |
r1247 |
|
| 77 | 77 | 'TR_STATUS' => tr('Available for purchasing'), |
|---|
| 78 | 78 | 'TR_TEMPLATE_DESCRIPTON' => tr('Description'), |
|---|
| 79 | | 'TR_EXAMPEL' => tr('(e.g. EUR)'), |
|---|
| | 79 | 'TR_EXAMPLE' => tr('(e.g. EUR)'), |
|---|
| 80 | 80 | 'TR_EDIT_HOSTING_PLAN' => tr('Update plan'), |
|---|
| 81 | 81 | 'TR_UPDATE_PLAN' => tr('Update plan') |
|---|
| … | … | |
| 309 | 309 | return false; |
|---|
| 310 | 310 | } |
|---|
| 311 | | |
|---|
| 312 | | return TRUE; |
|---|
| 313 | 311 | } // End of check_data_iscorrect() |
|---|
| 314 | 312 | |
|---|
| r1241 |
r1247 |
|
| 66 | 66 | gen_logged_from($tpl); |
|---|
| 67 | 67 | |
|---|
| 68 | | $tpl->assign(array('TR_EMAIL_SETUP' => tr('Email setup'), |
|---|
| | 68 | $tpl->assign( |
|---|
| | 69 | array( |
|---|
| | 70 | 'TR_EMAIL_SETUP' => tr('Email setup'), |
|---|
| 69 | 71 | 'TR_MESSAGE_TEMPLATE_INFO' => tr('Message template info'), |
|---|
| 70 | 72 | 'TR_USER_LOGIN_NAME' => tr('User login (system) name'), |
|---|
| … | … | |
| 77 | 79 | 'TR_SENDER_NAME' => tr('Senders name'), |
|---|
| 78 | 80 | 'TR_APPLY_CHANGES' => tr('Apply changes'), |
|---|
| | 81 | 'TR_USERTYPE' => tr('User type (admin, reseller, user)'), |
|---|
| | 82 | 'TR_BASE_SERVER_VHOST' => tr('URL to this admin panel'), |
|---|
| 79 | 83 | 'SUBJECT_VALUE' => $data['subject'], |
|---|
| 80 | 84 | 'MESSAGE_VALUE' => $data['message'], |
|---|
| 81 | 85 | 'SENDER_EMAIL_VALUE' => $data['sender_email'], |
|---|
| 82 | | 'SENDER_NAME_VALUE' => $data['sender_name'])); |
|---|
| | 86 | 'SENDER_NAME_VALUE' => $data['sender_name'] |
|---|
| | 87 | ) |
|---|
| | 88 | ); |
|---|
| 83 | 89 | |
|---|
| 84 | 90 | gen_page_message($tpl); |
|---|
| r1241 |
r1247 |
|
| 1 | 1 | <?php |
|---|
| 2 | | /** |
|---|
| 3 | 2 | /** |
|---|
| 4 | 3 | * ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| … | … | |
| 28 | 27 | $tpl->define_dynamic('page_message', 'page'); |
|---|
| 29 | 28 | $tpl->define_dynamic('logged_from', 'page'); |
|---|
| | 29 | $tpl->define_dynamic('custom_buttons', 'page'); |
|---|
| 30 | 30 | |
|---|
| 31 | 31 | $theme_color = Config::get('USER_INITIAL_THEME'); |
|---|
| … | … | |
| 106 | 106 | 'TR_SENDER_EMAIL' => tr('Senders email'), |
|---|
| 107 | 107 | 'TR_SENDER_NAME' => tr('Senders name'), |
|---|
| 108 | | 'TR_APPLY_CHANGES' => tr('Apply changes') |
|---|
| | 108 | 'TR_APPLY_CHANGES' => tr('Apply changes'), |
|---|
| | 109 | 'TR_BASE_SERVER_VHOST' => tr('URL to this admin panel') |
|---|
| 109 | 110 | ) |
|---|
| 110 | 111 | ); |
|---|
| r1241 |
r1247 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| | 3 | * ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| 4 | 4 | * |
|---|
| 5 | | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| 7 | | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| | 8 | * @link http://isp-control.net |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | | * @license |
|---|
| 11 | | * Thi |
|---|
|