Exemplo n.º 1
0
 #si les functions sont bien chargées
 if (function_exists('r301depart')) {
     r301depart();
 }
 #301 écrites sur le disque prioritaires
 if (function_exists('starter')) {
     $_ENV['yt'] = $yt = starter();
     timelong('starteron');
 }
 #attention uniquement si cron de suppression des vieux fichiers !!!
 if (function_exists('ggtracker')) {
     ggtracker();
 }
 if (function_exists('fap') && strpos(' ' . U . Q . RQS, 'go=1') || $_GET['cc']) {
     if (1) {
         Fap(VIT, array('cp' => CACHEPATH, 'sfn' => $a['SCRIPT_FILENAME']));
         if (is_file(CR301)) {
             unlink(CR301);
         }
         if (is_file(CACHEPATH)) {
             unlink(CACHEPATH);
         }
     }
     Header("location:" . str_replace(['?cc=' . $_GET['cc'], '?go=' . $_GET['go'], '&cc=' . $_GET['cc'], '&go=' . $_GET['go']], '', SU), 1, 301);
     kill();
 }
 if (isset($obstart)) {
     ob_start();
     timelong('obstart');
 }
 #had a ob get_level-if(ob_get_level()&&j10)die(''.ob_get_level());
Exemplo n.º 2
0
function R303($x, $nc = 0)
{
    #elles passent toutes par ici
    if (J9) {
        FB(debug_backtrace(), 303);
    }
    #$bt=end($bt);
    if (strlen($x) > 200 || preg_match("~phpthumb|image/png|base64,|data:~i", U)) {
        return;
    }
    #db3("r303urldata:");av(func_get_args());#data:;, => ne doit pas générer de r301 car .. bordel !!
    #if(J11)av(debug_backtrace());
    if (STARTER) {
        $lh = $_ENV['yt']['lh'];
        $lr = $_ENV['yt']['lr'];
    }
    Fap(IPF, 'lr', SU . "=>" . $x);
    #la concrétisation
    unset($_SESSION['st1']);
    $_GET['r301'] = 1;
    e(',r301,r303');
    #tracker
    #SU.$x
    if (starter && $lh == 301 && $lr == $x) {
        jx($lh . $lr);
        db('dest' . SU);
        if (U) {
            R302("/#error:301loop:{$x}");
        }
        return;
    }
    if ($nc == 1) {
        Header("Status: 301 Moved Permanently", 1, 301);
        Header("Location:{$x}");
        kill();
    }
    if (!$x) {
        Db("emptyR2:" . SU);
        jx('emptyr2');
        return;
    }
    #jx();
    if (headers_sent($f, $line)) {
        Db("headers!{$f},{$line}");
        return;
    }
    #on n'y peut rien !#@ob_clean();
    Header("Status: 301 Moved Permanently", 1, 301);
    Header("Location:{$x}");
    #av($_ENV['args'].'-'.__line__);
    kill();
}