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
if (!isset($_SERVER['HTTPS'])) | |
{ | |
header('Status-Code: 301'); | |
header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); | |
} | |
else | |
{ | |
header('Strict-Transport-Security: max-age=500'); | |
} |
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 processImage($imgname) | |
{ | |
// Load original image | |
$original = @imagecreatefromjpeg($imgname); | |
if (!$original) | |
die('Bad Image: ' . $imgname); |
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 | |
/** | |
* An array of countries with ISO2 codes as key | |
* | |
* @return array | |
**/ | |
function getCountries() | |
{ | |
$options["AF"] = "Afghanistan"; |
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 | |
/** | |
* Convert a timestamp into a relative string e.g. 2 Hours ago | |
* | |
* @return string | |
* | |
* @param $time Timestamp | |
**/ | |
function time_elapsed($time) |
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 | |
if (!class_exists('FRM_Loop')) | |
{ | |
class FRM_Loop | |
{ | |
public function __construct() | |
{ | |
add_shortcode('loop', array(&$this, 'loop_shortcode')); | |
} |
NewerOlder