Пример #1
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
$message = "\r\nName: " . security::encode($_POST['name']) . "\r\nEmail: " . security::encode($_POST['email']) . "\r\nSubjet: " . security::encode($_POST['subject']) . "\r\n\r\nMessage: " . security::encode($_POST['message']) . "\r\n";
mail("*****@*****.**", "[AS] " . security::encode($_POST['subject']), $message, "From: " . security::encode($_POST['email']));
$message = "{$lang['success']}\r\n\r\n<!-- Google Code for Envoi d&#39;un email Conversion Page -->\r\n<script type=\"text/javascript\">\r\n/* <![CDATA[ */\r\nvar google_conversion_id = 998104197;\r\nvar google_conversion_language = \"en\";\r\nvar google_conversion_format = \"3\";\r\nvar google_conversion_color = \"ffffff\";\r\nvar google_conversion_label = \"Bvm0CJv26AMQhbn32wM\";\r\nvar google_conversion_value = 0;\r\n/* ]]> */\r\n</script>\r\n<script type=\"text/javascript\" src=\"https://www.googleadservices.com/pagead/conversion.js\">\r\n</script>\r\n<noscript>\r\n<div style=\"display:inline;\">\r\n<img height=\"1\" width=\"1\" style=\"border-style:none;\" alt=\"\" src=\"https://www.googleadservices.com/pagead/conversion/998104197/?value=0&amp;label=Bvm0CJv26AMQhbn32wM&amp;guid=ON&amp;script=0\"/>\r\n</div>\r\n</noscript>";
$_SESSION['MESSAGE']['TYPE'] = 'success';
$_SESSION['MESSAGE']['TEXT'] = $message;
template::redirect('/about/contact');
/* ========================== OUTPUT PAGE ========================== */
$template->output($content);
Пример #2
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('news/del', array('id' => $_GET['id']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/blog');
}
Пример #3
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/account/update', array('id' => $_GET['id'], 'domain' => $_GET['domain'], 'mode' => 'delete', 'key' => $_GET['key']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    $template->redirect('/panel/users/config?id=' . security::encode($_GET['id']) . '&domain=' . security::encode($_GET['domain']));
}
Пример #4
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
switch ($_POST['type']) {
    case 'admin':
        api::send('self/token/add', array('name' => $_POST['name'], 'lease' => 'never', 'grants' => 'ACCESS,SELF_SELECT,SELF_UPDATE,SELF_DELETE,SELF_GRANT_SELECT,SELF_GROUP_SELECT,SELF_GROUP_DELETE,SELF_TOKEN_INSERT,SELF_TOKEN_SELECT,SELF_TOKEN_UPDATE,SELF_TOKEN_DELETE,SELF_QUOTA_SELECT,SELF_TOKEN_GRANT_DELETE,SELF_TOKEN_GRANT_INSERT,SELF_DOMAIN_INSERT,SELF_DOMAIN_SELECT,SELF_DOMAIN_DELETE,SELF_DOMAIN_UPDATE,SELF_SUBDOMAIN_SELECT,SELF_SUBDOMAIN_UPDATE,SELF_SUBDOMAIN_INSERT,SELF_SUBDOMAIN_DELETE,SELF_ACCOUNT_DELETE,SELF_ACCOUNT_INSERT,SELF_ACCOUNT_SELECT,SELF_ACCOUNT_UPDATE,SELF_SERVICE_DELETE,SELF_SERVICE_INSERT,SELF_SERVICE_SELECT,SELF_SERVICE_UPDATE,SELF_APP_INSERT,SELF_APP_DELETE,SELF_APP_UPDATE,SELF_APP_SELECT,SELF_BILL_SELECT,SELF_BILL_INSERT,SELF_STORAGE_SELECT,SELF_STORAGE_UPDATE,SELF_STORAGE_DELETE,SELF_STORAGE_INSERT,SELF_LOG_SELECT,SELF_LOG_INSERT,SELF_LOG_UPDATE,SELF_LOG_DELETE,SELF_BACKUP_SELECT,SELF_BACKUP_UPDATE,SELF_BACKUP_INSERT,SELF_BACKUP_DELETE'));
        break;
    case 'apps':
        api::send('self/token/add', array('name' => $_POST['name'], 'lease' => 'never', 'grants' => 'ACCESS,SELF_APP_INSERT,SELF_APP_SELECT,SELF_APP_UPDATE,SELF_APP_DELETE'));
        break;
    case 'services':
        api::send('self/token/add', array('name' => $_POST['name'], 'lease' => 'never', 'grants' => 'ACCESS,SELF_SERVICE_INSERT,SELF_SERVICE_SELECT,SELF_SERVICE_UPDATE,SELF_SERVICE_DELETE'));
        break;
    case 'domains':
        api::send('self/token/add', array('name' => $_POST['name'], 'lease' => 'never', 'grants' => 'ACCESS,SELF_DOMAIN_INSERT,SELF_DOMAIN_DELETE,SELF_DOMAIN_UPDATE,SELF_DOMAIN_SELECT,SELF_ACCOUNT_INSERT,SELF_ACCOUNT_DELETE,SELF_ACCOUNT_SELECT,SELF_ACCOUNT_UPDATE'));
        break;
    case 'blank':
        api::send('self/token/add', array('name' => $_POST['name'], 'lease' => 'never'));
        break;
}
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/settings/tokens');
}
Пример #5
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
$security->logout();
template::redirect('/');
Пример #6
0
            $content .= "\r\n\t\t\t\t</table>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t";
            $template->output($content);
        } else {
            if (count($user) == 1) {
                $template->redirect('/admin/user/detail?id=' . $user[0]['id']);
            } else {
                template::redirect('/admin');
            }
        }
    } else {
        if ($_POST['site'] != $lang['site']) {
            try {
                $site = api::send('site/select', array('site' => $_POST['site']));
            } catch (Exception $e) {
                template::redirect('/admin?error=site');
            }
            $template->redirect('/admin/users/detail?id=' . $site[0]['user']['id']);
        } else {
            if ($_POST['domain'] != $lang['domain']) {
                try {
                    $domain = api::send('domain/select', array('domain' => $_POST['domain']));
                } catch (Exception $e) {
                    template::redirect('/admin?error=domain');
                }
                $template->redirect('/admin/users/detail?id=' . $domain[0]['user']['id']);
            } else {
                template::redirect('/admin');
            }
        }
    }
}
Пример #7
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('group/add', array('name' => $_POST['name']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/groups');
}
Пример #8
0
if (isset($_POST['pass']) && strlen($_POST['pass']) > 0) {
    $params['pass'] = $_POST['pass'];
}
if (isset($_POST['report']) && strlen($_POST['report']) > 0) {
    $params['report'] = $_POST['report'];
}
if (isset($_POST['postal_address']) && strlen($_POST['postal_address']) > 0) {
    $params['postal_address'] = $_POST['postal_address'];
}
if (isset($_POST['organisation']) && strlen($_POST['organisation']) > 0) {
    $params['organisation'] = $_POST['organisation'];
}
if (isset($_POST['postal_code']) && strlen($_POST['postal_code']) > 0) {
    $params['postal_code'] = $_POST['postal_code'];
}
if (isset($_POST['locality']) && strlen($_POST['locality']) > 0) {
    $params['locality'] = $_POST['locality'];
}
try {
    api::send('self/user/update', $params);
    $_SESSION['MESSAGE']['TYPE'] = 'success';
    $_SESSION['MESSAGE']['TEXT'] = $lang['success'];
} catch (Exception $e) {
    $_SESSION['MESSAGE']['TYPE'] = 'error';
    $_SESSION['MESSAGE']['TEXT'] = $lang['error'];
}
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/settings');
}
Пример #9
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/database/del', array('database' => $_POST['database']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/databases');
}
Пример #10
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/domain/del', array('id' => $_GET['id']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/domains');
}
Пример #11
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
try {
    $message = api::send('message/list', array('id' => $_GET['id']));
    $message = $message[0];
    $messages = api::send('message/list', array('parent' => $_GET['id']));
} catch (Exception $e) {
    template::redirect('/admin/messages');
}
if (!$message['id'] || !$_GET['id']) {
    template::redirect('/admin/messages');
}
$content .= "\n\t<div class=\"panel\">\n\t\t<div class=\"top\">\n\t\t\t<div class=\"left\" style=\"width: 600px;\">\n\t\t\t\t<h3>{$message['title']}</h3>\n\t\t\t</div>\n\t\t\t<div class=\"right\" style=\"width: 400px; float: right; text-align: right;\">\n\t\t\t\t<a class=\"button classic\" href=\"#\" onclick=\"\$('#reply').dialog('open'); return false;\" style=\"width: 180px; height: 22px; float: right;\">\n\t\t\t\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['reply']}</span>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t\t<div class=\"clear\"></div><br /><br />\n\t\t</div>\n\t\t<div class=\"container\">\n\t\t\t<div class=\"topic\">\n";
foreach ($messages as $m) {
    $content .= "\n\t\t\t\t<div class=\"message\">\n\t\t\t\t\t<div class=\"toppart\">\n\t\t\t\t\t\t<div class=\"messageid\">\n\t\t\t\t\t\t\t#{$m['id']}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"date\">\n\t\t\t\t\t\t\t" . date($lang['dateformat'], $m['date']) . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t\t<a href=\"#\" onclick=\"showEdit('{$m['id']}'); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/pencil.png\" alt=\"\" /></a>\n\t\t\t\t\t\t\t<a href=\"#\" onclick=\"\$('#id').val('{$m['id']}'); \$('#delete').dialog('open'); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/close.png\" alt=\"\" /></a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"meta\">\n\t\t\t\t\t\t<a href=\"/admin/users/detail?id={$m['user']['id']}\"><img style=\"width: 80px; display: block;\" src=\"" . (file_exists("{$GLOBALS['CONFIG']['SITE']}/images/users/{$m['user']['id']}.png") ? "/{$GLOBALS['CONFIG']['SITE']}/images/users/{$m['user']['id']}.png" : "/{$GLOBALS['CONFIG']['SITE']}/images/users/user.png") . "\" /></a>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t{$m['user']['name']}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"text\">\n\t\t\t\t\t\t<form action=\"/admin/messages/update_action\" method=\"post\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"{$m['id']}\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"parent\" value=\"{$message['id']}\" />\n\t\t\t\t\t\t\t<p id=\"text{$m['id']}\">" . bbcode::display($m['content']) . "</p>\n\t\t\t\t\t\t\t<textarea id=\"edit{$m['id']}\" style=\"display: none; width: 700px; height: 200px;\" name=\"content\">" . bbcode::edit($m['content']) . "</textarea>\n\t\t\t\t\t\t\t<input id=\"submit{$m['id']}\" style=\"display: none;\" type=\"submit\" value=\"{$lang['update']}\" />\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t</div>\n\t\t";
}
$content .= "\n\t\t\t\t<div class=\"message\">\n\t\t\t\t\t<div class=\"toppart\">\n\t\t\t\t\t\t<div class=\"messageid\">\n\t\t\t\t\t\t\t#{$message['id']}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"date\">\n\t\t\t\t\t\t\t" . date($lang['dateformat'], $message['date']) . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t\t<a href=\"#\" onclick=\"showEdit('{$message['id']}'); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/pencil.png\" alt=\"\" /></a>\n\t\t\t\t\t\t\t<a href=\"#\" onclick=\"\$('#id').val('{$message['id']}'); \$('#delete').dialog('open'); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/close.png\" alt=\"\" /></a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"meta\">\n\t\t\t\t\t\t<a href=\"/admin/users/detail?id={$message['user']['id']}\"><img style=\"width: 80px; display: block;\" src=\"" . (file_exists("{$GLOBALS['CONFIG']['SITE']}/images/users/{$message['user']['id']}.png") ? "/{$GLOBALS['CONFIG']['SITE']}/images/users/{$message['user']['id']}.png" : "/{$GLOBALS['CONFIG']['SITE']}/images/users/user.png") . "\" /></a>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t{$message['user']['name']}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"text\">\n\t\t\t\t\t\t<form action=\"/admin/messages/update_action\" method=\"post\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"{$message['id']}\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"parent\" value=\"{$message['id']}\" />\n\t\t\t\t\t\t\t<p id=\"text{$message['id']}\">" . bbcode::display($message['content']) . "</p>\n\t\t\t\t\t\t\t<textarea id=\"edit{$message['id']}\" style=\"display: none; width: 700px; height: 200px;\" name=\"content\">" . bbcode::edit($message['content']) . "</textarea>\n\t\t\t\t\t\t\t<input id=\"submit{$message['id']}\" style=\"display: none;\" type=\"submit\" value=\"{$lang['update']}\" />\n\t\t\t\t\t\t</form>\t\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<br />\n\t\t\t<a class=\"button classic\" href=\"#\" onclick=\"\$('#reply').dialog('open'); return false;\" style=\"width: 180px; height: 22px; float: right;\">\n\t\t\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['reply']}</span>\n\t\t\t</a>\n";
if ($message['status'] != 3) {
    $content .= "\n\t\t\t<a class=\"button classic\" href=\"#\" onclick=\"\$('#close').dialog('open'); return false;\" style=\"width: 180px; height: 22px; float: right; margin-right: 20px;\">\n\t\t\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['close']}</span>\n\t\t\t</a>\n\t";
} else {
    $content .= "\n\t\t\t<a class=\"button classic\" href=\"/admin/messages/open_action?id={$message['id']}\" style=\"width: 180px; height: 22px; float: right; margin-right: 20px;\">\n\t\t\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['open']}</span>\n\t\t\t</a>\n\t";
}
$content .= "\n\t\t</div>\n\t\t<div class=\"clear\"></div><br /><br />\n\t</div>\n\t<div id=\"reply\" class=\"floatingdialog\">\n\t\t<br />\n\t\t<h3 class=\"center\">{$lang['reply']}</h3>\n\t\t<div class=\"form-small\">\t\t\n\t\t\t<form action=\"/admin/messages/add_action\" method=\"post\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" name=\"parent\" value=\"{$message['id']}\" />\n\t\t\t\t<input type=\"hidden\" name=\"type\" value=\"{$message['type']}\" />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<textarea class=\"auto\" style=\"text-align: left; width: 400px; height: 150px;\" name=\"content\" onfocus=\"this.value = this.value=='{$lang['content']}' ? '' : this.value; this.style.color='#4c4c4c';\" onfocusout=\"this.value = this.value == '' ? this.value = '{$lang['content']}' : this.value; this.value=='{$lang['content']}' ? this.style.color='#cccccc' : this.style.color='#4c4c4c'\">{$lang['content']}</textarea>\n\t\t\t\t\t<span class=\"help-block\">{$lang['content_help']}</span>\n\t\t\t\t</fieldset>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<input autofocus type=\"submit\" value=\"{$lang['send']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<div id=\"delete\" class=\"floatingdialog\">\n\t\t<h3 class=\"center\">{$lang['delete']}</h3>\n\t\t<p style=\"text-align: center;\">{$lang['delete_text']}</p>\n\t\t<div class=\"form-small\">\t\t\n\t\t\t<form action=\"/admin/messages/del_action\" method=\"get\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" value=\"{$message['id']}\" name=\"parent\" />\n\t\t\t\t<input id=\"id\" type=\"hidden\" value=\"\" name=\"id\" />\n\t\t\t\t<fieldset>\t\n\t\t\t\t\t<input autofocus type=\"submit\" value=\"{$lang['delete_now']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<div id=\"close\" class=\"floatingdialog\">\n\t\t<br />\n\t\t<h3 class=\"center\">{$lang['close']}</h3>\n\t\t<p style=\"text-align: center;\">{$lang['close_text']}</p>\n\t\t<div class=\"form-small\">\t\t\n\t\t\t<form action=\"/admin/messages/close_action\" method=\"get\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" value=\"{$message['id']}\" name=\"id\" />\n\t\t\t\t<fieldset>\t\n\t\t\t\t\t<input autofocus type=\"submit\" value=\"{$lang['close_now']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<script>\n\t\tnewFlexibleDialog('reply', 550);\n\t\tnewFlexibleDialog('delete', 550);\n\t\tnewFlexibleDialog('close', 550);\n\t\tvar status = 0;\n\t\tfunction showEdit(id)\n\t\t{\n\t\t\tvar options = {};\n\t\t\tif( status == 0 )\n\t\t\t{\n\t\t\t\t\$(\"#text\" + id).css(\"display\", \"none\");\n\t\t\t\t\$(\"#submit\"  + id).show(\"fade\", options, 200);\n\t\t\t\t\$(\"#edit\"  + id).show(\"fade\", options, 200);\n\t\t\t\tstatus = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\$(\"#submit\" + id).css(\"display\", \"none\");\n\t\t\t\t\$(\"#edit\" + id).css(\"display\", \"none\");\n\t\t\t\t\$(\"#text\"  + id).show(\"fade\", options, 200);\n\t\t\t\tstatus = 0;\n\t\t\t}\n\t\t}\n\t</script>\n";
/* ========================== OUTPUT PAGE ========================== */
$template->output($content);
Пример #12
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
$token = api::send('token/list', array('user' => $_GET['user'], 'token' => $_GET['token']));
if (count($token) == 0) {
    template::redirect('/admin/user/detail?id=' . $_GET['user']);
}
$token = $token[0];
$content = "\n\t\t<div class=\"admin\">\n\t\t\t<div class=\"top\">\n\t\t\t\t<div class=\"left\" style=\"padding-top: 5px;\">\n\t\t\t\t\t<h1 class=\"dark\">{$lang['title']} {$token['name']}</h1>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"right\">\n\t\t\t\t\t<a class=\"button classic\" href=\"/admin/users/detail?id={$_GET['user']}\" style=\"width: 180px; height: 22px; float: right;\">\n\t\t\t\t\t\t<span style=\"display: block; font-size: 18px; padding-top: 3px;\">{$lang['back']}</span>\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"clear\"></div><br />\n\t\t\t<div class=\"container\">\n\t\t\t\t<div style=\"width: 380px; float: left;\">\n\t\t\t\t\t<h2 class=\"dark\">{$lang['grants']}</h3>\n";
if (security::hasGrant('GRANT_TOKEN_SELECT')) {
    $tokengrants = api::send('grant/token/list', array('user' => $_GET['user'], 'token' => $_GET['token']));
    if (security::hasGrant('GRANT_USER_SELECT')) {
        $grants = api::send('grant/user/list', array('user' => $_GET['user'], 'overall' => true));
    } else {
        $grants = $tokengrants;
    }
    $content .= "\n\t\t\t\t\t<form action=\"/admin/tokens/grant_action\" method=\"post\">\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th>{$lang['grantname']}</th>\n\t\t\t\t\t\t\t\t<th>{$lang['granted']}</th>\n\t\t\t\t\t\t\t</tr>\n\t";
    if (security::hasGrant(array('GRANT_TOKEN_INSERT', 'GRANT_TOKEN_DELETE'))) {
        $disabled = '';
    } else {
        $disabled = 'disabled';
    }
    foreach ($grants as $g) {
        $checked = '';
        foreach ($tokengrants as $k) {
            if ($g['id'] == $k['id']) {
                $checked = 'checked';
                break;
Пример #13
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/site/del', array('id' => $_GET['id']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel');
}
Пример #14
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/service/del', array('service' => $_POST['service']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/services');
}
Пример #15
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('grant/group/revoke', array('group' => $_GET['group'], 'grant' => $_GET['grant']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/group/detail?id=' . $_GET['group']);
}
Пример #16
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
$domain = api::send('self/domain/list', array('domain' => $_GET['source']));
$domain = $domain[0];
api::send('self/alias/del', array('id' => $_GET['id']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/domains/config?id=' . $domain['id']);
}
Пример #17
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('quota/del', array('id' => $_GET['id']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/quotas');
}
Пример #18
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('group/update', array('id' => $_POST['id'], 'name' => $_POST['name']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/groups/detail?id=' . $_POST['id']);
}
Пример #19
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/message/del', array('id' => $_GET['id']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/messages/detail?id=' . security::encode($_GET['parent']));
}
Пример #20
0
        $apps = 12;
        $success = true;
        break;
    default:
        $success = false;
}
$quotas = api::send('self/quota/list');
foreach ($quotas as $q) {
    if ($q['name'] == 'DISK') {
        $dquota = $q;
    }
    if ($q['name'] == 'MEMORY') {
        $mquota = $q;
    }
    if ($q['name'] == 'SERVICES') {
        $squota = $q;
    }
    if ($q['name'] == 'APPS') {
        $aquota = $q;
    }
}
if ($disk && $dquota['used'] > $disk && ($dquota['max'] <= $disk || $diskplan === true) || $ram && $mquota['used'] > $ram || $ram && $squota['used'] > $services) {
    $_SESSION['MESSAGE']['TYPE'] = 'error';
    $_SESSION['MESSAGE']['TEXT'] = $lang['impossible'];
    template::redirect($_SERVER['HTTP_REFERER']);
}
$pay = array('lang' => translator::getLanguage(), 'first' => 1, 'ip' => $_SERVER['REMOTE_ADDR'], 'email' => $userinfo['email'], 'user' => $userinfo['name'], 'plan' => security::encode($_GET['plan']));
$xpay = base64_encode(serialize($pay));
$content = "\n\t<div class=\"panel\">\n\t\t<div class=\"top\">\n\t\t\t<h1 class=\"dark\" style=\"text-align: center;\">{$lang['title']}</h1>\n\t\t</div>\n\t\t<div class=\"clear\"></div><br /><br />\n\t\t<div class=\"container\" style=\"text-align: center;\">\n\t\t\t<br />\n\t\t\t<p style=\"font-size: 18px;\">{$lang['payment_text']}</p>\n\t\t\t<br />\n\t\t\t<br />\n\t\t\t<div style=\"text-align: center;\">\n\t\t\t\t<div class=\"pay\" onclick=\"\$('#paypal').submit(); return false;\">\n\t\t\t\t\t<h3 class=\"colored\">{$lang['paypal']}</h3>\n\t\t\t\t\t<br />\n\t\t\t\t\t<form id=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\" id=\"paypal\" style=\"display: none;\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\"_xclick\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"business\" value=\"contact@anotherservice.com\" />  \n\t\t\t\t\t\t<input type=\"hidden\" name=\"currency_code\" value=\"EUR\">  \n\t\t\t\t\t\t<input type=\"hidden\" name=\"item_name\" value=\"" . $lang['offer_' . security::encode($_GET['plan']) . '_title'] . "\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"amount\" value=\"" . $lang['offer_' . security::encode($_GET['plan']) . '_price'] . "\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"return\" value=\"https://www.anotherservice.com/panel/plans/landing\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"cancel_return\" value=\"https://www.anotherservice.com/panel/plans/landing\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"notify_url\" value=\"https://www.anotherservice.com/ipn_paypal\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"custom\" value=\"{$xpay}\" />\n\t\t\t\t\t\t<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif\" width=\"1\" height=\"1\" />\n\t\t\t\t\t</form>\n\t\t\t\t\t<img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/illu/paypal.png\" style=\"width: 150px;\" alt=\"\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"pay\" onclick=\"\$('#sips').submit(); return false;\">\n\t\t\t\t\t<h3 class=\"colored\">{$lang['card']}</h3>\n\t\t\t\t\t<br />\n\t\t\t\t\t<img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/illu/card.png\" style=\"width: 150px;\" alt=\"\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"pay\">\n\t\t\t\t\t<h3 class=\"colored\" style=\"color: #6a6a6a\">{$lang['transfer']}</h3>\n\t\t\t\t\t<br />\n\t\t\t\t\t<img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/illu/transfer_disabled.png\" style=\"width: 150px;\" alt=\"\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div><br /><br />\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<form action=\"/panel/plans/card\" method=\"post\" id=\"sips\" style=\"display: none;\">\n\t\t<input type=\"hidden\" name=\"xpay\" value=\"{$xpay}\" />\n\t\t<input type=\"hidden\" name=\"amount\" value=\"" . str_replace('.', '', sprintf("%.2f", round($lang['offer_' . security::encode($_GET['plan']) . '_price'], 2))) . "\" />\n\t\t<input type=\"hidden\" name=\"desc\" value=\"" . str_replace(' ', '&nbsp;', $lang['offer_' . security::encode($_GET['plan']) . '_title']) . "\" />\n\t</form>\t\n";
/* ========================== OUTPUT PAGE ========================== */
$template->output($content);
Пример #21
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/backup/restore', array('id' => $_GET['id'], 'branch' => $_GET['branch']));
$_SESSION['MESSAGE']['TYPE'] = 'success';
$_SESSION['MESSAGE']['TEXT'] = $lang['success'];
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/backups');
}
Пример #22
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
// 1) rekvoke all grants that are not selected
$token = api::send('grant/token/list', array('user' => $_POST['user'], 'token' => $_POST['token']));
if (!isset($_POST['grant']) || !is_array($_POST['grant'])) {
    $_POST['grant'] = array();
}
if (count($token) > 0) {
    $grants = array();
    foreach ($token as $t) {
        if (!in_array($t['id'], $_POST['grant'])) {
            $grants[] = $t['id'];
        }
    }
    if (count($grants) > 0) {
        api::send('grant/token/del', array('user' => $_POST['user'], 'token' => $_POST['token'], 'grants' => implode(',', $grants)));
    }
}
// 2) grant selected grants (existing ones will be ignored)
if (count($_POST['grant']) > 0) {
    api::send('grant/token/add', array('user' => $_POST['user'], 'token' => $_POST['token'], 'grants' => implode(',', $_POST['grant'])));
}
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/tokens/detail?token=' . $_POST['token'] . '&user='******'user']);
}
Пример #23
0
if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
$quotas = api::send('self/quota/user/list');
foreach ($quotas as $q) {
    if ($q['name'] == 'APPS') {
        $aquota = $q;
    }
    if ($q['name'] == 'MEMORY') {
        $mquota = $q;
    }
}
if ($mquota['max'] == 0 && $aquota['max'] == 0) {
    template::redirect('/panel/plans');
}
$backups = api::send('self/backup/list');
$content = "\n\t\t\t<div class=\"panel\">\n\t\t\t\t<div class=\"top\">\n\t\t\t\t\t<h1 class=\"dark\">{$lang['title']}</h1>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div><br />\n\t\t\t\t<div class=\"container\">\n";
if (count($backups) > 0) {
    $content .= "\n\t\t\t\t\t<table>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th style=\"text-align: center; width: 40px;\">#</th>\n\t\t\t\t\t\t\t<th>{$lang['type']}</th>\n\t\t\t\t\t\t\t<th>{$lang['name']}</th>\n\t\t\t\t\t\t\t<th>{$lang['date']}</th>\n\t\t\t\t\t\t\t<th>{$lang['mode']}</th>\n\t\t\t\t\t\t\t<th style=\"width: 130px; text-align: center;\">{$lang['actions']}</th>\n\t\t\t\t\t\t</tr>";
    foreach ($backups as $b) {
        $content .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td style=\"text-align: center; width: 40px;\"><img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/{$b['type']}.png\" /></td>\n\t\t\t\t\t\t\t<td>" . $lang['type_' . $b['type']] . "</td>\n\t\t\t\t\t\t\t<td><span style=\"font-weight: bold;\">{$b['title']}</span></td>\n\t\t\t\t\t\t\t<td>" . date($lang['dateformat'], $b['date']) . "</td>\n\t\t\t\t\t\t\t<td>" . ($b['auto'] == 1 ? "{$lang['auto']}" : "{$lang['manual']}") . "</td>\n\t\t\t\t\t\t\t<td style=\"width: 130px; text-align: center;\">\n\t\t\t\t\t\t\t\t<a href=\"{$b['url']}\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/large/download2.png\" alt=\"\" /></a>\n\t\t\t\t\t\t\t\t<a href=\"#\" onclick=\"\$('#restore{$b['id']}').dialog('open'); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/large/arrowLeft.png\" alt=\"\" /></a>\n\t\t\t\t\t\t\t\t<a href=\"#\" onclick=\"\$('#id').val('{$b['id']}'); \$('#delete').dialog('open'); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/large/close.png\" alt=\"\" /></a>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t";
    }
    $content .= "\n\t\t\t\t\t</table>\n\t";
} else {
    $content .= "\n\t\t\t\t\t<span style=\"font-size: 16px;\">{$lang['nobackup']}</span><br /><br />\n\t\t\t\t\t<a class=\"button classic\" href=\"/doc/backups\" style=\"width: 140px;\">\n\t\t\t\t\t\t<span style=\"display: block; font-size: 18px; padding-top: 3px;\">{$lang['doc']}</span>\n\t\t\t\t\t</a>";
}
$content .= "\n\t\t\t\t\t<br /><br />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id=\"delete\" class=\"floatingdialog\">\n\t\t\t\t<h3 class=\"center\">{$lang['delete']}</h3>\n\t\t\t\t<p style=\"text-align: center;\">{$lang['delete_text']}</p>\n\t\t\t\t<div class=\"form-small\">\t\t\n\t\t\t\t\t<form action=\"/panel/backups/del_action\" method=\"get\" class=\"center\">\n\t\t\t\t\t\t<input id=\"id\" type=\"hidden\" value=\"\" name=\"id\" />\n\t\t\t\t\t\t<fieldset autofocus>\t\n\t\t\t\t\t\t\t<input type=\"submit\" value=\"{$lang['delete_now']}\" />\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n";
foreach ($backups as $b) {
    $content .= "\n\t\t\t<div id=\"restore{$b['id']}\" class=\"floatingdialog\">\n\t\t\t\t<br />\n\t\t\t\t<h3 class=\"center\">{$lang['restore']}</h3>\n\t\t\t\t<p style=\"text-align: center;\">{$lang['restore_text']}</p>\n\t\t\t\t<div class=\"form-small\">\t\t\n\t\t\t\t\t<form action=\"/panel/backups/restore_action\" method=\"get\" class=\"center\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"{$b['id']}\" name=\"id\" />\n\t";
Пример #24
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
if (!isset($_POST['pass']) || !isset($_POST['confirm']) || $_POST['pass'] != $_POST['confirm']) {
    throw new SiteException("Password mismatch", 400, "Password and confirmation do not match");
}
$params = array('user' => $_POST['name'], 'pass' => $_POST['pass']);
if (isset($_POST['email']) && strlen($_POST['email']) > 0) {
    $params['email'] = $_POST['email'];
}
if (isset($_POST['firstname']) && strlen($_POST['firstname']) > 0) {
    $params['firstname'] = $_POST['firstname'];
}
if (isset($_POST['lastname']) && strlen($_POST['lastname']) > 0) {
    $params['lastname'] = $_POST['lastname'];
}
$result = api::send('user/add', $params);
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/user/detail?id=' . $result['id']);
}
Пример #25
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
template::redirect($GLOBALS['CONFIG']['DEFAULT_PAGE']);
Пример #26
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('grant/del', array('id' => $_GET['id']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/grants');
}
Пример #27
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
// 1) rekvoke all grants that are not selected
$token = api::send('self/token/grant/list', array('token' => $_POST['token']));
if (!isset($_POST['grant']) || !is_array($_POST['grant'])) {
    $_POST['grant'] = array();
}
if (count($token) > 0) {
    $grants = array();
    foreach ($token as $t) {
        if (!in_array($t['id'], $_POST['grant'])) {
            $grants[] = $t['id'];
        }
    }
    if (count($grants) > 0) {
        api::send('self/token/grant/del', array('token' => $_POST['token'], 'grants' => implode(',', $grants)));
    }
}
// 2) grant selected grants (existing ones will be ignored)
if (count($_POST['grant']) > 0) {
    api::send('self/token/grant/add', array('token' => $_POST['token'], 'grants' => implode(',', $_POST['grant'])));
}
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/settings/tokens/detail?token=' . $_POST['token']);
}
Пример #28
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
$token = api::send('self/token/list', array('token' => $_GET['token']));
if (count($token) == 0) {
    template::redirect('/panel/tokens');
}
$token = $token[0];
$content = "\n\t\t<div class=\"panel\">\n\t\t\t<div class=\"top\">\n\t\t\t\t<div class=\"left\" style=\"padding-top: 5px; width: 700px;\">\n\t\t\t\t\t<h1 class=\"dark\">{$lang['title']} {$token['name']}</h1>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"right\" style=\"width: 200px;\">\n\t\t\t\t\t<a class=\"button classic\" href=\"/panel/settings/tokens\" style=\"width: 180px; height: 22px; float: right;\">\n\t\t\t\t\t\t<span style=\"display: block; font-size: 18px; padding-top: 3px;\">{$lang['back']}</span>\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"clear\"></div><br />\n\t\t\t<div class=\"container\">\n\t\t\t\t<div style=\"width: 380px; float: left;\">\n\t\t\t\t\t<h2 class=\"dark\">{$lang['grants']}</h3>\n";
$tokengrants = api::send('self/token/grant/list', array('token' => $_GET['token']));
$grants = api::send('self/grant/user/list', array('overall' => true));
$content .= "\n\t\t\t\t\t<form action=\"/panel/settings/tokens/grant_action\" method=\"post\">\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th>{$lang['grantname']}</th>\n\t\t\t\t\t\t\t\t<th>{$lang['granted']}</th>\n\t\t\t\t\t\t\t</tr>\n";
foreach ($grants as $g) {
    $checked = '';
    foreach ($tokengrants as $k) {
        if ($g['id'] == $k['id']) {
            $checked = 'checked';
            break;
        }
    }
    $content .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>{$g['name']}</td>\n\t\t\t\t\t\t\t<td style=\"text-align: center;\">\n\t\t\t\t\t\t\t\t<input style=\"margin: 0 auto;\" type=\"checkbox\" name=\"grant[]\" value=\"{$g['id']}\" {$checked} />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>";
}
$content .= "\n\t\t\t\t\t</table>\n\t\t\t\t\t<input type=\"hidden\" name=\"token\" value=\"" . security::encode($_GET['token']) . "\" />\n\t\t\t\t\t<br />\n\t\t\t\t\t<input type=\"submit\" value=\"{$lang['update']}\" />\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t\t<div style=\"width: 600px; float: right;\">\n\t\t\t\t<h2 class=\"dark\">{$lang['tokeninfo']}</h2>\n";
$tokendate = '';
if ($token['lease'] > 0) {
    $tokendate = date($lang['dateformat'], $token['lease']);
}
$content .= "\n\t\t\t\t<form action=\"/panel/settings/tokens/update_action\" method=\"post\">\n\t\t\t\t\t<input type=\"hidden\" name=\"token\" value=\"" . security::encode($_GET['token']) . "\" />\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"text\" name=\"value\" value=\"{$token['token']}\" style=\"width: 400px;\" disabled />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['tokentoken']}</span>\n\t\t\t\t\t</fieldset>\t\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"text\" name=\"name\" value=\"{$token['name']}\" style=\"width: 400px;\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['tokenname']}</span>\n\t\t\t\t\t</fieldset>\t\t\t\t\t\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"text\" name=\"lease\" id=\"lease\" value=\"{$tokendate}\" style=\"width: 400px;\"/>\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['tokenlease']}</span>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"submit\" value=\"{$lang['update']}\" />\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t\t<div class=\"clear\"></div><br /><br />\n\t\t</div>\n\t</div>";
Пример #29
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('quota/user/update', array('user' => $_POST['user'], 'quota' => $_POST['quota'], 'max' => $_POST['max']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/users/detail?id=' . $_POST['user']);
}
Пример #30
0
<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/repo/del', array('id' => $_POST['id']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/repositories');
}