function get_TS_info($sno) { $len = strlen($sno); //print_R($len); if ($len == 6) { $info = get_Teacherinfo($sno); } elseif ($len == 10) { $info = get_Userinfo($sno); } else { return false; } // print_R($info); if ($info) { return $info; } return false; }
function getCollegeid_s() { $arr = array(); $usernumb = $_SESSION['usernumb']; if (strlen($usernumb) == 6) { $info = get_Teacherinfo($usernumb); } if (strlen($usernumb) == 10) { $info = get_Userinfo($usernumb); } $collegeid = $info['collegeid']; //老师的学员id if ($collegeid) { $arr['collegeid'] = $collegeid; $arr['usernumb'] = $usernumb; $arr['authority'] = $_SESSION['authority']; return $arr; } return false; }