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 | |
function filesModifiedSince($dir = "/", $modified = 0, $exclude = array()) { | |
$result = array(); | |
$exclude = array_merge(array(".",".."), $exclude); | |
$limit = time() - $modified; | |
$cdir = scandir($dir); | |
foreach ($cdir as $key => $value) | |
{ | |
if (!in_array($value,$exclude)) |
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 | |
ini_set('max_execution_time', 72000); | |
ini_set('memory_limit', '2048M'); | |
define('MODX_CORE_PATH', '/home/www/core/'); | |
require_once MODX_CORE_PATH . 'model/modx/modx.class.php'; | |
if(!function_exists('csv2array')){ | |
function csv2array($filename = '', $delimiter = ',', $asHash = 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
<?php | |
/** | |
** OnPageNotFound | |
**/ | |
$URI = $_SERVER['REQUEST_URI']; | |
if(strpos($URI, '.html') !== false){ | |
$URI = ltrim(str_replace('.html','/',$URI), '/'); | |
$resource = $modx->getObject('modResource', array('uri:='=>$URI, 'context_key:='=> $modx->context->key)); |
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
[ | |
{"caption":"Image", "fields":[ | |
{"field":"image","caption":"Image","inputTVtype":"image"} | |
]}, | |
{"caption":"Info", "fields": [ | |
{"field":"title","caption":"Title"}, | |
{"field":"description","caption":"Description","inputTVtype":"richtext"} | |
]} | |
] |
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 | |
/** | |
* Warning: this code is for demonstration purposes only | |
*/ | |
if (!preg_match("/\.pdf$/", $input)) { | |
return "PDF file not specified."; | |
} | |
$options = explode('&', $modx->getOption('options', $scriptProperties, null)); | |
if(empty($options)){ |
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
#list of trusted IPs | |
set_real_ip_from 69.16.133.0/24 | |
set_real_ip_from 69.16.176.0/20 | |
set_real_ip_from 69.16.182.0/24 | |
set_real_ip_from 69.16.184.0/24 | |
set_real_ip_from 69.16.188.0/24 | |
set_real_ip_from 74.209.134.0/24 | |
set_real_ip_from 74.209.134.128/25 | |
set_real_ip_from 81.171.60.0/24 | |
set_real_ip_from 81.171.61.0/24 |
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 | |
switch ($modx->event->name) { | |
case 'OnBeforeDocFormSave': | |
$now = mktime(); | |
$lastcache = $modx->cacheManager->get('delaycache'); | |
if(!empty($lastcache) && ($now - $lastcache) < 300){ | |
$_POST['syncsite'] = 0; | |
} | |
return; | |
break; |
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 | |
// Run OnWebPagePrereneder | |
$modx->resource->_output = str_replace('<table', '<table role="presentation"', $modx->resource->_output); |
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
BuiltWith | |
javascript:void(window.open('http://builtwith.com?'+location.hostname,'_blank')) | |
DNS Whois IP | |
javascript:void(window.open('https://dnslytics.com/domain/'+location.hostname,'_blank')) | |
MX Toolbox | |
javascript:void(window.open('https://mxtoolbox.com/SuperTool.aspx?action=mx%3a'+location.hostname+'&run=toolpage','_blank')) | |
Wayback Machine |