Esempio n. 1
0
 /**
  * 得到收藏的学校ID
  * @access public
  * @param  $id int 专业ID
  * @return string
  * @author liuxiaolin <*****@*****.**>
  */
 public function getCourseTpl($id)
 {
     $majorModel = M('university_majorlang');
     $lang = LANG_SET;
     $field = 'a.fid as id, a.us_id, a.su_id, a.sub_id, a.name, a.introduction, a.apply_way,
               a.category, a.degree, a.addr, b.url, b.duration, b.start_time, b.tuition, b.a_tuition, b.s_ship, b.p_ship,c.stip_val';
     $where = array('a.fid' => $id, 'a.lang' => $lang);
     $join = array('inner join __UNIVERSITY_MAJOR__ as b on b.id = a.fid left join __UNIVERSITY__ c ON a.us_id=c.id');
     //得到专业信息
     $majorData = $majorModel->alias('a')->field($field)->join($join)->where($where)->find();
     $time = date('Y-m', time());
     $timeArr = explode('-', $time);
     if ($timeArr[1] >= 9) {
         $res = $timeArr[0] + 1;
     } else {
         $res = $timeArr[0];
     }
     $majorData['year'] = $res;
     //处理入学时间;
     $majorData['start_time'] = month_map($majorData['start_time']);
     if ($majorData['tuition'] == 0) {
         $majorData['tuition'] = '--';
     }
     $courseModel = M('university_major_courselang');
     $field = 'a.name';
     $where = array('a.mj_id' => $id, 'a.lang' => $lang);
     $join = array('inner join __UNIVERSITY_MAJOR_COURSE__ as b on b.id = a.fid');
     //得到课程信息
     $courseData = $courseModel->alias('a')->field($field)->join($join)->where($where)->select();
     //处理专业详情及课程
     $img = new \Home\Lib\CreatePic();
     if (is_wap()) {
         $width = 480;
     } else {
         $width = 800;
     }
     $majorData['introduction'] = $img->gen($majorData['introduction'], $width, 11);
     $course = $img->gen(array_column($courseData, "name"), $width, 11);
     $this->assign('major', $majorData);
     $this->assign('course', $course);
     if (is_wap()) {
         $url = T('bootstrap/Match/courseTpl');
     } else {
         $url = T('default/Match/courseTpl');
     }
     $html = $this->fetch($url);
     echo $html;
 }
Esempio n. 2
0
 private function university($id, $lang)
 {
     $universityModel = M('university');
     $join = "left join __UNIVERSITYLANG__ b on a.id=b.fid";
     $where = "a.id={$id} and b.lang='{$lang}' and a.is_del=0 and b.is_del=0";
     $universityData = $universityModel->alias('a')->field('a.id,a.first,a.is_coop,a.telephone,
         a.post_code,a.link,a.pcode,a.rank,a.k,a.logo,b.name,b.country,b.area,b.city,
         b.addr,b.introduction,b.achieve')->join($join)->where($where)->find();
     if ($universityData['rank'] == 999) {
         $universityData['rank'] = '--';
     }
     //处理学校详情及课程
     $img = new \Home\Lib\CreatePic();
     $universityData['introduction_img'] = $img->gen(strip_tags($universityData['introduction']), 1080, 12);
     if ($universityData) {
         return $universityData;
     }
     return null;
 }
Esempio n. 3
0
 public function xxx()
 {
     $str = "The Cambridge MFin is a one year, full time post experience Masters degree taught at Cambridge Judge Business School. It provides an academically rigorous and commercially relevant programme; enabling finance professionals to consolidate their existing experience and develop their future careers in finance. Teaching focuses on the theory and practice of finance, drawing upon the highly successful education provided at Cambridge Judge Business School, as well as the University of Cambridge’s long heritage of teaching and research in finance and related disciplines. The programme has access to a strong network of finance practitioners and institutions to help deliver its goal of a rigorous but commercially relevant programme. Entry into the degree is highly competitive, and students must have a strong academic record and at least two years successful work experience in finance.  ";
     $arr = ['xxxxx', 'xxxxx', 'xxxxx', 'xxxxx', 'xxxxx', 'xxxxx', 'xxxxx', 'xxxxx', 'xxxxx'];
     $img = new \Home\Lib\CreatePic();
     $imgcode = $img->gen($arr, 800, 12);
     echo "<img src='" . $imgcode . "'/>";
 }