<?php

if(!defined('APP_INCLUDE')){ die('invalid inclusion'); }
 
class tabletologfile {
	function __construct() {
		global $db, $profile,$mysqltmp;
		$logfile = "{$mysqltmp}{$profile->profilename}_tracker_log";
		
		$fp = fopen($logfile, "w");
		$q = $db->Execute("select logline from ". $profile->tablename_trackerlog);
		while ($data=$q->FetchRow()) {
			// echoWarning($data[0]);
			fwrite($fp, $data[0]."\n");
		}		
		fclose($fp);
		set_permissions($logfile);
	}
}

# Initializer of class
// $tabtolog = new tabletologfile();
?>