public function action_index() { $seotitle = Common::getSysPara('cfg_indextitle'); $keyword = Common::getSysPara('cfg_keywords'); $description = Common::getSysPara('cfg_description'); $this->assign('seotitle', $seotitle); $this->assign('keyword', $keyword); $this->assign('description', $description); $this->display('index'); }
public function action_pay() { $orderid = $this->params['orderid']; $model = new Model_Member_Order(); $info = $model->getOrderDetail($orderid); $totalprice = $info['price'] * $info['dingnum'] + $info['childprice'] * $info['childnum'] + $info['oldprice'] * $info['oldnum']; $info['depoist'] = $info['dingjin'] * ($info['dingnum'] + $info['childnum'] + $info['oldnum']); $info['totalprice'] = $totalprice; $cfg_pay_type = Common::getSysPara('cfg_pay_type'); $pay_arr = explode(',', $cfg_pay_type); if (in_array(6, $pay_arr)) { $this->assign('isXianxia', 1); } $this->assign('paytypes', $pay_arr); $this->assign('info', $info); $this->display('public/fukuan'); }
public function action_show() { $id = $this->params['id']; $tel = Common::getSysPara('cfg_phone'); //详细信息 $row = ORM::factory('visa')->where("id={$id}")->find()->as_array(); if (empty($row['litpic'])) { $row['litpic'] = Common::getDefaultImage(); } //签证国家 if (!empty($row['nationid'])) { $area = ORM::factory('visa_area')->where("id=" . $row['nationid'])->find()->as_array(); $row['country'] = $area['kindname']; } //签证类型 if (!empty($row['visatype'])) { $visatype = ORM::factory('visa_kind')->where("id=" . $row['visatype'])->find()->as_array(); $row['kindname'] = $visatype['kindname']; } //签发城市 if (!empty($row['cityid'])) { $visacity = ORM::factory('visa_city')->where("id=" . $row['cityid'])->find()->as_array(); $row['cityname'] = $visacity['kindname']; } $this->assign('row', $row); $this->assign('phone', $tel); $this->display('visa/show'); }
public function before() { $params = $this->request->param('params'); $this->params = $this->analyze_param($params); $this->assign('cmsurl', URL::site()); //手机版相对地址 $this->assign('computerurl', $GLOBALS['cfg_deskurl']); //电脑版地址 $this->assign('weburl', $GLOBALS['cfg_basehost']); //当前域名 $this->assign('publicurl', $GLOBALS['cfg_public_url']); //公共资源css,images地址 $this->assign('webname', Common::getSysConf('value', 'cfg_webname', 0)); //当前站点名. $this->assign('logo', Common::getSysPara('cfg_m_logo')); $this->assign('cmscontroller', $this->request->controller()); //$controller = $this->request->controller(); //用户是否登陆 $session_mobile = Session::instance()->get('mobile'); $cookie_mobile = Cookie::get('mobile'); if (!empty($session_mobile)) { $GLOBALS['userinfo'] = Common::checkLogin($session_mobile); } else { if (!empty($cookie_mobile)) { $GLOBALS['userinfo'] = Common::checkLogin($session_mobile); } } $this->assign('user', $GLOBALS['userinfo']); /*if($controller != 'login') { $needCheck=1;//uplodify检测 if ($_SERVER['HTTP_USER_AGENT'] == 'Shockwave Flash') { $needCheck=0; // avoid uplodify check. } if($needCheck) { $session = Session::instance(); $session_username = $session->get('username'); $cookie_username = Cookie::get('username'); if(!isset($session_username) && !isset($cookie_username)) { $this->request->redirect('login/index'); } else if(isset($cookie_username)&&!isset($session_username)) { $sql="select * from sline_admin where username='******'"; $curuser=DB::query(1,$sql)->execute()->as_array(); if(empty($curuser[0]['id'])) { $this->request->redirect('login/index'); } $session = Session::instance(); $session->set('username',$curuser[0]['username']); $session->set('userid',$curuser[0]['id']); $session->set('roleid',$curuser[0]['roleid']); $rolemodule=ORM::factory('role_module')->where("roleid='{$curuser[0]['roleid']}'")->as_array(); $session->set('rolemodule',$rolemodule); } /* if(empty($username)) { $this->request->redirect('login/index'); } } }*/ }
public function action_show() { $tel = Common::getSysPara('cfg_phone'); $lineid = $this->params['id']; if (empty($lineid)) { echo "产品信息错误!"; exit; } //产品信息 $row = ORM::factory('line')->where("id={$lineid}")->find()->as_array(); $row['lineprice'] = Model_Line::getMinPrice($lineid); if (empty($row['litpic'])) { $row['litpic'] = Common::getDefaultImage(); } $row['lineseries'] = Common::getSeries($row['id'], '01'); //线路编号 $row['satisfyscore'] = empty($row['satisfyscore']) ? $row['satisfyscore'] : $row['satisfyscore'] . '%'; //如果行程类型为2 if ($row['isstyle'] == '2') { $temjeishao = ORM::factory('line_jieshao')->where("lineid=" . $row['id'])->order_by("day", 'asc')->limit($row['lineday'])->get_all(); /*foreach ($temjeishao as $key => $value) { //$value['jieshao'] = strip_tags($value['jieshao']); //$value['jieshao'] = Common::clearHtml($value['jieshao']); $temjeishao[$key]['jieshao'] = $value['jieshao']; }*/ $row['linejieshao_arr'] = $temjeishao; } else { } //产品图片 if (!empty($row['piclist'])) { $temarr = explode(",", $row['piclist']); foreach ($temarr as $key => $value) { $row['pic_arr'][$key] = explode("||", $value); } } $this->assign('linedisc', ORM::factory('line_content')->where("webid=0 and isopen=1 and isline=0 and columnname<>'linespot'")->order_by("displayorder", 'asc')->get_all()); $this->assign('row', $row); $this->assign('phone', $tel); $this->display('lines/show'); }
public function action_show() { $id = $this->params['id']; $tel = Common::getSysPara('cfg_phone'); //详细信息 $row = ORM::factory('tuan')->where("id={$id}")->find()->as_array(); $row['picturelist'] = Model_Tuan::handlePicture($row['piclist']); $row['score'] = Model_Comment::getScore($row['id'], 13); $this->assign('tuan', $row); $this->assign('phone', $tel); $this->display('tuan/show'); }