Exemple #1
0
function genDay($seed)
{
    global $totalSessionsStd;
    $var = intval($seed / 10);
    if ($var == 1) {
        $var = 2;
    }
    //echo 'Total Sessions : '.$var.'<br />';
    $a = "";
    $count = 0;
    $flag = 0;
    while ($var > 0) {
        $b = genSess($seed);
        /* Generates activity for one session */
        //echo $b.'<br /><br />';
        if (($var != 1 || $count != 0) && $a != "") {
            $a = $a . ',';
        }
        $a = $a . $b;
        $var--;
        $totalSessionsStd++;
        $count++;
        $flag++;
    }
    if ($flag == 0) {
        $totalSessionsStd--;
    }
    return $a;
}
Exemple #2
0
function genDay($seed)
{
    global $totalSessionsStd;
    /*<S1;D;A;5>,<S1;R;A;2>*/
    $var = intval($seed / 10);
    echo 'Seed : ' . $seed . '<br />';
    echo 'Total sessions : ' . $var . '<br />';
    while ($var > 0) {
        $a = genSess($seed);
        /* Generates activity for one session */
        $var--;
        $totalSessionsStd++;
    }
}
Exemple #3
0
function genDay($seed)
{
    global $totalSessionsStd;
    $var = intval($seed / 10);
    if ($var == 1) {
        $var = 2;
    }
    $a = "";
    $count = 0;
    while ($var > 0) {
        $b = genSess($seed);
        /* Generates activity for one session */
        if (($var != 1 || $count != 0) && $a != "") {
            $a = $a . ';';
        }
        $a = $a . $b;
        $var--;
        $totalSessionsStd++;
        $count++;
    }
    return $a;
}