function uset_url($ln_type)
{
    // $ln_type 	轉換網頁的方式
    // $[lc_msg]	轉換網頁前要顯示的訊息, 如果傳入"", 則不會顯示 [對話框]
    // $[lc_url]	要轉換的目標 [網頁] , 可含或不含網址 (ln_type = 2 時,本參數可傳入空白, 其他方式則要傳入), 不傳入則預設網址為 ""
    // $[lc_time]	如果 ln_type = 1, 則本參數為 [暫停的秒數] (ln_type = 2,3,4 時,本參數可傳入空白, 其他方式則要傳入), 不傳入則預設為 3 秒
    $m_args = func_get_args();
    $m_alen = count($m_args);
    $lc_url = "";
    $lc_time = 3;
    if ($m_alen >= 2) {
        // 有傳入第2個參數時
        if (!empty($m_args[1])) {
            echo "<script> alert('" . $m_args[1] . "'); </script>";
            // 另一種方式, 但是本方式須於程式開頭先下 ob_start(), 結尾下 ob_end_flush()
            //			Header("refresh:3;URL=http://www.aiguli.com/test/tenco/insert.php") ;
        }
    }
    if ($m_alen >= 3) {
        // 有傳入第3個參數時
        $lc_url = $m_args[2];
    }
    if ($m_alen >= 4) {
        // 有傳入第4個參數時
        $lc_time = $m_args[3];
    }
    switch ($ln_type) {
        case 1:
            if ($m_alen < 4) {
                umess("第1種模式, 需傳入第3參數(目標網址) 和 第4參數(延遲時間)");
            } else {
                //在網頁上顯示訊息後, 於指定的 [時間] 後返回上一頁 (利用 HTML 語法)
                echo $lc_msg . $lc_time . "秒後會自動返回";
                echo "<meta http-equiv='refresh' content='" . $lc_time . ";url=" . $lc_url . "'>";
            }
            break;
        case 2:
            if ($m_alen >= 3) {
                umess("第2種模式, 不需傳入第3個參數(目標網址)");
            } else {
                //顯示對話框, 並會自動 [返回] 到上一頁 (利用 JaveScript 語法)
                echo '<Script> 
						history.go(-1);
					  </Script>';
            }
            break;
        case 3:
            if ($m_alen < 3) {
                umess("第3種模式, 需傳入第3個參數(目標網址)");
            } else {
                //顯示對話框, 並會轉到 [指定] 的網頁 (利用 JaveScript 語法)
                echo "<script>\r\n\t\t\t\t\t\twindow.location.href='" . $lc_url . "';\r\n\t\t\t\t\t  </script>";
            }
            break;
        case 4:
            if ($m_alen < 3) {
                umess("第4種模式, 需傳入第3個參數(目標網址)");
            } else {
                // 使用本方法 (location.replace(URL)) 應該可將URL取代原本在瀏覽器執行的網頁,而無法使用「上一頁」的按鈕回到上一頁。
                echo '<Script> 
						window.location.replace("' . $lc_url . '") ;
					  </Script>';
            }
            break;
        case 5:
            if ($m_alen < 3) {
                umess("第5種模式, 需傳入第3個參數(目標網址)");
            } else {
                // 使用本方式須於程式開頭先下ob_start(),結尾下ob_end_flush(),但是下了 ob_start(),則在 Header()同一區塊中的umess() 將會失效
                Header("Location: {$lc_url}");
            }
            break;
    }
}
function utime_tran($lc_country)
{
    //lc_country 代表欲轉換時差的都市名  (目前只支援[洛杉磯]字串 "Los Angeles")
    $m_time = date("Y-m-j-H-i-s", mktime());
    //Y-m-j-H-i-s->年月日時分秒
    $m_array = explode("-", "{$m_time}");
    //將$time(2007-01-01-05-5)以[-]符號隔開成為陣列
    $m_years = $m_array[0];
    //年
    $m_months = $m_array[1];
    //月
    $m_days = $m_array[2];
    //日
    $m_hour = $m_array[3];
    //時
    $m_minute = $m_array[4];
    //分
    $m_second = $m_array[5];
    //秒
    if ($lc_country == "Los Angeles") {
        //Los Angeles代表洛杉磯
        $m_number = 16;
        if ($m_months >= 4 & $m_months <= 10) {
            $m_number = 15;
        }
    } else {
        umess("本函數目前只支援[洛杉磯]時差轉換");
    }
    return date("Y-m-j H:i:s", mktime($m_hour + $m_number, $m_minute, $m_second, $m_months, $m_days, $m_years));
    //回傳值:年-月-日-時-分-秒
    //	return date("Y-m-j-H-i-s",mktime($m_hour+$m_number,$m_minute,$m_second,$m_months,$m_days,$m_years));//回傳值:年-月-日-時-分-秒
}