summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php
blob: 1b5b638ad72f197cc230d88bfe380f2c3ae53731 (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
<?php

class Ticket703 extends TPage {
	public function onLoad ($param)
	{
		parent::onLoad($param);
		if (!$this->isPostBack && !$this->isCallback)
		{
			$this->refreshLog();		
		}
	}
	
	public function refreshLog ()
	{
		$this->logBox->Text=file_get_contents(prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt'));
	}
	
	public function clearLog ($sender, $param)
	{
		$file=prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt');
		$f=fopen($file,"w");
		fclose($f);
		$this->refreshLog();
	}
	
	public function addLog($sender,$param)
	{
		prado::log($this->logMessage->getText(), TLogger::DEBUG, "Tickets"); 
	}
}
?>