Exemplo n.º 1
0
function drawSelectInter($menu)
{
    $interval = $_SESSION['MenuInterval'];
    $select = $_SESSION['selectedInter'];
    $iselect = selectIndex($interval['opt'], $select);
    $selected = min($iselect, $interval[$menu]);
    for ($i = 0; $i <= $interval[$menu]; $i++) {
        $val = $interval['opt'][$i][0];
        $txt = tr($interval['opt'][$i][1]);
        $sel = '';
        if ($i == $selected) {
            $sel = "selected='selected'";
        }
        echo "<option value=" . "'" . $val . "' " . $sel . ">" . $txt . ' </option>' . "\n";
    }
}
Exemplo n.º 2
0
                $_SESSION['datebeg'] = $date0;
                $_SESSION['dateend'] = $date1;
            }
        }
    }
}
if (isset($_GET['row'])) {
    $row = $_GET['row'];
    $date_beg = $_SESSION['date_beg'];
    $date_end = $_SESSION['date_end'];
    $sel = selectIndex($opt, $interval);
    if ($sel < maxIndexMenu('G')) {
        $beg = $_SESSION['begdata'];
        $dateRow = $beg + $row * $inter;
        $interval = $opt[$sel + 1][0];
        $sel = selectIndex($opt, $interval);
        $inter = $opt[$sel][2];
        $tinter = $opt[$sel][1];
        $date_beg = $dateRow - 50 * $inter;
        $date_end = $dateRow + 50 * $inter;
        $date_end = min($date_end, time());
        $datebeg = date("d/m/Y", $date_beg);
        $dateend = date("d/m/Y", $date_end);
        $_SESSION['selectedInter'] = $interval;
        $_SESSION['datebeg'] = date("d/m/Y", $date_beg);
        $_SESSION['dateend'] = date("d/m/Y", $date_end);
        $_SESSION['date_beg'] = $date_beg;
        $_SESSION['date_end'] = $date_end;
    } else {
        $numrows = ($date_end - $date_beg) / $inter;
        $rowBeg = max(0, $row - $numrows / 10);