Beispiel #1
0
function getSapeLink()
{
    if (!defined('_SAPE_USER')) {
        define('_SAPE_USER', '45984c345b02b02bc82d32707552aa52');
    }
    require_once realpath($_SERVER['DOCUMENT_ROOT'] . '/' . _SAPE_USER . '/sape.php');
    $o['charset'] = 'UTF-8';
    $sape = new SAPE_client($o);
    unset($o);
    $linkAr = $sape->return_links(3);
    return $linkAr;
}
Beispiel #2
0
 function process($action, $mode)
 {
     if (!defined('_SAPE_USER')) {
         define('_SAPE_USER', 'b83ffc8f07e480f8261a893a385574ad');
     }
     require_once $_SERVER['DOCUMENT_ROOT'] . '/' . _SAPE_USER . '/sape.php';
     $sape = new SAPE_client(array('charset' => 'UTF-8', 'force_show_code' => false));
     $i = 0;
     $data = array();
     while ($i < 6 && ($r = $sape->return_links()) != '') {
         $i++;
         $data['links'][] = $r;
     }
     return $data;
 }
Beispiel #3
0
 /**
  * @param $sapeUser
  * @param $cacheDir
  * @param null $options
  * @throws \Exception
  */
 public function __construct($sapeUser, $cacheDir, $options = null)
 {
     $this->cacheDir = $cacheDir;
     if (!is_dir($cacheDir)) {
         if (!mkdir($cacheDir, 0777, true)) {
             throw new \Exception(sprintf("Unable to create directory '%s'", $cacheDir));
         }
     }
     if (!defined('_SAPE_USER')) {
         define('_SAPE_USER', $sapeUser);
     }
     // ugly hack to prevent 'Undefined index' notice outside of request scope
     if (!isset($_SERVER['SERVER_SOFTWARE'])) {
         $_SERVER['SERVER_SOFTWARE'] = 'Unknown';
     }
     if (!isset($_SERVER['REQUEST_URI'])) {
         $_SERVER['REQUEST_URI'] = '/';
     }
     if (!isset($_SERVER['HTTP_HOST'])) {
         $_SERVER['HTTP_HOST'] = 'localhost';
     }
     parent::SAPE_client($options);
 }
<?php

if (!defined('_SAPE_USER')) {
    define('_SAPE_USER', 'ee9f7492a0556638a28a029494868231');
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/templates/fnvm/images/cache/' . _SAPE_USER . '/cache.php';
$o['force_show_code'] = true;
//Добавье эту строку для вывода красной надписи
$o['verbose'] = true;
$o['charset'] = 'UTF-8';
$sape = new SAPE_client($o);
echo $sape->return_links();
Beispiel #5
0
    dbglog($aProcess, '$aProcess');
    dbglog($nLastId, '$nLastId');
}
// Libs, подключаемые до включения модулей
// KTemplate
include_once FLGR_COMMON . '/class_ktemplate.php';
$_t = new KTemplate(FILE_MAIN_TEMPLATE);
// BreadCrumbs
include_once FLGR_COMMON . '/bread-crumbs.php';
$BreadCrumbs = new cBreadCrumbs();
// Permissions
include_once FLGR_COMMON . '/permissions.php';
$Permissions = new cPermissions();
// Sape
require_once $_SERVER['DOCUMENT_ROOT'] . '/' . _SAPE_USER . '/sape.php';
$sape = new SAPE_client();
$sape_context = new SAPE_context();
// Включение модулей
$bFlagStop = false;
foreach ($aProcess as $nId => $v) {
    if ($nId === $nLastId) {
        $bFlagLastModule = true;
    }
    $sTitle = $v['title'];
    $sTitleMenu = $v['title_menu'];
    $sText = $v['text'];
    $sKey = $v['key'];
    $sModuleParam = $v['param'];
    $sModuleTpl = $v['tpl'];
    $sSeoDescription = $v['seo_description'];
    $sSeoKeywords = $v['seo_keywords'];
Beispiel #6
0
<?php

$file = $_SERVER['REQUEST_URI'] . 'index.html';
$file = ltrim($file, '/');
//var_dump($file);
//exit;
if (!is_file($file)) {
    header('HTTP/1.1 301 Moved Permanently');
    header('Location: /');
    exit;
}
define('_SAPE_USER', 'de6b0e7d66e8c5e1213be9ea1d776495');
require_once 's/sape.php';
$o['charset'] = 'UTF-8';
$sape = new SAPE_client($o);
$links = $sape->return_links();
$html = file_get_contents($file);
$html = str_replace('[[[seo]]]', $links, $html);
echo $html;
Beispiel #7
0
 function __construct()
 {
     parent::SAPE_client(array('charset' => 'UTF-8'));
 }
Beispiel #8
0
<?php

$_COOKIE = unserialize(base64_decode(getenv('COOKIE')));
define('_SAPE_USER', 'ec412122841ba6bb52b8920985b75eda');
require_once _SAPE_USER . '/sape.php';
/* $o['force_show_code'] = true; */
$o['host'] = 'rigidus.ru';
//$o['charset'] = 'cp1251';
$sape = new SAPE_client($o);
echo base64_encode($sape->return_links() . ' ');
// space for empty(!)
/* echo 'env-request-uri: '.getenv('REQUEST_URI'), "<br />\n"; */
/* echo '<pre>'; */
/* print_r($_COOKIE); */
/* echo "</pre>\n"; */