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


PHP security::get方法代码示例

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


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

示例1: round

if ($apps['max'] != 0) {
    $percent_apps = $apps['used'] * 100 / $apps['max'];
}
$disk['max'] = round($disk['max'] / 1024, 2) . " {$lang['gb']}";
if ($disk['used'] >= 1024) {
    $disk['used'] = round($disk['used'] / 1024, 2) . " {$lang['gb']}";
} else {
    $disk['used'] = "{$disk['used']} {$lang['mb']}";
}
$mem['max'] = round($mem['max'] / 1024, 2) . " {$lang['gb']}";
if ($mem['used'] >= 1024) {
    $mem['used'] = round($mem['used'] / 1024, 2) . " {$lang['gb']}";
} else {
    $mem['used'] = "{$mem['used']} {$lang['mb']}";
}
$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;\">\n\t\t\t\t\t<h1 class=\"dark\">{$lang['title']}</h1>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"right\">\n\t\t\t\t\t<a class=\"button classic\" href=\"/panel/raise\" style=\"width: 200px; 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\t<span style=\"display: block; padding-top: 3px;\">{$lang['more']}</span>\n\t\t\t\t\t</a>\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"clear\"></div><br /><br />\n\t\t\t<div class=\"container\">\n\t\t\t\t<div style=\"float: left; width: 500px;\">\n\t\t\t\t\t<span style=\"block; float: left; padding-top: 7px; font-size: 18px; color: #878787;\">{$lang['memory']}</span>\n\t\t\t\t\t<div style=\"float: right;\">\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_memory}%;\"></small>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class=\"quota\"><span style='font-weight: bold;'>{$mem['used']}</span> {$lang['of']} {$mem['max']}.</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"clear\"></div><br />\n\t\t\t\t\t<span style=\"block; float: left; padding-top: 7px; font-size: 18px; color: #878787;\">{$lang['disk']}</span>\n\t\t\t\t\t<div style=\"float: right;\">\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_disk}%;\"></small>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class=\"quota\"><span style='font-weight: bold;'>{$disk['used']}</span> {$lang['of']} {$disk['max']}.</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div style=\"float: right; width: 500px;\">\n\t\t\t\t\t<span style=\"block; float: left; padding-top: 7px; font-size: 18px; color: #878787;\">{$lang['services']}</span>\n\t\t\t\t\t<div style=\"float: right;\">\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_services}%;\"></small>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class=\"quota\"><span style='font-weight: bold;'>{$services['used']}</span> {$lang['of']} {$services['max']}.</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"clear\"></div><br />\n\t\t\t\t\t<span style=\"block; float: left; padding-top: 7px; font-size: 18px; color: #878787;\">{$lang['apps']}</span>\n\t\t\t\t\t<div style=\"float: right;\">\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_apps}%;\"></small>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class=\"quota\"><span style='font-weight: bold;'>{$apps['used']}</span> {$lang['of']} {$apps['max']}.</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div><br /><br />\n\t\t\t\t<br />\n\t\t\t\t<h2 class=\"dark\">{$lang['sizes']}</h2>\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th style=\"text-align: center; width: 40px;\">#</th>\n\t\t\t\t\t\t<th>{$lang['name']}</th>\n\t\t\t\t\t\t<th>{$lang['type']}</th>\n\t\t\t\t\t\t<th>{$lang['path']}</th>\n\t\t\t\t\t\t<th>{$lang['size']}</th>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style=\"text-align: center; width: 40px;\"><img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/ftp.png\" style=\"width: 40px;\" /></td>\n\t\t\t\t\t\t<td>{$lang['cloud']}</td>\n\t\t\t\t\t\t<td>{$lang['cloud_type']}</td>\n\t\t\t\t\t\t<td>/dns/com/anotherservice/Users/" . security::get('USER') . "</td>\n\t\t\t\t\t\t<td><span style=\"font-weight: bold;\">{$me['size']} {$lang['mb']}</span></td>\n\t\t\t\t\t</tr>\n";
foreach ($apps2 as $a) {
    $content .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style=\"text-align: center; width: 40px;\"><img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/panel.png\" style=\"width: 40px;\" /></td>\n\t\t\t\t\t\t<td>{$a['tag']}</td>\n\t\t\t\t\t\t<td>{$lang['app']}</td>\n\t\t\t\t\t\t<td>{$a['homeDirectory']}</td>\n\t\t\t\t\t\t<td><span style=\"font-weight: bold;\">{$a['size']} {$lang['mb']}</span></td>\n\t\t\t\t\t</tr>\n\t";
}
foreach ($services2 as $s) {
    $content .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style=\"text-align: center; width: 40px;\"><img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/service.png\" style=\"width: 40px;\" /></td>\n\t\t\t\t\t\t<td>{$s['description']}</td>\n\t\t\t\t\t\t<td>{$lang['service']} {$s['vendor']}</td>\n\t\t\t\t\t\t<td>/services/{$s['name']}-master</td>\n\t\t\t\t\t\t<td><span style=\"font-weight: bold;\">{$s['size']} {$lang['mb']}</span></td>\n\t\t\t\t\t</tr>\n\t";
    if (count($s['branches']) > 0) {
        foreach ($s['branches'] as $b) {
            $content .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style=\"text-align: center; width: 40px;\"><img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/service.png\" style=\"width: 40px;\" /></td>\n\t\t\t\t\t\t<td>{$s['description']}</td>\n\t\t\t\t\t\t<td>{$lang['service']} {$s['vendor']}</td>\n\t\t\t\t\t\t<td>/services/{$s['name']}-{$b['branch_name']}</td>\n\t\t\t\t\t\t<td><span style=\"font-weight: bold;\">{$b['size']} {$lang['mb']}</span></td>\n\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t";
        }
    }
}
foreach ($domains2 as $d) {
    $users = api::send('self/account/list', array('domain' => $d['hostname']));
    foreach ($users as $u) {
        $content .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style=\"text-align: center; width: 40px;\"><img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/user.png\" style=\"width: 40px;\" /></td>\n\t\t\t\t\t\t<td>{$u['mail']}</td>\n\t\t\t\t\t\t<td>{$lang['user']}</td>\n\t\t\t\t\t\t<td>{$u['homeDirectory']}</td>\n\t\t\t\t\t\t<td><span style=\"font-weight: bold;\">{$u['size']} {$lang['mb']}</span></td>\n\t\t\t\t\t</tr>\n\t\t";
开发者ID:iseth,项目名称:php-www-1,代码行数:31,代码来源:quotas.php

示例2: round

    if ($q['name'] == 'BYTES') {
        $quota = $q;
    }
}
$percent = $quota['used'] * 100 / $quota['max'];
if ($quota['used'] >= 1024) {
    $quota['used'] = round($quota['used'] / 1024, 2) . " {$lang['gb']}";
} else {
    $quota['used'] = "{$quota['used']} {$lang['mb']}";
}
if ($quota['max'] >= 1024) {
    $quota['max'] = round($quota['max'] / 1024, 2) . " {$lang['gb']}";
} else {
    $quota['max'] = "{$quota['max']} {$lang['mb']}";
}
$content = "\r\n\t<div class=\"panel\">\r\n\t\t<div class=\"top\">\r\n\t\t\t<div class=\"left\" style=\"width: 500px;\">\r\n\t\t\t\t<img style=\"width: 60px; height: 60px; float: left; margin: 5px 10px 0px 0px; display: block;\" src=\"" . (file_exists("{$GLOBALS['CONFIG']['SITE']}/images/users/{$userinfo['id']}.png") ? "/{$GLOBALS['CONFIG']['SITE']}/images/users/{$userinfo['id']}.png" : "/{$GLOBALS['CONFIG']['SITE']}/images/users/user.png") . "\" />\r\n\t\t\t\t<h1 class=\"dark title\">" . security::get('USER') . "</h1>\r\n\t\t\t\t<h2 class=\"dark title\">" . ($userinfo['firstname'] ? "{$userinfo['firstname']} {$userinfo['lastname']}" : "{$lang['nolastname']}") . "</h2>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"right\" style=\"width: 460px;\">\r\n\t\t\t\t<span style=\"block; float: left; padding-top: 7px; font-size: 18px; color: #878787;\">{$lang['disk2']}</span>\r\n\t\t\t\t<div style=\"float: right;\">\r\n\t\t\t\t\t<div class=\"fillgraph\" style=\"margin-top: 10px;\">\r\n\t\t\t\t\t\t<small style=\"width: {$percent}%;\"></small>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<span class=\"quota\"><span style='font-weight: bold;'>{$quota['used']}</span> {$lang['of']} {$quota['max']}. <a href=\"/panel/messages\">{$lang['request']}</a>.</span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"clear\"></div>\r\n\t\t</div>\r\n\t\t<br />\r\n\t\t<div class=\"sites\">\r\n\t\t\t<div class=\"sitescontent\">\r\n\t\t\t\t<div style=\"width: 1080px; padding: 10px; background-color: #ffffff; opacity: 0.6; border-radius: 5px; margin-bottom: 20px;\">\r\n\t\t\t\t\t<img style=\"display: block; float: left; margin-right: 10px;\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/donation.png\" />\r\n\t\t\t\t\t<span style=\"font-size: 18px; display: block; float: left;\">{$lang['help']} <a href=\"/org/help\">{$lang['help_text']}</a> !</span><br /><br />\r\n\t\t\t\t\t<span style=\"font-size: 12px; color: #ff8827; display: block; float: left; padding-top: 10px;\"\">{$lang['thanks']} <span style=\"font-weight: bold;\">{$lang['thanks2']}</span>.</span>\r\n\t\t\t\t\t<div class=\"clear\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"site newsite\" id=\"newsite\">\r\n\t\t\t\t\t<div id=\"addsite\">\r\n\t\t\t\t\t\t<a href=\"#\" onclick=\"showForm(); return false;\" class=\"button classic\" style=\"margin: 0 auto; margin-top: 97px; padding: 10px 0 0 0; height: 40px; width: 50px; text-align: center;\">\r\n\t\t\t\t\t\t\t<img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/plus-white-big.png\" />\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div id=\"formsite\" style=\"display: none; position: relative; padding: 30px 10px 10px 10px;\">\r\n\t\t\t\t\t\t<a href=\"#\" style=\"display: block; position: absolute; top: 5px; left: 5px;\" onclick=\"showNew(); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/arrowLeft.png\" alt=\"\" /></a>\r\n\t\t\t\t\t\t<div class=\"form-small\">\t\t\r\n\t\t\t\t\t\t\t<form action=\"/panel/sites/add_action\" method=\"post\" class=\"center\">\r\n\t\t\t\t\t\t\t\t<fieldset style=\"padding-top: 10px;\">\r\n\t\t\t\t\t\t\t\t\t<input class=\"auto\" type=\"text\" value=\"{$lang['name']}\" name=\"subdomain\" onfocus=\"this.value = this.value=='{$lang['name']}' ? '' : this.value; this.style.color='#4c4c4c';\" onfocusout=\"this.value = this.value == '' ? this.value = '{$lang['name']}' : this.value; this.value=='{$lang['name']}' ? this.style.color='#cccccc' : this.style.color='#4c4c4c'\" />\r\n\t\t\t\t\t\t\t\t\t<span class=\"help-block\">{$lang['tipsite']}</span>\r\n\t\t\t\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t\t\t\t\t<input 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'\" />\r\n\t\t\t\t\t\t\t\t\t<span class=\"help-block\">{$lang['tippassword']}</span>\r\n\t\t\t\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t\t\t\t<fieldset>\t\r\n\t\t\t\t\t\t\t\t\t<input autofocus type=\"submit\" value=\"{$lang['create']}\" style=\"width: 120px;\" />\r\n\t\t\t\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n";
if (count($sites) == 0) {
    $content .= "<div class=\"new\">\r\n\t\t\t\t\t<div class=\"bullet\"></div>\r\n\t\t\t\t\t<div class=\"text\">\r\n\t\t\t\t\t\t<span class=\"title\">{$lang['welcome']}</span>\r\n\t\t\t\t\t\t{$lang['welcome_text']}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t";
} else {
    $count = count($sites);
    $i = 1;
    foreach ($sites as $s) {
        if ($i == $count) {
            $last = "style=\"margin-right: 0;\"";
        }
        $i++;
        if (!$s['size']) {
            $s['size'] = 0;
        }
        $content .= "\r\n\t\t\t\t<div class=\"site\" {$last} onclick=\"window.location.href='/panel/sites/config?id={$s['id']}'; return false;\">\r\n\t\t\t\t\t<div class=\"normal\">\r\n\t\t\t\t\t\t<span style=\"font-size: 16px; font-weight: bold; display: block; margin-bottom: 5px;\">{$s['hostname']}</span>\r\n\t\t\t\t\t\t<span style=\"color: #9a9a9a; font-size: 12px; display: block; margin-bottom: 20px;\">{$lang['disk']} {$s['size']} {$lang['mb']}</span></span>\r\n\t\t\t\t\t\t<div class=\"thumbshot\">\r\n\t\t\t\t\t\t\t<img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/sites/?url={$s['hostname']}\" />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t";
    }
开发者ID:iseth,项目名称:php-www,代码行数:31,代码来源:index.php

示例3: 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

示例4: 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

示例5: header

<?php

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

示例6: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
if ($security->hasAccess('/panel')) {
    $user = security::get('USER');
}
$message = "\r\nName: " . security::encode($_POST['name']) . "\r\nEmail: " . security::encode($_POST['email']) . "\r\nSubjet: " . security::encode($_POST['subject']) . "\r\nCompte: {$user}\r\n\r\nMessage: " . security::encode($_POST['message']) . "\r\n";
mail("contact@olympe.in", "[Olympe] {$_POST['subject']}", $message, "From: " . security::encode($_POST['email']));
$_SESSION['MESSAGE']['TYPE'] = 'success';
$_SESSION['MESSAGE']['TEXT'] = $lang['success'];
template::redirect('/about/contact');
/* ========================== OUTPUT PAGE ========================== */
$template->output($content);
开发者ID:iseth,项目名称:php-www,代码行数:16,代码来源:contact_action.php

示例7: round

if (count($domains) == 0) {
    template::redirect('/panel/domains');
}
if ($mquota['max'] > 0) {
    $mpercent = $mquota['used'] * 100 / $mquota['max'];
}
if ($aquota['max'] > 0) {
    $apercent = $aquota['used'] * 100 / $aquota['max'];
}
$mquota['max'] = round($mquota['max'] / 1024, 2) . " {$lang['gb']}";
if ($mquota['used'] >= 1024) {
    $mquota['used'] = round($mquota['used'] / 1024, 2) . " {$lang['gb']}";
} else {
    $mquota['used'] = "{$mquota['used']} {$lang['mb']}";
}
$content = "\r\n\t<div class=\"panel\">\r\n\t\t<div class=\"top\">\r\n\t\t\t<div class=\"left\" style=\"width: 500px;\">\r\n\t\t\t\t<img style=\"width: 60px; height: 60px; float: left; margin: 5px 10px 0px 0px; display: block;\" src=\"" . (file_exists("{$GLOBALS['CONFIG']['SITE']}/images/users/{$userinfo['id']}.png") ? "/{$GLOBALS['CONFIG']['SITE']}/images/users/{$userinfo['id']}.png" : "/{$GLOBALS['CONFIG']['SITE']}/images/users/user.png") . "\" />\r\n\t\t\t\t<h1 class=\"dark title\">" . security::get('USER') . "</h1>\r\n\t\t\t\t<h2 class=\"dark title\">" . ($userinfo['firstname'] ? "{$userinfo['firstname']} {$userinfo['lastname']}" : "{$lang['nolastname']}") . "</h2>\r\n\t\t\t</div>\r\n";
if ($mquota['max'] > 0) {
    $content .= "\r\n\t\t\t<div class=\"right\" style=\"width: 450px;\">\r\n\t\t\t\t<span style=\"block; float: left; padding-top: 7px; font-size: 18px; color: #878787;\">{$lang['memory2']}</span>\r\n\t\t\t\t<div style=\"float: right;\">\r\n\t\t\t\t\t<div class=\"fillgraph\" style=\"margin-top: 10px;\">\r\n\t\t\t\t\t\t<small style=\"width: {$mpercent}%;\"></small>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<span class=\"quota\"><span style='font-weight: bold;'>{$mquota['used']}</span> {$lang['of']} {$mquota['max']}. <a href=\"/panel/raise\">{$lang['request']}</a>.</span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t";
} else {
    if ($aquota['max'] > 0) {
        $content .= "\r\n\t\t\t<div class=\"right\" style=\"width: 450px;\">\r\n\t\t\t\t<span style=\"block; float: left; padding-top: 7px; font-size: 18px; color: #878787;\">{$lang['apps2']}</span>\r\n\t\t\t\t<div style=\"float: right;\">\r\n\t\t\t\t\t<div class=\"fillgraph\" style=\"margin-top: 10px;\">\r\n\t\t\t\t\t\t<small style=\"width: {$apercent}%;\"></small>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<span class=\"quota\"><span style='font-weight: bold;'>{$aquota['used']}</span> {$lang['of']} {$aquota['max']}. <a href=\"/panel/raise\">{$lang['request']}</a>.</span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t";
    }
}
$content .= "\r\n\t\t\t<div class=\"clear\"></div>\r\n\t\t</div>\r\n\t\t<br />\r\n\t\t<div class=\"apps\">\r\n\t\t\t<div class=\"appscontent\">\r\n\t\t\t\t<div class=\"app newapp\" id=\"newapp\">\r\n\t\t\t\t\t<div id=\"addapp\">\r\n\t\t\t\t\t\t<a href=\"#\" onclick=\"showForm(); return false;\" class=\"button classic\" style=\"margin: 0 auto; margin-top: 97px; padding: 10px 0 0 0; height: 40px; width: 50px; text-align: center;\">\r\n\t\t\t\t\t\t\t<img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/plus-white-big.png\" />\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div id=\"formapp\" style=\"display: none; position: relative; padding: 30px 10px 10px 10px;\">\r\n\t\t\t\t\t\t<a href=\"#\" style=\"display: block; position: absolute; top: 5px; left: 5px;\" onclick=\"showNew(); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/arrowLeft.png\" alt=\"\" /></a>\r\n\t\t\t\t\t\t<div class=\"form-small\">\t\t\r\n\t\t\t\t\t\t\t<form action=\"/panel/apps/add\" method=\"post\" class=\"center\">\r\n\t\t\t\t\t\t\t\t<fieldset style=\"padding-top: 10px;\">\r\n\t\t\t\t\t\t\t\t\t<input class=\"auto\" type=\"text\" value=\"{$lang['name']}\" name=\"tag\" onfocus=\"this.value = this.value=='{$lang['name']}' ? '' : this.value; this.style.color='#4c4c4c';\" onfocusout=\"this.value = this.value == '' ? this.value = '{$lang['name']}' : this.value; this.value=='{$lang['name']}' ? this.style.color='#cccccc' : this.style.color='#4c4c4c'\" />\r\n\t\t\t\t\t\t\t\t\t<span class=\"help-block\">{$lang['tipapp']}</span>\r\n\t\t\t\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t\t\t\t\t<input 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'\" />\r\n\t\t\t\t\t\t\t\t\t<span class=\"help-block\">{$lang['tippassword']}</span>\r\n\t\t\t\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t\t\t\t<fieldset>\t\r\n\t\t\t\t\t\t\t\t\t<input autofocus type=\"submit\" value=\"{$lang['create']}\" style=\"width: 120px;\" />\r\n\t\t\t\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n";
if (count($apps) == 0) {
    $content .= "<div class=\"new\">\r\n\t\t\t\t\t<div class=\"bullet\"></div>\r\n\t\t\t\t\t<div class=\"text\">\r\n\t\t\t\t\t\t<span class=\"title\">{$lang['welcome']}</span>\r\n\t\t\t\t\t\t{$lang['welcome_text']}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t";
} else {
    $count = count($apps);
    $i = 1;
    foreach ($apps as $a) {
        $language = explode('-', $a['name']);
开发者ID:iseth,项目名称:php-www-1,代码行数:31,代码来源:index.php

示例8: 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']));
}
$url = '/domains/fake.com';
$data = array('uidNumber' => $_POST['id']);
$domain = $api->query($url, 'GET', $data);
$form = new form('add_subdomain');
$form->checkReferer();
$form->reset();
$form->importValues($_POST);
$form->setCheck('subdomain', $lang['check_subdomain'], formCheck::LOWERCASE . formCheck::NUMERIC . '_-', 2, 50, false);
$form->validate();
$url = '/' . $domain['associatedDomain'] . '/subdomains';
$data = array('subdomain' => $form->getValue('subdomain'), 'gidNumber' => security::get('user_id'));
$subdomain = $api->query($url, 'POST', $data);
// LOG ACTION IN HISTORY
$data = array('domain' => $domain['associatedDomain'], 'subdomain' => $form->getValue('subdomain'));
$logger = new logger();
$logger->log($data);
$form->cleanup();
$template->redirect('/panel/domains/config?id=' . $_POST['id']);
开发者ID:iseth,项目名称:php-www,代码行数:27,代码来源:action_add_subdomain.php


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