} $quotas = api::send('self/quota/user/list'); foreach ($quotas as $q) { if ($q['name'] == 'APPS') { $aquota = $q; } if ($q['name'] == 'MEMORY') { $mquota = $q; } } $domains = api::send('self/domain/list'); if ($_POST['password']) { $_SESSION['APP_PASS'] = security::encode($_POST['password']); } if ($_POST['tag']) { $_SESSION['APP_TAG'] = security::encode($_POST['tag']); } $content = "\n\t<div class=\"panel\">\n\t\t<div class=\"top\">\n\t\t\t<div class=\"left\" style=\"width: 500px; padding-top: 5px;\">\n\t\t\t\t<h1 class=\"dark\">{$lang['title']}</h1>\n\t\t\t</div>\n\t\t\t<div class=\"right\">\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"clear\"></div><br />\n\t\t<div class=\"container\">\n\t\t\t<h2 class=\"dark\">{$lang['frameworks']}</h2>\n\t\t\t<a href=\"#\" onclick=\"\$('#runtime').val('php55'); \$('#standalone').val(0); \$('#binary').hide(); \$('#new').dialog('open'); return false;\">\n\t\t\t\t<div class=\"nservice\">\n\t\t\t\t\t<p><img class=\"icon\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/languages/icon-php.png\" alt=\"PHP\"><span class=\"large\">PHP (Web)</span></p>\n\t\t\t\t\t<div class=\"overline\">5.5.12</div>\n\t\t\t\t\t<br />\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</a>\n"; if ($mquota['max'] > 0) { $content .= "\n\t\t\t<a href=\"#\" onclick=\"\$('#runtime').val('php52'); \$('#standalone').val(0); \$('#binary').hide(); \$('#new').dialog('open'); return false;\">\n\t\t\t\t<div class=\"nservice\">\n\t\t\t\t\t<p><img class=\"icon\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/languages/icon-php.png\" alt=\"PHP\"><span class=\"large\">PHP (Web)</span></p>\n\t\t\t\t\t<div class=\"overline\">5.2.17</div>\n\t\t\t\t\t<br />\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</a>\t\t\t\t\n\t\t\t<a href=\"#\" onclick=\"\$('#runtime').val('rails40'); \$('#standalone').val(0); \$('#binary').hide(); \$('#new').dialog('open'); return false;\">\n\t\t\t\t<div class=\"nservice\">\n\t\t\t\t\t<p><img class=\"icon\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/languages/icon-rubyrails.png\" alt=\"Ruby on Rails\"><span class=\"large\">Ruby on Rails</span></p>\n\t\t\t\t\t<div class=\"overline\">4.0.4</div>\n\t\t\t\t\t<br />\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t\t<a href=\"#\" onclick=\"\$('#runtime').val('sinatra14'); \$('#standalone').val(1); \$('#binary').show(); \$('#new').dialog('open'); return false;\">\n\t\t\t\t<div class=\"nservice\">\n\t\t\t\t\t<p><img class=\"icon\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/languages/icon-rubysinatra.png\" alt=\"Ruby Sinatra\"><span class=\"large\">Ruby Sinatra</span></p>\n\t\t\t\t\t<div class=\"overline\">1.4.5</div>\n\t\t\t\t\t<br />\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t\t<a href=\"#\" onclick=\"\$('#runtime').val('django16'); \$('#standalone').val(0); \$('#new').dialog('open'); return false;\">\n\t\t\t\t<div class=\"nservice\">\n\t\t\t\t\t<p><img class=\"icon\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/languages/icon-pythondjango.png\" alt=\"Python Django\"><span class=\"large\">Python Django</span></p>\n\t\t\t\t\t<div class=\"overline\">1.6.2</div>\n\t\t\t\t\t<br />\t\t\t\t\t\n\t\t\t\t</div>\t\t\t\n\t\t\t</a>\n\t\t\t<a href=\"#\" onclick=\"\$('#runtime').val('tomcat70'); \$('#standalone').val(0); \$('#new').dialog('open'); return false;\">\n\t\t\t\t<div class=\"nservice\">\n\t\t\t\t\t<p><img class=\"icon\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/languages/icon-javatomcat.png\" alt=\"Tomcat\"><span class=\"large\">Java Tomcat</span></p>\n\t\t\t\t\t<div class=\"overline\">7.0.42</div>\n\t\t\t\t\t<br />\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t\t<div class=\"clear\"></div>\n\t\t\t<br />\n\t\t\t<h2 class=\"dark\">{$lang['standalone']}</h2>\n\t\t\t<a href=\"#\" onclick=\"\$('#runtime').val('phpworker55'); \$('#standalone').val(1); \$('#binary').show(); \$('#new').dialog('open'); return false;\">\n\t\t\t\t<div class=\"nservice\">\n\t\t\t\t\t<p><img class=\"icon\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/languages/icon-phpworker.png\" alt=\"PHP (Worker)\"><span class=\"large\">PHP (Worker)</span></p>\n\t\t\t\t\t<div class=\"overline\">5.5.3</div>\n\t\t\t\t\t<br />\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t\t<a href=\"#\" onclick=\"\$('#runtime').val('python27'); \$('#standalone').val(1); \$('#binary').show(); \$('#new').dialog('open'); return false;\">\n\t\t\t\t<div class=\"nservice\">\n\t\t\t\t\t<p><img class=\"icon\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/languages/icon-python.png\" alt=\"Python\"><span class=\"large\">Python</span></p>\n\t\t\t\t\t<div class=\"overline\">2.7.4</div>\n\t\t\t\t\t<br />\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t\t<a href=\"#\" onclick=\"\$('#runtime').val('java17'); \$('#standalone').val(1); \$('#binary').show(); \$('#new').dialog('open'); return false;\">\n\t\t\t\t<div class=\"nservice\">\n\t\t\t\t\t<p><img class=\"icon\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/languages/icon-java.png\" alt=\"Java\"><span class=\"large\">Java</span></p>\n\t\t\t\t\t<div class=\"overline\">1.7.0</div>\n\t\t\t\t\t<br />\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t\t<a href=\"#\" onclick=\"\$('#runtime').val('ruby19'); \$('#standalone').val(1); \$('#binary').show(); \$('#new').dialog('open'); return false;\">\n\t\t\t\t<div class=\"nservice\">\n\t\t\t\t\t<p><img class=\"icon\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/languages/icon-ruby.png\" alt=\"Ruby\"><span class=\"large\">Ruby</span></p>\n\t\t\t\t\t<div class=\"overline\">1.9.3</div>\n\t\t\t\t\t<br />\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t\t<a href=\"#\" onclick=\"\$('#runtime').val('nodejs010'); \$('#standalone').val(1); \$('#binary').show(); \$('#new').dialog('open'); return false;\">\n\t\t\t\t<div class=\"nservice\">\n\t\t\t\t\t<p><img class=\"icon\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/languages/icon-nodejs.png\" alt=\"NodeJS\"><span class=\"large\">NodeJS</span></p>\n\t\t\t\t\t<div class=\"overline\">0.10.26</div>\n\t\t\t\t\t<br />\n\t\t\t\t</div>\n\t\t\t</a>\t\t\t\n\t\t\t<div class=\"clear\"></div>\n\t\t\t<br /><br />\n\t"; } $content .= "\n\t\t</div>\n\t</div>\n\t<div id=\"new\" class=\"floatingdialog\">\n\t\t<h3 class=\"center\">{$lang['new']}</h3>\n\t\t<p style=\"text-align: center;\">{$lang['new_text']}</p>\n\t\t<div class=\"form-small\">\t\t\n\t\t\t<form action=\"/panel/apps/add_action\" method=\"post\" class=\"center\">\n\t\t\t\t<input id=\"runtime\" type=\"hidden\" name=\"runtime\" value=\"{$_SESSION['APP_RUNTIME']}\" />\n\t\t\t\t<input id=\"standalone\" type=\"hidden\" name=\"standalone\" value=\"{$_SESSION['APP_STANDALONE']}\" />\n\t\t\t\t<input type=\"hidden\" name=\"pass\" value=\"{$_SESSION['APP_PASS']}\" />\n\t\t\t\t<input type=\"hidden\" name=\"tag\" value=\"{$_SESSION['APP_TAG']}\" />\n\t\t\t\t<input type=\"hidden\" name=\"nodocker\" value=\"" . ($mquota['max'] > 0 ? "0" : "1") . "\" />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<input type=\"text\" disabled value=\"{$_SESSION['APP_TAG']}\" />\n\t\t\t\t\t<span class=\"help-block\">{$lang['name']}</span>\n\t\t\t\t</fieldset>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<input type=\"text\" disabled value=\"{$_SESSION['APP_PASS']}\" />\n\t\t\t\t\t<span class=\"help-block\">{$lang['password']}</span>\n\t\t\t\t</fieldset>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<select name=\"domain\">"; foreach ($domains as $d) { $content .= "\t\t<option value=\"{$d['hostname']}\">{$d['hostname']}</option>"; } $content .= "\n\t\t\t\t\t</select>\n\t\t\t\t\t<span class=\"help-block\">{$lang['help_domain']}</span>\n\t\t\t\t</fieldset>\n\t\t\t\t<fieldset id=\"binary\" style=\"display: none;\">\n\t\t\t\t\t<input class=\"auto\" type=\"text\" value=\"{$lang['binary']}\" name=\"binary\" onfocus=\"this.value = this.value=='{$lang['binary']}' ? '' : this.value; this.style.color='#4c4c4c';\" onfocusout=\"this.value = this.value == '' ? this.value = '{$lang['binary']}' : this.value; this.value=='{$lang['binary']}' ? this.style.color='#cccccc' : this.style.color='#4c4c4c'\" />\n\t\t\t\t\t" . (isset($_GET['estandalone']) ? "<span class=\"help-block\" style=\"color: #bc0000;\">{$lang['error_binary']}</span>" : "<span class=\"help-block\">{$lang['binary_help']}</span>") . "\n\t\t\t\t</fieldset>\n\t\t\t\t<fieldset>\t\n\t\t\t\t\t<input autofocus type=\"submit\" value=\"{$lang['create']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<script>\n\t\tnewFlexibleDialog('new', 550);\n"; if (isset($_GET['estandalone'])) { $content .= "\n\t\t\$('#binary').show();\n\t\t\$('#new').dialog('open');\n\t"; } $content .= "\n\t</script>\n"; /* ========================== OUTPUT PAGE ========================== */
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } api::send('self/message/update', array('id' => $_POST['id'], 'content' => bbcode::encode($_POST['content']))); if (isset($_GET['redirect'])) { template::redirect($_GET['redirect']); } else { $template->redirect('/panel/messages/detail?id=' . security::encode($_POST['parent'])); }
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } api::send('self/team/add', array('team' => $_POST['mail'], 'domain' => $_POST['domain'], 'pass' => $_POST['password'], 'firstname' => $_POST['firstname'], 'lastname' => $_POST['lastname'])); if (isset($_GET['redirect'])) { template::redirect($_GET['redirect']); } else { $template->redirect('/panel/users/list?domain=' . security::encode($_POST['domain'])); }
} $running = false; $memory = 0; $memoryu = 0; $instances = 0; foreach ($app['branches'][$_SESSION['DATA'][$app['id']]['branch']]['instances'] as $i) { if ($i['status'] == 'run') { $running = true; } $memory = $memory + $i['memory']['quota']; $memoryu = $memoryu + $i['memory']['usage']; $instances++; } $expl = explode('-', $app['name']); $language = $expl[0]; $content = "\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>{$lang['id']}</th>\n\t\t\t\t\t<th>{$lang['host']}</th>\n\t\t\t\t\t<th>{$lang['port']}</th>\n\t\t\t\t\t<th>{$lang['cpu']}</th>\n\t\t\t\t\t<th>{$lang['memory']}</th>\n\t\t\t\t\t<th>{$lang['uptime']}</th>\n\t\t\t\t\t<th>{$lang['status']}</th>\n\t\t\t\t\t<th style=\"width: 30px; text-align: center;\">{$lang['logs']}</th>\n\t\t\t\t</tr>\n\t"; $j = 0; foreach ($app['branches'][$_SESSION['DATA'][$app['id']]['branch']]['instances'] as $i) { if ($i['status'] == 'run') { $running = true; } else { $running = false; } $info = secondsToTime($i['uptime']); $content .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><span class=\"large\">{$app['name']}-" . security::encode($_SESSION['DATA'][$app['id']]['branch']) . "-{$j}</span></td>\n\t\t\t\t\t\t<td>{$i['host']}</td>\n\t\t\t\t\t\t<td>{$i['port']}</td>\n\t\t\t\t\t\t<td>" . round($i['cpu']['usage'] / 10, 1) . "% / {$i['cpu']['quota']} core</td>\n\t\t\t\t\t\t<td>{$i['memory']['usage']}Mo / {$i['memory']['quota']}Mo</td>\n\t\t\t\t\t\t<td>{$info['d']} {$lang['days']} {$info['h']} {$lang['hours']} {$info['m']} {$lang['minutes']} {$info['s']} {$lang['seconds']}</td>\n\t\t\t\t\t\t<td>" . ($running ? "<div class=\"state running\"><div class=\"state-content\">{$lang['running']}</div></div>" : "<div class=\"state stopped\"><div class=\"state-content\">{$lang['stopped']}") . "</div></div></td>\n\t\t\t\t\t\t<td style=\"width: 30px; text-align: center;\"><a href=\"/panel/apps/log?id={$app['id']}&instance={$i['id']}\" title=\"\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/notebook.png\" alt=\"\" /></a></td>\n\t\t\t\t\t</tr>\n\t\t"; $j++; } $content .= "\n\t\t\t\t</table>\n\t"; } catch (Exception $e) { } echo $content;
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } $database = api::send('self/database/list', array('database' => $_GET['database'])); $database = $database[0]; $percent = round($database['stats'][$database['server']] * 100 / 6000); if ($percent > 100) { $percent = 100; } $content .= "\n\t<div class=\"panel\">\n\t\t<div class=\"top\">\n\t\t\t<div class=\"left\" style=\"padding-top: 5px; width: 700px;\">\n\t\t\t\t<h1 class=\"dark\">{$lang['database']} {$database['name']}</h1>\n\t\t\t</div>\n\t\t\t<div class=\"right\" style=\"width: 400px;\">\n\t\t\t\t<a class=\"button classic\" href=\"#\" onclick=\"\$('#delete').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['delete']}</span>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"clear\"></div><br /><br />\n\t\t<div class=\"container\">\n\t\t\t<div style=\"width: 500px; float: left;\">\n\t\t\t\t<h3 class=\"colored\">{$lang['change_pass']}</h3>\n\t\t\t\t<form action=\"/panel/databases/password_action\" method=\"post\">\n\t\t\t\t\t<input type=\"hidden\" name=\"database\" value=\"" . security::encode($_GET['database']) . "\" />\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"password\" name=\"pass\" style=\"width: 400px;\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['password']}</span>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"password\" name=\"confirm\" style=\"width: 400px;\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['password2']}</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 style=\"width: 420px; float: right;\">\n\t\t\t\t<h3 class=\"colored\">{$lang['change_info']}</h3>\n\t\t\t\t<form action=\"/panel/databases/config_action\" method=\"post\">\n\t\t\t\t\t<input type=\"hidden\" name=\"database\" value=\"" . security::encode($_GET['database']) . "\" />\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"text\" name=\"description\" value=\"{$database['desc']}\" style=\"width: 400px;\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['description_help']}</span>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<select disabled name=\"\" style=\"width: 415px;\">\n\t\t\t\t\t\t\t<option value=\"\" " . ($database['type'] == 'mysql' ? "selected" : "") . " >MySQL</option>\n\t\t\t\t\t\t\t<option value=\"\" " . ($database['type'] == 'pgsql' ? "selected" : "") . " >PostgreSQL</option>\n\t\t\t\t\t\t\t<option value=\"\" " . ($database['type'] == 'mongodb' ? "selected" : "") . " >MongoDB</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['type_help']}</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>\n\t\t\t<br /><br />\n\t\t\t<h2 class=\"dark\">{$lang['connection']}</h2>\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<th style=\"text-align: center; width: 40px;\">#</th>\n\t\t\t\t\t<th>{$lang['server']}</th>\n\t\t\t\t\t<th>{$lang['username']}</th>\n\t\t\t\t\t<th>{$lang['password']}</th>\n\t\t\t\t\t<th>{$lang['database']}</th>\n\t\t\t\t\t<th>{$lang['load']}</th>\n\t\t\t\t\t<th style=\"width: 100px; text-align: center;\">{$lang['actions']}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td style=\"text-align: center; width: 40px;\"><img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/server.png\" /></td>\n\t\t\t\t\t<td>{$database['server']}</td>\n\t\t\t\t\t<td>{$database['name']}</td>\n\t\t\t\t\t<td>**********</td>\n\t\t\t\t\t<td>{$database['name']}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<div class=\"fillgraph\" style=\"margin-top: 10px;\">\n\t\t\t\t\t\t\t<small style=\"width: {$percent}%;\"></small>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class=\"quota\"><span style='font-weight: bold;'>{$database['stats'][$database['server']]}</span> {$lang['databases']}</span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style=\"width: 100px; text-align: center;\">\n\t\t\t\t\t\t<a href=\"#\" title=\"\" onclick=\"\$('#migrate').dialog('open'); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/large/settings.png\" alt=\"\" /></a>\n\t\t\t\t\t\t<a href=\"#\" title=\"\" onclick=\"\$('#download').dialog('open'); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/large/download2.png\" alt=\"\" /></a>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<br /><br />\n\t\t</div>\n\t</div>\n\t<div id=\"migrate\" class=\"floatingdialog\">\n\t\t<br />\n\t\t<h3 class=\"center\">{$lang['migrate']}</h3>\n\t\t<p style=\"text-align: center;\">{$lang['migrate_text']}</p>\n\t\t<div class=\"form-small\">\t\t\n\t\t\t<form action=\"/panel/databases/migrate_action\" method=\"post\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" value=\"{$database['name']}\" name=\"database\" />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<select name=\"server\" style=\"width: 420px;\">\n\t\t\t\t\t\t<option value=\"sql1.olympe.in\" style=\"color: " . ($database['stats']['sql1.olympe.in'] > 6000 ? "red" : "green") . ";\">sql1.olympe.in ({$database['stats']['sql1.olympe.in']} {$lang['databases']})</option>\n\t\t\t\t\t\t<option value=\"sql2.olympe.in\" style=\"color: " . ($database['stats']['sql2.olympe.in'] > 6000 ? "red" : "green") . ";\">sql2.olympe.in ({$database['stats']['sql2.olympe.in']} {$lang['databases']})</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<span class=\"help-block\">{$lang['server_help']}</span>\n\t\t\t\t</fieldset>\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input style=\"width: 400px;\" class=\"auto\" type=\"password\" value=\"{$lang['password']}\" name=\"password\" onfocus=\"this.value = this.value=='{$lang['password']}' ? '' : this.value; this.style.color='#4c4c4c';\" onfocusout=\"this.value = this.value == '' ? this.value = '{$lang['password']}' : this.value; this.value=='{$lang['password']}' ? this.style.color='#cccccc' : this.style.color='#4c4c4c'\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['password_help']}</span>\n\t\t\t\t\t</fieldset>\t\n\t\t\t\t<fieldset autofocus>\t\n\t\t\t\t\t<input type=\"submit\" value=\"{$lang['migrate_now']}\" />\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=\"/panel/databases/del_action\" method=\"post\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" value=\"{$database['name']}\" name=\"database\" />\n\t\t\t\t<fieldset autofocus>\t\n\t\t\t\t\t<input 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=\"download\" class=\"floatingdialog\">\n\t\t<br />\n\t\t<h3 class=\"center\">{$lang['backup']}</h3>\n\t\t<p style=\"text-align: center;\">{$lang['backup_text']}</p>\n\t\t<div class=\"form-small\">\t\t\n\t\t\t<form action=\"/panel/backups/add_action\" method=\"get\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" value=\"{$database['name']}\" name=\"database\" />\n\t\t\t\t<fieldset autofocus>\t\n\t\t\t\t\t<input type=\"submit\" value=\"{$lang['backup_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('migrate', 550);\n\t\tnewFlexibleDialog('download', 550);\n\t\tnewFlexibleDialog('delete', 550);\n\t</script>\t\n\t"; /* ========================== OUTPUT PAGE ========================== */ $template->output($content);
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } $team = api::send('self/team/list', array('id' => $_GET['id'], 'domain' => $_GET['domain'])); $team = $team[0]; $content .= "\n\t<div class=\"panel\">\n\t\t<div class=\"top\">\n\t\t\t<div class=\"left\" style=\"padding-top: 5px; width: 600px;\">\n\t\t\t\t<h1 class=\"dark\">{$lang['group']} {$team['name']}</h1>\n\t\t\t</div>\n\t\t\t<div class=\"right\" style=\"width: 400px;\">\n\t\t\t\t<a class=\"button classic\" href=\"/panel/users/list?domain=" . security::encode($_GET['domain']) . "\" style=\"width: 180px; height: 22px; float: right;\">\n\t\t\t\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['back']}</span>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"clear\"></div><br /><br />\n\t\t<div class=\"container\">\n\t\t\t<div style=\"width: 500px; float: left;\">\n\t\t\t\t<h3 class=\"colored\">{$lang['change_pass']}</h3>\n\t\t\t\t<form action=\"/panel/groups/config_action\" method=\"post\">\n\t\t\t\t\t<input type=\"hidden\" name=\"domain\" value=\"" . security::encode($_GET['domain']) . "\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"" . security::encode($_GET['id']) . "\" />\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"password\" name=\"password\" style=\"width: 400px;\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['password']}</span>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"password\" name=\"confirm\" style=\"width: 400px;\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['password2']}</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 style=\"width: 420px; float: right;\">\n\t\t\t\t<h3 class=\"colored\">{$lang['change_info']}</h3>\n\t\t\t\t<form action=\"/panel/groups/config_action\" method=\"post\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"text\" name=\"firstname\" value=\"{$team['firstname']}\" style=\"width: 400px;\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['firstname']}</span>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"text\" name=\"lastname\" value=\"{$team['lastname']}\" style=\"width: 400px;\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['lastname']}</span>\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>\n\t"; /* ========================== OUTPUT PAGE ========================== */ $template->output($content);
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>"; /* ========================== OUTPUT PAGE ========================== */ $template->output($content);
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } $domains = api::send('self/domains/list'); $id = security::encode($_GET['id']); $content = "\n\t\t\t<form action=\"/panel/apps/add_url_action\" method=\"post\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"{$id}\" />\n\t\t\t\t<input type=\"hidden\" name=\"branch\" value=\"{$_SESSION['DATA'][$id]['branch']}\" />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<select name=\"url\">"; foreach ($domains as $d) { $content .= "\t\t<optgroup label=\"{$d['hostname']}\">\n\t\t\t\t\t\t\t<option value=\"{$d['hostname']}\">{$d['hostname']}</option>\n\t"; $subdomains = api::send('self/subdomain/list', array('domain' => $d['hostname'])); foreach ($subdomains as $s) { $content .= "\t\t\t<option value=\"{$s['hostname']}\">{$s['hostname']}</option>"; } $content .= " \t\t\t</optgroup>"; } $content .= "\n\t\t\t\t\t</select>\n\t\t\t\t\t<span class=\"help-block\">{$lang['help_url']}</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['add_url']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n"; echo $content;
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } if (preg_match("/^[0-9]{2,30}\$/", $_POST['id']) != 1) { raise(new SecurityException(iSeverity::CRITICAL, $lang['ABNORMAL_PARAMETER_VALUE'])); } $form = new form('edit_domain'); $form->checkReferer(); $form->reset(); $form->importValues($_POST); $form->setCheck('dir', $lang['check_dir'], formCheck::ALLTEXT, 2, 30, true); if (preg_match("/(^\\/?\\.\\.|\\/\\.\\.\\/?\$|\\/\\.\\.\\/|\\\\|\\s)/", $_POST['dir']) > 0) { $form->setError('dir', $lang['check_dir']); } $form->validate(); $home = '/dns/com/olympe-network/' . security::get('user') . '/' . $form->getValue('dir'); $sql = "UPDATE domain SET homeDirectory = '" . security::encode($home, false) . "' WHERE uid = '{$_POST['id']}'"; $userapi->query($sql, iDatabase::NO_ROW); // LOG ACTION IN HISTORY $sql = "SELECT Hostname FROM domain WHERE uid = '{$_POST['id']}'"; $domain = $userapi->query($sql); $data = array('domain' => $domain['Hostname'], 'dir' => $form->getValue('dir')); $logger = new logger(); $logger->log($data); $form->cleanup(); $template->redirect('/panel/domains/edit?done&id=' . $_POST['id']);
foreach ($apps as $a) { $content .= "\n\t\t\t\t\t\t<option value=\"{$a['id']}\">{$a['tag']} ({$a['name']})</option>"; } } $content .= "\n\t\t\t\t\t</select>\n\t\t\t\t\t<span class=\"help-block\">{$lang['help_app']}</span>\n\t\t\t\t</fieldset>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<select name=\"permission\">\n\t\t\t\t\t\t<option value=\"rx\">{$lang['readonly']}</option>\n\t\t\t\t\t\t<option value=\"rwx\">{$lang['readwrite']}</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<span class=\"help-block\">{$lang['help_permission']}</span>\n\t\t\t\t</fieldset>\t\n\t\t\t\t<fieldset autofocus>\t\n\t\t\t\t\t<input type=\"submit\" value=\"{$lang['grant']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<div id=\"newuser\" class=\"floatingdialog\" style=\"padding: 30px;\">\n\t\t<h3 class=\"center\">{$lang['add_users']}</h3>\n\t\t<p style=\"text-align: center;\">{$lang['add_users_text']}</p>\n\t\t<div class=\"form-small\">\n\t\t\t<form action=\"/panel/apps/permit_action\" method=\"get\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"" . security::encode($_GET['id']) . "\" />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<select name=\"member\">\n"; $domains = api::send('self/domain/list'); if (count($domains) > 0) { foreach ($domains as $d) { $users = api::send('self/account/list', array('domain' => $d['hostname'])); if (count($users) > 0) { foreach ($users as $u) { $content .= "\n\t\t\t\t\t\t<option value=\"{$u['id']}\">{$u['mail']}</option>"; } } } } $content .= "\n\t\t\t\t\t</select>\n\t\t\t\t\t<span class=\"help-block\">{$lang['help_user']}</span>\n\t\t\t\t</fieldset>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<select name=\"permission\">\n\t\t\t\t\t\t<option value=\"rx\">{$lang['readonly']}</option>\n\t\t\t\t\t\t<option value=\"rwx\">{$lang['readwrite']}</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<span class=\"help-block\">{$lang['help_permission']}</span>\n\t\t\t\t</fieldset>\t\n\t\t\t\t<fieldset autofocus>\t\n\t\t\t\t\t<input type=\"submit\" value=\"{$lang['grant']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<div id=\"newgroup\" class=\"floatingdialog\" style=\"padding: 30px;\">\n\t\t<h3 class=\"center\">{$lang['add_groups']}</h3>\n\t\t<p style=\"text-align: center;\">{$lang['add_groups_text']}</p>\n\t\t<br />\n\t\t<div class=\"form-small\">\n\t\t\t<form action=\"/panel/apps/permit_action\" method=\"get\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"" . security::encode($_GET['id']) . "\" />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<select name=\"member\">\n"; $domains = api::send('self/domain/list'); if (count($domains) > 0) { foreach ($domains as $d) { $groups = api::send('self/team/list', array('domain' => $d['hostname'])); if (count($groups) > 0) { foreach ($groups as $g) { $content .= "\n\t\t\t\t\t\t<option value=\"{$g['id']}\">{$g['mail']}</option>"; } } } } $content .= "\n\t\t\t\t\t</select>\n\t\t\t\t\t<span class=\"help-block\">{$lang['help_group']}</span>\n\t\t\t\t</fieldset>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<select name=\"permission\">\n\t\t\t\t\t\t<option value=\"rx\">{$lang['readonly']}</option>\n\t\t\t\t\t\t<option value=\"rwx\">{$lang['readwrite']}</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<span class=\"help-block\">{$lang['help_permission']}</span>\n\t\t\t\t</fieldset>\t\n\t\t\t\t<fieldset autofocus>\t\n\t\t\t\t\t<input type=\"submit\" value=\"{$lang['grant']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<div id=\"push\" class=\"floatingdialog\">\n\t\t<br />\n\t\t<h3 class=\"center\" style=\"padding-top: 5px;\">{$lang['push_title']}</h3>\n\t\t<p style=\"text-align: center;\">{$lang['push_text']}</p>\n\t\t<br />\n\t\t<h2 class=\"dark\" style=\"text-align: center;\">{$lang['access']}</h2>\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<th>{$lang['type']}</th>\n\t\t\t\t<th>{$lang['infos']}</th>\n\t\t\t\t<th>{$lang['user']}</th>\n\t\t\t\t<th>{$lang['port']}</th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td><span class=\"large\">SSH</span></td>\n\t\t\t\t<td>ssh://git.as/~" . security::get('USER') . "/{$app['name']}.git</td>\n\t\t\t\t<td>" . security::get('USER') . "</td>\n\t\t\t\t<td>22</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<br />\n\t\t<h2 class=\"dark\" style=\"text-align: center;\">{$lang['paths']}</h2>\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<th>{$lang['type']}</th>\n\t\t\t\t<th>{$lang['folder']}</th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>{$lang['git']}</td>\n\t\t\t\t<td colspan=\"2\">{$app['homeDirectory']}</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<br />\n\t</div>\n\t<script>\n\t\tnewFlexibleDialog('newapp', 550);\n\t\tnewFlexibleDialog('newuser', 550);\n\t\tnewFlexibleDialog('newgroup', 550);\n\t\tnewFlexibleDialog('push', 900);\n\t</script>\n\t"; /* ========================== OUTPUT PAGE ========================== */ $template->output($content);
if (strlen(trim($m[2])) > 2) { $logs[] = array('host' => $instance['host'], 'date' => $m[1], 'text' => $m[2]); } $j++; } } $log = $i['log']; } else { if (count($app['branches'][$_SESSION['DATA'][$app['id']]['branch']]['instances']) > 0) { foreach ($app['branches'][$_SESSION['DATA'][$app['id']]['branch']]['instances'] as $i) { foreach (preg_split("/((\r?\n)|(\r\n?))/", $i['log']) as $line) { preg_match("/^\\s*([0-9\\-_:\\.]+)?(.*)\$/is", trim($line), $m); if (strlen(trim($m[2])) > 2) { $logs[] = array('host' => $i['host'], 'date' => $m[1], 'text' => $m[2]); } $j++; } } } usort($logs, "cmp"); } $logs = array_slice($logs, 0, 100); $content .= "\n\t<div class=\"panel\">\n\t\t<div class=\"top\">\n\t\t\t<div class=\"left\" style=\"width: 700px;\">\n\t\t\t\t<h1 class=\"dark\">{$lang['title']} {$app['name']}</h1>\n\t\t\t</div>\n\t\t\t<div class=\"right\" style=\"width: 400px;\">\n\t\t\t\t<a class=\"button classic\" href=\"/panel/apps/show?id=" . security::encode($_GET['id']) . "\" style=\"width: 180px; height: 22px; float: right;\">\n\t\t\t\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['back']}</span>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"clear\"></div><br /><br />\n\t\t<div class=\"container\">\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<th style=\"width: 100px;\">{$lang['host']}</th>\n\t\t\t\t\t<th style=\"width: 160px;\">{$lang['date']}</th>\n\t\t\t\t\t<th>{$lang['text']}</th>\n\t\t\t\t</tr>\n"; foreach ($logs as $l) { $l['date'] = explode('.', $l['date']); $l['date'] = $l['date'][0]; $content .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td style=\"width: 100px;\">{$l['host']}</td>\n\t\t\t\t\t<td style=\"width: 160px;\">{$l['date']}</td>\n\t\t\t\t\t<td>{$l['text']}</td>\n\t\t\t\t</tr>\n\t"; } $content .= "\n\t\t\t</table>\n\t\t\t\n\t\t</div>\n\t</div>\n\t"; /* ========================== OUTPUT PAGE ========================== */ $template->output($content);
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } try { if (isset($_POST['pass']) && (!isset($_POST['confirm']) || $_POST['pass'] != $_POST['confirm'])) { throw new Exception("Password mismatch"); } $params = array(); $params['pass'] = $_POST['pass']; $params['service'] = $_POST['service']; api::send('self/service/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/services/config?service=' . security::encode($_POST['service'])); }
<?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'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&label=Bvm0CJv26AMQhbn32wM&guid=ON&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);
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } api::send('message/del', array('id' => $_GET['id'])); if (isset($_GET['redirect'])) { template::redirect($_GET['redirect']); } else { template::redirect('/admin/messages/detail?id=' . security::encode($_GET['parent'])); }
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } api::send('self/app/update', array('id' => $_GET['id'], 'join' => 'add', 'member' => $_GET['member'], 'permission' => $_GET['permission'])); if (isset($_GET['redirect'])) { template::redirect($_GET['redirect']); } else { $template->redirect('/panel/apps/config?id=' . security::encode($_GET['id'])); }
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } $account = api::send('self/account/list', array('id' => $_GET['id'], 'domain' => $_GET['domain'])); $account = $account[0]; $content .= "\n\t<div class=\"panel\">\n\t\t<div class=\"top\">\n\t\t\t<div class=\"left\" style=\"padding-top: 5px; width: 700px;\">\n\t\t\t\t<h1 class=\"dark\">{$lang['user']} {$account['mail']}</h1>\n\t\t\t</div>\n\t\t\t<div class=\"right\" style=\"width: 400px;\">\n\t\t\t\t<a class=\"button classic\" href=\"/panel/users/list?domain=" . security::encode($_GET['domain']) . "\" style=\"width: 180px; height: 22px; float: right;\">\n\t\t\t\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['back']}</span>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"clear\"></div><br /><br />\n\t\t<div class=\"container\">\n\t\t\t<div style=\"width: 500px; float: left;\">\n\t\t\t\t<h3 class=\"colored\">{$lang['change_pass']}</h3>\n\t\t\t\t<form action=\"/panel/users/config_action\" method=\"post\">\n\t\t\t\t\t<input type=\"hidden\" name=\"domain\" value=\"" . security::encode($_GET['domain']) . "\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"" . security::encode($_GET['id']) . "\" />\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"password\" name=\"password\" style=\"width: 400px;\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['password']}</span>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"password\" name=\"confirm\" style=\"width: 400px;\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['password2']}</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</div>\n\t\t\t<div style=\"width: 420px; float: right;\">\n\t\t\t\t<h3 class=\"colored\">{$lang['change_info']}</h3>\n\t\t\t\t<form action=\"/panel/users/config_action\" method=\"post\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"text\" name=\"firstname\" value=\"{$account['firstname']}\" style=\"width: 400px;\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['firstname']}</span>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"text\" name=\"lastname\" value=\"{$account['lastname']}\" style=\"width: 400px;\" />\n\t\t\t\t\t\t<span class=\"help-block\">{$lang['lastname']}</span>\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\t<div style=\"float: left; width: 530px;\">\n\t\t\t\t<div style=\"float: left; width: 300px; padding-top: 5px;\">\n\t\t\t\t\t<h3 class=\"colored\">{$lang['redirections']}</h3>\n\t\t\t\t</div>\n\t\t\t\t<div style=\"float: right; width: 200px;\">\n\t\t\t\t\t<a class=\"button classic\" href=\"#\" onclick=\"\$('#new-redirect').dialog('open'); return false;\" style=\"width: 22px; height: 22px; float: right;\">\n\t\t\t\t\t\t<img style=\"float: left;\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/plus-white.png\" />\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t<br />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>{$lang['email']}</th>\n\t\t\t\t\t\t<th style=\"width: 70px; text-align: center;\">{$lang['actions']}</th>\n\t\t\t\t\t</tr>\n\t"; if (!is_array($account['redirection']) && $account['redirection']) { $account['redirection'] = array($account['redirection']); } if ($account['redirection']) { foreach ($account['redirection'] as $r) { $content .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>{$r}</td>\n\t\t\t\t\t\t<td style=\"width: 35px; text-align: center;\">\n\t\t\t\t\t\t\t<a href=\"/panel/users/del_redirection_action?redirection={$r}&domain={$_GET['domain']}&id={$_GET['id']}\" title=\"\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/close.png\" alt=\"\" /></a>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>"; } } $content .= "\t\t\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div style=\"float: right; width: 530px;\">\n\t\t\t\t<div style=\"float: left; width: 300px; padding-top: 5px;\">\n\t\t\t\t\t<h3 class=\"colored\">{$lang['alternates']}</h3>\n\t\t\t\t</div>\n\t\t\t\t<div style=\"float: right; width: 200px;\">\n\t\t\t\t\t<a class=\"button classic\" href=\"#\" onclick=\"\$('#new-alias').dialog('open'); return false;\" style=\"width: 22px; height: 22px; float: right;\">\n\t\t\t\t\t\t<img style=\"float: left;\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/plus-white.png\" />\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t<br />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>{$lang['email']}</th>\n\t\t\t\t\t\t<th style=\"width: 35px; text-align: center;\">{$lang['actions']}</th>\n\t\t\t\t\t</tr>\n\t"; if (!is_array($account['alternate']) && $account['alternate']) { $account['alternate'] = array($account['alternate']); } if ($account['alternate']) { foreach ($account['alternate'] as $a) { $content .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>{$a}</td>\n\t\t\t\t\t\t<td style=\"width: 35px; text-align: center;\">\n\t\t\t\t\t\t\t<a href=\"/panel/users/del_alternate_action?alternate={$a}&domain={$_GET['domain']}&id={$_GET['id']}\" title=\"\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/close.png\" alt=\"\" /></a>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>"; } } $content .= "\t\t\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div class=\"clear\"></div>\n\t\t</div>\n\t</div><br />\n\t<div id=\"new-redirect\" style=\"display: none;\" class=\"floatingdialog\">\n\t\t<h3 class=\"center\">{$lang['new_redirect']}</h3>\n\t\t<p style=\"text-align: center;\">{$lang['new_redirect_text']}</p>\n\t\t<div class=\"form-small\">\t\t\n\t\t\t<form action=\"/panel/users/add_redirection_action\" method=\"post\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"{$account['id']}\" />\n\t\t\t\t<input type=\"hidden\" name=\"domain\" value=\"" . security::encode($_GET['domain']) . "\" />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<input class=\"auto\" type=\"text\" value=\"{$lang['redirection']}\" name=\"redirection\" onfocus=\"this.value = this.value=='{$lang['redirection']}' ? '' : this.value; this.style.color='#4c4c4c';\" onfocusout=\"this.value = this.value == '' ? this.value = '{$lang['redirection']}' : this.value; this.value=='{$lang['redirection']}' ? this.style.color='#cccccc' : this.style.color='#4c4c4c'\" />\n\t\t\t\t\t<span class=\"help-block\">{$lang['redirection_help']}</span>\n\t\t\t\t</fieldset>\n\t\t\t\t<fieldset autofocus>\t\n\t\t\t\t\t<input type=\"submit\" value=\"{$lang['create']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<div id=\"new-alias\" style=\"display: none;\" class=\"floatingdialog\">\n\t\t<h3 class=\"center\">{$lang['new_alias']}</h3>\n\t\t<p style=\"text-align: center;\">{$lang['new_alias_text']}</p>\n\t\t<div class=\"form-small\">\t\t\n\t\t\t<form action=\"/panel/users/add_alternate_action\" method=\"post\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"{$account['id']}\" />\n\t\t\t\t<input type=\"hidden\" name=\"domain\" value=\"" . security::encode($_GET['domain']) . "\" />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<input class=\"auto\" type=\"text\" value=\"{$lang['alias']}\" name=\"alternate\" onfocus=\"this.value = this.value=='{$lang['alias']}' ? '' : this.value; this.style.color='#4c4c4c';\" onfocusout=\"this.value = this.value == '' ? this.value = '{$lang['alias']}' : this.value; this.value=='{$lang['alias']}' ? this.style.color='#cccccc' : this.style.color='#4c4c4c'\" />\n\t\t\t\t\t<span class=\"help-block\">" . str_replace('{DOMAIN}', security::encode($_GET['domain']), $lang['alias_help']) . "</span>\n\t\t\t\t</fieldset>\n\t\t\t\t<fieldset autofocus>\t\n\t\t\t\t\t<input type=\"submit\" value=\"{$lang['create']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<script>\n\t\tnewDialog('new-redirect', 550, 250);\n\t\tnewDialog('new-alias', 550, 250);\n\t</script>\t\n\t"; /* ========================== OUTPUT PAGE ========================== */ $template->output($content);
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } if (!$_GET['user'] || !$_GET['token']) { exit; } $_SESSION['CHANGEPASS']['TOKEN'] = security::encode($_GET['token']); $_SESSION['CHANGEPASS']['USER'] = security::encode($_GET['user']); template::redirect('/');
/** * 用户登录相关的函数 * @param Array $loginInfo 登录信息 * @param Number $login_type 登录类型 1 手机 2 微信 3 QQ 4 微博 */ public function login($loginInfo, $login_type) { $phone = $loginInfo['phone']; $pwd = $loginInfo['pwd']; $openid = $loginInfo['openid']; $device = $loginInfo['device']; $device_no = $loginInfo['device_no']; $device_token = $loginInfo['device_token']; $device_type = $loginInfo['device_type']; $version = $loginInfo['version']; $auth_column = array(LOGIN_TYPE_PHONE => 'pwd', LOGIN_TYPE_WECHAT => 'wechat_auth_str', LOGIN_TYPE_QQ => 'qq_auth_str', LOGIN_TYPE_WEIBO => 'weibo_auth_str'); $ip = $_SERVER["REMOTE_ADDR"]; $login_time = date('Y-m-d H:i:s'); if ($login_type == LOGIN_TYPE_PHONE) { $exist_user = $this->user->fetchOne(array('phone' => $phone, 'pwd' => md5($pwd)), array('uid', 'phone', 'enable')); if (empty($exist_user)) { return new Msg(-1, '手机号和密码组合错误'); } } else { $exist_user = $this->user->fetchOne(array($auth_column[$login_type] => md5($openid)), array('uid', 'phone', 'enable')); if (empty($exist_user)) { return new Msg(-1, '第三方信息未曾关联过'); } } if (empty($exist_user['enable'])) { return new Msg(-2, '该账号已被封,请联系管理员'); } $token = base64_encode(security::encode($exist_user['uid'], 3600 * 10 * 24)); $l_id = $this->login->insert(array('uid' => $exist_user['uid'], 'phone' => $phone, 'ip' => $ip, 'token' => $token, 'device' => $device, 'device_no' => $device_no, 'device_token' => $device_token, 'version' => $version, 'login_time' => $login_time, 'device_type' => $device_type, 'login_type' => $login_type)); if (empty($l_id)) { return new Msg(-3, '登录失败,未知错误'); } return new Msg(0, '登录成功', array('token' => $token, 'uid' => $exist_user['uid'], 'needCompleteInfo' => $this->needCompleteInfo($exist_user['uid']))); }
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } api::send('self/app/update', array('id' => $_POST['id'], 'mode' => 'add', 'key' => $_POST['key'])); if (isset($_GET['redirect'])) { template::redirect($_GET['redirect']); } else { $template->redirect('/panel/apps/show?id=' . security::encode($_POST['id']) . '&key'); }
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } api::send('self/app/update', array('app' => $_POST['id'], 'branch' => $_POST['branch'], 'mode' => 'add')); if (isset($_GET['redirect'])) { template::redirect($_GET['redirect']); } else { $template->redirect('/panel/apps/show?id=' . security::encode($_POST['id']) . '&branch=' . security::encode($_POST['branch'])); }
if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } $userinfo = api::send('self/user/list'); $userinfo = $userinfo[0]; $sips_params = "merchant_id=052174593500010"; $sips_params .= " pathfile=/dns/com/anotherservice/etc/sips/pathfile"; $sips_params .= " merchant_country=fr"; $sips_params .= " language=fr"; $sips_params .= " amount=" . security::encode($_POST['amount']); $sips_params .= " currency_code=978"; $sips_params .= " transaction_id=" . date("His"); $sips_params .= " customer_email=" . $userinfo['email']; $sips_params .= " customer_ip_address=42.42.42.42"; $sips_params .= " caddie=" . security::encode($_POST['xpay']); $sips_params .= " cancel_return_url=https://www.anotherservice.com/panel/billing"; $sips_params .= " automatic_response_url=https://www.anotherservice.com/ipn_sips"; $sips_params .= " normal_return_url=https://www.anotherservice.com/panel/billing"; //$sips_params .= " templatefile=template_fr"; try { $sips_params = escapeshellcmd($sips_params); $result = exec("/dns/com/anotherservice/etc/sips/request {$sips_params}"); $result = explode('!', $result); $code = $result[1]; $error = $result[2]; $message = $result[3]; } catch (Exception $e) { print_r($e); } $content = "\n\t<div class=\"panel\">\n\t\t<div class=\"top\">\n\t\t\t<h1 class=\"dark\" style=\"text-align: center;\">{$lang['payment']}</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{$message}\n\t\t</div>\n\t</div>\n\t\t\t\n";
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } api::send('self/repo/update', array('id' => $_POST['id'], 'desc' => $_POST['desc'], 'email' => $_POST['email'])); $_SESSION['MESSAGE']['TYPE'] = 'success'; $_SESSION['MESSAGE']['TEXT'] = $lang['success']; if (isset($_GET['redirect'])) { template::redirect($_GET['redirect']); } else { $template->redirect('/panel/repositories/config?id=' . security::encode($_POST['id'])); }
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } try { api::send('self/domain/update', array('id' => $_POST['id'], 'arecord' => $_POST['domain_arecord'], 'mx1' => $_POST['mx1'], 'mx2' => $_POST['mx2'], 'mx3' => $_POST['mx3'], 'mx4' => $_POST['mx4'])); $_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/domains/config?id=' . security::encode($_POST['id'])); }
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } $params = array(); $params['id'] = $_POST['id']; $params['title'] = $_POST['title']; $params['description'] = $_POST['desc']; $params['content'] = $_POST['content']; $params['author'] = $_POST['author']; $params['language'] = $_POST['lang']; api::send('news/update', $params); if (isset($_GET['redirect'])) { template::redirect($_GET['redirect']); } else { $template->redirect('/admin/blog/detail?id=' . security::encode($_POST['id'])); }
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } api::send('message/update', array('id' => $_GET['id'], 'status' => 3)); if (isset($_GET['redirect'])) { template::redirect($_GET['redirect']); } else { $template->redirect('/admin/messages/detail?id=' . security::encode($_GET['id'])); }
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } $sites = api::send('site/list', array('directory' => 1, 'keyword' => $_GET['keyword'], 'start' => 0, 'limit' => 250), $GLOBALS['CONFIG']['API_USERNAME'] . ':' . $GLOBALS['CONFIG']['API_PASSWORD']); $content = "\n\t\t<div class=\"directory\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<h1 class=\"dark\">{$lang['search']} "" . security::encode($_GET['keyword']) . ""</h1>\n\t\t\t\t<br />\n"; foreach ($sites as $s) { $content .= "\n\t\t\t\t<a href=\"/directory/site?id={$s['id']}\">\n\t\t\t\t\t<div class=\"site\" >\n\t\t\t\t\t\t<div class=\"thumbshot\">\n\t\t\t\t\t\t\t<img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/sites/?url={$s['url']}\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"text\">\n\t\t\t\t\t\t\t<span class=\"name\">{$s['title']}</span>\n\t\t\t\t\t\t\t<span class=\"editor\">{$s['user']}</span>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<div class=\"star\" data-score=\"{$s['rating']['rating']}\" data-id=\"{$s['id']}\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</a>\n\t"; } $content .= "\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<script>\n\t\t\t\$('.star').raty(\n\t\t\t{\n\t\t\t\tnumberMax: 5,\n\t\t\t\tnumber: 500,\n\t\t\t\treadOnly: true,\n\t\t\t\tpath: '/on/images/icons',\n\t\t\t\tscore: function() {\n\t\t\t\t\treturn \$(this).attr('data-score');\n\t\t\t\t},\n\t\t\t\tclick: function() {\n\t\t\t\t\trate(\$(this).attr('data-id'), \$('.star').raty('score'));\n\t\t\t\t}\n\t\t\t});\n\t\t</script>"; /* ========================== OUTPUT PAGE ========================== */ echo $content;
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } try { $params = array(); $params['database'] = $_POST['database']; $params['desc'] = $_POST['description']; api::send('self/database/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/databases/config?database=' . security::encode($_POST['database'])); }
$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(' ', ' ', $lang['offer_' . security::encode($_GET['plan']) . '_title']) . "\" />\n\t</form>\t\n"; /* ========================== OUTPUT PAGE ========================== */ $template->output($content);
<?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'])); }
<?php if (!defined('PROPER_START')) { header("HTTP/1.0 403 Forbidden"); exit; } try { if (isset($_POST['pass']) && (!isset($_POST['confirm']) || $_POST['pass'] != $_POST['confirm'])) { throw new Exception("Password mismatch"); } $params = array(); $params['pass'] = $_POST['pass']; $params['service'] = $_POST['service']; $params['branch'] = $_POST['branch']; api::send('self/service/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/apps/show?id=' . security::encode($_POST['app'])); }