我家網頁是用 session 內的變數 lanage 來切換語系的 ....那就改一改 , 將初始化改直接定義 _session['lanage'] 為瀏覽器語系
- Oct 27 Fri 2017 10:22
-
php 判斷瀏覽器語系
找到一個外國人寫的判斷語系 , 的 sitemap , 就有文章說 , 那網頁能判斷 瀏覽器語系 然後簡體字就簡體 , 繁體瀏覽器就繁體 , 日語瀏覽器就日語 , 其他就英文 ........
我家網頁是用 session 內的變數 lanage 來切換語系的 ....那就改一改 , 將初始化改直接定義 _session['lanage'] 為瀏覽器語系
我家網頁是用 session 內的變數 lanage 來切換語系的 ....那就改一改 , 將初始化改直接定義 _session['lanage'] 為瀏覽器語系
- Oct 25 Wed 2017 14:56
-
信呼,免費開源的辦公OA系統 _ BIG5 修改
- Oct 24 Tue 2017 17:32
-
multicast mreciver to msend
- Oct 24 Tue 2017 13:47
-
vbscript check gateway

在主機上寫個 Script 利用排程每五分鐘 判斷 gateway 192.168.0.1 是否可以 ping 到 google 不可以就換 gateway 192.168.0.2 且發信告知
當切換到 192.168.0.2 後 , 下次過 5 分鐘再判斷看看 gateway 192.168.0.1 是否恢復 , 恢復就切回 192.168.0.1 且寄信通知 ....
亂寫就用一條龍寫法 ...不寫副程式了 ....
'判斷是否是 Administrator 權限 , 不是Admin 將切換 ... 切換時可能會問 (Y/N)
If Not WScript.Arguments.Named.Exists("elevate") Then
CreateObject("Shell.Application").ShellExecute WScript.FullName _
, """" & WScript.ScriptFullName & """ /elevate", "", "runas", 1
WScript.Quit
End If
'取得 strDefaultIPGateway
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For Each objNetAdapter in colNetAdapters
If Not isNull(objNetAdapter.DefaultIPGateway) Then
strDefaultIPGateway = Join(objNetAdapter.DefaultIPGateway, ",")
End If
Next
'設定檢查 hostname
Dim hostname
hostname = "www.google.com"
'判斷 是否 gateway 是否是 192.168.0.2
if strDefaultIPGateway = "192.168.0.2" Then
' 如 gateway 是 192.168.0.2 就切換到 192.168.0.1
Set WshShell3 = WScript.CreateObject("WScript.Shell")
WshShell3.currentdirectory="c:\"
WshShell3.Run "route change 0.0.0.0 mask 0.0.0.0 192.168.0.1", 0
Set WshShell3 = Nothing
' 用 gateway 192.168.0.1 ping google
Set WshShell = WScript.CreateObject("WScript.Shell")
Ping = WshShell.Run("ping -n 1 " & hostname, 0, True)
Select Case Ping
' 當 ping 到 google 寄信通知已切換回來 gateway 192.168.0.1
Case 0
Set CDOMail = CreateObject("CDO.Message")
With CDOMail
.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") =2
.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "192.168.0.3"
.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "echochio"
.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "echochiopassord"
.Configuration.Fields.Update
.From = "echochio@test.com"
.To = "echochio@test.com"
.Subject = "Back to gateway to 192.168.0.1"
.TextBody = "ping www.google.com.tw OK !! Back to gateway to 192.168.0.1"
.Send
End With
Set CDOMail = Nothing
' 當 ping 不到 google 切換回去原本的 gateway 192.168.0.2
Case 1
Set WshShell2 = WScript.CreateObject("WScript.Shell")
WshShell2.currentdirectory="c:\"
WshShell2.Run "route change 0.0.0.0 mask 0.0.0.0 192.168.0.2", 0
Set WshShell2 = Nothing
End Select
' 如 gateway 不是 192.168.0.2 所以是 192.168.0.1 , ping google
Else
Set WshShell = WScript.CreateObject("WScript.Shell")
Ping = WshShell.Run("ping -n 1 " & hostname, 0, True)
Select Case Ping
'當 ping 不到 google 切換去 192.168.0.2 且寄信通知
Case 1
Set WshShell2 = WScript.CreateObject("WScript.Shell")
WshShell2.currentdirectory="c:\"
WshShell2.Run "route change 0.0.0.0 mask 0.0.0.0 192.168.0.2", 0
Set WshShell2 = Nothing
'寄信通知 切換到 192.168.0.2 了
Set CDOMail = CreateObject("CDO.Message")
With CDOMail
.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") =2
.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "192.168.0.3"
.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "echochio"
.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "echochiopassword"
.Configuration.Fields.Update
.From = "echochio@test.com"
.To = "echochio@test.com"
.Subject = "defult gateway cannot to google"
.TextBody = "ping www.google.com.tw fail !! Change gateway to 192.168.0.2"
.Send
End With
Set CDOMail = Nothing
End Select
End If
- Oct 24 Tue 2017 10:22
-
ROS pptp 設定
- Oct 20 Fri 2017 11:25
-
公司管理系統 rockoa 信呼 設定 flow
- Oct 19 Thu 2017 13:15
-
Teamviewer 之外的遠端遙控 向日葵遠程控制

