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


PHP api::send方法代码示例

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


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

示例1: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
$users = api::send('user/list', array('order' => 'user_date', 'order_type' => 'DESC'));
$content = "\n\t<div class=\"admin\">\n\t\t<div class=\"top\">\n\t\t\t<div class=\"left\" style=\"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\t<a class=\"button classic\" href=\"#\" onclick=\"\$('#new').dialog('open');\" style=\"width: 180px; height: 22px; float: right;\">\n\t\t\t\t\t<img style=\"float: left;\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/plus-white.png\" />\n\t\t\t\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['add']}</span>\n\t\t\t\t</a>\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<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<th style=\"width: 40px; text-align: center;\">#</th>\n\t\t\t\t\t<th>{$lang['username']}</th>\n\t\t\t\t\t<th>{$lang['email']}</th>\n\t\t\t\t\t<th>{$lang['ip']}</th>\n\t\t\t\t\t<th>{$lang['date']}</th>\n\t\t\t\t</tr>\n";
foreach ($users as $u) {
    $content .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td style=\"width: 40px; text-align: center;\"><a href=\"/admin/users/detail?id={$u['id']}\"><img style=\"width: 30px; height: 30px;\" src=\"" . (file_exists("{$GLOBALS['CONFIG']['SITE']}/images/users/{$u['id']}.png") ? "/{$GLOBALS['CONFIG']['SITE']}/images/users/{$u['id']}.png" : "/{$GLOBALS['CONFIG']['SITE']}/images/users/user.png") . "\" /></a></td>\n\t\t\t\t\t<td><a href=\"/admin/users/detail?id={$u['id']}\">{$u['name']}</a></td>\n\t\t\t\t\t<td>{$u['email']}</td>\n\t\t\t\t\t<td>{$u['ip']}</td>\n\t\t\t\t\t<td>" . date('Y-m-d H:i', $u['date']) . "</td>\n\t\t\t\t</tr>\n\t";
}
$content .= "\n\t\t\t</table>\n\t\t</div>\n\t</div>\n";
/* ========================== OUTPUT PAGE ========================== */
$template->output($content);
开发者ID:iseth,项目名称:php-www-1,代码行数:14,代码来源:users.php

示例2: header

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

示例3: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('quota/user/update', array('user' => $_POST['user'], 'quota' => $_POST['quota'], 'max' => $_POST['max']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/users/detail?id=' . $_POST['user']);
}
开发者ID:iseth,项目名称:php-www,代码行数:12,代码来源:set_quota_action.php

示例4: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('news/del', array('id' => $_GET['id']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/blog');
}
开发者ID:iseth,项目名称:php-www,代码行数:12,代码来源:del_action.php

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

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

示例7: header

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

示例8: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
$bill = api::send('bill/select', array('bill' => $_GET['id']));
$bill = $bill[0];
$userinfo = api::send('user/list', array('user' => $bill['user']['id']));
$userinfo = $userinfo[0];
$mail = str_replace(array('{BILL}', '{NAME}', '{AMOUNT}', '{DATE}'), array($bill['id'], $userinfo['name'], $bill['amount_ati'], date($lang['dateformat'], $bill['date'])), $lang['mailcontent']);
$result = mail($userinfo['email'], $lang['subject'], str_replace(array('{TITLE}', '{CONTENT}'), array($lang['subject'], $mail), $GLOBALS['CONFIG']['MAIL_TEMPLATE']), "MIME-Version: 1.0\r\nContent-type: text/html; charset=utf-8\r\nFrom: Another Service <no-reply@anotherservice.com>\r\nBcc: contact@anotherservice.com\r\n");
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    $template->redirect('/admin/billing/view?id=' . $_GET['id']);
}
开发者ID:iseth,项目名称:php-www-1,代码行数:17,代码来源:send_action.php

示例9: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/app/start', array('app' => $_GET['id'], 'branch' => $_GET['branch']));
echo "OK";
开发者ID:iseth,项目名称:php-www-1,代码行数:8,代码来源:start_action.php

示例10: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/app/grow', array('app' => $_GET['id'], 'branch' => $_GET['branch'], 'instances' => $_GET['instances']));
echo "OK";
开发者ID:iseth,项目名称:php-www-1,代码行数:8,代码来源:instance_increase_action.php

示例11: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/subdomain/add', array('domain' => $_POST['domain'], 'subdomain' => $_POST['subdomain']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    $template->redirect('/panel/domains/config?id=' . $_POST['id']);
}
开发者ID:iseth,项目名称:php-www,代码行数:12,代码来源:add_subdomain_action.php

