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


PHP TPage::onInit方法代码示例

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


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

示例1: 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);
     }
     $servername = $_SERVER['SERVER_NAME'];
     $page = $_SERVER['PHP_SELF'];
     $port = $_SERVER['SERVER_PORT'];
     if ($port == '443') {
         $prot = "https";
     } else {
         $prot = "http";
         if ($port != '80') {
             $servername .= ":{$port}";
         }
     }
     $url = $prot . "://{$servername}{$page}?page=Repository:DumpOutputPage&RepositoryID={$repositoryid}";
     $this->StartLink->setNavigateUrl("{$url}");
     header("Refresh: 3; URL={$url}");
 }
开发者ID:joybinchen,项目名称:svnmanager-1.09,代码行数:28,代码来源:DumpAnnouncePage.php

示例2: onInit

 public function onInit($param)
 {
     parent::onInit($param);
     if ($this->Module->getUserParameter('AllowNewAccount') === 'false') {
         $this->Application->transfer();
     }
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:7,代码来源:NewPage.php

示例3: onInit

 public function onInit($param)
 {
     parent::onInit($param);
     $repositoryid = $_GET['RepositoryID'];
     $results = $this->Module->Database->Execute("SELECT * FROM repositories WHERE id=" . makeSqlString($repositoryid));
     $fields = $results->fields;
     $ownerid = $fields['ownerid'];
     if (!$this->User->isAdmin() && $this->User->getId() != $ownerid) {
         echo "Not enough rights to change this repository!";
         exit(-1);
     }
     $this->setSelectedRepository($repositoryid);
     $ownername = $this->Module->getUserName($ownerid);
     $repositoryname = $this->Module->getRepositoryname($repositoryid);
     $this->RepositoryName->setText($repositoryname);
     $this->RepositoryOwner->setText($ownername);
     //Reproduce dynamic buttons for proper event handling (something is not completely right, Prado!)
     $sess = $this->Application->getSession();
     if ($sess->has("linkbuttons")) {
         $linkbuttons = $sess->get("linkbuttons");
         foreach ($linkbuttons as $lb) {
             $this->PathHolder->addChild($lb);
             $this->PathHolder->addBody($lb);
         }
         $sess->clear("linkbuttons");
     }
     if ($sess->has("listbox")) {
         $listbox = $sess->get("listbox");
         $this->PathHolder->addChild($listbox);
         $this->PathHolder->addBody($listbox);
         $sess->clear("listbox");
     }
 }
开发者ID:joybinchen,项目名称:svnmanager-1.09,代码行数:33,代码来源:GroupPrivilegesEditPage.php

示例4: onInit

 public function onInit($param)
 {
     parent::onInit($param);
     if (!$this->isPostBack) {
         switch ($this->Request['modus']) {
             case 0:
                 $sql = "SELECT idtm_waren_kategorie, waren_kategorie_name FROM tm_waren_kategorie";
                 $data = PFH::convertdbObjectArray(WarenKategorieRecord::finder()->findAllBySql($sql), array("idtm_waren_kategorie", "waren_kategorie_name"));
                 $this->idtm_waren_kategorie->DataSource = $data;
                 $this->idtm_waren_kategorie->dataBind();
                 $sql = "SELECT idtm_preis_kategorie, preis_kategorie_name FROM tm_preis_kategorie";
                 $data = PFH::convertdbObjectArray(PreisKategorieRecord::finder()->findAllBySql($sql), array("idtm_preis_kategorie", "preis_kategorie_name"));
                 $this->idtm_preis_kategorie->DataSource = $data;
                 $this->idtm_preis_kategorie->dataBind();
                 $this->bindList();
                 break;
             case 1:
                 $sql = "SELECT idtm_waren_kategorie, waren_kategorie_name FROM tm_waren_kategorie";
                 $data = PFH::convertdbObjectArray(WarenKategorieRecord::finder()->findAllBySql($sql), array("idtm_waren_kategorie", "waren_kategorie_name"));
                 $this->edidtm_waren_kategorie->DataSource = $data;
                 $this->edidtm_waren_kategorie->dataBind();
                 $sql = "SELECT idtm_preis_kategorie, preis_kategorie_name FROM tm_preis_kategorie";
                 $data = PFH::convertdbObjectArray(PreisKategorieRecord::finder()->findAllBySql($sql), array("idtm_preis_kategorie", "preis_kategorie_name"));
                 $this->edidtm_preis_kategorie->DataSource = $data;
                 $this->edidtm_preis_kategorie->dataBind();
                 $this->fillValues($this->getSelected($this->Request['idta_waren']));
                 $this->bindListed();
                 break;
             default:
                 break;
         }
         $this->viewPanel->ActiveViewIndex = $this->Request['modus'];
     }
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:34,代码来源:waren.php

示例5: onInit

 public function onInit($param)
 {
     parent::onInit($param);
     $userid = $_GET['UserID'];
     if (!$this->User->isAdmin() && $userid != $this->User->getId()) {
         echo "Not enough rights to change this user!";
         exit(-1);
     }
     $results = $this->Module->Database->Execute("SELECT * FROM users WHERE id=" . makeSqlString($userid));
     $fields = $results->fields;
     $user = array('id' => $fields['id'], 'name' => $fields['name'], 'email' => $fields['email'], 'admin' => $fields['admin'], 'grants' => $fields['repositorygrants']);
     $this->setSelectedUser($user);
     $this->UserID->setText($fields['id']);
     $this->UserName->setText($fields['name']);
     $this->Email->setText($fields['email']);
     if ($fields['admin'] == 255) {
         $this->Admin->setChecked(true);
     } else {
         $this->Admin->setChecked(false);
     }
     $this->Grants->setText($fields['repositorygrants']);
     if (!$this->User->isAdmin()) {
         $this->Grants->setEnabled(false);
         $this->Admin->setEnabled(false);
     } else {
         $this->Grants->setEnabled(true);
         $this->Admin->setEnabled(true);
     }
 }
开发者ID:joybinchen,项目名称:svnmanager-1.09,代码行数:29,代码来源:EditPage.php

示例6: onInit

 /**
  * (non-PHPdoc)
  * @see TControl::onInit()
  */
 public function onInit($param)
 {
     parent::onInit($param);
     if (get_class($this) !== 'LoginController') {
         $this->getForm()->setAttribute('onSubmit', 'return false;');
     }
 }
开发者ID:larryu,项目名称:magento-b2b,代码行数:11,代码来源:BPCPageAbstract.php

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

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

示例9: onInit

 public function onInit($param)
 {
     parent::onInit($param);
     //Globale definition f�r dieses Dokument
     $this->finder = StrukturRecord::finder();
     $this->MASTERRECORD = new StrukturRecord();
     if (!$this->isPostBack && !$this->isCallback) {
         switch ($this->Request['modus']) {
             case 0:
                 $sql = "SELECT idta_struktur_type, struktur_type_name FROM ta_struktur_type";
                 $data = PFH::convertdbObjectArray(StrukturTypeRecord::finder()->findAllBySql($sql), array("idta_struktur_type", "struktur_type_name"));
                 $this->idta_struktur_type->DataSource = $data;
                 $this->idta_struktur_type->dataBind();
                 $HRKEYTest = new PFHierarchyPullDown();
                 $HRKEYTest->setStructureTable("tm_struktur");
                 $HRKEYTest->setRecordClass(StrukturRecord::finder());
                 $HRKEYTest->setPKField("idtm_struktur");
                 $HRKEYTest->setField("struktur_name");
                 $HRKEYTest->letsrun();
                 $this->parent_idtm_struktur->DataSource = $HRKEYTest->myTree;
                 $this->parent_idtm_struktur->dataBind();
                 $this->idtm_stammdaten->DataSource = PFH::build_SQLPullDown(StammdatenRecord::finder(), "tm_stammdaten", array("idtm_stammdaten", "stammdaten_name"));
                 $this->idtm_stammdaten->dataBind();
                 break;
             case 1:
                 $sql = "SELECT idta_struktur_type, struktur_type_name FROM ta_struktur_type";
                 $data = PFH::convertdbObjectArray(StrukturTypeRecord::finder()->findAllBySql($sql), array("idta_struktur_type", "struktur_type_name"));
                 $this->edidta_struktur_type->DataSource = $data;
                 $this->edidta_struktur_type->dataBind();
                 if ($this->Request[$this->primarykey] != 1) {
                     $HRKEYTest = new PFHierarchyPullDown();
                     $HRKEYTest->setStructureTable("tm_struktur");
                     $HRKEYTest->setRecordClass(StrukturRecord::finder());
                     $HRKEYTest->setPKField("idtm_struktur");
                     $HRKEYTest->setField("struktur_name");
                     $HRKEYTest->letsrun();
                     $data = $HRKEYTest->myTree;
                 } else {
                     $data = array();
                     $data[0] = "START";
                 }
                 $this->edparent_idtm_struktur->DataSource = $data;
                 $this->edparent_idtm_struktur->dataBind();
                 $this->fillValues($this->getSelected($this->Request[$this->primarykey]));
                 $this->edidtm_stammdaten->DataSource = PFH::build_SQLPullDown(StammdatenRecord::finder(), "tm_stammdaten", array("idtm_stammdaten", "stammdaten_name"));
                 $this->edidtm_stammdaten->dataBind();
                 $Usersql = "SELECT idtm_user, user_name FROM tm_user";
                 $Userdata = PFH::convertdbObjectArray(UserRecord::finder()->findAllBySql($Usersql), array("idtm_user", "user_name"));
                 $this->idtm_user->DataSource = $Userdata;
                 $this->idtm_user->dataBind();
                 $this->loadBerechtigung();
                 break;
             default:
                 break;
         }
         $this->viewPanel->ActiveViewIndex = $this->Request['modus'];
         $this->StrukturStammdatenGroupContainer->RCedidtm_struktur->Text = $this->Request[$this->primarykey];
     }
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:59,代码来源:strukturview.php

示例10: onInit

 public function onInit($param)
 {
     parent::onInit($param);
     if (!$this->getIsPostBack() && !$this->getIsCallBack()) {
         $this->populateProductList();
         $this->populateShoppingList();
     }
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:8,代码来源:Home.php

示例11: onInit

 public function onInit($param)
 {
     parent::onInit($param);
     if (isset($_GET['ticket'])) {
         $this->setTicket($_GET['ticket']);
     }
     $this->dataBind();
 }
开发者ID:joybinchen,项目名称:svnmanager-1.09,代码行数:8,代码来源:ActivatePage.php

示例12: onInit

 /**
  * Populates the datagrid with user lists.
  * This method is invoked by the framework when initializing the page
  * @param mixed event parameter
  */
 public function onInit($param)
 {
     parent::onInit($param);
     // fetches all data account information
     $this->UserGrid->DataSource = UserRecord::finder()->findAll();
     // binds the data to interface components
     $this->UserGrid->dataBind();
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:13,代码来源:AdminUser.php

示例13: onInit

 public function onInit($param)
 {
     $this->session = $this->Application->getSession();
     if ($this->page->isCallback && $this->page->isPostBack) {
         $this->reRenderTable();
     }
     parent::onInit($param);
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:8,代码来源:splasherworkspace.php

示例14: onInit

 public function onInit($param)
 {
     parent::onInit($param);
     $session = $this->getSession();
     if (!$session->getIsStarted()) {
         $session->open();
     }
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:8,代码来源:SWFChartBase.php

示例15: onInit

 public function onInit($param)
 {
     parent::onInit($param);
     if (!$this->isPostBack() && !$this->Module->hasGrants()) {
         echo "Not enough rights or grants to create Repository";
         exit(-1);
     }
 }
开发者ID:joybinchen,项目名称:svnmanager-1.09,代码行数:8,代码来源:LoadPage.php


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