当前位置: 首页>>代码示例>>PHP>>正文


PHP change_language函数代码示例

本文整理汇总了PHP中change_language函数的典型用法代码示例。如果您正苦于以下问题:PHP change_language函数的具体用法?PHP change_language怎么用?PHP change_language使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了change_language函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 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");
     }
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:26,代码来源:successpay123.php

示例2: 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['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);
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:29,代码来源:category__ver2.php

示例3: set_account_preference

/**
 * 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}");
        }
    }
}
开发者ID:patkira,项目名称:mahara,代码行数:38,代码来源:user.php

示例4: index

 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");
     }
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:29,代码来源:checkout2.php

示例5: 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");
     }
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:35,代码来源:check123pay.php

示例6: index

 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");
     }
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:12,代码来源:checkout.php

示例7: 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");
     }
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:12,代码来源:checkout3.php

示例8: 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);
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:12,代码来源:tuyendung.php

示例9: index

 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");
     }
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:13,代码来源:useredit.php

示例10: 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);
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:16,代码来源:previewbooking.php

示例11: index

 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);
     }
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:17,代码来源:cancelpay123.php

示例12: index

 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');
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:46,代码来源:login.php

示例13: index

 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");
     }
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:18,代码来源:indexuser.php

示例14: 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');
     }
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:19,代码来源:productdetail.php

示例15: 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);
 }
开发者ID:OcNetVN,项目名称:Spa,代码行数:40,代码来源:category.php


注:本文中的change_language函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。