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
<script type="text/javascript"> | |
brand({ | |
hrz : 'http://upload.wikimedia.org/wikipedia/commons/9/97/2010_Audi_A5_(8T)_3.0_TDI_quattro_Sportback_04.jpg', | |
vrt : 'http://upload.wikimedia.org/wikipedia/commons/9/97/2010_Audi_A5_(8T)_3.0_TDI_quattro_Sportback_04.jpg', | |
click : 'http://www.kinoafisha.info', | |
views : [ | |
'http://ad.adriver.ru/cgi-bin/erle.cgi?sid=92926&target=blank&bt=41&pz=0&rnd=' + Math.random(), | |
function(){ | |
_gaq.push(['_trackEvent','branding','robocop','show']); | |
} |
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
$this->getApp()->exitWithJsonSuccessMessage([ | |
'comment' => $this->getTwig()->render('/comments/Comment.twig', [ | |
'comment' => $lastComment, | |
'forceImageLoad' => true | |
]), | |
'replyTo' => $replyTo, | |
'level' => $lastComment->getLevel(), | |
'id' => $lastComment->getId() | |
]); |
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
{ | |
"name": "traffic/popcorn", | |
"description": "popcornnews", | |
"minimum-stability": "dev", | |
"authors": [ | |
{ | |
"name": "Aleksey Kolyadin", | |
"email": "[email protected]" | |
}, | |
{ |
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
//Выбираем основные новости (большие) | |
{ | |
$dataMapHelper = new DataMapHelper(); | |
$dataMapHelper->setRelationship([ | |
'popcorn\\model\\dataMaps\\NewsPostDataMap' => NewsPostDataMap::WITH_TAGS, | |
'popcorn\\model\\dataMaps\\TagDataMap' => TagDataMap::WITH_ENTITY, | |
'popcorn\\model\\dataMaps\\PersonDataMap' => PersonDataMap::WITH_NONE | |
]); | |
$dataMap = new NewsTagDataMap($dataMapHelper); |
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
$timestamp = func_get_args()[0]; | |
$month = explode(' ', 'января февраля марта апреля мая июня июля августа сентября октября ноября декабря'); | |
if ((time() - $timestamp) < 60 * 60 * 24) { | |
$out = 'сегодня, '; | |
} elseif ((time() - $timestamp) > 60 * 60 * 24 && (time() - $timestamp) < 60 * 60 * 24 * 2) { | |
$out = 'вчера, '; | |
} else { | |
$out = sprintf('%u %s %04u, ', |
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
public static function newMessageSave() { | |
$recipient = UserFactory::getUser(self::getSlim()->request()->post('recipient')); | |
$message = new Message(); | |
$message->setSentTime(new \DateTime()); | |
$message->setAuthor(UserFactory::getCurrentUser()); | |
$message->setRecipient($recipient); | |
$message->setContent(self::getSlim()->request()->post('message')); | |
$message->setRead(0); |
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
/** | |
* @param int $announceLength | |
* @return null|string | |
*/ | |
public function getAnnounceFriendly($announceLength = 100){ | |
$announce = trim($this->getAnnounce()); | |
$content = trim($this->getContent()); | |
$output = null; |
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 | |
/** | |
* Данное api обеспечивает взаимодействие между мобильными приложениями (iphone,ipad,android) и backend'ом кино | |
* | |
* @date 23.07.2013 | |
* @author Колядин Алексей | |
*/ | |
ini_set('display_errors',1); | |
ini_set('html_errors',1); | |
error_reporting(E_ALL); |
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
<? | |
#print $GLOBALS['trafapril']; | |
/* | |
print "=".$HTTP_POST_VARS["pageid1"]."=($rand)"; | |
print "=".$HTTP_POST_VARS["pageid"]."=($rand)"; | |
print "=".$HTTP_POST_VARS["pageid2"]."=($rand)"; | |
print "=$pageid/$subpageid/$page_id/$fold_id/$good_id=<br>"; |
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
public function getUsersByCity($cityId, $from = 0, $count = -1){ | |
$sql = <<<SQL | |
select | |
user.* | |
from | |
pn_users user | |
join pn_users_info info on (info.id = user.userInfo) | |
where | |
info.cityId = :cityId |