This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Mysql database class - only one connection alowed | |
*/ | |
class Database { | |
private $_connection; | |
private static $_instance; //The single instance | |
private $_host = "HOSTt"; | |
private $_username = "USERNAME"; | |
private $_password = "PASSWORd"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<title>HTML5 TryOut</title> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<form autocomplete="on"> | |
*First Name: <input placeholder="First name" name="fname" type="text" required /> <br /> | |
*Last name: <input type="text" name="lname" placeholder="Last name" /><br /> | |
Telephone: <input type="tel" name="phone" /> <br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Database { | |
protected $_link; | |
protected $_result; | |
protected $_numRows; | |
private $_host = "HOST"; | |
private $_username = "DATABASE USERNAME"; | |
private $_password = "DATABASE PASSWORD"; | |
private $_database = "DATABASE"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function charFix($text) { | |
return mb_convert_encoding($text,"HTML-ENTITIES","UTF-8"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function zipFiles($dirName, $zip) { | |
$zipName = $dirName.'.zip'; | |
$filenames = array(); | |
$path = $this->_uploadFolder.$dirName.'/'; | |
ini_set('max_execution_time', 5000); | |
// Opening and creating zip file | |
if($zip->open($path.$zipName, $overwrite ? ZIPARCHIVE::OVERWRITE : | |
ZIPARCHIVE::CREATE) !== true) { |