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
Controller: save() | |
if ($this->OpinionPoll->saveAll($this->data, array('validate' => 'first'))) { | |
$this->OpinionPoll->OpinionPollEntry->OpinionPollParty->saveAll($this->data['OpinionPollParty'], array('validate' => 'first')); | |
$this->redirect('/opinion_polls/view_poll/'.$this->OpinionPoll->id); | |
} else { | |
$this->Session->write('applicantdata',$this->data); | |
$this->redirect('/opinion_polls/add_poll/error'); | |
} | |
Model: OpinionPoll |
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
/* | |
* jQuery beforeafter plugin | |
* @author admin@catchmyfame.com - http://www.catchmyfame.com | |
* @version 1.2 | |
* @date October 18, 2010 | |
* @category jQuery plugin | |
* @copyright (c) 2009 admin@catchmyfame.com (www.catchmyfame.com) | |
* @license CC Attribution-NoDerivs 3.0 Unported - http://creativecommons.org/licenses/by-nc-sa/3.0/ | |
*/ | |
// before image : $('div:eq(2)', obj) |
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
stop | |
2011-02-21 19:31:01 [INFO] CONSOLE: Stopping the server.. | |
2011-02-21 19:31:01 [INFO] Stopping server | |
2011-02-21 19:31:01 [INFO] Saving chunks |
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 checkEmail($email) { | |
// checks proper syntax | |
if(preg_match("/^([a-z])([a-z0-9._])+([a-z0-9])\@([a-z0-9])*([a-z])+(-[a-z])*([a-z0-9])*(\.([a-z0-9])*([a-z])+(-[a-z])*([a-z0-9])*)+$/i" , $email)) { | |
// gets domain name | |
list($username,$domain)=split('@',$email); | |
// checks for if MX records in the DNS | |
if(!checkdnsrr($domain, 'MX')) { | |
return false; | |
} | |
// attempts a socket connection to mail server |
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
$statusWords = explode(" ",$data['text']); | |
foreach ($statusWords as $word) { | |
if (substr($word,0,1) == "@") { | |
$newWord = '@<a href="#">'.substr($word,1).'</a>'; | |
$data['text'] = str_replace($word,$newWord,$data['text']); | |
} | |
} |
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 DownloaderComponent extends Object { | |
function download_file($file) { | |
$basename = basename($file); | |
$file_extension = strtolower(substr(strrchr($basename,"."),1)); | |
switch($file_extension) | |
{ | |
case "PLS": $ctype="audio/x-scpls"; break; | |
case "pls": $ctype="audio/x-scpls"; break; |
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
http://adtech.panthercustomer.com/apps/17/Ad2867729St3Sz170Sq4044125V0Id3/300x250_lokalguidedk_s_gbla.swf?targetTAG=_blank&clickTarget=_blank&pathTAG=http%3A//adtech.panthercustomer.com/apps/17/Ad2867729St3Sz170Sq4044125V0Id3/&closeTAG=javascript%3AcloseAdLayer2182707%28%29&openTAG=javascript%3AopenAdLayer2182707%28%29&expandTAG=javascript%3Aexpand2182707%28%29&collapseTAG=javascript%3Acollapse2182707%28%29&clicktarget=_blank&clickTarget=_blank&clickTARGET=_blank&CURRENTDOMAIN=www.berlingske.dk |
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
<?xml version="1.0"?> | |
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> | |
<cross-domain-policy> | |
<allow-access-from domain="www.yourcompanydomain.com" /> | |
</cross-domain-policy> |
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
Array | |
( | |
[0] => Array | |
( | |
[created_at] => Fri Feb 19 09:23:49 +0000 2010 | |
[id] => 9327647067 | |
[text] => Uffe om doku-fiktion og farcen #lækagesag http://www.berlingske.dk/kommentarer/den-store-taber-i-laekage-sagen-pressen | |
[source] => TweetDeck | |
[truncated] => false | |
[InReplyToStatusId] => Array |
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
$statuses1 = $this->Twitter->statusesUserTimeline("TCarlsen",NULL,NULL,5); | |
$statuses2 = $this->Twitter->statusesUserTimeline("kfriis",NULL,NULL,5); | |
$statuses = array_merge_recursive($statuses1,$statuses2); | |
$result = Set::sort($statuses, 'Statuses.Status.{n}.id', 'desc'); | |
$this->set('statuses',$result); |