用 Teamviewer 回到家發現出現 ....
原來遠端桌面是不可以中斷或縮小的 .....挖哩 .....要將 Teamviewer 安裝成服務 ....
Teamviewer 是廠商提供的 ...且只有錄色版 ....免安裝的被控端企業板
- Oct 19 Thu 2017 13:04
-
免費的公司辦公司管理系統 rockoa 信呼

網路上翻到的 叫做 "信呼" ... 使用 起來還可以 ...有手機的 app .... 把它繁體化 ...(還沒改完)
紀錄一下 ....
http://www.rockoa.com/
- Oct 17 Tue 2017 09:30
-
html 的 table 寫法 colspan & rowspan

紀錄一下 html 的 table 寫法
<table border="1" cellpadding="5" style="border:2px #00DBDB solid;text-align:center;">
<tr>
<td>表格欄位 1 </td>
<td>表格欄位 2 </td>
</tr>
<tr>
<td colspan=2> 使用 colspan 欄位</td>
</tr>
<tr>
<td>表格欄位 3 </td>
<td rowspan="2">使用 rowspan 的欄位</td>
</tr>
<tr>
<td>表格欄位 4 </td>
</tr>
</table>
- Oct 13 Fri 2017 09:18
-
清理 印表機 queue 的批次檔
清理 印表機 queue
net stop spooler
del /Q /F /S "%windir%\System32\spool\PRINTERS\*.*"
net start spooler
net stop spooler
del /Q /F /S "%windir%\System32\spool\PRINTERS\*.*"
net start spooler
- Oct 13 Fri 2017 09:06
-
windows 定時刪除檔案
- Oct 05 Thu 2017 17:52
-
百度地圖標示地點
百度地圖標示地點
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=ZUONbpqGBsYGXNIYHicvbAbM"></script>
<title>带文字标签的覆盖物</title>
</head>
<body>
<div id="allmap"></div>
</body>
</html>
<script type="text/javascript">
// 百度地图API功能
var map = new BMap.Map("allmap");
var point = new BMap.Point(116.400244,39.92556);
map.centerAndZoom(point, 18);
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
var label = new BMap.Label("公司",{offset:new BMap.Size(20,-10)});
marker.setLabel(label);
// 添加带有定位的导航控件
var navigationControl = new BMap.NavigationControl({
// 靠左上角位置
anchor: BMAP_ANCHOR_TOP_LEFT,
// LARGE类型
type: BMAP_NAVIGATION_CONTROL_LARGE,
// 启用显示定位
enableGeolocation: true
});
map.addControl(navigationControl);
// 添加定位控件
var geolocationControl = new BMap.GeolocationControl();
geolocationControl.addEventListener("locationSuccess", function(e){
// 定位成功事件
var address = '';
address += e.addressComponent.province;
address += e.addressComponent.city;
address += e.addressComponent.district;
address += e.addressComponent.street;
address += e.addressComponent.streetNumber;
alert("当前定位地址为:" + address);
});
geolocationControl.addEventListener("locationError",function(e){
// 定位失败事件
alert(e.message);
});
map.addControl(geolocationControl);
</script>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=ZUONbpqGBsYGXNIYHicvbAbM"></script>
<title>带文字标签的覆盖物</title>
</head>
<body>
<div id="allmap"></div>
</body>
</html>
<script type="text/javascript">
// 百度地图API功能
var map = new BMap.Map("allmap");
var point = new BMap.Point(116.400244,39.92556);
map.centerAndZoom(point, 18);
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
var label = new BMap.Label("公司",{offset:new BMap.Size(20,-10)});
marker.setLabel(label);
// 添加带有定位的导航控件
var navigationControl = new BMap.NavigationControl({
// 靠左上角位置
anchor: BMAP_ANCHOR_TOP_LEFT,
// LARGE类型
type: BMAP_NAVIGATION_CONTROL_LARGE,
// 启用显示定位
enableGeolocation: true
});
map.addControl(navigationControl);
// 添加定位控件
var geolocationControl = new BMap.GeolocationControl();
geolocationControl.addEventListener("locationSuccess", function(e){
// 定位成功事件
var address = '';
address += e.addressComponent.province;
address += e.addressComponent.city;
address += e.addressComponent.district;
address += e.addressComponent.street;
address += e.addressComponent.streetNumber;
alert("当前定位地址为:" + address);
});
geolocationControl.addEventListener("locationError",function(e){
// 定位失败事件
alert(e.message);
});
map.addControl(geolocationControl);
</script>
