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
$.ajax({ | |
type: "POST", | |
url: "form.php", | |
data: $('#form').serialize(), | |
beforeSend: function() { | |
$('#form').append('<div class="alert alert-success save-message">Saving...</div>'); | |
}, | |
success: function(data) { | |
$('.save-message').remove(); | |
} |
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
############################################################################### | |
# SECTION:Initial Settings | |
############################################################################### | |
# Testing flag - enables a CRON job that clears iptables incase of | |
# configuration problems when you start csf. This should be enabled until you | |
# are sure that the firewall works - i.e. incase you get locked out of your | |
# server! Then do remember to set it to 0 and restart csf when you're sure | |
# everything is OK. Stopping csf will remove the line from /etc/crontab | |
# | |
# lfd will not start while this is enabled |
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
server { | |
listen 80; | |
root /var/www; | |
index index.php; | |
server_name domain.dev; | |
# Do nice rewrite stuff in here | |
location / { | |
#try_files $uri $uri/ /index.php?$args; |
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 | |
// make sure the trackback ping's URL links back to us | |
$handle = fopen($url, "r"); | |
$tb_page = ''; | |
while (!feof($handle)) { | |
$tb_page .= fread($handle, 8192); | |
} | |
fclose($handle); | |
$pos = strpos($tb_page, "http://imgur.com"); | |
if ($pos === false) { |
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 | |
session_start(); | |
if (empty($_SESSION['captcha'])) | |
{ | |
$captcha = mt_rand(10000, 99999); | |
$_SESSION['captcha'] = $captcha; | |
} | |
else | |
{ |
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 | |
$url = 'http://beheer.e-poc.nl/onderwijs/plugins/montessori/website/rooster_groesbeek.php'; | |
preg_match_all("/<tr>(.+)<\/tr>/siU", @file_get_contents($url), $matches); | |
preg_match_all("/<td colspan=\"5\" class=\"title\">(.+)<\/tr>/siU", @file_get_contents($url), $titles); | |
$titles_count = count($titles); | |
$changes = $matches[0]; | |
$changes = str_replace ('<td colspan="5"> </td>', '', $changes); |
NewerOlder