本文整理汇总了PHP中Table类的典型用法代码示例。如果您正苦于以下问题:PHP Table类的具体用法?PHP Table怎么用?PHP Table使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Table类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: list_data_radio
function list_data_radio($hal = 0) {
$_SESSION[setting_radiologi_spesimen][hal] = $hal;
$objResponse = new xajaxResponse();
$paging = new MyPagina;
$paging->rows_on_page = 15;
$paging->sql = "
SELECT
rp.id as id,
rp.nama as nama,
rp.biaya_bhp as biaya_bhp,
rpd.biaya_jasa as biaya_jasa,
rpd.kelas as kelas
FROM
radio_pemeriksaan rp
JOIN radio_pemeriksaan_detil rpd ON (rpd.tingkat = rp.tingkat)
ORDER BY
rp.nama
";
$paging->hal = $hal;
$paging->get_page_result();
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$table = new Table;
$table->tbody_height = 350;
$table->addTh(
"No",
"Nama",
"Biaya BHP",
"Biaya Jasa",
"Kelas",
"Hapus"
);
//$table->addExtraTh("style=\"width:50px;\"","style=\"width:200px;\"","","","");
//$kon = new Konek;
for($i=0;$i<sizeof($data);$i++) {
$table->addRow(
($no+$i),
$data[$i][nama],
$data[$i][biaya_bhp],
$data[$i][biaya_jasa],
$data[$i][kelas],
"<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_kamar('".$data[$i][id]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>"
);
$table->addOnclickTd(
"xajax_get_info('".$data[$i][id]."')",
"xajax_get_info('".$data[$i][id]."')",
"xajax_get_info('".$data[$i][id]."')",
"xajax_get_info('".$data[$i][id]."')",
"xajax_get_info('".$data[$i][id]."')"
);
}
$buka = $table->build();
$objResponse->addAssign("list_data_radio", "innerHTML", $buka);
$objResponse->addAssign("navi", "innerHTML", $navi);
return $objResponse;
}
开发者ID:reekoheek,项目名称:srmis,代码行数:60,代码来源:radiologi_spesimen.php
示例2: __construct
public function __construct(Database $database, Table $table, $info)
{
// Table
$this->table = $table;
// Name
$this->name = $info->Field;
// Type
$this->parse_type($info->Type);
// Default
$this->default_value = $info->Default;
// Primary key
if (strtoupper($info->Key) == 'PRI') {
$this->is_primary_key = true;
if ($info->Extra == 'auto_increment') {
$this->is_auto_increment = true;
}
}
// Unique key
if (strtoupper($info->Key) == 'UNI') {
$this->is_unique = true;
}
// Comment
$this->comment = $info->Comment;
// Collation
$this->collation = $info->Collation;
// NULL?
$this->nullable = $info->Null == 'YES';
// Is this a foreign key?
if (in_array($this->name, $table->get_foreign_key_names())) {
$referencedTables = $table->get_referenced_tables(false);
$this->references = $referencedTables[$this->name];
}
}
开发者ID:gitter-badger,项目名称:tabulate-1,代码行数:33,代码来源:Column.php
示例3: getPrimaryKeyDDL
public function getPrimaryKeyDDL(Table $table)
{
if ($table->hasPrimaryKey()) {
$pattern = 'CONSTRAINT %s PRIMARY KEY (%s)';
return sprintf($pattern, $this->quoteIdentifier($this->getPrimaryKeyName($table)), $this->getColumnListDDL($table->getPrimaryKey()));
}
}
开发者ID:kalaspuffar,项目名称:php-orm-benchmark,代码行数:7,代码来源:MssqlPlatform.php
示例4: testToPhpUnitTable
/**
* Tests toPhpUnitTable.
*/
public function testToPhpUnitTable()
{
$table = new Table(new Test(new ReflectionMethod(__CLASS__, __FUNCTION__)), 'dbName', 'tableName');
$result = $table->toPhpUnitTable();
$this->assertInstanceOf('PHPUnit_Extensions_Database_DataSet_ITable', $result);
$this->assertSame('dbName.tableName', $result->getTableMetaData()->getTableName());
}
开发者ID:raphhh,项目名称:pumpkin,代码行数:10,代码来源:TableTest.php
示例5: getHtml
public function getHtml()
{
$trace = $this->trace->addChild("HodnoteniaCallback");
$hodnotenia = $this->app->getHodnotenia($trace);
$hodnoteniaTable = new Table(TableDefinitions::hodnotenia());
$priemeryCalculator = new PriemeryCalculator();
foreach (Sorter::sort($hodnotenia->getData(), array("semester" => -1, "nazov" => 1)) as $row) {
if ($row['semester'] == 'L') {
$class = 'leto';
$priemeryCalculator->add(PriemeryCalculator::SEMESTER_LETNY, $row['znamka'], $row['kredit']);
} else {
$class = 'zima';
$priemeryCalculator->add(PriemeryCalculator::SEMESTER_ZIMNY, $row['znamka'], $row['kredit']);
}
$hodnoteniaTable->addRow($row, array('class' => $class));
}
$hodnoteniaCollapsible = new Collapsible(new HtmlHeader('Hodnotenia'), $hodnoteniaTable);
$priemery = $this->app->getPriemery($trace);
$priemeryTable = new Table(TableDefinitions::priemery());
$priemeryTable->addRows($priemery->getData());
$priemeryContainer = new Container();
$priemeryContainer->addChild(new Label('Nasledovné priemery sú prebraté z AISu, čiže to (ne)funguje presne rovnako:'));
$priemeryContainer->addChild($priemeryTable);
if ($priemeryCalculator->hasPriemer()) {
$priemeryFajrText = '<p><br />Nasledovné vážené študijné priemery sú počítané Fajrom priebežne z tabuľky Hodnotenia, <strong>preto nemôžu byť považované ako oficiálne</strong>:<br /><br />';
$priemeryFajrText .= $priemeryCalculator->getHtml();
$priemeryFajrText .= '</p>';
$priemeryContainer->addChild(new Label($priemeryFajrText));
}
$priemeryCollapsible = new Collapsible(new HtmlHeader('Priemery'), $priemeryContainer);
return $hodnoteniaCollapsible->getHtml() . $priemeryCollapsible->getHtml();
}
开发者ID:BGCX067,项目名称:fajr-svn-to-git,代码行数:32,代码来源:HodnoteniaCallback.php
示例6: display
public function display()
{
$form = new Form(2);
$form->submit();
$GLOBALS['editinglanguage'] = new Language($_GET['language']);
$table = new Table();
$token = new TableColumn("token", "Token");
$translation = new TableFunctionColumn("token", Language::DirectTranslate("TRANSLATION"));
$translation->functionName = "TranslationEditor_GetString";
$translation->autoWidth = true;
$languagetoken = new TableColumn("'" . DataBase::Current()->EscapeString($_GET['language']) . "' as language", "Language");
$languagetoken->value = $_GET['language'];
$languagetoken->visible = false;
$table->columns->add($token);
$table->columns->add($translation);
$table->columns->add($languagetoken);
$table->name = "{'dbprefix'}language_tokens";
$table->actions = "translation_tokens";
$table->orderBy = "token";
$table->size = -1;
$table->display();
$newModule = Language::DirectTranslateHtml("NEW_MODULE");
echo "<h2>" . $newModule . "</h2>";
$form->display();
}
开发者ID:srueegger,项目名称:1zu12bB,代码行数:25,代码来源:translationeditor.php
示例7: list_data
function list_data($hal = 0) {
$_SESSION[hal] = $hal;
$objResponse = new xajaxResponse();
$paging = new MyPagina;
$paging->rows_on_page = 20;
$paging->sql = "SELECT
i.id as icid,
i.kode as kode,
i.nama as nama,
id.id as idid,
id.*
FROM
icopim i
LEFT JOIN icopim_detil id ON (id.tingkat = i.tingkat)
GROUP BY i.id, id.kelas
ORDER BY i.nama, id.kelas
";
$paging->hal = $hal;
$paging->get_page_result();
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$tabel = new Table;
$tabel->tbody_height = 400;
$tabel->addTh(
"No",
"Kode",
"Tindakan",
"Tingkat",
"Kelas",
"Biaya",
"Hapus"
);
for($i=0;$i<sizeof($data);$i++) {
$tabel->addRow(
($no+$i),
$data[$i][kode],
$data[$i][nama],
$data[$i][tingkat],
$data[$i][kelas],
$data[$i][biaya],
"<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_tindakan('".$data[$i][icid]."', '".$data[$i][idid]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>");
$tabel->addOnclickTd(
"xajax_get_tindakan('".$data[$i][icid]."', '".$data[$i][tingkat]."', '".$data[$i][kelas]."')",
"xajax_get_tindakan('".$data[$i][icid]."', '".$data[$i][tingkat]."', '".$data[$i][kelas]."')",
"xajax_get_tindakan('".$data[$i][icid]."', '".$data[$i][tingkat]."', '".$data[$i][kelas]."')",
"xajax_get_tindakan('".$data[$i][icid]."', '".$data[$i][tingkat]."', '".$data[$i][kelas]."')",
"xajax_get_tindakan('".$data[$i][icid]."', '".$data[$i][tingkat]."', '".$data[$i][kelas]."')",
"xajax_get_tindakan('".$data[$i][icid]."', '".$data[$i][tingkat]."', '".$data[$i][kelas]."')"
);
}
$buka = $tabel->build();
$objResponse->addAssign("list_data", "innerHTML", $buka);
$objResponse->addAssign("navi", "innerHTML", $navi);
return $objResponse;
}
开发者ID:reekoheek,项目名称:srmis,代码行数:60,代码来源:tindakan.php
示例8: Load
public function Load()
{
require_once dirname(__FILE__) . "/includes/utils-unset-var.inc.php";
if (!$this->isAjaxPage()) {
unsetWspAdminVariables();
}
parent::$PAGE_TITLE = __(CONNECT_PAGE_TITLE);
$this->setUserRights("");
// Welcome message
$this->render = new Table();
$this->render->setWidth("100%");
$connect_box = new RoundBox(RoundBox::STYLE_SECOND, "connect_box", 420, 150);
$connect_box->setShadow(true);
$connect_box->setValign(RoundBox::VALIGN_CENTER);
$connect_table = new Table();
$connect_table->setWidth("100%")->setDefaultAlign(RowTable::ALIGN_LEFT);
$admin_pic = new Picture("img/wsp-admin/admin_128.png", 128, 128);
$this->auth_obj = new Authentication($this, "connect");
$this->auth_obj->setTableWidth(265);
$connect_table->addRowColumns($admin_pic, $this->auth_obj);
$connect_box->setContent($connect_table);
$this->render->addRow("<br/><br/><br/><br/><br/>");
$this->obj_br_before = new Object();
$this->obj_br_before->setId("divBrBefore");
$this->render->addRow($this->obj_br_before);
$this->mod_obj = new Object();
$this->mod_obj->setId("divConfigRecommandation")->setWidth(400);
$this->render->addRow($this->mod_obj);
$this->render->addRow("");
$this->render->addRow($connect_box, RowTable::ALIGN_CENTER, RowTable::VALIGN_CENTER);
$this->render->addRow("<br/>");
}
开发者ID:kxopa,项目名称:WebSite-PHP,代码行数:32,代码来源:connect.php
示例9: display
public function display()
{
$rolelist = new Template();
$rolelist->load("role_list");
$actions = ActionList::get("rolelist");
if (isset($_POST['insert'])) {
$role = new Role();
$role->name = $_POST['insert'];
$role->insert();
}
if (isset($_GET['delete'])) {
$role = new Role();
$role->ID = $_GET['delete'];
$role->delete();
}
$table = new Table();
$id = new TableColumn("id", Language::DirectTranslate("ID"));
$id->autoWidth = true;
$name = new TableColumn("name", Language::DirectTranslate("NAME"));
$table->columns->add($id);
$table->columns->add($name);
$table->name = "{'dbprefix'}roles";
$table->actions = "rolelist";
$table->orderBy = "name";
$table->cacheName = "rolelist";
$rolelist->assign_var("TABLE", $table->getCode());
$rolelist->output();
}
开发者ID:srueegger,项目名称:1zu12bB,代码行数:28,代码来源:rolelist.php
示例10: commentform
function commentform($pageid)
{
//global $session;
$process = new ProcessForm();
$validate = $process::validate();
$postcomment = new Table("Comments");
//Process Page Form
if ($process->submitForm()) {
/*@setting validation rules*/
$required = array("name", "comment");
$process->errorinfo = array_merge($process->errorinfo, $validate->check_requiredFields($required));
$massage = $process->message("Comment has been successfully submmited.");
//$sucessmsg = $_REQUEST["msg"]=$massage;
if ($process->successflag) {
//put database table here
$postcomment::$tablefields = array("Name" => $process->post("name"), "Comment" => $process->post("comment"), "Pageid" => $pageid);
/*saved to database*/
$postcomment->save();
//echo "new recored was added with id=".$postcomment->lastInsertedId();
//echo "<br> success happened and all fields are sent to database, Thank you ! :)";
}
}
$form = new Form("commentform", filter_var($_SERVER['PHP_SELF']) . "?" . filter_var($_SERVER['QUERY_STRING']), "post");
//Company;
$form->startForm();
$form->setFormField("", $form->addFormInfo("<h2>Comment Form</h2>"));
//Page Title
$form->setFormField($form->inputLabel("name", "*Name"), $form->inputField("text", "name", $process->post("name")), $validate->displayErrorField($process->errorinfo, "name"));
// Page Content
$form->setFormField($form->inputLabel("comment", "*Comment (HTML is not allowed)"), $form->textAreaField("comment", $process->post("comment"), 10, 45, 'placeholder="Type comment here"'), $validate->displayErrorField($process->errorinfo, "comment"));
//Submit Form
$form->setFormField(null, $form->inputField("hidden", "userid", $process->post("userid", $authorid = "")) . $form->inputField("submit", "submit", "Add Comment"));
$form->endForm();
return $form->DisplayFields($GLOBALS["form_labling"], $process->message);
}
开发者ID:rasarpmultimedia,项目名称:ezCMSv1.1.2,代码行数:35,代码来源:comment.form.php
示例11: payment
public function payment($module = '')
{
global $payment, $language, $PHP_SELF;
$instance_sub_table = new Table("cc_payment_methods", "payment_filename");
$DBHandle = DbConnect();
$return = null;
$return = $instance_sub_table->Get_list($DBHandle, $QUERY, 0);
$this->modules = array();
if (is_array($return)) {
foreach ($return as $value) {
array_push($this->modules, $value["payment_filename"]);
}
}
$include_modules = array();
if (!empty($module) && in_array($module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1), $this->modules)) {
$this->selected_module = $module;
$include_modules[] = array('class' => $module, 'file' => $module . '.php');
} else {
reset($this->modules);
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
$include_modules[] = array('class' => $class, 'file' => $value);
}
}
for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
include dirname(__FILE__) . '/../methods/' . $include_modules[$i]['file'];
$GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
}
if (!is_null($module) && in_array($module, $this->modules) && isset($GLOBALS[$module]->form_action_url)) {
$this->form_action_url = $GLOBALS[$module]->form_action_url;
}
$actived_module = $this->selection();
$payment = $actived_module[0]['id'];
}
开发者ID:saydulk,项目名称:a2billing,代码行数:34,代码来源:payment.php
示例12: createUiContainers
function createUiContainers(){
$t = new Table();
$t->add($this->_createNameElement(_T("Zone name"),false),
array("value" => $this->hostname, "required" => True));
$t->add(new TrFormElement( _T("Name server"),
new InputTpl($this->pn("dnsserver")),
$this->_dnRulesTooltip(AllowedDn::RELATIVE|AllowedDn::FQDN)
),
array("value" => $this->values["dnsserver"], "required" => True));
$t->add(new TrFormElement( _T("Responsible person e-mail"),
new InputTpl($this->pn("mail")),
$this->_dnRulesTooltip(AllowedDn::RELATIVE|AllowedDn::FQDN)
),
array("value"=>$this->values["mail"], "required" => True));
$t->add(new TrFormElement(_T("Time interval before the zone should be refreshed"), new BindRemainingTimeTpl($this->pn("refresh"))),
array("value"=>BindRemainingTimeTpl::valueFromBindTimeString($this->values["refresh"])));
$t->add(new TrFormElement(_T("Time interval that should elapse before a failed refresh should be retried"), new BindRemainingTimeTpl($this->pn("retry"))),
array("value"=>BindRemainingTimeTpl::valueFromBindTimeString($this->values["retry"])));
$t->add(new TrFormElement(_T("Expiry time"), new BindRemainingTimeTpl($this->pn("expiry"))),
array("value"=>BindRemainingTimeTpl::valueFromBindTimeString($this->values["expiry"])));
$t->add(new TrFormElement(_T("Minimum TTL"), new BindRemainingTimeTpl($this->pn("minttl"))),
array("value"=>BindRemainingTimeTpl::valueFromBindTimeString($this->values["minttl"])));
$t->add(new TrFormElement(_T("Serial number"), new HiddenTpl($this->pn("serial"))),
array("value"=>$this->values["serial"], "required" => True));
return array($this->stackedUi($t));
}
开发者ID:neoclust,项目名称:mmc,代码行数:26,代码来源:soa.php
示例13: mod
public function mod()
{
$id_trans = Get::req('id_trans', DOTY_INT, 0);
if (isset($_POST['undo'])) {
Util::jump_to('index.php?r=alms/transaction/show');
}
if (isset($_POST['save']) || isset($_POST['not_paid'])) {
$product_to_activate = Get::req('product', DOTY_MIXED, array());
$id_user = Get::req('id_user', DOTY_MIXED, 0);
if ($this->model->saveTransaction($product_to_activate, $id_trans, $id_user)) {
$this->model->controlActivation($id_trans, isset($_POST['not_paid']));
Util::jump_to('index.php?r=alms/transaction/show&res=ok');
}
Util::jump_to('index.php?r=alms/transaction/show&res=err');
}
$transaction_info = $this->model->getTransactionInfo($id_trans);
$user_info = $this->acl_man->getUser($transaction_info['id_user'], false);
$user_info[ACL_INFO_USERID] = $this->acl_man->relativeId($user_info[ACL_INFO_USERID]);
require_once _base_ . '/lib/lib.table.php';
$tb = new Table(false, Lang::t('_DETAILS', 'transaction'), Lang::t('_DETAILS', 'transaction'));
$ts = array('', '', 'min-cell', 'image');
$th = array(Lang::t('_CODE', 'transaction'), Lang::t('_NAME', 'transaction'), Lang::t('_PRICE', 'transaction'), Lang::t('_MARK_AS_PAID', 'transaction'));
$tb->setColsStyle($ts);
$tb->addHead($th);
foreach ($transaction_info['product'] as $product_info) {
$tb->addBody(array($product_info['code'], $product_info['name'], $product_info['price'], Form::getInputCheckbox('product_' . $product_info['id_course'] . '_' . $product_info['id_date'] . '_' . $product_info['id_edition'], 'product[' . $product_info['id_course'] . '_' . $product_info['id_date'] . '_' . $product_info['id_edition'] . ']', 1, $product_info['activated'], $product_info['activated'] ? ' disabled="disabled"' : '')));
}
$this->render('mod', array('transaction_info' => $transaction_info, 'user_info' => $user_info, 'tb' => $tb, 'id_trans' => $id_trans));
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:29,代码来源:TransactionAlmsController.php
示例14: __construct
public function __construct(Table $table, $name, array $options = array())
{
$columnTypes = array(self::TYPE_COLUMN_FIX_SIZE, self::TYPE_COLUMN_VAR_SIZE, self::TYPE_COLUMN_INDEX);
if ($this->isObjectResource($name, $columnTypes)) {
parent::__construct($name);
return;
}
$ctx = $table->getContext();
$path = null;
$flags = 0;
$type = null;
foreach (array('path', 'flags', 'type') as $option) {
if (isset($options[$option])) {
if ($option === 'type') {
${$option} = $this->fetchResource($options[$option], $ctx);
} else {
${$option} = $options[$option];
}
}
}
$previous = ini_set('track_errors', '1');
$column = @grn_column_open_or_create($table->getResource(), $name, $path, $flags, $type);
ini_set('track_errors', $previous);
if (!$column) {
throw new Exception($php_errormsg);
}
parent::__construct($column);
}
开发者ID:rsky,项目名称:phroonga,代码行数:28,代码来源:Column.php
示例15: createEnumerationTable
function createEnumerationTable($enumeration, $dbSchema)
{
if ($this->is_table_filtered($enumeration['name'])) {
$this->logger->log("<br>Ignoriere Enumeration: {$enumeration['name']}");
}
$this->logger->log('<br><b>Create Enumeration Tables: ' . $enumeration['name'] . '</b> (' . $enumeration['xmi_id'] . ')');
$table = new Table($enumeration['name']);
# read Values
$enumType = new EnumType($enumeration['name'], $this->logger);
$enumType->setSchemas($this->umlSchema, $dbSchema);
$enumType->setId($enumeration['id']);
$table->values = $enumType->getValues($enumeration);
# definiere Attribute
$wert_type = empty($enumType) ? 'chacacter varying' : $enumType->getWertType();
$attribute = new Attribute('wert', $wert_type);
$table->addAttribute($attribute);
$attribute = new Attribute('beschreibung', 'character varying');
$table->addAttribute($attribute);
# definiere Primärschlüssel
$table->primaryKey = 'wert';
$this->logger->log($table->values->asTable($table->attributes));
# if (
# $table->values->rows[0][0] != $table->values->rows[0][1] AND
# $table->values->rows[0][1] != 'NULL'
# )
# definiere Commentare
$table->addComment('UML-Typ: Enumeration');
$sql .= $table->asSql();
$this->enumerations[$enumType->name] = $enumType;
$this->logger->log('<pre>' . $tableSql . '</pre>');
return $sql;
}
开发者ID:pkorduan,项目名称:xmi2db,代码行数:32,代码来源:ogrschema.php
示例16: Load
public function Load()
{
parent::$PAGE_TITLE = __(CONFIGURE_BANNED_VISITORS);
if (!defined('MAX_BAD_URL_BEFORE_BANNED')) {
define("MAX_BAD_URL_BEFORE_BANNED", 4);
}
$this->array_wsp_banned_users = WspBannedVisitors::getBannedVisitors();
$this->table_ban = new Table();
$this->table_ban->setId("table_ban")->activateAdvanceTable()->activatePagination()->activateSort(2, "desc")->setWidth(500);
$this->table_ban->addRowColumns("IP", __(LAST_ACCESS), __(DURATION), __(AUTHORIZE))->setHeaderClass(0);
$ban_vistors_obj = new Object("<br/><br/>", $this->table_ban, "<br/><br/>");
$ban_ip_table = new Table();
$form = new Form($this);
$this->ip_edt = new TextBox($form);
$validation = new LiveValidation();
$validation->addValidatePresence();
$this->ip_edt->setLiveValidation($validation);
$this->duration_edt = new TextBox($form);
$this->duration_edt->setValue(0);
$validation = new LiveValidation();
$validation->addValidatePresence()->addValidateNumericality(true);
$this->duration_edt->setLiveValidation($validation);
$ip_btn = new Button($form);
$ip_btn->setValue(__(BAN_IP))->onClick("onBannedIP")->setAjaxEvent();
$ban_ip_table->addRowColumns("IP : ", $this->ip_edt);
$ban_ip_table->addRowColumns(__(DURATION) . " : ", $this->duration_edt);
$form->setContent(new Object($ban_ip_table, $ip_btn));
$ban_vistors_obj->add($form, "<br/><br/>");
$this->render = new AdminTemplateForm($this, $ban_vistors_obj);
}
开发者ID:kxopa,项目名称:WebSite-PHP,代码行数:30,代码来源:configure-banned-visitors.php
示例17: Load
public function Load()
{
parent::$PAGE_TITLE = __(CHANGE_PASSWD);
$form = new Form($this, "Form_change_passwd");
if (extension_loaded('openssl')) {
//$form->setEncryptObject(new EncryptDataWspObject("change wsp password", 2048));
}
$table = new Table();
$table->addRow();
$this->edt_old_passwd = new Password($form, "wsp_old_password");
$this->edt_old_passwd->setFocus();
$live_validation = new LiveValidation();
$live_validation->addValidatePresence()->setFieldName(__(OLD_PASSWD));
$table->addRowColumns(__(OLD_PASSWD) . " : ", $this->edt_old_passwd->setLiveValidation($live_validation))->setStyle("color:black;");
$this->edt_new_passwd = new Password($form, "wsp_new_password");
$live_validation = new LiveValidation();
$live_validation->addValidatePresence()->setFieldName(__(NEW_PASSWD));
$table->addRowColumns(__(NEW_PASSWD) . " : ", $this->edt_new_passwd->setLiveValidation($live_validation))->setStyle("color:black;");
$this->edt_confirm_passwd = new Password($form, "wsp_confirm_password");
$live_validation = new LiveValidation();
$live_validation->addValidatePresence()->setFieldName(__(CONFIRM_PASSWD));
$live_validation->addValidateConfirmation("wsp_new_password");
$table->addRowColumns(__(CONFIRM_PASSWD) . " : ", $this->edt_confirm_passwd->setLiveValidation($live_validation))->setStyle("color:black;");
$table->addRow();
$this->validate_btn = new Button($form);
$this->validate_btn->setValue(__(CHANGE_PASSWD))->onClick("onChangePasswd")->setAjaxEvent();
$table->addRow($this->validate_btn)->setColspan(2)->setAlign(RowTable::ALIGN_CENTER);
$table->addRow();
$form->setContent($table);
$table = new Table();
$table->setWidth("100%");
$table->addRow($form, RowTable::ALIGN_CENTER);
$this->render = $table;
}
开发者ID:kxopa,项目名称:WebSite-PHP,代码行数:34,代码来源:change-passwd.php
示例18: createUiContainers
function createUiContainers($editMode = false)
{
$t = new Table();
$t->add($this->_createNameElement(_T("Host name")), array("value" => $this->hostname, "required" => True));
$t->add(new TrFormElement(_T("IPv6 address"), new IPv6InputTpl($this->pn("ip"))), array("value" => $this->values["ip"], "required" => true));
return array($this->stackedUi($t));
}
开发者ID:sebastiendu,项目名称:mmc,代码行数:7,代码来源:aaaa.php
示例19: factory
/**
* Creates a Datatype object for insertion into the passed table. The table's
* database engine type is checked first. This allows database specific data
* type instructions to be used.
*
* @param \Database\Table $table
* @param string $name Name of column/data type
* @param string $type Data type
* @param string $value Default value for column
* @return \Database\Datatype Returns an extension of Datatype
* @throws \Exception
*/
public static function factory(Table $table, $name, $type, $value = null)
{
$engine = $table->db->getDatabaseType();
$alltypes = $table->getDatatypeList();
$type = strtolower($type);
if (empty($type)) {
throw new \Exception(\t('Data type was empty'));
}
if (!isset($alltypes[$type])) {
throw new \Exception(\t('Unknown data type "%s"', $type));
}
$class_name = ucwords($alltypes[$type]);
$class_file = PHPWS_SOURCE_DIR . "Global/Database/Datatype/{$class_name}.php";
$engine_file = PHPWS_SOURCE_DIR . "Global/Database/Engine/{$engine}/Datatype/{$class_name}.php";
if (is_file($engine_file)) {
$datatype_name = "\\Database\\Engine\\{$engine}\\Datatype\\{$class_name}";
} elseif (is_file($class_file)) {
$datatype_name = "\\Database\\Datatype\\{$class_name}";
} else {
throw new \Exception(\t('Unknown class name "%s"', $class_name));
}
$object = new $datatype_name($table, $name);
if ($object->default instanceof \Variable) {
$object->setDefault($value);
}
return $object;
}
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:39,代码来源:Datatype.php
示例20: getHtml
public function getHtml()
{
$predmetyZapisnehoListu = $this->skusky->getPredmetyZapisnehoListu();
$predmetyZapisnehoListuTable = new Table(TableDefinitions::predmetyZapisnehoListu());
$predmetyZapisnehoListuCollapsible = new Collapsible('Predmety zápisného listu', $predmetyZapisnehoListuTable);
$kreditovCelkomLeto = 0;
$kreditovCelkomZima = 0;
$pocetPredmetovLeto = 0;
$pocetPredmetovZima = 0;
foreach (Sorter::sort($predmetyZapisnehoListu->getData(), array("semester" => -1, "nazov" => 1)) as $row) {
if ($row['semester'] == 'L') {
$pocetPredmetovLeto += 1;
$kreditovCelkomLeto += $row['kredit'];
$class = 'leto';
} else {
$pocetPredmetovZima += 1;
$kreditovCelkomZima += $row['kredit'];
$class = 'zima';
}
$predmetyZapisnehoListuTable->addRow($row, array('class' => $class));
}
$pocetPredmetovText = 'Celkom ';
$pocetPredmetovText .= FajrUtils::formatPlural($pocetPredmetovLeto + $pocetPredmetovZima, '0 predmetov', '1 predmet', '%d predmety', '%d predmetov');
if ($pocetPredmetovLeto > 0 && $pocetPredmetovZima > 0) {
$pocetPredmetovText .= sprintf(' (%d v zime, %d v lete)', $pocetPredmetovZima, $pocetPredmetovLeto);
}
$kreditovCelkomText = '' . ($kreditovCelkomLeto + $kreditovCelkomZima);
if ($kreditovCelkomLeto > 0 && $kreditovCelkomZima > 0) {
$kreditovCelkomText .= sprintf(' (%d+%d)', $kreditovCelkomZima, $kreditovCelkomLeto);
}
$predmetyZapisnehoListuTable->addFooter(array('nazov' => $pocetPredmetovText, 'kredit' => $kreditovCelkomText), array());
$predmetyZapisnehoListuTable->setUrlParams(array('studium' => Input::get('studium'), 'list' => Input::get('list')));
return $predmetyZapisnehoListuTable->getHtml();
}
开发者ID:BGCX067,项目名称:fajr-svn-to-git,代码行数:34,代码来源:ZapisanePredmetyCallback.php
注:本文中的Table类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论