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
@media only screen and (min-width: 320px) { | |
/* Small screen, non-retina */ | |
} | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |
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
// Load do wideimage | |
$image = WideImage::load($file_path); | |
// Processar cada tamanho de imagem | |
foreach ($this->image_sizes as $key => $image_size) { | |
if ($image_size['crop'] === true) { | |
$image->resize($image_size['width'], $image_size['height'], 'outside', 'down')->crop('center', 'top', $image_size['width'], $image_size['height'])->saveToFile($uploads_dir.$file_name_a.'-'.$key.$file_name_b); | |
} else { | |
$image->resize($image_size['width'], $image_size['height'], 'inside', 'down')->saveToFile($uploads_dir.$file_name_a.'-'.$key.$file_name_b); |
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
// Escapes a string or array just like mysql_real_escape_string but does not require a db connection like mysql_* one does | |
function real_escape_string($input) { | |
if(is_array($input)) | |
return array_map(__METHOD__, $input); | |
if(!empty($input) && is_string($input)) { | |
return str_replace(array('\\', "\0", "\n", "\r", "'", '"', "\x1a"), array('\\\\', '\\0', '\\n', '\\r', "\\'", '\\"', '\\Z'), $input); | |
} | |
return $input; |
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
/** | |
* Return Passed variable if exists | |
* | |
* Allows to return a variable but only if it exists | |
* | |
* @access public | |
* @param var &$key | |
* @param string $default (default: null) | |
* @return void | |
*/ |
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
/* Estilo da lista que contem cada prova */ | |
.event-list { | |
/* background: red; */ | |
width: 600px; | |
padding: 0; | |
padding-left: 10px; | |
margin: 0; | |
font-family: sans-serif; | |
} |
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
/* Estilo da lista que contem cada prova */ | |
.event-list { | |
/* background: red; */ | |
width: 600px; | |
padding: 0; | |
padding-left: 10px; | |
margin: 0; | |
font-family: sans-serif; | |
} |
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
.tabs{ | |
padding: 0; | |
list-style: none; | |
} | |
.tabs li { | |
display: table-cell; | |
width: 1%; | |
} | |
|
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
.tabs{ | |
padding: 0; | |
list-style: none; | |
} | |
.tabs li { | |
display: table-cell; | |
width: 1%; | |
} |
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 | |
// <form name="register" ...> | |
if($_POST['register']) | |
{ | |
$email_regex = '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/'; | |
$validity = array( | |
'password_ok' => preg_match("/^[a-z0-9_-]*$/i", $pass) | |
&& (strlen($pass < 6) || strlen($pass > 30)), |
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
function curl_request($url, $parameters = array(), $type = 'GET') { | |
$type = strtoupper($type); | |
$request = curl_init(); | |
if ($type === 'POST' && !empty($parameters)) { | |
curl_setopt($request, CURLOPT_POST, count($parameters)); | |
curl_setopt($request, CURLOPT_POSTFIELDS, http_build_query($parameters)); | |
} else if (!empty($parameters)) { |