Skip to content

Instantly share code, notes, and snippets.

@iguana007
iguana007 / config.php
Created March 26, 2012 11:13 — forked from juzna/config.php
UIR-ADR update
<?
$dbHost = 'localhost';
$dbUser = '...';
$dbPass = '...';
$dbDatabase = '...';
@iguana007
iguana007 / BaseModel.php
Created October 6, 2011 10:29 — forked from Majkl578/BaseModel.php
Nette: Dynamické načítání modelů - Dibi + Nette\DI
<?php
namespace Models;
/**
* Base model
* @link http://wiki.nette.org/cs/cookbook/dynamicke-nacitani-modelu
* @author Majkl578
*/
abstract class Base extends \Nette\Object
@iguana007
iguana007 / gist:1111155
Created July 28, 2011 07:30
Gmaps API - Localization
<script type="text/javascript" src="http://www.google.com/jsapi?key={!$googleKey}"></script>
<script type="text/javascript" charset="utf-8">
google.load("jquery", "1.6.1");
google.load("jqueryui", "1.8.13");
google.load("maps", "3.x", { other_params:"sensor=false&language=ja" });
</script>
<form enctype="multipart/form-data" class="ajax" id="frm-clocOutletFormExtended" method="post" action="add-new-outlet/?do=clocOutletFormExtended-submit" novalidate="">
<fieldset>
<legend>Outlet details</legend>
<table><div class="fieldsetIn">
<tbody><tr>
<th><label for="frmclocOutletFormExtended-upload">Select photos</label></th>
<td><div id="frmclocOutletFormExtended-upload" class="MultipleFileUpload"><input type="hidden" value="1777511084e281310c1d09" name="upload[token]"><div style="display: block;" id="frmclocOutletFormExtended-upload-MFUInterface-MFUUIPlupload"><div class="mfuplupload" id="frmclocOutletFormExtended_upload_box"><div class="plupload_wrapper plupload_scroll"><div class="plupload_container" id="frmclocOutletFormExtended_upload_box_container" title="Using runtime: flash"><div class="plupload"><div class="plupload_header"><div class="plupload_header_content"><div class="plupload_header_title">Select files</div><div class="plupload_header_text">Add files to the upload queue and click the s
function linkFormatter(cellvalue, options, rowObject) {
return '<a class="ajax" href= {!$editLink}' + rowObject[0] + '>' + cellvalue + '</a>';
}
function booleanFormatter(cellvalue, options, rowObject) {
var cellValueInt = parseInt(cellvalue);
if (cellValueInt === 0)
return '<img src="{!$coreBasePath}\/images\/core\/admin\/0.gif" alt="no">';
else
return '<img src="{!$coreBasePath}\/images\/core\/admin\/1.gif" alt="yes">';
@iguana007
iguana007 / Replicator.php
Created April 28, 2011 07:39 — forked from fprochazka/CreatePresenter.php
ReplicatingContainer
see: https://github.com/Kdyby/Framework/blob/master/Kdyby/Forms/Containers/Replicator.php
<?php
namespace Kdyby\Control;
use Nette;
use Nette\String;
class LookoutControl extends Nette\Application\Control
@iguana007
iguana007 / Czech locale - countries of world
Created December 14, 2010 13:29
Czech locale - countries of world
$countries = array(
'AX' => 'Alandské ostrovy',
'AL' => 'Albánská republika',
'DZ' => 'Alžírská lidová demokratická republika',
'AS' => 'Americká Samoa',
'VI' => 'Americké Panenské ostrovy',
'AD' => 'Andorrské knížectví',
'AO' => 'Angolská republika',
'AI' => 'Anguilla',
'AQ' => 'Antarktida',
$debugArray = array();
if (!in_array($_SERVER['REMOTE_ADDR'], $debugArray)) {
Debug::enable(Debug::PRODUCTION,NULL,'xxx@gmail.com');
$application->catchExceptions = TRUE;
} else {
Debug::enable(Debug::DEVELOPMENT);
$application->catchExceptions = FALSE;
}
<?php
/**
* Image helper with automatic image resize and cache
*
* @author Roman Ozana, ozana@omdesign.cz
* @link www.omdesign.cz
*
*
* add to presenter before render function
*