Ejemplo n.º 1
0
function academy_change_priority($table, $value, $course_id)
{
    global $db;
    $va = (int) base_nulltest($value);
    $query = "update " . table($table) . "  set course_priority = course_priority +" . $va . "   where course_id = " . $test_id;
    print_r($query);
    return $db->sql($query);
}
Ejemplo n.º 2
0
function user_islogin()
{
    if (base_nulltest($_COOKIE['twt_account']) != "" && base_nulltest($_COOKIE['twt_authkey']) != "" && $_COOKIE['twt_account'] == $_SESSION['twt_account'] && $_COOKIE['twt_authkey'] == $_SESSION['twt_authkey'] && base_nulltest($_SESSION['twt_uid']) > 0 && isset($_SESSION['realname'])) {
        return true;
    }
    // global $repo;
    // if(!is_array($repo))
    // 	$repo=array();
    // $repo[]=base_nulltest($_COOKIE['twt_account']);
    // $repo[]=base_nulltest($_COOKIE['twt_authkey']);
    // $repo[]=$_SESSION['twt_account'];
    // $repo[]=$_COOKIE['twt_account']==$_SESSION['twt_account'];
    // $repo[]=$_COOKIE['twt_authkey']==$_SESSION['twt_authkey'];
    // $repo[]=base_nulltest($_SESSION['twt_uid'])>0;
    // $repo[]=isset($_SESSION['realname']);
    // print_r($repo);
    return false;
}