You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
984 B
36 lines
984 B
/*
|
|
DESTOON Copyright (C)2008-2099 www.destoon.com
|
|
This is NOT a freeware,Use is subject to license.txt
|
|
*/
|
|
function guest_log(id) {
|
|
if($('#'+id)[0]) {
|
|
v = get_local('guest_'+id);
|
|
if(safe_input(v) && !$('#'+id).val()) $('#'+id).val(v);
|
|
$('#'+id).blur(function(){
|
|
v = $('#'+id).val();
|
|
if(safe_input(v)) set_local('guest_'+id, v);
|
|
});
|
|
}
|
|
}
|
|
function safe_input(v) {
|
|
if(v) {
|
|
var a = ['%', '"', "'", '}', ']', '>', '#', ';', ','];
|
|
for(var i in a) {
|
|
if(v.indexOf(a[i]) != -1) return false;
|
|
}
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
var guest_ids = ['company', 'truename', 'telephone', 'mobile', 'email', 'address', 'postcode', 'qq', 'wx', 'ali', 'skype', 'receive'];
|
|
for(var i in guest_ids) {
|
|
guest_log(guest_ids[i]);
|
|
}
|
|
if($('#load_area_1')[0] && parseInt($('#areaid_1').val()) == 0) {
|
|
v = get_local('guest_areaid');
|
|
if(v) load_area(v, 1);
|
|
$('#load_area_1').mouseout(function(){
|
|
v = parseInt($('#areaid_1').val());
|
|
if(v > 0) set_local('guest_areaid', v);
|
|
});
|
|
}
|