summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php
blob: f254cf6ddbf538376c31b43004cfd73c4d2cc621 (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->clearLog(null, null);
		}
	}

	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");
	}
}