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 | |
/** | |
* Get upcomming match schedule | |
*/ | |
function getNextMatches($referenceTime = null) | |
{ | |
$matchSchedule = array( | |
"2014-06-13 01:30:00" => array('team1' => 'BRA', 'team2' => 'CRO', 'date' => '2014-06-13 01:30:00', 'team1Class' => 'brazil', 'team2Class' => 'croatia'), | |
"2014-06-13 21:30:00" => array('team1' => 'MEX', 'team2' => 'CMR', 'date' => '2014-06-13 21:30:00', 'team1Class' => 'mexico', 'team2Class' => 'cameroon'), |
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 | |
if (!empty($_GET['redir']) && $_GET['redir'] < 11) { | |
sleep(1); | |
$url = '?redir=' . ($_GET['redir'] + 1); | |
header("Location: {$url}"); | |
exit; | |
} | |
?><!DOCTYPE html> | |
<html> | |
<head> |
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 | |
if (class_exists('Memcache')) { | |
$server = 'localhost'; | |
if (!empty($_REQUEST['server'])) { | |
$server = $_REQUEST['server']; | |
} | |
$memcache = new Memcache; | |
$isMemcacheAvailable = @$memcache->connect($server); | |
if ($isMemcacheAvailable) { |
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
o = document.getElementsByClassName('data')[0]; | |
str = ""; | |
for (i = 1; i < o.rows.length - 1; i++) { | |
str += o.rows[i].cells[1].getElementsByTagName('a')[0].innerHTML | |
+ ": " + o.rows[i].cells[8].innerHTML | |
+ "\n"; | |
} | |
alert(str); |
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
a = document.getElementsByTagName('input'); | |
for (i=0;i<a.length;i++) { | |
if (a[i].type == 'checkbox') { | |
a[i].checked = true; | |
} | |
} |
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
class MyModel { | |
/** | |
* @return array validation rules for model attributes. | |
*/ | |
public function rules() | |
{ | |
return array( | |
array( | |
'element', |
NewerOlder