first commit

This commit is contained in:
Senad Uka
2017-10-19 11:38:33 +02:00
commit c56b5a76b3
35 changed files with 2148 additions and 0 deletions

38
TogglBase.inc Normal file
View File

@@ -0,0 +1,38 @@
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
class TogglBase
{
protected $folderKey;
protected $lastErr;
protected $file;
public function getFolderKey()
{
return $this->folderKey;
}
public function getLastError()
{
return $this->lastErr;
}
protected function open($filename)
{
mb_internal_encoding('UTF-8');
$this->file = fopen($filename, "r");
if (!fgetcsv($this->file)) {
$this->lastErr = "Unable to read CSV file";
return false;
}
return true;
}
protected function close()
{
fclose($this->file);
$this->file = null;
}
}