本文整理汇总了PHP中box类的典型用法代码示例。如果您正苦于以下问题:PHP box类的具体用法?PHP box怎么用?PHP box使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了box类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: drawWidget
function drawWidget()
{
$s = new session();
if (session::check() != false) {
$w = new box($this->logged_in_realm_caption);
$w->css_box = "login";
$w->addWidget(html::write($this->logged_in_caption . $s->user->username));
$w->addWidget(new button($this->logout_caption, $this->logouttarget . "?logout=1"));
return $w->draw();
}
$h = new html();
$h->html .= "\n\t\t\t\t\t\n\t\t\t\t\t<form method=\"post\" action=\"" . $this->target . "\">\n\t\t\t\t\t<table>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t\t" . $this->realm_caption . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td>" . $this->username_caption . "</td><td><input type=\"text\" name=\"username\"></td></tr>\t\t\t\n\t\t\t\t\t\t<tr><td>" . $this->password_caption . "</td><td><input type=\"password\" name=\"password\"></td></tr>\n\t\t\t\t\t\t<tr><td><input type=\"submit\" value=\"" . $this->submit_caption . "\"></td></tr></table></form>";
$b = new box($this->realm_caption, $h);
$b->css_box = "login";
return $b->draw();
}
示例2: display
function display()
{
$statusBox = new box("EVE Status");
$statusApi = new API_ServerStatus();
if ($statusApi->fetchXML()) {
if ($statusApi->getserverOpen()) {
$statusBox->addOption("caption", "EVE Server is <span><strong><font color=green>ONLINE</font></strong></span>");
$statusBox->addOption("caption", "Players Online: " . $statusApi->getOnlinePlayers());
} else {
$statusBox->addOption("caption", "EVE Server is <span><strong><font color=red>OFFLINE</font></strong></span>");
}
} else {
$statusBox->addOption("caption", "EVE Server is <span><strong><font color=red>UNKNOWN</font></strong></span>");
$statusBox->addOption("caption", "Players Online: Unknown");
$statusBox->addOption("caption", "EVE API is <span><strong><font color=red>DOWN</font></strong></span>");
}
if (config::get("show_clock")) {
$statusBox->addOption("caption", "EVE Time: <span><strong><font color=orange>" . gmdate("H:i") . "</font></strong></span>");
}
return $statusBox->generate();
}
示例3: page_open
# BerliOS - The OpenSource Mediator: http://www.berlios.de
#
# Insert contact person of a contact
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
######################################################################
require "./include/prepend.php3";
page_open(array("sess" => "SourceContact_Session", "auth" => "SourceContact_Auth", "perm" => "SourceContact_Perm"));
require "./include/header.inc";
require "./include/conlib.inc";
require "./include/clalib.inc";
require "./include/perlib.inc";
$bx = new box("100%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$be = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
$bs = new box("100%", $th_strip_frame_color, $th_strip_frame_width, $th_strip_title_bgcolor, $th_strip_title_font_color, $th_strip_title_align, $th_strip_body_bgcolor, $th_strip_body_font_color, $th_strip_body_align);
?>
<!-- content -->
<?php
if ($perm->have_perm("user_pending")) {
$be->box_full($t->translate("Error"), $t->translate("Access denied"));
$auth->logout();
} else {
if (isset($id)) {
$salutation_per = trim($salutation_per);
$firstname_per = trim($firstname_per);
$lastname_per = trim($lastname_per);
$grad_per = trim($grad_per);
$phone_per = trim($phone_per);
示例4: page_open
#
# Manage document formats
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
######################################################################
require "./include/prepend.php3";
page_open(array("sess" => "DocsWell_Session"));
if (isset($auth) && !empty($auth->auth["perm"])) {
@page_close();
page_open(array("sess" => "DocsWell_Session", "auth" => "DocsWell_Auth", "perm" => "DocsWell_Perm"));
}
require "./include/header.inc";
$bx = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$be = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
?>
<!-- content -->
<?php
if ($config_perm_admformat != "all" && (!isset($perm) || !$perm->have_perm($config_perm_admformat))) {
$be->box_full($t->translate("Error"), $t->translate("Access denied"));
} else {
if (isset($format) && !empty($format)) {
// Look if Format is already in table
$db->query("SELECT * FROM FORMATDEF WHERE NAME='{$format}'");
if ($db->num_rows() > 0) {
if (isset($new_format)) {
// If format in database and a new name is given, then rename
if (!empty($new_format)) {
$db->query("UPDATE FORMATDEF SET NAME='{$new_format}' WHERE NAME='{$format}'");
示例5: page_open
#
# This file inserts a new license
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
######################################################################
require "include/prepend.php3";
page_open(array('sess' => 'SourceAgency_Session'));
if (isset($auth) && !empty($auth->auth['perm'])) {
page_close();
page_open(array('sess' => 'SourceAgency_Session', 'auth' => 'SourceAgency_Auth', 'perm' => 'SourceAgency_Perm'));
}
require 'include/header.inc';
$bx = new box('97%', $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$be = new box('80%', $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
start_content();
if ($config_perm_admlicens != 'all' && (!isset($perm) || !$perm->have_perm($config_perm_admlicens))) {
$be->box_full($t->translate('Error'), $t->translate('Access denied'));
} else {
if (isset($license) && !empty($license)) {
// Look if License is already in table
$db->query("SELECT * FROM licenses WHERE license='{$license}'");
if ($db->num_rows() > 0) {
if (isset($new_license)) {
// If license in database and a new name is given, then rename
if (!empty($new_license)) {
$db->query("SELECT proid,creation FROM developing WHERE " . "license = '{$license}'");
// All the affected projects are treated as modified
// BUT they are assigned to the new license!!!!
while ($db->next_record()) {
示例6: page_open
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
######################################################################
require "./include/prepend.php3";
page_open(array("sess" => "SourceWell_Session"));
if (isset($auth) && !empty($auth->auth["perm"])) {
page_close();
page_open(array("sess" => "SourceWell_Session", "auth" => "SourceWell_Auth", "perm" => "SourceWell_Perm"));
}
require "./include/header.inc";
require "./include/cmtlib.inc";
$bx = new box("100%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$bi = new box("80%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$be = new box("80%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
?>
<!-- content -->
<?php
if ($config_perm_admdate != "all" && (!isset($perm) || !$perm->have_perm($config_perm_admdate))) {
$be->box_full($t->translate("Error"), $t->translate("Access denied"));
} else {
if (!isset($action)) {
$action = "check";
}
$where = "WHERE status='A'";
if (isset($id)) {
$where .= " AND appid='{$id}'";
}
// Check application
示例7: page_open
# This is the index file which shows the recent apps
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
######################################################################
require "./include/prepend.php3";
page_open(array("sess" => "SourceWell_Session"));
if (isset($auth) && !empty($auth->auth["perm"])) {
page_close();
page_open(array("sess" => "SourceWell_Session", "auth" => "SourceWell_Auth", "perm" => "SourceWell_Perm"));
}
require "./include/header.inc";
$bx = new box("100%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$be = new box("80%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
$bs = new box("100%", $th_strip_frame_color, $th_strip_frame_width, $th_strip_title_bgcolor, $th_strip_title_font_color, $th_strip_title_align, $th_strip_body_bgcolor, $th_strip_body_font_color, $th_strip_body_align);
?>
<!-- content -->
<table BORDER=0 CELLSPACING=10 CELLPADDING=0 WIDTH="100%" >
<tr valign="top"><td width="80%">
<?php
if (!isset($by)) {
$by = "Date";
}
if (!isset($start)) {
$start = date("Y-m-d");
}
if (!isset($days)) {
$days = 1;
}
示例8: array
$reviews = $reviews_result->fields;
$heading = array();
$contents = array();
$heading[] = array('params' => 'class="menuBoxHeading"', 'text' => BOX_TITLE_STATISTICS);
$contents[] = array('params' => 'class="infoBox"', 'text' => BOX_ENTRY_CUSTOMERS . ' ' . $customers['count'] . '<br />' . BOX_ENTRY_PRODUCTS . ' ' . $products['count'] . '<br />' . BOX_ENTRY_REVIEWS . ' ' . $reviews['count']);
$box = new box();
echo $box->menuBox($heading, $contents);
echo '<br />';
$contents = array();
if (oos_server_get_var('HTTPS') == 'on' || oos_server_get_var('HTTPS') == '1') {
$size = oos_server_get_var('SSL_CIPHER_ALGKEYSIZE') ? oos_server_get_var('SSL_CIPHER_ALGKEYSIZE') . '-bit' : '<i>' . BOX_CONNECTION_UNKNOWN . '</i>';
$contents[] = array('params' => 'class="infoBox"', 'text' => oos_image(OOS_IMAGES . 'icons/locked.gif', ICON_LOCKED, '', '', 'align="right"') . sprintf(BOX_CONNECTION_PROTECTED, $size));
} else {
$contents[] = array('params' => 'class="infoBox"', 'text' => oos_image(OOS_IMAGES . 'icons/unlocked.gif', ICON_UNLOCKED, '', '', 'align="right"') . BOX_CONNECTION_UNPROTECTED);
}
$box = new box();
echo $box->tableBlock($contents);
?>
</td>
</tr>
</table></td>
<td width="460" valign="center"><table border="0" width="460" height="375" cellspacing="1" cellpadding="1">
<tr>
<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr><?php
echo oos_draw_form('languages', 'index.php', '', 'get');
?>
<td class="heading"><?php
echo HEADING_TITLE;
?>
</td>
示例9: page_open
# BerliOS - The OpenSource Mediator: http://www.berlios.de
#
# Insert type
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
######################################################################
page_open(array("sess" => "DocsWell_Session"));
if (isset($auth) && !empty($auth->auth["perm"])) {
@page_close();
page_open(array("sess" => "DocsWell_Session", "auth" => "DocsWell_Auth", "perm" => "DocsWell_Perm"));
}
require "header.inc";
$bx = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$be = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
?>
<!-- content -->
<?php
if ($config_perm_admtype != "all" && (!isset($perm) || !$perm->have_perm($config_perm_admtype))) {
$be->box_full($t->translate("Error"), $t->translate("Access denied"));
} else {
if (isset($type) && !empty($type)) {
// Look if Type is already in table
$db->query("SELECT * FROM TYPDEF WHERE NAME='{$type}'");
if ($db->num_rows() > 0) {
if (isset($new_type)) {
// If type in database and a new name is given, then rename
if (!empty($new_type)) {
$db->query("UPDATE TYPDEF SET NAME='{$new_type}' WHERE NAME='{$type}'");
示例10: page_open
# the Free Software Foundation; either version 2 or later of the GPL.
#
# $Id: cusbyentid.php,v 1.2 2003/02/25 11:45:44 helix Exp $
#
######################################################################
require "./include/prepend.php3";
page_open(array("sess" => "SourceBiz_Session"));
if (isset($auth) && !empty($auth->auth["perm"])) {
page_close();
page_open(array("sess" => "SourceBiz_Session", "auth" => "SourceBiz_Auth", "perm" => "SourceBiz_Perm"));
}
require "./include/header.inc";
require "./include/entlib.inc";
require "./include/cuslib.inc";
$bx = new box("100%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$be = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
$bs = new box("100%", $th_strip_frame_color, $th_strip_frame_width, $th_strip_title_bgcolor, $th_strip_title_font_color, $th_strip_title_align, $th_strip_body_bgcolor, $th_strip_body_font_color, $th_strip_body_align);
?>
<!-- content -->
<?php
if (isset($id)) {
entbyentid($db, $id);
cusbyentid($db, $id);
} else {
$be->box_full($t->translate("Error"), $t->translate("No Enterprise ID specified"));
}
?>
<!-- end content -->
<?php
示例11: page_open
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
#
# $Id: admuser.php,v 1.5 2004/03/02 09:22:58 helix Exp $
#
######################################################################
require "./include/prepend.php3";
page_open(array("sess" => "DevCounter_Session"));
if (isset($auth) && !empty($auth->auth["perm"])) {
page_close();
page_open(array("sess" => "DevCounter_Session", "auth" => "DevCounter_Auth", "perm" => "DevCounter_Perm"));
}
require "./include/header.inc";
$bx = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$be = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
?>
<!-- content -->
<?php
if ($config_perm_admuser != "all" && (!isset($perm) || !$perm->have_perm($config_perm_admuser))) {
$be->box_full($t->translate("Error"), $t->translate("Access denied"));
} else {
// Check if there was a submission
while (is_array($HTTP_POST_VARS) && (list($key, $val) = each($HTTP_POST_VARS))) {
switch ($key) {
case "create":
// Create a new user
if (empty($username) || empty($password) || empty($email_usr)) {
// Do we have all necessary data?
$be->box_full($t->translate("Error"), $t->translate("Please enter") . " <B>" . $t->translate("Username") . "</B>, <B>" . $t->translate("Password") . "</B> " . $t->translate("and") . " <B>" . $t->translate("E-Mail") . "</B>!");
示例12: page_open
# Norbert Geiges
#
# BerliOS SourceLines: http://sourcelines.berlios.de
# BerliOS - The OpenSource Mediator: http://www.berlios.de
#
# Select category of a solution.
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
######################################################################
require "./include/prepend.php3";
page_open(array("sess" => "SourceLines_Session", "auth" => "SourceLines_Auth", "perm" => "SourceLines_Perm"));
require "./include/header.inc";
/*---------- Box-Definitionen -----------------------------------------------*/
$bx = new box("100%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$be = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
/*---------- Table-Definitionen ---------------------------------------------*/
$tbw = new table("100%", "0", "1", "4", $th_box_title_bgcolor, $th_box_title_font_color, "center", "top", $th_box_body_bgcolor, $th_box_body_font_color, "left", "middle");
$tby = new table("100%", "0", "1", "4", $th_box_title_bgcolor, $th_box_title_font_color, "center", "top", "#ffcc00", $th_box_body_font_color, "left", "top");
?>
<!-- content -->
<?php
debugparam();
if (isset($cate_id)) {
if ($cate_id != 0) {
$leaves = category_leaves($cate_id);
}
} else {
$db->query("SELECT * FROM tblsolutions WHERE solutions_id='{$solu_id}'");
示例13: page_open
#
# BerliOS DocsWell: http://docswell.berlios.de
# BerliOS - The OpenSource Mediator: http://www.berlios.de
#
# Form for inserting new doc
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
######################################################################
page_open(array("sess" => "DocsWell_Session", "auth" => "DocsWell_Auth", "perm" => "DocsWell_Perm"));
require "header.inc";
if ($category && !$kategorie) {
$kategorie = $category;
}
$bx = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
?>
<!-- content -->
<?php
if ($perm->have_perm("editor") || $perm->have_perm("admin")) {
$bx->box_begin();
$bx->box_title($t->translate("Verify new document"));
$bx->box_body_begin();
## Neues Dokument soll eingefügt werden, hier die Datenüberprüfung
if ($status == 'do_new') {
if ($Button == "OK") {
// Eingaben ueberpruefen
if (!$titel) {
$error_ar["titel"] = $t->translate("Error") . ": " . $t->translate("Please enter the titel of the document") . " (" . __LINE__ . ")";
// echo $error_ar["titel"];
示例14: page_open
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
#
# $Id: faq.php,v 1.5 2004/03/02 09:22:58 helix Exp $
#
######################################################################
require "./include/prepend.php3";
page_open(array("sess" => "DevCounter_Session"));
if (isset($auth) && !empty($auth->auth["perm"])) {
page_close();
page_open(array("sess" => "DevCounter_Session", "auth" => "DevCounter_Auth", "perm" => "DevCounter_Perm"));
}
require "./include/header.inc";
$bx = new box("80%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
$be = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
?>
<!-- content -->
<?php
$db->query("SELECT * FROM faq WHERE language='{$la}'");
if ($db->num_rows() > 0) {
while ($db->next_record()) {
$msg .= "<li><a href=#" . $db->f("faqid") . ">" . $db->f("question") . "</a>";
}
$bx->box_full($t->translate("Frequently Asked Questions"), $msg);
$db->seek(0);
while ($db->next_record()) {
echo "<a name=" . $db->f("faqid") . ">\n";
$bx->box_full($t->translate("Question") . ": " . $db->f("question"), "<b>" . $t->translate("Answer") . ":</b> " . $db->f("answer"));
}
示例15: box
<?php
include_once CLASSPATH . 'box.class.php';
$box = new box();
$resid = mysql_query("select * from immobili i,localita l, tipi t where residence=1 and pubblicato=1 and t.id_tipi=i.id_tipi and l.id_localita=i.id_localita ");
echo '<ul>';
while ($r = mysql_fetch_assoc($resid)) {
echo '<li><a href="' . $box->costruisciPath('residence', $r, $_SESSION['lan']) . '" title="' . stripslashes($r['nome_immobile_' . $_SESSION['lan']]) . '">' . stripslashes($r['nome_immobile_' . $_SESSION['lan']]) . '</a></li>';
}
echo '</ul>';