This file contains hidden or 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> | |
| <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
| <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
| <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
| <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title></title> | |
| <meta name="description" content=""> |
This file contains hidden or 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
| // Mihai Ionut Vilcu (ionutvmi@gmail.com) | |
| // July 2013 | |
| // | |
| // CSS: | |
| // .share { | |
| // position: absolute; | |
| // top: 265px; | |
| // right: 25px; | |
| // } |
This file contains hidden or 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> | |
| <html> | |
| <head> | |
| <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> | |
| <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"> | |
| </script> | |
| <title></title> | |
| </head> | |
| <body> |
This file contains hidden or 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
| /******************************/ | |
| /* 1. CSS Reset | |
| /******************************/ | |
| body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { | |
| margin:0; | |
| padding:0; | |
| } | |
| table { | |
| border-collapse:collapse; | |
| border-spacing:0; |
This file contains hidden or 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 | |
| // Returns the real IP address of the user | |
| function i2c_realip() | |
| { | |
| // No IP found (will be overwritten by for | |
| // if any IP is found behind a firewall) | |
| $ip = FALSE; | |
| // If HTTP_CLIENT_IP is set, then give it priority |
This file contains hidden or 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 | |
| /** | |
| * Time elapes since a times | |
| * @param int $time The past time | |
| * @return string time elapssed | |
| * credits: http://stackoverflow.com/a/2916189/1579481 | |
| */ | |
| function tsince($time, $end_msg = 'ago') { | |
| $time = abs(time() - $time); // to get the time since that moment |
This file contains hidden or 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 | |
| function deleteAll($directory, $empty = false) { | |
| $t= time() - 60*60*24*4; | |
| if(substr($directory,-1) == "/") { | |
| $directory = substr($directory,0,-1); | |
| } | |
| if(!file_exists($directory) || !is_dir($directory)) { | |
| return false; |
This file contains hidden or 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 | |
| function get_max_upl() { | |
| $max_upload = (int)(ini_get('upload_max_filesize')); | |
| $max_post = (int)(ini_get('post_max_size')); | |
| $memory_limit = (int)(ini_get('memory_limit')); | |
| return min($max_upload, $max_post, $memory_limit); | |
| } |
This file contains hidden or 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 | |
| function get_os() { | |
| $browser = $_SERVER['HTTP_USER_AGENT']; | |
| if (strpos($browser,"Windows") !== FALSE) { | |
| return "Windows"; | |
| }else if (strpos($browser,"Linux") !== FALSE) { | |
| return "Linux"; | |
| }else if (strpos($browser,"FreeBSD") !== FALSE) { | |
| return "FreeBSD"; |
This file contains hidden or 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 | |
| function sendMail($to, $subject, $message, $from = 'From: no.reply@dot.com', $isHtml = true) { | |
| $from .= "\r\n"; // we make sure we have an endline | |
| if($isHtml) { | |
| $from .= "MIME-Version: 1.0 \r\n"; | |
| $from .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; | |
| } | |
| $from .= 'X-Mailer: PHP/'.phpversion()."\r\n"; | |