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").click(function() { | |
$("html, body").animate({ | |
scrollTop: $($(this).attr("href")).offset().top + "px" | |
}, { | |
duration: 500, | |
easing: "swing" | |
}); | |
return false; | |
}); |
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 href='#t-rex' onclick='return getDinoInfo("t-rex");'>T-Rex</a><br /> | |
<a href='#brachiosaurus' onclick='return getDinoInfo("brachiosaurus");'>Brachiosaurus</a><br /> | |
<a href='#pterodactylus' onclick='return getDinoInfo("pterodactylus");'>Pterodactylus</a> | |
<div id='dino-details'></div> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script type='text/javacript'> | |
$(document).ready(function() { | |
//makes sure that the window.location.hash exists |
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
function get_client_language($availableLanguages, $default='en'){ | |
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { | |
$langs=explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']); | |
foreach ($langs as $value){ | |
$choice=substr($value,0,2); | |
if(in_array($choice, $availableLanguages)){ | |
return $choice; | |
} | |
} |
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 save($path, $array) | |
{ | |
$data = "<?php\nreturn array("; | |
foreach ($array as $key => $value) { | |
$data .= "'" . $key . "'=>". var_export($value,true).';' . "\n"; | |
} | |
$cdata .= "\n);"; | |
//make sure directory exists before creating | |
return file_put_contents($path, $data); | |
} |
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 $results = [ | |
[ | |
"date"=> $_GET['sort'], | |
"message"=> "User \"Beheerder, Systeem\" has been working for more than 12 hours 19.5 hours total", | |
"status"=> 0, | |
"user_name"=> "Beheerder, Systeem" | |
], | |
[ | |
"date"=> "22-04-2013 04=>00", | |
"message"=> "User \"Beheerder, Systeem\" has been working outside office hours on 22-04-2013 04=>00", |
NewerOlder