summaryrefslogtreecommitdiff
path: root/demos/controls/protected/pages/HomePage.php
blob: 50bdc9e7e8dd946a4ae8f9bb4875e53b74669254 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php

class HomePage extends TPage
{
	public function onPreInit($param)
	{
		parent::onPreInit($param);
		if(!$this->User->IsGuest)
			$this->Theme='';
	}

	public function onLoad($param)
	{
		parent::onLoad($param);
		if(!$this->IsPostBack)
		{
			$this->dataBind();
		}
	}

	public function testClick($sender,$param)
	{
		if($sender->BackColor==='')
			$sender->BackColor='blue';
		else
			$sender->BackColor='';
		$this->TextBox->focus();
	}

	public function clickImage($sender,$param)
	{
		$this->TextBox->Text="You Clicked (".$param->X.", ".$param->Y.")";
	}

	public function linkClicked($sender,$param)
	{
		$sender->Text="Hello World";
	}
}

?>