当前位置: 首页>>代码示例>>PHP>>正文


PHP security::encode方法代码示例

本文整理汇总了PHP中security::encode方法的典型用法代码示例。如果您正苦于以下问题:PHP security::encode方法的具体用法?PHP security::encode怎么用?PHP security::encode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在security的用法示例。


在下文中一共展示了security::encode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

}
$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 ========================== */
开发者ID:iseth,项目名称:php-www-1,代码行数:31,代码来源:add.php

示例2: header

<?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']));
}
开发者ID:iseth,项目名称:php-www,代码行数:12,代码来源:update_action.php

示例3: header

<?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']));
}
开发者ID:iseth,项目名称:php-www-1,代码行数:12,代码来源:add_action.php

示例4: foreach

    }
    $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;
开发者ID:iseth,项目名称:php-www-1,代码行数:31,代码来源:ajax_instances.php

示例5: header

<?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);
开发者ID:iseth,项目名称:php-www,代码行数:15,代码来源:config.php

示例6: header

<?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);
开发者ID:iseth,项目名称:php-www-1,代码行数:11,代码来源:config.php

示例7: header

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);
开发者ID:iseth,项目名称:php-www,代码行数:31,代码来源:detail.php

示例8: header

<?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;
开发者ID:iseth,项目名称:php-www-1,代码行数:19,代码来源:ajax_urls.php

示例9: header

<?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']);
开发者ID:iseth,项目名称:php-www,代码行数:29,代码来源:action_edit.php

示例10: foreach

    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);
开发者ID:iseth,项目名称:php-www-1,代码行数:31,代码来源:config.php

示例11: array

            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);
开发者ID:iseth,项目名称:php-www-1,代码行数:31,代码来源:log.php

示例12: header

<?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']));
}
开发者ID:iseth,项目名称:php-www-1,代码行数:25,代码来源:password_action.php

示例13: header

<?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("contact@anotherservice.com", "[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);
开发者ID:iseth,项目名称:php-www-1,代码行数:14,代码来源:contact_action.php

示例14: header

<?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']));
}
开发者ID:iseth,项目名称:php-www,代码行数:12,代码来源:del_action.php

示例15: header

<?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']));
}
开发者ID:iseth,项目名称:php-www-1,代码行数:12,代码来源:permit_action.php


注:本文中的security::encode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。