public function index() { $lang = change_language(); $status = 0; if (isset($_GET['status'])) { $status = intval($_GET['status']); } if ($status == 1) { if ((isset($_SESSION['AccUser']) || isset($_SESSION['object'])) && isset($_SESSION['Cart'])) { $data['MenuString'] = $this->m_index->getMenuStr(); $data['CommentString'] = $this->m_index->getCommentStr(); //nghia viet them theo ss cart moi $this->load->view($lang . '/successpay123', $data); } else { redirect("index"); } if (isset($_SESSION['check_goto123pay'])) { unset($_SESSION["check_goto123pay"]); } } else { if (isset($_SESSION['check_goto123pay'])) { unset($_SESSION["check_goto123pay"]); } redirect("cancelpay123"); } }
public function index() { $lang = change_language(); $res['listpro_limit4'] = $this->m_index->listpro_limit4(); $res['loaispcon'] = $this->m_index->layloaiconsp(); $res['MenuString'] = $this->m_index->getMenuStr(); $res['CommentString'] = $this->m_index->getCommentStr(); $res['SortBy'] = $this->m_category->GetSortBy(); $res['link_spainfo'] = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; $res['ProductTypeCap1'] = $this->m_category->GetProductTypeCap1(); $res['listtienichspa'] = $this->m_category->laytienichspa(); $res['listloaispa'] = $this->m_category->layloaispa(); if (isset($_SESSION['indexsearch'])) { $res['txtcategory'] = $_SESSION['indexsearch']['location']; if (isset($_SESSION['indexsearch']['producttype']) && $_SESSION['indexsearch']['producttype'] != "") { $name_childproducttype = $_SESSION['indexsearch']['producttype']; $id_childproducttype = $this->m_category->layidloaisp_theotenloaisp($name_childproducttype); //echo $id_childproducttype." "; $id_chaproducttype = substr($id_childproducttype, 0, 2); $res['id_childproducttype'] = $id_childproducttype; $res['id_chaproducttype'] = $id_chaproducttype; $res['list_childproducttype'] = $this->m_category->layloaispcon_theoidloaispcha($id_chaproducttype); //echo $res['id_chaproducttype']; //print_r($res['list_childproducttype']);die; } } $res['listspa'] = $this->m_category->searchspa(); $this->load->view($lang . '/category', $res); }
/** * sets a user preference in the database * if you want to set it in the session as well * use SESSION->set_account_preference * * @param int $userid user id to set preference for * @param string $field preference field to set * @param string $value preference value to set. */ function set_account_preference($userid, $field, $value) { if ($field == 'mobileuploadtoken' && (!isset($value) || empty($value) || is_array($value) && count($value) == 1 && (!isset($value[0]) || empty($value[0])))) { $value = ''; } if ($field == 'lang') { $oldlang = get_field('usr_account_preference', 'value', 'usr', $userid, 'field', 'lang'); if (empty($oldlang) || $oldlang == 'default') { $oldlang = get_config('lang'); } $newlang = empty($value) || $value == 'default' ? get_config('lang') : $value; if ($newlang != $oldlang) { change_language($userid, $oldlang, $newlang); } } if (record_exists('usr_account_preference', 'usr', $userid, 'field', $field)) { set_field('usr_account_preference', 'value', $value, 'usr', $userid, 'field', $field); } else { try { $pref = new StdClass(); $pref->usr = $userid; $pref->field = $field; $pref->value = $value; insert_record('usr_account_preference', $pref); } catch (Exception $e) { throw new InvalidArgumentException("Failed to insert account preference " . " {$value} for {$field} for user {$userid}"); } } }
public function index() { $lang = change_language(); /*---------------------------- |----------------------------- |check 123pay |----------------------------------*/ if (isset($_SESSION['AccUser'])) { $data['user_object'] = $this->m_checkout->layobjecttheouserid($_SESSION['AccUser']['User']->UserId); } if (isset($_SESSION['object'])) { $data['user_object'] = $this->m_checkout->layobjecttheObjectID($_SESSION['object']->ObjectId); } $data['arr_pay123'] = $this->m_checkout->check123pay(); /*---------------------------- |----------------------------- |check 123pay |----------------------------------*/ if ((isset($_SESSION['AccUser']) || isset($_SESSION['object'])) && isset($_SESSION['checkout1']) && isset($_SESSION['Cart'])) { $_SESSION['check2'] = "check2"; $data['MenuString'] = $this->m_index->getMenuStr(); $data['CommentString'] = $this->m_index->getCommentStr(); $data['Payment'] = $this->m_checkout->gethinhthucthanhtoan(); //$lang = $_SESSION['Lang']; $this->load->view($lang . '/checkout2', $data); } else { redirect("index"); } }
public function index() { $lang = change_language(); if (isset($_SESSION["check_goto123pay"])) { if ((isset($_SESSION['AccUser']) || isset($_SESSION['object'])) && isset($_SESSION['check2']) && isset($_SESSION['Cart'])) { $typefor123pay = $_SESSION['the']; //echo $typefor123pay;die; //$_SESSION['check123pay']="check123pay"; $data['MenuString'] = $this->m_index->getMenuStr(); $data['CommentString'] = $this->m_index->getCommentStr(); $data['arr_pay123'] = $this->m_checkout->check123pay(); $actual_link = 'http://' . $_SERVER['HTTP_HOST'] . base_url(); $data['ipaddress'] = $this->m_checkout->getRealIPAddress(); if (strpos($actual_link, "localhost") > 0 || strpos($actual_link, "127.0.0.1") > 0) { $data['ipaddress'] = "192.168.1.99"; } $data['typefor123pay'] = $typefor123pay; //echo $data['ipaddress'];die; /*echo "<pre>"; print_r($data['arr_pay123']); echo "</pre>";die;*/ if (isset($_SESSION['AccUser'])) { $data['user_object'] = $this->m_checkout->layobjecttheouserid($_SESSION['AccUser']['User']->UserId); } if (isset($_SESSION['object'])) { $data['user_object'] = $this->m_checkout->layobjecttheObjectID($_SESSION['object']->ObjectId); } $this->load->view($lang . '/check123pay', $data); } else { redirect("index"); } } else { redirect("checkout2"); } }
public function index() { $lang = change_language(); if (!isset($_SESSION['AccUser']) && isset($_SESSION['Cart'])) { $res['MenuString'] = $this->m_index->getMenuStr(); $res['CommentString'] = $this->m_index->getCommentStr(); //$lang = $_SESSION['Lang']; $this->load->view($lang . '/checkout', $res); } else { redirect("index"); } }
public function index() { $lang = change_language(); if (isset($_SESSION['AccUser'])) { $paywith = $this->uri->segment(3) ? $this->uri->segment(3) : 0; $data['paywith'] = $paywith; //$data['Payment']=$this->m_checkout->gethinhthucthanhtoan(); $this->load->view($lang . '/checkout3', $data); } else { redirect("index"); } }
public function index() { $lang = change_language(); $res['listpro_limit4'] = $this->m_index->listpro_limit4(); $res['loaispcon'] = $this->m_index->layloaiconsp(); $res['MenuString'] = $this->m_index->getMenuStr(); $res['SortBy'] = $this->m_category->GetSortBy(); $res['ProductTypeCap1'] = $this->m_category->GetProductTypeCap1(); $res['CommentString'] = $this->m_index->getCommentStr(); $res['HTMLInfo'] = $this->m_mail->GetHTML("tuyendung.html", $lang); $this->load->view($lang . '/tuyendung', $res); }
public function index() { $lang = change_language(); if (isset($_SESSION['AccUser'])) { $userid = $_SESSION['AccUser']['User']->UserId; $data['MenuString'] = $this->m_index->getMenuStr(); $data['CommentString'] = $this->m_index->getCommentStr(); $data['ttuser'] = $this->m_useredit->layobjecttheouserid($userid); $this->load->view($lang . '/useredit', $data); } else { redirect("index"); } }
public function index() { $lang = change_language(); $id = $this->uri->segment(3); if (isset($id) && $id != "") { $str = $this->m_checkout->previewbooking($id); } //print_r($str);die; if (isset($str) && $str != "") { $data['str'] = $str; } $data['MenuString'] = $this->m_index->getMenuStr(); $data['CommentString'] = $this->m_index->getCommentStr(); //$lang = $_SESSION['Lang']; $this->load->view($lang . '/previewbooking', $data); }
public function index() { $lang = change_language(); if ((isset($_SESSION['AccUser']) || isset($_SESSION['object'])) && isset($_SESSION['Cart']) && isset($_SESSION['mTransactionID'])) { $data['MenuString'] = $this->m_index->getMenuStr(); $data['CommentString'] = $this->m_index->getCommentStr(); //nghia viet them theo ss cart moi $this->m_checkout->cancelpay123(); $this->load->view($lang . '/cancelpay123', $data); //xoa het du lieu da add vao db } else { //redirect("index"); $data['MenuString'] = $this->m_index->getMenuStr(); $data['CommentString'] = $this->m_index->getCommentStr(); $this->load->view($lang . '/cancelpay123', $data); } }
public function index() { $lang = change_language(); $this->load->library('form_validation'); $this->form_validation->set_rules('username', 'User name', 'required'); $this->form_validation->set_rules('password', 'Password', 'required'); //$this->form_validation->set_rules('captcha','Code ID','required'); $lang = $_SESSION['Lang']; $this->form_validation->set_message('required', '<center><span style="color:red; clear:both; text-align:right;">%s not null</span></center>'); if ($this->form_validation->run()) { $username = $this->input->post('username'); $password = $this->input->post('password'); $user = $this->m_user->lay_nguoi_dung($username, $password); if (!$user) { $this->session->set_flashdata('flashmss', '<center><span style="color:red;">Wrong username or password</span></center>'); } else { // 1 - load user $arr_user = $this->m_user->lay_User_theo_id1($username); // 2 - load Object $arr_Object = $this->m_user->lay_object_theo_ObjectID($arr_user[0]->ObjectId); // 3 - Load Role $arr_Role = $this->m_user->lay_Role_theo_RoleID($arr_user[0]->RoleId); // 4 - Load RoleMenuModule $arr_RoleMenuModule = $this->m_user->lay_RoleMenuModule_theo_RoleID($arr_user[0]->RoleId); // chuoi menu $menuStr = $this->GetMenuStr($arr_user[0]->RoleId); // lấy các module có quyèn $module = $this->m_index->GetModuleOfRole($arr_user[0]->RoleId); $arr_session = array("User" => $arr_user[0], "Object" => $arr_Object[0], "Role" => $arr_Role[0], "ListMenu" => $arr_RoleMenuModule, "MenuSTR" => $menuStr, "CacModule" => $module); $_SESSION['AccUser'] = $arr_session; if (isset($_SESSION['object'])) { unset($_SESSION['object']); } //echo $arr_user[0]->RoleId; //print($menuStr); // die; //$_SESSION['user_name']=$user->UserId; $LastLogin = date("Y-m-d h:m:s"); $this->m_user->update_lastlogin_user($user->UserId, $LastLogin); //$this->session->set_userdata($arr_session); redirect('admin/welcome'); } //} } $this->load->view($lang . '/login'); }
public function index() { $lang = change_language(); if (isset($_SESSION['AccUser'])) { $userid = $_SESSION['AccUser']['User']->UserId; $data['MenuString'] = $this->m_index->getMenuStr(); $data['count_bookingid'] = $this->m_indexuser->countbookingid(); //print_r($data['count_bookingid']);die; $data['CommentString'] = $this->m_index->getCommentStr(); $data['ttuser_db2'] = $this->m_indexuser->layuser_db2_theouserid($userid); //lay table user trong database 2 //print_r($res['ttuser_db2']);die; $data['ttuser'] = $this->m_useredit->layobjecttheouserid($userid); $this->load->view($lang . '/indexuser', $data); } else { redirect("index"); } }
public function index() { $lang = change_language(); $id = $this->uri->segment(3); //id spa if (isset($id) && $id != "") { $data['ttsp'] = $this->m_productdetail->layproduct_theoma($id); $this->m_spadetail->countview($data['ttsp']->SpaID); if (count($data['ttsp']) > 0) { $data['MenuString'] = $this->m_index->getMenuStr(); $data['CommentString'] = $this->m_index->getCommentStr(); $this->load->view($lang . '/productdetail', $data); } else { redirect('index'); } } else { redirect('index'); } }
public function index() { $lang = change_language(); $res['listpro_limit4'] = $this->m_index->listpro_limit4(); $res['loaispcon'] = $this->m_index->layloaiconsp(); $res['MenuString'] = $this->m_index->getMenuStr(); $res['CommentString'] = $this->m_index->getCommentStr(); $res['SortBy'] = $this->m_category->GetSortBy(); $res['ProductTypeCap1'] = $this->m_category->GetProductTypeCap1(); $res['listtienichspa'] = $this->m_category->laytienichspa(); $res['listloaispa'] = $this->m_category->layloaispa(); if (isset($_SESSION['indexsearch'])) { $res['txtcategory'] = ""; if (isset($_SESSION['indexsearch']['location'])) { $res['txtcategory'] = $_SESSION['indexsearch']['location']; } if (isset($_SESSION['indexsearch']['producttype']) && $_SESSION['indexsearch']['producttype'] != "") { $name_childproducttype = $_SESSION['indexsearch']['producttype']; $id_childproducttype = $this->m_category->layidloaisp_theotenloaisp($name_childproducttype); //echo $id_childproducttype." "; $id_chaproducttype = substr($id_childproducttype, 0, 2); $res['id_childproducttype'] = $id_childproducttype; $res['id_chaproducttype'] = $id_chaproducttype; $res['list_childproducttype'] = $this->m_category->layloaispcon_theoidloaispcha($id_chaproducttype); //echo $res['id_chaproducttype']; //print_r($res['list_childproducttype']);die; } if (isset($_SESSION['indexsearch']['producttypepanter']) && $_SESSION['indexsearch']['producttypepanter'] != "") { $commonID = $_SESSION['indexsearch']['producttypepanter']; $res['CommonID_Cha'] = $_SESSION['indexsearch']['producttypepanter']; $res['list_productypeCon'] = $this->m_category->layloaispcon_theoidloaispcha($commonID); } // check loại sản phẩm loại cha } $res['listspa'] = $this->m_category->searchspa(); /*echo "<pre>"; print_r($res['listspa']); echo "</pre>";die;*/ $this->load->view($lang . '/category', $res); }
public function index() { $lang = change_language(); if (isset($_REQUEST['mTransactionID'])) { $mTransactionID = $_REQUEST['mTransactionID']; $bankCode = $_REQUEST['bankCode']; $transactionStatus = $_REQUEST['transactionStatus']; $description = $_REQUEST['description']; $ts = $_REQUEST['ts']; $checksum = $_REQUEST['checksum']; $sMySecretkey = 'SPATHEBOOKINGVNoOAj5Aj8AN'; //key use to hash checksum that will be provided by 123Pay $sRawMyCheckSum = $mTransactionID . $bankCode . $transactionStatus . $ts . $sMySecretkey; $sMyCheckSum = sha1($sRawMyCheckSum); if ($sMyCheckSum != $checksum) { $this->response($mTransactionID, '-1', $sMySecretkey); } $iCurrentTS = time(); $iTotalSecond = $iCurrentTS - $ts; $processResult = $this->process($mTransactionID, $bankCode, $transactionStatus); $this->response($mTransactionID, $processResult, $sMySecretkey); } }
public function index() { $lang = change_language(); $res['listpro_limit4'] = $this->m_index->listpro_limit4(); $res['loaispcon'] = $this->m_index->layloaiconsp(); $res['MenuString'] = $this->m_index->getMenuStr(); $res['SortBy'] = $this->m_category->GetSortBy(); $res['ProductTypeCap1'] = $this->m_category->GetProductTypeCap1(); //nghia viet them 25/12/2014 $res['dsloai'] = $this->m_news->laytatcaloainews(); $res['dstintucmoinhat'] = $this->m_news->laytintucmoi(); $res['dstintheoloaidautien'] = $this->m_news->laydstin_theoloaidautien(); $res['CommentString'] = $this->m_index->getCommentStr(); $segment3 = $this->uri->segment(3); if (isset($segment3) && $segment3 != "") { $newsid = $segment3; } else { if (isset($res['dstintucmoinhat']) && count($res['dstintucmoinhat']) > 0) { $newsid = $res['dstintucmoinhat'][0]->id; } else { $newsid = -1; } } if ($newsid != -1 && $newsid != "-1") { $res['mainnews'] = $this->m_news->laytintuc_theomatintuc($newsid); $hinh = $this->m_news->layhinhtintuc_theomatintuc($newsid); if (count($hinh) > 0) { $res['hinh'] = $hinh; } if (isset($res['mainnews']) && count($res['mainnews']) > 0) { $res['listmainnews'] = $this->m_news->dstintuc_theomaloaitintuc_khacid($res['mainnews']->CategoryID, $res['mainnews']->id); } } //echo $a;die; $this->load->view($lang . '/news', $res); }
if ($ip) { if (!preg_match("#:#", $ip)) { $ip = $ip . ":80"; } } $provdata = get_prov_data(); foreach ($provdata as $key => $value) { if ($value['ip'] == $ip) { $exten = $key; } } if (!isset($exten)) { exit; } // Change to Userlanguage $sip_array = change_language($exten); function snom_menu() { print "<SnomIPPhoneMenu>"; printf("<Title>%s</Title>", _("Phonebook Switch")); // Privat Phonebook printf("<MenuItem>"); printf("<Name>%s</Name>", _("Privat Phonebook")); printf("<URL>http://%s%s?action=privat</URL>", $_SERVER['HTTP_HOST'], $_SERVER['PHP_SELF']); printf("</MenuItem>"); // Global Phonebook printf("<MenuItem>"); printf("<Name>%s</Name>", _("Global Phonebook")); printf("<URL>http://%s%s?action=global</URL>", $_SERVER['HTTP_HOST'], $_SERVER['PHP_SELF']); printf("</MenuItem>"); // Company/Internal Directory
public function index() { $lang = change_language(); $this->load->view('ViewTest1'); }
public function Change_Language() { // $data = $_POST['language']; echo $lang = change_language(); }
public function index() { $lang = change_language(); $this->load->library('form_validation'); $this->form_validation->set_rules('username', 'User name', 'required'); $this->form_validation->set_rules('password', 'Password', 'required'); //$this->form_validation->set_rules('captcha','Code ID','required'); // $lang = $_SESSION['Lang']; $this->form_validation->set_message('required', '<center><span style="color: red;clear: both;text-align: right;font-size: 12px;font-weight: bold;">%s is required</span></center>'); if ($this->form_validation->run()) { $username = $this->input->post('username'); $password = $this->input->post('password'); $user = $this->m_user->lay_nguoi_dung($username, $password); // print_r($user->UserId); // return; if (!$user) { $_SESSION['error'] = "Sorry, we were unable to log you in. Please check your username and password are correct."; redirect('spaman/login'); } else { // 1 - load user $arr_user = $this->m_user->lay_User_theo_id1($username); // print_r($arr_user[0]->UserId); // // 2 - load Object // $arr_Object = $this->m_user->lay_object_theo_ObjectID($arr_user[0]->ObjectId); // // print_r($arr_Object); // // 3 - Load Role // $arr_Role = $this->m_user->lay_Role_theo_RoleID($arr_user[0]->RoleId); // // print_r($arr_Role); // // 4 - Load RoleMenuModule // $arr_RoleMenuModule = $this->m_user->lay_RoleMenuModule_theo_RoleID($arr_user[0]->RoleId); // // print_r($arr_RoleMenuModule); // 5 - Load Spa $arr_Spa = $this->m_spa->lay_info_Spa($arr_user[0]->UserId); if (!$arr_Spa) { $_SESSION['error'] = "Sorry, we were unable to log you in. Please check your username and password are correct."; redirect('spaman/login'); } // print_r($arr_Spa); // return; // chuoi menu //$menuStr = $this->GetMenuStr($arr_user[0]->RoleId); // // lấy các module có quyèn // $module = $this->m_index->GetModuleOfRole($arr_user[0]->RoleId); // // $id_spa = $arr_user[0]->UserId; $arr_session = array("spaid" => $arr_Spa[0]->spaID, "User" => $arr_user[0]); $_SESSION['AccSpa'] = $arr_session; if (isset($_SESSION['object'])) { unset($_SESSION['object']); } //echo $arr_user[0]->RoleId; //print($menuStr); // die; //$_SESSION['user_name']=$user->UserId; $LastLogin = date("Y-m-d H:m:s"); $this->m_user->update_lastlogin_user($user->UserId, $LastLogin); //$this->session->set_userdata($arr_session); redirect('spaman/spa_statistics'); } //} } $this->load->view($lang . '/spamanagement/login'); }
public function index() { $lang = change_language(); //nghia them session de lam cart /*$arr_pro1=array( array("proid"=>"0100010223000002","Qty"=>2,"Price"=>500000,"FromTime"=>'2014-12-11 01:04:32',"ToTime"=>'2014-12-11 02:04:32'), array("proid"=>"0220141119000001","Qty"=>1,"Price"=>700000,"FromTime"=>'2014-12-12 12:55:32',"ToTime"=>'2014-12-11 13:55:32') ); $arr_spa1=array( "spaid"=>"3320141118000001", "list_product"=>$arr_pro1 ); $arr_pro2=array( array("proid"=>"0220141119000004","Qty"=>1,"Price"=>400000,"FromTime"=>'2014-12-10 07:40:32',"ToTime"=>'2014-12-11 08:40:32'), array("proid"=>"0100010223000005","Qty"=>1,"Price"=>200000,"FromTime"=>'2014-12-12 05:15:32',"ToTime"=>'2014-12-11 06:15:32'), array("proid"=>"0220141204000001","Qty"=>3,"Price"=>900000,"FromTime"=>'2014-12-15 12:23:32',"ToTime"=>'2014-12-11 13:23:32') ); $arr_spa2=array( "spaid"=>"3320141118000003", "list_product"=>$arr_pro2 ); $arr_spa=array(); $arr_spa[]=$arr_spa1; $arr_spa[]=$arr_spa2; $_SESSION['Cart']=$arr_spa;*/ /*echo "<pre>"; print_r($_SESSION['Cart']); echo "</pre>";die;*/ /*$arr_sanpham=array( //array("SpaID","ProductID","Qty","Price","Status","FromTime","ToTime"), array("spaName"=>"The Beauty Lounge London Ltd, Hounslow","SpaAdd"=>"114 Nguyen Du, Q3", "ProductID"=>"0100010223000002","ProductName"=>"Spa tối ngày sáng đêm","Qty"=>"2","Price"=>"1500000","AmtBT"=>"3000000","FromTime"=>"2014-12-11 01:04:32","ToTime"=>"2014-12-11 03:04:32"), array("spaName"=>"Fami Hair & Beauty Institute, Ilford","SpaAdd"=>"214 le loi, Q1","ProductID"=>"0100010223000013","ProductName"=>"Spa sáng ngày tối đêm","Qty"=>"3","Price"=>"2500000","AmtBT"=>"7500000","FromTime"=>"2014-12-11 04:04:32","ToTime"=>"2014-12-11 05:15:32"), array("spaName"=>"Nhà của Nghĩa", "SpaAdd"=>"1 Nguyen Trai, Q1","ProductID"=>"0100010223000005","ProductName"=>"Massage cả đêm","Qty"=>"3","Price"=>"3000000","AmtBT"=>"9000000","FromTime"=>"2014-12-11 12:25:32","ToTime"=>"2014-12-11 16:55:19") ); $_SESSION['Cart']=$arr_sanpham;*/ //echo "<pre>"; //print_r($_SESSION['Cart']); //echo "</pre>"; //echo "<br><br>"; if ((isset($_SESSION['AccUser']) || isset($_SESSION['object'])) && isset($_SESSION['Cart'])) { $res['listpro_limit4'] = $this->m_index->listpro_limit4(); $res['loaispcon'] = $this->m_index->layloaiconsp(); $res['MenuString'] = $this->m_index->getMenuStr(); $res['CommentString'] = $this->m_index->getCommentStr(); //nghia viet them theo ss cart moi $arr_session = array(); //chua tat ca thong tin day du cua session cart foreach ($_SESSION['Cart'] as $row_cart) { $spaid = $row_cart['spaid']; $ttspa = $this->m_checkout->layttspatheoid($spaid); // lay thong tin cua spa theo id $arr_product = array(); foreach ($row_cart['list_product'] as $key => $row_pro) { $onerow_pro = $this->m_checkout->layproducttheoid($row_pro['ProductID'], $row_pro['Qty'], $row_pro['Price'], $row_pro['FromTime'], $row_pro['ToTime']); //$arr_product[]=$onerow_pro; array_push($arr_product, $onerow_pro); } $onerow_spa = array("spa" => $ttspa, "list_pro" => $arr_product); //gom lai thanh 1 dong chua day du thong tin cua spa va sp cua spa do array_push($arr_session, $onerow_spa); } //echo "<pre>"; //print_r($arr_session); //echo "</pre>";die; $_SESSION['check1'] = $arr_session; $res['list_info_session'] = $arr_session; //end nghia viet them theo ss cart moi $this->load->view($lang . '/checkout1', $res); } else { if ((!isset($_SESSION['AccUser']) || !isset($_SESSION['object'])) && isset($_SESSION['Cart'])) { redirect("checkout"); } else { redirect("index"); } } }
public function index() { $lang = change_language(); $id = $this->uri->segment(3); //id spa if (isset($id) && $id != "") { $this->m_spadetail->countview($id); $data['ttspa'] = $this->m_spadetail->getspa($id); $data['link_spainfo'] = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; if (count($data['ttspa']) > 0) { $data['timehoatdong'] = $this->m_spadetail->loadtimehoatdong($id); $data['info'] = $this->m_spadetail->loadspainfo($id); //tien ich cua spa $data['spatype'] = $this->m_spadetail->layhinhthucspa_theospaid($id); //loai spa, hinh thuc spa $data['spalocation'] = $this->m_spadetail->getspalocationID($id); $loaispcuaspa = $this->m_spadetail->loadloaisanpham($id); //loai san pham cua spa cung cap if (count($loaispcuaspa) > 0) { $arr_protype_pro = array(); //mang list product type va product cua producttype do foreach ($loaispcuaspa as $row) { $tenproducttype = $this->m_spadetail->laytenproducttypetheoid($row->ProductType); $list_pro = $this->m_spadetail->loadsanpham($id, $row->ProductType); if (count($list_pro) > 0) { $arr_protype_pro[$tenproducttype->StrValue2] = $list_pro; } } $data['arr_protype_pro'] = $arr_protype_pro; } /*echo "<pre>"; print_r($data['arr_protype_pro']); echo "</pre>";die;*/ // echo 'aaaaaaaaaa'; $cmtcap1 = $this->m_spadetail->loadcommentfirst($id); //load cmt cap 1 cua spa if (count($cmtcap1) > 0) { $arr_cmt = array(); //mang list product type va product cua producttype do foreach ($cmtcap1 as $row_cmt1) { $list_cmt2 = $this->m_spadetail->loadcommentafter($id, $row_cmt1->id); $arr_cmt[$row_cmt1->id . "___" . $row_cmt1->FullName . "___" . $row_cmt1->Content] = $list_cmt2; } $data['arr_cmt'] = $arr_cmt; } /*echo "<pre>"; print_r($data['arr_cmt']); echo "</pre>"; die;*/ $data['hinhspa'] = $this->m_spadetail->loadhinhspa($id); //load list hinh cua spa $data['MenuString'] = $this->m_index->getMenuStr(); $data['CommentString'] = $this->m_index->getCommentStr(); $data['listspatt'] = $this->m_spadetail->getlistspa(); //$data['imagefrist'] = $this->m_spadetail->getfristhinh($id); $this->load->view($lang . '/spadetail', $data); } else { redirect('index'); } } else { redirect('index'); } }
public function index() { $lang = change_language(); $res['MenuString'] = $this->m_index->getMenuStr(); $res['CommentString'] = $this->m_index->getCommentStr(); $res['ProvinceString'] = $this->m_register->get_provincel(); $this->load->view($lang . '/register', $res); }
<script type="text/javascript" src="<?php echo base_url(); ?> public/scripts/jquery.tablesorter.js"></script> <script src="<?php echo base_url(); ?> public/scripts/jquery-tools-min.js"></script> <link href="<?php echo base_url(); ?> public/styles/style.css" rel="stylesheet" type="text/css" /> </head> <?$redirect_url = get_redirect_url();?> <?change_language($lang);?> <body> <div id="header_full"> <div id="header_960"> <div id="logo"><img src="<?php echo base_url(); ?> public/styles/images/logo.gif" alt="" border="0" /></div> <div id="header_menu"> <div id="welcom_name"><?php echo gettext("Welcome"); ?> <span><?php echo $this->session->userdata['name']; ?>
/** * Function view spa user page * Date: 14/04/2015 * URL Page: spaman/spa_user * Rewrite routing: file config/routes.php * @param * @return Show spa Page */ public function spa_report() { $lang = change_language(); $p_arr = array('title' => 'Báo cáo spa ', 'p_custom_js' => $this->load->view($lang . '/spamanagement/js/js_spa_report_view', '', TRUE)); //print_r($_SESSION); $spaid = $_SESSION["AccSpa"]["spaid"]; // return; $spa_report = $this->m_common->get_spa_report_by_spaid($spaid); $arr_spareport = array("spa_report" => $spa_report); /* |---------------------------------------------------------------- | Load Head View | Load Header View | Load Left View | Load spa hour View | Load Footer View |---------------------------------------------------------------- */ $this->load->view($lang . "/spamanagement/common/head_view", $p_arr); $this->load->view($lang . "/spamanagement/common/header_view"); $this->load->view($lang . "/spamanagement/common/left_view"); $this->load->view($lang . "/spamanagement/spa_report_view", $arr_spareport); $this->load->view($lang . "/spamanagement/common/footer_view"); }
<?php if (isset($_GET['lang'])) { change_language($_GET['lang']); } else { if (!isset($_COOKIE['lang'])) { //if no language is selected set language as Estonian set_language('et'); } else { set_language($_COOKIE['lang']); } } //sets language and changes cookie accordingly function change_language($id) { setcookie('lang', $id, time() + 30000000); set_language($id); } //Sets language used function set_language($id) { $lang_file = realpath(dirname(__FILE__)) . "\\lang_" . $id . ".php"; if (is_file($lang_file) && file_exists($lang_file)) { include_once $lang_file; } else { include_once realpath(dirname(__FILE__)) . "\\lang_et.php"; } }