• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP TPage类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __construct

 /**
  * Class constructor
  * Creates the page
  */
 function __construct()
 {
     parent::__construct();
     // loads the galleria javascript library
     TPage::include_js('app/lib/jquery/galleria/galleria-1.2.2.min.js');
     // creates a table
     $table = new TTable();
     // creates the DIV element with the images
     $galleria = new TElement('div');
     $galleria->id = 'images';
     $galleria->style = "width:600px;height:460px";
     for ($n = 1; $n <= 4; $n++) {
         $img = new TElement('img');
         $img->src = "app/images/nature/nature{$n}.jpg";
         $galleria->add($img);
     }
     // add the DIV to the table
     $table->addRow()->addCell($galleria);
     // creates the script element
     $script = new TElement('script');
     $script->type = 'text/javascript';
     $script->add('
         Galleria.loadTheme("app/lib/jquery/galleria/themes/classic/galleria.classic.min.js");
         $("#images").galleria();
     ');
     // add the script to the table
     $table->addRow()->addCell($script);
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($table);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:37,代码来源:JqueryGalleryView.class.php


示例2: __construct

 /**
  * Class Constructor
  * @param $type    Type of the message (info, error)
  * @param $message Message to be shown
  * @param $action  Action to process
  */
 public function __construct($type, $message, TAction $action = NULL)
 {
     $this->id = uniqid();
     if (!is_null($action)) {
         $this->action = '__adianti_load_page(\'' . $action->serialize() . '\');';
     }
     if (TPage::isMobile()) {
         $img = new TElement('img');
         $img->src = "lib/adianti/images/{$type}.png";
         $table = new TTable();
         $table->width = '250px';
         $table->bgcolor = '#E5E5E5';
         $table->style = "border-collapse:collapse";
         $row = $table->addRow();
         $row->addCell($img);
         $row->addCell($message);
         $table->show();
     } else {
         TPage::include_css('lib/adianti/include/tmessage/tmessage.css');
         // creates a pannel to show the dialog
         $painel = new TElement('div');
         $painel->{'class'} = 'tmessage';
         $painel->id = 'tmessage_' . $this->id;
         // creates a table for layout
         $table = new TTable();
         // creates a row for the icon and the message
         $row = $table->addRow();
         $row->addCell(new TImage("lib/adianti/images/{$type}.png"));
         $scroll = new TScroll();
         $scroll->setSize(350, 70);
         $scroll->add($message);
         $scroll->setTransparency(true);
         $cell = $row->addCell($scroll);
         // add the table to the pannel
         $painel->add($table);
         // show the pannel
         $painel->show();
         $script = new TElement('script');
         $script->{'type'} = 'text/javascript';
         $script->add(' $(function() {
             $( "#' . $painel->id . '" ).dialog({
                 height: 180,
                 width: 440,
                 stack: false,
                 zIndex: 3000,
                 modal: true,
                 buttons: {
                     OK: function() {
                         $( this ).dialog( "close" ); ' . $this->action . '
                     }
                 }
                 }).css("visibility", "visible");
                 
             	$( "#' . $painel->id . ' a" ).click(function () {
             	    window.open($(this).attr(\'href\'));
                 }); 
             });');
         $script->show();
     }
 }
开发者ID:enieber,项目名称:adianti,代码行数:66,代码来源:TMessage.class.php


示例3: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     $list = $this->getPageList(dirname(__FILE__), '');
     $this->List->DataSource = $list;
     $this->List->dataBind();
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:7,代码来源:FeatureList.php


示例4: BootstrapFormWrapper

 /**
  * Class constructor
  * Creates the page
  */
 function __construct()
 {
     parent::__construct();
     // create the form using TQuickForm class
     $this->form = new BootstrapFormWrapper(new TQuickForm());
     $this->form->setFormTitle('cadastroTarefas');
     // create the form fields
     $id = new TEntry('id');
     $id->setEditable(FALSE);
     $description = new TEntry('titulo');
     $list = new TCombo('prioridade');
     $text = new TText('descricao');
     $combo_items = array();
     $combo_items['1'] = 'Baixa';
     $combo_items['2'] = 'Media';
     $combo_items['3'] = 'Alta';
     $list->addItems($combo_items);
     // add the fields inside the form
     $this->form->addQuickField('Id', $id, 40);
     $this->form->addQuickField('Título', $description, 250);
     $this->form->addQuickField('Descrição', $text, 120);
     $this->form->addQuickField('Prioridade', $list, 120);
     $text->setSize(250, 50);
     // define the form action
     $btn = $this->form->addQuickAction('Save', new TAction(array($this, 'onSave')), 'fa:save');
     $btn->class = 'btn btn-success';
     $panel = new TPanelGroup('Cadastro de taredas');
     $panel->add($this->form);
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add($panel);
     parent::add($vbox);
 }
开发者ID:GustavoEmmel,项目名称:exercicioPHP,代码行数:37,代码来源:FormBootstrapView.class.php


示例5: onInit

 public function onInit($param)
 {
     parent::onInit($param);
     if (!$this->isPostBack) {
         switch ($this->Request['modus']) {
             case 0:
                 $sql = "SELECT idtm_country, country_ful FROM tm_country";
                 $data = PFH::convertdbObjectArray(CountryRecord::finder()->findAllBySql($sql), array("idtm_country", "country_ful"));
                 $this->Country->DataSource = $data;
                 $this->Country->dataBind();
                 $this->idta_partei->Data = $this->Request['idta_partei'];
                 break;
             case 1:
                 $sql = "SELECT idtm_country, country_ful FROM tm_country";
                 $data = PFH::convertdbObjectArray(CountryRecord::finder()->findAllBySql($sql), array("idtm_country", "country_ful"));
                 $this->edCountry->DataSource = $data;
                 $this->edCountry->dataBind();
                 $this->fillValues($this->getSelected($this->Request['idta_adresse']));
                 break;
             default:
                 break;
         }
         $this->viewPanel->ActiveViewIndex = $this->Request['modus'];
     }
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:25,代码来源:adresse.php


示例6: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     date_default_timezone_set('Europe/Berlin');
     if (!$this->IsPostBack || !$this->IsCallBack) {
         $sql = "SELECT idta_organisation_type, org_type_name FROM ta_organisation_type";
         $data = PFH::convertdbObjectArray(OrganisationTypeRecord::finder()->findAllBySql($sql), array("idta_organisation_type", "org_type_name"));
         $this->RCedidta_organisation_type->DataSource = $data;
         $this->RCedidta_organisation_type->dataBind();
         $this->RCedidta_organisation_art->DataSource = $this->idta_organisation_art;
         $this->RCedidta_organisation_art->dataBind();
         $this->RCedorg_idtm_user_role->DataSource = PFH::build_SQLPullDown(UserRoleRecord::finder(), "tm_user_role", array("idtm_user_role", "user_role_name"));
         $this->RCedorg_idtm_user_role->dataBind();
         $this->RCedidta_branche->DataSource = PFH::build_SQLPullDown(BrancheRecord::finder(), "ta_branche", array("idta_branche", "bra_name"));
         $this->RCedidta_branche->dataBind();
         $this->RCedidtm_ressource->DataSource = PFH::build_SQLPullDown(RessourceRecord::finder(), "tm_ressource", array("idtm_ressource", "res_name"));
         $this->RCedidtm_ressource->dataBind();
         $this->RCedidtm_country->DataSource = PFH::build_SQLPullDown(CountryRecord::finder(), "tm_country", array("idtm_country", "country_iso"));
         $this->RCedidtm_country->dataBind();
         $this->RCedkom_type->DataSource = array(1 => "Telefon", "Fax", "Mail");
         $this->RCedkom_type->dataBind();
         $this->RCedorg_status->DataSource = array(0 => "offen", "interessant", "nicht interessant", "Kunde", "EX-Kunde");
         $this->RCedorg_status->dataBind();
         if (isset($_GET['idtm_organisation'])) {
             $this->view_Organisation($_GET['idtm_organisation']);
         } else {
             $this->view_Organisation(1);
         }
         //$this->bindListOrgListe();
     }
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:31,代码来源:orgworkspace.php


示例7: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $this->setViewState("clicks", 0);
     }
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:7,代码来源:Ticket21.php


示例8: OnInit

 function OnInit($param)
 {
     parent::onInit($param);
     include "config.php";
     $repositoryid = $_GET['RepositoryID'];
     $results = $this->Module->Database->Execute("SELECT * FROM repositories WHERE id=" . makeSqlString($repositoryid));
     $fields = $results->fields;
     $ownerid = $fields['ownerid'];
     $name = $fields['name'];
     if (!$this->User->isAdmin() && $this->User->getId() != $ownerid) {
         echo "Not enough rights to change this repository!";
         exit(-1);
     }
     $filename = $name . ".dump";
     if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT'])) {
         // IE Bug in download name workaround
         error_log("ini_set");
         ini_set('zlib.output_compression', 'Off');
     }
     header('Cache-Control:');
     header('Pragma:');
     header("Content-Type: application/octet-stream");
     header("Content-Disposition: attachment; filename=\"{$filename}\"");
     header("Content-Transfer-Encoding: binary");
     passthru($svnadmin_cmd . " dump " . $svn_repos_loc . DIRECTORY_SEPARATOR . $name);
     exit(0);
     //$this->Application->transfer('Repository:AdminPage');
 }
开发者ID:joybinchen,项目名称:svnmanager-1.09,代码行数:28,代码来源:DumpOutputPage.php


示例9: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->isPostBack && !$this->isCallback) {
         $this->clearLog(null, null);
     }
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:7,代码来源:Ticket703.php


示例10: __construct

 public function __construct()
 {
     parent::__construct();
     try {
         TTransaction::open('samples');
         // abre uma transação
         // cria novo objeto
         $giovani = new Customer();
         $giovani->name = 'Giovanni Dall Oglio';
         $giovani->address = 'Rua da Conceicao';
         $giovani->phone = '(51) 8111-2222';
         $giovani->birthdate = '2013-02-15';
         $giovani->status = 'S';
         $giovani->email = '[email protected]';
         $giovani->gender = 'M';
         $giovani->category_id = '1';
         $giovani->city_id = '1';
         $giovani->store();
         // armazena o objeto
         new TMessage('info', 'Objeto armazenado com sucesso');
         TTransaction::close();
         // fecha a transação.
     } catch (Exception $e) {
         new TMessage('error', $e->getMessage());
     }
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:26,代码来源:ObjectStore.class.php


示例11: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     $checkNewsletter = nNewsletterRecord::finder()->findByStatus(1);
     if ($checkNewsletter) {
         $layout = nLayoutRecord::finder()->findBy_nNewsletterID($checkNewsletter->ID);
         $mail = new PHPMailer();
         $mail->isSendmail();
         $mail->setFrom('[email protected]', 'First Last');
         $mail->addReplyTo('[email protected]');
         $lista = nSenderRecord::finder()->findAll('nLayoutID = ? AND Status = 0 LIMIT 25', $layout->ID);
         foreach ($lista as $person) {
             $mail->addAddress($person->Email);
             $mail->Subject = $checkNewsletter->Name;
             $mail->msgHTML($layout->HtmlText);
             if ($mail->send()) {
                 $person->Status = 1;
                 $person->save();
             } else {
                 $person->Status = 5;
                 $person->save();
                 echo "Mailer Error: " . $mail->ErrorInfo;
             }
         }
         if (empty($lista)) {
             $checkNewsletter->Status = 0;
             $checkNewsletter->save();
         }
     }
     die;
 }
开发者ID:venomproject,项目名称:defaultCMS,代码行数:31,代码来源:Newsletter.php


示例12: TNotebook

 /**
  * Class constructor
  * Creates the page and the registration form
  */
 function __construct()
 {
     parent::__construct();
     // creates the notebook
     $this->notebook = new TNotebook();
     $this->notebook->setSize(400, 170);
     // creates the form
     $this->form = new TQuickForm('form_account');
     $this->notebook->appendPage('Personal details', $this->form);
     // create the form fields
     $email = new TEntry('email');
     $first_name = new TEntry('first_name');
     $last_name = new TEntry('last_name');
     $phone = new TEntry('phone');
     $email->setEditable(FALSE);
     // add the fields
     $this->form->addQuickField('Email: ', $email, 200);
     $this->form->addQuickField('First name: ', $first_name, 200);
     $this->form->addQuickField('Last name: ', $last_name, 200);
     $this->form->addQuickField('Phone: ', $phone, 200);
     // validations
     $first_name->addValidation('First name', new TRequiredValidator());
     $last_name->addValidation('Last name', new TRequiredValidator());
     $phone->addValidation('Phone', new TRequiredValidator());
     // add a form action
     $this->form->addQuickAction('Confirm', new TAction(array($this, 'onConfirm')), 'ico_apply.png');
     $this->form->addQuickAction('Back', new TAction(array($this, 'onBackForm')), 'ico_back.png');
     // add the form to the page
     parent::add($this->notebook);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:34,代码来源:MultiStepMultiForm2View.class.php


示例13: onPreRender

 public function onPreRender($param)
 {
     parent::onPreRender($param);
     if (trim($this->_status)) {
         $this->label1->Text = $this->_status;
     }
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:7,代码来源:RepeaterWithActiveControls.php


示例14: TQuickForm

 /**
  * Class constructor
  * Creates the page
  */
 function __construct()
 {
     parent::__construct();
     // create the form using TQuickForm class
     $this->form = new TQuickForm('form_dynamic_filter');
     // create the notebook
     $notebook = new TNotebook(530, 160);
     // adds the notebook page
     $notebook->appendPage('Dynamic filtering', $this->form);
     $check_gender = new TCheckGroup('check_gender');
     $check_gender->addItems(array('M' => 'Male', 'F' => 'Female'));
     $check_gender->setLayout('horizontal');
     $combo_status = new TCombo('combo_status');
     $combo_status->addItems(array('S' => 'Single', 'C' => 'Committed', 'M' => 'Married'));
     $combo_customers = new TCombo('customers');
     // add the fields inside the form
     $this->form->addQuickField('Load customers: ', $check_gender, 200);
     $this->form->addQuickField('', $combo_status, 200);
     $this->form->addQuickField('', $combo_customers, 200);
     $check_gender->setChangeAction(new TAction(array($this, 'onGenderChange')));
     $combo_status->setChangeAction(new TAction(array($this, 'onGenderChange')));
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($notebook);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:31,代码来源:FormDynamicFilterView.class.php


示例15: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->isPostBack and !$this->isCallBack) {
         $this->Lbl->setText(date("h:m:s"));
     }
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:7,代码来源:Ticket598.php


示例16: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     $handler = $this->Application->getErrorHandler();
     $this->ErrorCode->setText($handler->getErrorCode());
     $this->ErrorMessage->setText($handler->getErrorMessage());
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:7,代码来源:ErrorPage.php


示例17: __construct

 public function __construct()
 {
     parent::__construct();
     $this->form = new TQuickForm();
     $this->form->class = 'tform';
     $this->form->setFormTitle(_t('Profile'));
     $name = new TEntry('name');
     $login = new TEntry('login');
     $email = new TEntry('email');
     $password1 = new TPassword('password1');
     $password2 = new TPassword('password2');
     $login->setEditable(FALSE);
     $this->form->addQuickField(_t('Name'), $name, '80%', new TRequiredValidator());
     $this->form->addQuickField(_t('Login'), $login, '80%', new TRequiredValidator());
     $this->form->addQuickField(_t('Email'), $email, '80%', new TRequiredValidator());
     $table = $this->form->getContainer();
     $row = $table->addRow();
     $row->style = 'background: #FFFBCB;';
     $cell = $row->addCell(new TLabel(_t('Change password') . ' (' . _t('Leave empty to keep old password') . ')'));
     $cell->colspan = 2;
     $this->form->addQuickField(_t('Password'), $password1, '80%');
     $this->form->addQuickField(_t('Password confirmation'), $password2, '80%');
     $this->form->addQuickAction(_t('Save'), new TAction(array($this, 'onSave')), 'fa:save');
     $bc = new TBreadCrumb();
     $bc->addHome();
     $bc->addItem('Profile');
     $container = TVBox::pack($bc, $this->form);
     $container->style = 'width:80%';
     parent::add($container);
 }
开发者ID:edurbs,项目名称:sobcontrole,代码行数:30,代码来源:SystemProfileForm.class.php


示例18: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack && !$this->IsCallback) {
         $this->resetClicked(null, null);
     }
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:7,代码来源:Home.php


示例19: __construct

 public function __construct()
 {
     parent::__construct();
     // show the message dialog
     new TMessage('error', 'Error message');
     parent::add(new TXMLBreadCrumb('menu.xml', __CLASS__));
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:7,代码来源:DialogErrorView.class.php


示例20: TQuickForm

 function __construct()
 {
     parent::__construct();
     // create the form using TQuickForm class
     $this->form = new TQuickForm();
     $this->form->class = 'tform';
     $this->form->setFormTitle('Formas de Pagamentos');
     $combo = new TCombo('pagamento');
     $combo_items = array();
     $combo_items['a'] = 'Cartão de Crédito Visa';
     $combo_items['b'] = 'Cartão de Crédito Mastercard';
     $combo_items['c'] = 'Ticket Vale Refeição';
     $combo_items['d'] = 'PagSeguro';
     $combo_items['e'] = 'PayPal';
     $combo_items['f'] = 'DriverCoins';
     $combo->addItems($combo_items);
     $this->form->addQuickField('Forma de Pagamentos', $combo, 500);
     $this->form->addQuickAction('Salvar', new TAction(array($this, 'onSave')), 'ico_save.png');
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->style = 'width: 100%';
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($this->form);
     parent::add($vbox);
 }
开发者ID:dtgfranca,项目名称:web,代码行数:25,代码来源:PagamentosForm.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP TPropertyValue类代码示例发布时间:2022-05-23
下一篇:
PHP TPL类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap