コード例 #1
0
ファイル: index.php プロジェクト: techczech/tuit
} elseif (!isset($section) and is_numeric($exercise) or is_numeric($unit)) {
    $section = 'public_access';
} elseif (strcmp($section, 'acct_request') and strcmp($section, 'mb') and strcmp($section, 'public_access')) {
    $section = 'login';
}
/*
   each section has its own include file, which must return 123, this
   tells this main script that everything went fine. otherwise displays
   error. section is a parameter set as section=name_of_section parameter
   in url or as hidden field in forms..
*/
if (ereg('^[[:alnum:]_]+$', $section)) {
    $r = (include "{$section}.inc");
    if ($r != 123) {
        error_fl('The page you requested does not exist.');
    }
} else {
    error_fl('The page you requested does not exist.');
}
if ($GLOBALS['m'] == 'tuit') {
} else {
    $out = $page->display($section == 'notepad');
    if (preg_match('/--INSERTEWCONTROLHERE--/', $out)) {
        list($pre, $post) = explode('<!--INSERTEWCONTROLHERE-->', $out);
        echo $pre;
        eval("\$" . $INSERTEWCONTROL . "->ShowControl('800','400');");
        echo $post;
    } else {
        echo $out;
    }
}
コード例 #2
0
ファイル: specdict-indep.php プロジェクト: techczech/tuit
@($res = mysql_query("select * from dicts"));
while (@($row = mysql_fetch_array($res))) {
    $dicts[$row['d_id']] = $row['d_name'];
}
asort($dicts);
if (is_numeric($dict)) {
    $tab = new TABLE();
    if (!is_numeric($offset) or $offset < 0) {
        $offset = 0;
    }
    if (!is_numeric($limit) or $limit < 1) {
        $limit = 20;
    }
    @($res = mysql_query("select count(*) as cnt from vocab where v_d_id={$dict}"));
    @($row = mysql_fetch_array($res));
    $cnt = $row['cnt'];
    $tab->add_row(array(array('attr' => 'colspan=5', 'cont' => pnav($cnt, $offset, $limit, "?dict={$dict}&") . "<br><br>")));
    @($res = mysql_query("select * from vocab where v_d_id={$dict} order by v_english limit {$offset},{$limit}"));
    while (@($row = mysql_fetch_array($res))) {
        $tab->add_row(array($row['v_english'], "<i>" . $row['v_latin'] . "</i>", $row['v_czech'], $row['v_slovak'], $row['v_german']));
    }
    $page->add_to_middle($tab->prepare());
} else {
    $menu = new VMENU();
    while (list($k, $v) = each($dicts)) {
        $menu->add_item($v, "?dict={$k}");
    }
    $page->add_to_middle($menu->prepare());
}
$page->display();
コード例 #3
0
ファイル: index-erroroff.php プロジェクト: techczech/tuit
    if (empty($section) and is_numeric($exercise)) {
        $section = 'exercise_display';
    } elseif (empty($section) and is_numeric($unit)) {
        $section = 'unit_display';
    }
    if (empty($section)) {
        $section = 'main';
    }
} elseif (!isset($section) and is_numeric($exercise) or is_numeric($unit)) {
    $section = 'public_access';
} elseif (strcmp($section, 'acct_request') and strcmp($section, 'mb') and strcmp($section, 'public_access')) {
    $section = 'login';
}
/*
   each section has its own include file, which must return 123, this
   tells this main script that everything went fine. otherwise displays
   error. section is a parameter set as section=name_of_section parameter
   in url or as hidden field in forms..
*/
if (ereg('^[[:alnum:]_]+$', $section)) {
    @($r = (include "{$section}.inc"));
    if ($r != 123) {
        error_fl('The page you requested does not exist.');
    }
} else {
    error_fl('The page you requested does not exist.');
}
if ($GLOBALS['m'] == 'tuit') {
} else {
    echo $page->display($section == 'notepad');
}