summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php
blob: adf71837bb00c2fcf444af3c1f66cd5aad9362ab (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
<?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');
		file_put_contents($file, '');
		$this->refreshLog();
	}
	
	public function addLog($sender,$param)
	{
		prado::log($this->logMessage->getText(), TLogger::DEBUG, "Tickets"); 
	}
}