case "confirm":
            $OUTPUT = confirm($_POST);
            break;
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['salespid'])) {
                $OUTPUT = rem($_GET['salespid']);
            } else {
                $OUTPUT = "<li> - Invalid use of module";
            }
    }
} else {
    if (isset($_GET['salespid'])) {
        $OUTPUT = rem($_GET['salespid']);
    } else {
        $OUTPUT = "<li> - Invalid use of module";
    }
}
# display output
require "../template.php";
function rem($salespid)
{
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($salespid, "num", 1, 50, "Invalid Sales Person id.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";
        case "confirm":
            $OUTPUT = confirm($_POST);
            break;
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['catid'])) {
                $OUTPUT = rem($_GET['catid']);
            } else {
                $OUTPUT = "<li> - Invalid use of module";
            }
    }
} else {
    if (isset($_GET['catid'])) {
        $OUTPUT = rem($_GET['catid']);
    } else {
        $OUTPUT = "<li> - Invalid use of module";
    }
}
# display output
require "../template.php";
function rem($catid)
{
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($catid, "num", 1, 50, "Invalid category id.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";
Beispiel #3
0
function mod($num, $div)
{
    // (let [m (rem num div)]
    //   (if (or (zero? m) (= (pos? num) (pos? div)))
    //     m
    //     (+ m div))))
    $m = rem($num, $div);
    if (is_zero($m) || is_pos($num) === is_pos($div)) {
        return $m;
    }
    return $m + $div;
}
Beispiel #4
0
<?php

#Per domain config : cumulative
$sqlconn = ['127.0.0.1', 'root', 'a', 'test'];
$ga = 'UA-111-1';
#analytics code
$DB = 'ciel';
#DR.'adm/3.s3db';#replace this value now !!
$def = array('titre' => 'racetrack default title', 'desc' => 'desc default', 'keyw' => 'default keywords');
$a = array_merge($a, ['adminemail' => '*****@*****.**', 'senderemail1' => '*****@*****.**', 'rt' => $a['root'] . 'rt/', 'tmp' => $a['root'] . 'tmp/']);
rem($a['preload'], '0=autoloader.php&1=r304.php');
$a['preload'] = '0=autoloader.php&1=r304.php';
#,1=debug53.php,2=fundev1.php&1=deprecated.php&2=ksv1-div.php&3=ksv1-auto.php&4=crypt.php&5=autor301.php&6=ggtracker.php&7=css.php
register_shutdown_function(function () {
    if ($_ENV['errorshutdown']) {
        return;
    }
    $e = error_get_last();
    if ($e && $e['type'] != 8) {
        print_r($e);
    }
    $_ENV['errorshutdown'] = 1;
});
header('Content-Type: text/html; charset=utf-8');
#ie displays :#
Beispiel #5
0
$ipsa = array('127.0.0.1' => 'localhost');
$_ENV['c']['sql']['test'] = array('127.0.0.1', 'root', 'a');
#database connection
redef('J9', strpos(UA, 'J9') && !strpos(RH, 'cloudflare') ? 1 : 0, 1);
redef('J10', strpos(UA, 'J10') && !strpos(RH, 'cloudflare') ? 1 : 0, 1);
#définir les élevations depuis qquechose
$host = 127;
if (!function_exists('sys_getloadavg')) {
    function sys_getloadavg()
    {
        return array(1, 0, 0);
    }
}
#
date_default_timezone_set('Europe/Paris');
rem($a['preload'], '0=autoloader.php,1=fun.php,2=debug53.php,3=fundev1.php');
#&1=deprecated.php&2=ksv1-div.php&3=ksv1-auto.php&4=crypt.php&5=autor301.php&6=ggtracker.php&7=css.php
$a['vars'] = "root=/l/debshared/racetrack&logs/l/debshared/racetrack&l2=/l/debshared/racetrack&obstart=1&cacheinit=0&starter=0&tracker=0";
$erlogs = '/l/debshared/racetrack/er.logs';
#die(dr.'adm/local.s3db');
redef('LOGLEVEL', 6);
#6:écrire tout les petits fichiers
redef('SHELL', 'shell.php');
Rem($DB, [$_GET['ho'], 'ben', DR . 'adm/local.s3db']);
#localhost,Y:/web/www/
$thumbsh = array(80);
#$thumbsw=array(120);#genérer chaque miniature..
$ga = 'UA-939697-14';
#'''google analytics code :::
$adwordstag = "<img height=1 width=1 src='http://www.googleadservices.com/pagead/conversion/989090452/?label=gtPZCKzJsQzIQlKXR1&amp;value=31&amp;guid=ON&amp;script=0'>";
$def = array('titre' => 'titre défault', 'desc' => 'desc défault', 'keyw' => 'mots clés défault');
Beispiel #6
0
function ggtracker()
{
    rem($ref, $_ENV['yt']['ref'], refe);
    #.refe  Car déjà enregistré
    $files = "ico|eot|ttf|js|css|htc|woff|swf|xml|gif|png|bmp|flv|mp(3|4)|exe|jpe?g|aspx?";
    #bad extensions
    $bp = "~\\?(jsr?|css|rss)|Final|visuall|zsimu|contact2?\\.php|suivi|s74.fr|4Test|(zsimu|2001|admin|intranet|sql)/|z/\\!|/!|/y/|\\.({$files})\$~i";
    #bad url
    $bR = "~(a74|xzxzx|dc10)\\.fr|frontaliers\\.info|yahooapi|url=|\\.(s?html|{$files})\$~i";
    #bad referer : can't be the referer,ex:referal spam
    #shall be recorded on first step !
    if (stripos(' ' . $ref . refe, '<a href')) {
        Block(array('badref', $ref . refe));
    } elseif (h == 'cli') {
        $x = 'cli';
    } elseif (bots) {
        $x = 'bots';
    } elseif (!$GLOBALS['tracker']) {
        $x = '!tracker';
    } elseif ($GLOBALS['notracker']) {
        $x = 'notracker';
    } elseif ($_ENV['yt']['lw'] + 600 > now) {
        $x = 'lw<600';
    } elseif (Preg_Match('~SID|css|js|jsr~is', q)) {
        $x = 'badq';
    } elseif (Preg_Match("~\\.({$files})\$~is", u)) {
        $x = 'badfiletype';
    } elseif (Preg_Match("~yandsearch|saihm|seoheap|internesdedijon|(a74|xzxzxz)\\.fr~is", REFE . Q . $ref)) {
        $x = 'badref';
    } elseif (Preg_Match("~(Tag|2|zsimu|qform|contact2?)\\.php|Final|dev3|/(3p|mut|!r|\\?|sql|2001|intranet)~is", u)) {
        $x = 'badurl';
    } elseif (Preg_Match($bp, $ref, $t)) {
        $x = 'ref:badpat(u)';
    } elseif (Preg_Match($bp, u, $t2)) {
        $x = 'url:badpat';
    } elseif (Preg_Match($bR, refe . $ref, $t3)) {
        $x = 'ref:badpat(R)';
    } elseif (preg_match("~\\.(php|s?html?)\$~", u)) {
        $x = 11;
    } elseif (strpos(substr($v, -5), '.') > -1) {
        $x = 'is not php or shtml : other filetype';
    } else {
        $x = 12;
    }
    #unknown
    if (!is_numeric($x)) {
        null;
    } else {
        G2('k1');
        #si le fichier existe déjà sur le serveur, cette valeur est récupérée, puis inserée de nouveau pour marquer l'autre site avec le meme mot clés
        #$y=Preg_replace('`&(babsrc|affid|mntrid|channel|client|clientcop|source|gs_rfai|ei|btng|spell|resnum|sourceid|channel|filetype|vertical|_iceurlflag|_iceurl)=([^&]+)`is','',$y);
        $y = str_replace(array('search/z/results/', '/fr/results/index/q/', 'search/', 'search?w=tot', 'as_q=', 'custom&q=', '&aqa=', '&aqp=', '/web/', 'rdata=', 'lts/&q='), '&q=', $ref);
        $y = str_replace(array('search/srpcache', 'linkdoctor', 'toggle=1', 'sa=n', 'ei=', 'prmd=mc', 'hl=fr', 'rls=', 'org.mozilla:fr', ':official', 'firefox-a', 'http://', 'www.', 'fr.', 'search.', 'aq=', 'oq=', 'aqi=', 'fkt=', 'fsdt=', 'fr=yfp-t-703', 'meta=lr', 'source=hp', 'aql=', 'hs=', 'tbo=s', 'rlz=', 'searchal', 'utf-8', 'ie=', 'oe=', 'sourceid=', 'nabclient', 'gfns=', '/bottomnavigation', '/relevance', '%22', 'recherche google', 'ved=', 'ct=', 'sa=x', 'oi=spell', 'rlz=', 'hl=fr', 'oq=', 'linkdoctor', 'safari', 'redir_esc=', 'ie=', 'oe=', 'utf-8', 'aq=', 'rls=', 'org.mozilla:', 'fr:official', 'meta=', 'gs_rfai=', 'aqi=', 'ql=', 'navclient', 'usg=', 'vc=', 'safe=', 'active', 'com.microsoft', 'en-gb', 'searchbox', 'ecofree.org/search.php', 'pid=', 'search.daum.net', 'results&', 'itag=ody', 'search&', '&hl=fr', 'topnavigation/', 'relevance/', 'iq=true/', 'zoom=off/', '=7', '&oq=', '&aq=', '&cx=', 'partner-', 'mb-', 'pub-'), '&', $y);
        $y = trim(Preg_replace("~[&]{2,}~", '&', $y), ' &');
        $mots = kwd($y);
        #travaux de nettoyage du referrer =)
        if ($mots && !strpos($mots, 'provided') && !in_Array($mots, array('', ':'))) {
            $mots = Tridecoder($mots);
            $mots = Preg_replace("~((google|yahoo|bing|yandex|gooofullcom|vizzeo|.?chiadah|find\\.eu|ke\\.voila|voila|seexie|askpeter|iadah|yougoo|yhs4|ecosia)\\.|search;|cx=|goooful|(\\.fr)?iadah\\.com).*|\\.it\$~is", '', $mots);
            $trop = explode(',', "_,</a>,< a>,<a href=,refineobj:video,google.ca,google.ci,google.co.uk ,url ,google.fr ,google.com ,search ,hl=en,sa=t,spider.htm");
            $mots = trim(str_replace($trop, '', $mots));
            #synchronisation des bibliothècas,maintenance
            if (preg_match("~^.(ttp&%2f%2f|ttp:)~is", $mots) or strlen($mots) < 3) {
                Null;
            } elseif ($_ENV['yt']['mots'] == $mots || $_ENV['yt']['fmt']['kw'] + 600 > NOW) {
                null;
            } else {
                #Nouveau mot clé
                if (preg_match("~q=([^&]+)~is", $mots, $t)) {
                    $mots = $t[1];
                }
                if (Preg_Match_ALL("~" . BKW . "~i", $mots, $t)) {
                    Block($t[0], $mots);
                }
                #blockage de l'IP et throw 404
                if (Preg_Match("~bestof~is", U)) {
                    $mots = '';
                }
                #cancel
                if ($mots) {
                    #if(!$_ENV['yt']){$_ENV['yt']=Array();DBM('!yt',"<pre>".STARTER."-$mots</pre>",'a6');}$i=$_ENV['yt'];
                    $yt2 = array('lw' => NOW, 'date' => date("Y/m/d H:i:s"), 'mots' => $mots, array('fmt' => array('kw' => NOW)));
                    if ($_ENV['yt']['mots']) {
                        $yt2['mots-1'] = $_ENV['yt']['mots'];
                    }
                    #DBM('ggt',"<pre>$mots,".print_r($_ENV['yt'],1).'</pre>','gg9');
                    if (Preg_Match("~gclid=|aclk\\?~is", $_ENV['yt']['ref'])) {
                        $yt2['adwords'] = $mots;
                    } elseif (0) {
                        #insertions sql //todo:file_append puis écriture en lots
                        $x2 = sql5("UPDATE CSF set site='" . H . "',hits=hits+1,ip='" . IP . "',time=" . NOW . ",date=now(),Ref=\"{$ref}\" {$s1} where url=\"" . SU . "\" and keyword=\"{$mots}\" order by id ASC limit 1");
                        if ($x2 < 1) {
                            sql5("INSERT INTO CSF(ip,Ref,site,keyword,url,position,time,date)VALUES('" . IP . "',\"{$ref}\",'" . H . "',\"{$mots}\",\"" . SU . "\",'{$pos}'," . NOW . ",NOW())");
                        }
                        #INSERT INTO CSF SET key = 'key', generation = 'generation' ON DUPLICATE KEY UPDATE key = 'key', generation = (generation + 1);
                    }
                    #$_SESSION['st1']=$magic;#$_SESSION['mots']=$mots;
                    $magic = "{$mots};" . $_ENV['yt']['dlp'] . ";" . $_ENV['yt']['ref'];
                    setcookie('kw', $mots, 1484045758);
                    setcookie('dlp', $magic, 1484045758);
                }
            }
            if (is_array($yt2)) {
                $_ENV['yt'] = Array_merge($_ENV['yt'], $yt2);
                FAP(IPF, $_ENV['yt']);
            }
            redef('motcle', $mots);
        }
    }
}
        case "confirm":
            $OUTPUT = confirm($_POST);
            break;
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['whid'])) {
                $OUTPUT = rem($_GET['whid']);
            } else {
                $OUTPUT = "<li> - Invalid use of module";
            }
    }
} else {
    if (isset($_GET['whid'])) {
        $OUTPUT = rem($_GET['whid']);
    } else {
        $OUTPUT = "<li> - Invalid use of module";
    }
}
# display output
require "../template.php";
function rem($whid)
{
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($whid, "num", 1, 50, "Invalid Store id.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";
#
#
#
#
#
#
#
#
#
#
# Get settings
require "settings.php";
if (isset($_POST['key'])) {
    switch ($_POST["key"]) {
        case "rem":
            $OUTPUT = rem($_POST);
            break;
        default:
            if (isset($_GET['stkid'])) {
                $OUTPUT = confirm($_GET['stkid']);
            } else {
                $OUTPUT = "<li class='err'> - Invalid use of module</li>";
            }
    }
} else {
    if (isset($_GET['stkid'])) {
        $OUTPUT = confirm($_GET['stkid']);
    } else {
        $OUTPUT = "<li> - Invalid use of module</li>";
    }
}
# decide what to do
if (isset($_POST["key"])) {
    switch ($_POST["key"]) {
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['batchid'])) {
                $OUTPUT = rem($_GET['batchid']);
            } else {
                $OUTPUT = "<li> - Invalid use of module";
            }
    }
} else {
    if (isset($_GET['batchid'])) {
        $OUTPUT = rem($_GET['batchid']);
    } else {
        $OUTPUT = "<li> - Invalid use of module";
    }
}
# get templete
require "template.php";
# Enter Details of Transaction
function rem($batchid)
{
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($batchid, "num", 1, 20, "Invalid batch number.");
    # display errors, if any
    if ($v->isError()) {
#
#
#
#
#
require "settings.php";
if (isset($_REQUEST["key"])) {
    switch ($_REQUEST["key"]) {
        case "recover":
            $OUTPUT = recover();
            break;
        case "confirm":
            $OUTPUT = confirm();
            break;
        case "rem":
            $OUTPUT = rem();
            break;
        default:
            $OUTPUT = slctcomp();
    }
} else {
    $OUTPUT = slctcomp();
}
$OUTPUT .= mkQuickLinks(ql("company-new.php", "Add New Company"), ql("company-view.php", "View Companies"));
require "template.php";
function slctcomp($err = "")
{
    db_con("cubit");
    # Get Companies
    $sql = "SELECT * FROM companies ORDER BY name ASC";
    $compRslt = db_exec($sql) or die("Unable to get companies from database.");
        case "confirm":
            $OUTPUT = confirm($_POST);
            break;
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['listid'])) {
                $OUTPUT = rem($_GET['listid']);
            } else {
                $OUTPUT = "<li> - Invalid use of module";
            }
    }
} else {
    if (isset($_GET['listid'])) {
        $OUTPUT = rem($_GET['listid']);
    } else {
        $OUTPUT = "<li> - Invalid use of module.</li>";
    }
}
# display output
require "../template.php";
function rem($listid)
{
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($listid, "num", 1, 50, "Invalid Price List id.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";
# decide what to do
if (isset($_POST["key"])) {
    switch ($_POST["key"]) {
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['ledgid'])) {
                $OUTPUT = rem($_GET);
            } else {
                $OUTPUT = "<li class='err'> Invalid use of module</li>";
            }
    }
} else {
    if (isset($_GET['ledgid'])) {
        $OUTPUT = rem($_GET);
    } else {
        $OUTPUT = "<li class='err'> Invalid use of module</li>";
    }
}
# get templete
require "../template.php";
# Remove
function rem($_GET)
{
    # Get vars
    extract($_GET);
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($ledgid, "num", 1, 20, "Invalid Input Ledger Number.");
        case "confirm":
            $OUTPUT = confirm($_POST);
            break;
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['deptid'])) {
                $OUTPUT = rem($_GET['deptid']);
            } else {
                $OUTPUT = "<li> - Invalid use of module";
            }
    }
} else {
    if (isset($_GET['deptid'])) {
        $OUTPUT = rem($_GET['deptid']);
    } else {
        $OUTPUT = "<li> - Invalid use of module";
    }
}
# display output
require "../template.php";
function rem($deptid)
{
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($deptid, "num", 1, 50, "Invalid Department id.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";
# decide what to do
if (isset($_POST["key"])) {
    switch ($_POST["key"]) {
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['clasid'])) {
                $OUTPUT = rem($_GET['clasid']);
            } else {
                $OUTPUT = "<li> - Invalid use of module";
            }
    }
} else {
    if (isset($_GET['clasid'])) {
        $OUTPUT = rem($_GET['clasid']);
    } else {
        $OUTPUT = "<li> - Invalid use of module";
    }
}
# display output
require "template.php";
function rem($clasid)
{
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($clasid, "num", 1, 50, "Invalid Classification id.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";
# decide what to do
if (isset($_POST["key"])) {
    switch ($_POST["key"]) {
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['cusnum'])) {
                $OUTPUT = rem($_GET['cusnum']);
            } else {
                $OUTPUT = "<li> - Invalid use of module.</li>";
            }
    }
} else {
    if (isset($_GET['cusnum'])) {
        $OUTPUT = rem($_GET['cusnum']);
    } else {
        $OUTPUT = "<li> - Invalid use of module.</li>";
    }
}
# display output
require "template.php";
function rem($cusnum)
{
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($cusnum, "num", 1, 50, "Invalid customer id.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";
        case "confirm":
            $OUTPUT = confirm($_POST);
            break;
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['calloutpid'])) {
                $OUTPUT = rem($_GET['calloutpid']);
            } else {
                $OUTPUT = "<li> - Invalid use of module";
            }
    }
} else {
    if (isset($_GET['calloutpid'])) {
        $OUTPUT = rem($_GET['calloutpid']);
    } else {
        $OUTPUT = "<li> - Invalid use of module";
    }
}
# display output
require "../template.php";
function rem($calloutpid)
{
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($calloutpid, "num", 1, 50, "Invalid Call Out Person id.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";
        case "confirm":
            $OUTPUT = confirm($_POST);
            break;
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['id'])) {
                $OUTPUT = rem($_GET['id']);
            } else {
                $OUTPUT = "<li> - Invalid use of module";
            }
    }
} else {
    if (isset($_GET['id'])) {
        $OUTPUT = rem($_GET['id']);
    } else {
        $OUTPUT = "<li> - Invalid use of module";
    }
}
# display output
require "../template.php";
function rem($id)
{
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($id, "num", 1, 50, "Invalid id.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";
# decide what to do
if (isset($_POST["key"])) {
    switch ($_POST["key"]) {
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['custid'])) {
                $OUTPUT = rem($_GET['custid']);
            } else {
                $OUTPUT = "<li> - Invalid use of module";
            }
    }
} else {
    if (isset($_GET['custid'])) {
        $OUTPUT = rem($_GET['custid']);
    } else {
        $OUTPUT = "<li> - Invalid use of module";
    }
}
# display output
require "../template.php";
function rem($custid)
{
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($custid, "num", 1, 50, "Invalid customer id.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";
        case "confirm":
            $OUTPUT = confirm($_POST);
            break;
        case "write":
            $OUTPUT = write($_POST);
            break;
        default:
            if (isset($_GET['supid'])) {
                $OUTPUT = rem($_GET['supid']);
            } else {
                $OUTPUT = "<li> - Invalid use of module";
            }
    }
} else {
    if (isset($_GET['supid'])) {
        $OUTPUT = rem($_GET['supid']);
    } else {
        $OUTPUT = "<li> - Invalid use of module";
    }
}
# display output
require "template.php";
function rem($supid)
{
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($supid, "num", 1, 50, "Invalid supplier id.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";