示例12: floor

    $days = floor($inputSeconds / $secondsInADay);
    // extract hours
    $hourSeconds = $inputSeconds % $secondsInADay;
    $hours = floor($hourSeconds / $secondsInAnHour);
    // extract minutes
    $minuteSeconds = $hourSeconds % $secondsInAnHour;
    $minutes = floor($minuteSeconds / $secondsInAMinute);
    // extract the remaining seconds
    $remainingSeconds = $minuteSeconds % $secondsInAMinute;
    $seconds = ceil($remainingSeconds);
    // return the final array
    $obj = array('d' => (int) $days, 'h' => (int) $hours, 'm' => (int) $minutes, 's' => (int) $seconds);
    return $obj;
}
try {
    $app = api::send('self/app/list', array('id' => $_GET['id'], 'extended' => 1));
    $app = $app[0];
    if (!$_GET['branch'] && !$_SESSION['DATA'][$app['id']]['branch']) {
        $_SESSION['DATA'][$app['id']]['branch'] = 'master';
    } else {
        if ($_GET['branch']) {
            $_SESSION['DATA'][$app['id']]['branch'] = $_GET['branch'];
        }
    }
    $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;
开发者ID:iseth,项目名称:php-www-1,代码行数:31,代码来源:ajax_instances.php

示例13: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
$bills = api::send('bill/list');
$content = "\n\t\t\t<div class=\"panel\">\n\t\t\t\t<div class=\"top\">\n\t\t\t\t\t<div class=\"left\">\n\t\t\t\t\t\t<h1 class=\"dark\">{$lang['title']}</h1>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"right\">\n\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div><br />\n\t\t\t\t<div class=\"container\">\n";
if (count($bills) > 0) {
    $content .= "\n\t\t\t\t\t<table>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th style=\"text-align: center; width: 50px;\">#</th>\n\t\t\t\t\t\t\t<th>{$lang['name']}</th>\n\t\t\t\t\t\t\t<th>{$lang['ref']}</th>\n\t\t\t\t\t\t\t<th style=\"text-align: center; width: 50px;\">#</th>\n\t\t\t\t\t\t\t<th>{$lang['user']}</th>\n\t\t\t\t\t\t\t<th>{$lang['date']}</th>\n\t\t\t\t\t\t\t<th>{$lang['amount']}</th>\n\t\t\t\t\t\t\t<th>{$lang['status']}</th>\n\t\t\t\t\t\t</tr>\n\t";
    foreach ($bills as $b) {
        $month = date('F', $b['date']);
        $month_translate = $lang[$month];
        $content .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td tyle=\"text-align: center; width: 50px;\"><a href=\"/admin/billing/view?id={$b['id']}\"><img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/large/doc.png\" alt=\"\" style=\"display: block; padding-top: 5px; margin: 0 auto;\"/></a></td>\n\t\t\t\t\t<td>{$b['name']}</td>\n\t\t\t\t\t<td>" . str_replace($month, $month_translate, $b['reference']) . "</td>\n\t\t\t\t\t<td style=\"text-align: center; width: 50px;\"><a href=\"/admin/users/detail?id={$b['user']['id']}\"><img style=\"width: 30px; height: 30px;\" src=\"" . (file_exists("{$GLOBALS['CONFIG']['SITE']}/images/users/{$b['user']['id']}.png") ? "/{$GLOBALS['CONFIG']['SITE']}/images/users/{$b['user']['id']}.png" : "/{$GLOBALS['CONFIG']['SITE']}/images/users/user.png") . "\" /></a></td>\n\t\t\t\t\t<td><a href=\"/admin/users/detail?id={$b['user']['id']}\">{$b['user']['name']}</a></td>\n\t\t\t\t\t<td>" . str_replace($month, $month_translate, date($lang['DATEFORMAT'], $b['date'])) . "</td>\n\t\t\t\t\t<td>{$b['amount_ati']} &euro;</td>\n\t\t\t\t\t<td><img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/status_{$b['status']}.png\" alt=\"\" style=\"display: block; padding: 0 10px 0 0; margin: 0 auto; float: left;\"/>" . $lang['status_' . $b['status']] . "</td>\n\t\t\t\t</tr>\n\t\t";
    }
    $content .= "\t\t\t</table>";
} else {
    $content .= "\n\t\t\t\t\t<span style=\"font-size: 16px;\">{$lang['nobill']}</span><br /><br />\n\t\t\t\t\t<a class=\"button classic\" href=\"/doc/billing\" style=\"width: 140px;\">\n\t\t\t\t\t\t<span style=\"display: block; font-size: 18px; padding-top: 3px;\">{$lang['doc']}</span>\n\t\t\t\t\t</a>\n";
}
$content .= "\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t<br /><br />\n\t\t\t\t</div>\n\t\t\t</div>\n";
/* ========================== OUTPUT PAGE ========================== */
$template->output($content);
开发者ID:iseth,项目名称:php-www-1,代码行数:22,代码来源:billing.php

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

示例15: count

$domain = $domain[0];
if (is_array($domain['aRecord'])) {
    $i = 1;
    $count = count($domain['aRecord']);
    foreach ($domain['aRecord'] as $a) {
        $arecord .= $a;
        if ($i != $count) {
            $arecord .= ',';
        }
        $i++;
    }
} else {
    $arecord = $domain['aRecord'];
}
$subdomains = api::send('self/subdomain/list', array('domain' => $domain['hostname']));
$aliases = api::send('self/alias/list', array('source' => $domain['hostname']));
$content = "\n\t\t\t<div class=\"panel\">\n\t\t\t\t<div class=\"top\">\n\t\t\t\t\t<div class=\"left\" style=\"width: 500px; padding-top: 5px;\"\">\n\t\t\t\t\t\t<h1 class=\"dark\">{$lang['title']} {$domain['hostname']}</h1>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"right\">\n\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div><br />\n\t\t\t\t<div class=\"container\">\n\t\t\t\t\t<div style=\"float: left; width: 300px;\">\n\t\t\t\t\t\t<h2 style=\"padding-top: 10px;\" class=\"dark\">{$lang['dns']}</h2>\n\t\t\t\t\t\t<form style=\"margin-top: 23px;\" action=\"/panel/domains/config_action\" method=\"post\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"{$domain['id']}\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"domain\" value=\"{$domain['hostname']}\" />\n\t\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t\t<input style=\"width: 250px;\" type=\"text\" value=\"" . str_replace('10 ', '', $domain['mxRecord'][0]) . "\" name=\"mx1\" />\n\t\t\t\t\t\t\t\t<span class=\"help-block\">{$lang['mx1']}</span>\n\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t\t<input style=\"width: 250px;\" type=\"text\" value=\"" . str_replace('20 ', '', $domain['mxRecord'][1]) . "\" name=\"mx2\" />\n\t\t\t\t\t\t\t\t<span class=\"help-block\">{$lang['mx2']}</span>\n\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t\t<input style=\"width: 250px;\" type=\"text\" value=\"{$arecord}\" name=\"domain_arecord\" />\n\t\t\t\t\t\t\t\t<span class=\"help-block\">{$domain['hostname']}</span>\n\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" value=\"1\" name=\"domain_mailer\" " . ($domain['mailHost'] ? "checked" : "") . " /> {$lang['mailer']}\n\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t\t<fieldset>\t\t\t\t\n\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"{$lang['update']}\" />\n\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t</form>\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"float: right; width: 700px;\">\n\t\t\t\t\t\t<div style=\"float: left; width: 250px;\">\n\t\t\t\t\t\t\t<h2 style=\"padding-top: 10px;\" class=\"dark\">{$lang['aliases']}</h2>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style=\"float: right; width: 300px;\">\n\t\t\t\t\t\t\t<a class=\"button classic\" href=\"#\" onclick=\"\$('#newalias').dialog('open'); return false;\" style=\"width: 200px; height: 22px; float: right;\">\n\t\t\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\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['add_alias']}</span>\n\t\t\t\t\t\t\t</a>\t\t\t\t\t\t\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\t<br />\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['domain']}</th>\n\t\t\t\t\t\t\t\t<th>{$lang['record']}</th>\n\t\t\t\t\t\t\t\t<th>{$lang['type']}</th>\n\t\t\t\t\t\t\t\t<th>{$lang['actions']}</th>\n\t\t\t\t\t\t\t</tr>";
if (count($aliases) > 0) {
    foreach ($aliases as $a) {
        $arecord = "";
        if (is_array($a['aRecord'])) {
            $i = 1;
            $max = count($a['aRecord']);
            foreach ($a['aRecord'] as $r) {
                if ($i == $max) {
                    $arecord .= "{$r}";
                } else {
                    $arecord .= "{$r}<br />";
                }
                $i++;
            }
开发者ID:iseth,项目名称:php-www-1,代码行数:31,代码来源:config.php


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