summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php
blob: 54240798feab93a1b568eb25d3a0142f06ad69aa (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
<?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"); 
	}
}