diff --git a/include/class.emailer.php b/include/class.emailer.php new file mode 100644 index 0000000..58b5e96 --- /dev/null +++ b/include/class.emailer.php @@ -0,0 +1,46 @@ +setFileName('./include/config/account.ini'); + $cfg->load(); + $this->userMail = $cfg->getElementValue('user','mail'); + // ładowanie konfiguracji + + } + + + private function setEmailContet($adressArray) + { + + } + + private function send() + { + + } + + private function token() + { + return md5(time()); + } +} +?> \ No newline at end of file diff --git a/include/class.uploadfile.php b/include/class.uploadfile.php index 2e505a2..256a074 100644 --- a/include/class.uploadfile.php +++ b/include/class.uploadfile.php @@ -8,7 +8,7 @@ class UploadFile private $size; private $error; private - static $AllowedExt = array("csv","xml","application/vnd.ms-excel"); + private $AllowedExt = array("csv","xml","application/vnd.ms-excel"); static $maxSize = 5120; public @@ -31,7 +31,7 @@ public function startUplod() $this->errorAlert(); $fileExt=pathinfo(strtolower($this->name), PATHINFO_EXTENSION); - if (!in_array($this->mime, UploadFile::$AllowedExt, true)) { + if (!in_array($this->mime, $this->$AllowedExt, true)) { exit("Niedozwolone rozszerzenie pliku."); } @@ -89,6 +89,11 @@ public function remove() } } + public function setAllowedExt($ext) + { + $this->AllowedExt[] = $ext; + } + } ?> \ No newline at end of file