<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Trippest
{
    protected $ci;

    public function __construct()
    {
        $this->ci =& get_instance();
    }

    public function tour_name($pag_code)
    {
        $name = "";
        switch ($pag_code) {
            case 'BJSIC-41':
                $name = "One Day Beijing Highlights Tour";
                break;
            case 'BJSIC-42':
                $name = "Two-Day Beijing Boutique Small Group Tour";
                break;
            case 'BJSIC-43':
                $name = "Three-Day Beijing Discovery Tour";
                break;

            default:
                # code...
                break;
        }
        return $name;
    }

    public function complex_tour()
    {
        return array(
            "BJSIC-41" => array(
                "name1" => "One Day Beijing Highlights Tour"
                ,"name2" => "北京精品一日游（目的地BJSIC-41）"
                ,"tours" => array(
                    "BJSIC-41"
                )
            )
            ,"BJSIC-42" => array(
                "name1" => "Two-Day Beijing Boutique Small Group Tour"
                ,"name2" => "北京精品两日游（目的地BJSIC-42）"
                ,"tours" => array(
                    "BJSIC-41","BJSIC-42"
                )
            )
            ,"BJSIC-43" => array(
                "name1" => "Three-Day Beijing Discovery Tour"
                ,"name2" => "北京精品三日游（目的地BJSIC-43）"
                ,"tours" => array(
                    "BJSIC-41","BJSIC-42","BJSIC-43"
                )
            )
            ,"XASIC-42" => array(
                "name1" => " "
                ,"name2" => " "
                ,"tours" => array(
                    "XASIC-41","XASIC-42"
                )
            )
        );
    }

    public function get_complex_pag($pag_code)
    {
        $all_set = $this->complex_tour();
        if (isset($all_set[$pag_code])) {
            return $all_set[$pag_code]['tours'];
        }
        return array($pag_code);
    }

    public function vendor_sourcetype()
    {
        return array(
            // 北京图兰朵
            "1343" => array(
                "sourcetype" => "32090"
                ,"vendor_name" => "北京图兰朵"
                ,"profit_rate" => 0.4
            )
            // 上海图兰朵
            ,"29188" => array(
                "sourcetype" => "32112"
                ,"vendor_name" => "上海图兰朵"
                ,"profit_rate" => 0.4
            )
            // 西安图兰朵
            ,"30548" => array(
                "sourcetype" => "32116"
                ,"vendor_name" => "西安图兰朵"
                ,"profit_rate" => 0.4
            )
            // 桂林地接
            // ,"628" => array(
            //     "sourcetype" => "32122"
            //     ,"vendor_name" => "桂林地接"
            //     ,"profit_rate" => 0.4
            // )
        );
    }


}

/* End of file trippest.php */
/* Location: ./third_party/trippestOrderSync/libraries/trippest.php */
