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
app.post('/admin/ajax/theme.:format', function(req, res){ aServ.ajax.theme(req, res); }); | |
theme: function(req, res){ | |
if( !this._start(req, res) ) return; | |
var Status = this.Status; | |
cb_func = function(theme, error){ | |
if(error){ | |
res.send({ status: 404, message: "Theme not found: " + error}); | |
return; |
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 article extends basedata{ | |
var $_table = 'article'; | |
var $_keycol = 'id_article'; | |
var $_cols = array('title', 'short_txt', 'long_txt', 'posted', 'is_welcome', 'is_featured'); | |
var $_createbycol = 'created_by'; | |
var $_createwhencol = 'created_when'; | |
var $_delbycol = 'deleted_by'; |
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 event extends basedata { | |
var $_table = 'event'; | |
var $_keycol = 'id_event'; | |
var $_cols = array('title', 'from_date', 'to_date', 'summary', 'content', 'resource_type', 'event_type', | |
'city', 'country', 'published'); | |
var $_createbycol = 'created_by'; | |
var $_createwhencol = 'created_when'; |
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
SELECT SQL_CALC_FOUND_ROWS | |
`group_user`.*, | |
concat(`name_first`, ' ', `name_last`) as `full_name`, | |
`name_first`, | |
`name_last`, | |
`gender`, | |
`email`, | |
`img`, | |
`country`, | |
`place`, |
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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ index.php/$1 [QSA,L] | |
$urlchunk = explode('/', trim($pageurl, '/')); | |
if(count($urlchunk) > 0 && substr($urlchunk[count($urlchunk) - 1],0,1) == '?') { | |
unset($urlchunk[count($urlchunk) - 1]); | |
if(count($urlchunk) == 0) $urlchunk[0] = ''; | |
} |
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
$('audio').each(function(){ | |
$(this).parent().html($(this).html()); | |
} |
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 | |
function update_basecamp_img($filename){ | |
if($this->basecamp_login != "" && $this->basecamp_password != ""){ | |
//echo "Updating basecamp image"; | |
$S = new Snoopy(); | |
/* Login the user */ | |
$login_url = "https://" . BasecampSiteURL . '/login'; | |
$S->fetch($login_url); | |
$S->setcookies(); |
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 | |
$html = file_get_contents("http://finance.yahoo.com/futures?t=energy"); | |
$dom = new DOMDocument(); | |
$dom->recover = true; | |
$dom->strictErrorChecking = false; | |
@$dom->loadHTML($html); | |
$table = $dom->getElementsByTagName('table'); | |
echo "Table: <br/>"; |
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 | |
while(true){ | |
$x++ | |
$y = 0; | |
while($y < 5000){ | |
file_get_contents("http://yoursite.com/img/img_$x$y.jpg"); | |
$y++; | |
} | |
} |
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
var StaticPages = module.exports = function StaticPages(){}; | |
StaticPages.prototype = { | |
initPages: function(app){ | |
// Routes | |
app.get('/', function(req, res){ | |
res.render('index', { | |
title: 'Home' |
OlderNewer