Beispiel #1
0
/**
 * Classes controller.
 *
 * @author paul.michaud
 * @author loic.bothorel
 */
function classes()
{
    $tabPromo = getPromo();
    set('tabPromo', $tabPromo);
    return render('classes.html.php', 'layout/layout.html.php');
}
Beispiel #2
0
<?php

$data = array(10019021 => array(6713658, '*****@*****.**'), 10019078 => array(6794590, '*****@*****.**'), 10006810 => array(6713498, '*****@*****.**'), 10003486 => array(6330210, '*****@*****.**'), 10022861 => array(6743596, '*****@*****.**'), 10002900 => array(6713600, '*****@*****.**'), 10002775 => array(6815998, '*****@*****.**'), 10012408 => array(6688808, '*****@*****.**'), 10003051 => array(6743778, '*****@*****.**'), 10014518 => array(6780954, '*****@*****.**'), 10015654 => array(6794568, '*****@*****.**'), 10003231 => array(6718352, '*****@*****.**'));
foreach ($data as $idd => $arr) {
    $val = getPromo($idd, $arr[0]);
    echo "http://cargotogo.com/activation/{$val}  => {$arr[1]}\n";
}
function getPromoHash($cid)
{
    $res = $cid % 10000;
    return sprintf("%04d", $res);
}
function getPromo($id, $crm)
{
    $base = 10002413;
    $res = $id - $base;
    return $res . getPromoHash($crm);
}