Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions include/class.emailer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
require_once('class.db.php');

//NASZ SKRYPT
require_once("./phpmailer/PHPMailerAutoload.php");
require_once('./phpmailer/class.smtp.php');
require './phpmailer/class.phpmailer.php';
require_once("class.ini.php");
require_once('class.htmlparser.php');


class Emailer
{
private $cfg;
private $mail;
private $emailContent;
private $adressList;
private $userMail;

function __construct()
{
$cfg = new ini_file;
$cfg->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());
}
}
?>
9 changes: 7 additions & 2 deletions include/class.uploadfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.");
}
Expand Down Expand Up @@ -89,6 +89,11 @@ public function remove()
}
}

public function setAllowedExt($ext)
{
$this->AllowedExt[] = $ext;
}

}

?>