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
<? | |
class OpenGraphControl extends Nette\Application\UI\Control | |
{ | |
/** @var Nette\Utils\Html[] */ | |
private $tags = []; | |
public function addOgTag($property, $content) |
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 | |
/** | |
* trida pro stazeni souboru | |
* tato trida umoznuje stejnou funkcnost jak v IE tak ve firefoxu | |
* | |
* @author Dostal Ales | |
* @version 1.1 | |
* @date 13.4.2006 | |
* |
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
/* | |
@author - Roman Janko, rjwebdesign.cz | |
@date - 28.8.2014 | |
*/ | |
@mixin respond($minWidth: false, $maxWidth: false) { | |
@if $minWidth and $maxWidth | |
{ | |
@media screen and (min-width: $minWidth) and (max-width: $maxWidth) { @content; } |
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
<? | |
function getLatLng($address) | |
{ | |
$json = json_decode(file_get_contents("http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false")); | |
$lat = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'}; | |
$lng = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'}; |
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
<? | |
function getLocationInfoByIp(){ | |
$client = @$_SERVER['HTTP_CLIENT_IP']; | |
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; | |
$remote = @$_SERVER['REMOTE_ADDR']; | |
$result = array('country'=>'', 'city'=>''); | |
if(filter_var($client, FILTER_VALIDATE_IP)){ | |
$ip = $client; | |
}elseif(filter_var($forward, FILTER_VALIDATE_IP)){ |
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
<? | |
header("content-type:text/html; charset=utf-8"); | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: POST'); | |
header('Access-Control-Max-Age: 1000'); |
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 ImageResponse extends \Nette\Object implements \Nette\Application\IResponse | |
{ | |
/** @var \Nette\Image|string */ | |
private $image; | |
/** | |
* @param \Nette\Image|string |
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
{form $form} | |
<ul class=error n:if="$form->ownErrors"> | |
<li n:foreach="$form->ownErrors as $error">{$error}</li> | |
</ul> | |
<table> | |
<tr n:foreach="$form->controls as $input" n:class="$input->required ? required"> | |
<th>{label $input /}</th> | |
<td>{input $input} <span class=error n:ifcontent>{$input->error}</span></td> | |
</tr> |
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 | |
use Nette\Forms\Controls\TextInput, | |
Nette\Forms\Form, | |
Nette\Utils\Html; | |
/** | |
* AntispamControl |
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
RewriteCond %{REQUEST_URI} ^/storage/images/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ http://domena/$1 [R=301,QSA] |