1// author sunnycoolboy 2// package panda 3function checkemail(name){ 4 var emailPattern = /^([a-zA-Z0-9]+[_|\-|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\-|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,4}$/; 5 var item=document.getElementById(name); 6 if(!item.value.match(emailPattern)){ 7 return false; 8 }else return true; 9} 10function g(id) { 11 return document.getElementById(id); 12} 13function fnOnPageChanged(p) { 14 var cat = g('cat'); 15 var name = g('name'); 16 var page = g('page'); 17 page.value=p; 18 document.searchform.submit(); 19} 20function changepsort(svalue) { 21 var cat = g('cat'); 22 var tag = g('tag'); 23 var url = 'index.php?controller=Default&action=product&sort='+svalue+'&cat='+cat.value+'&tag='+tag.value; 24 document.location.href=url; 25} 26function changePic(src){ 27 document.getElementById('producti_img').src='Upload/'+src; 28 document.getElementById('producti_a').href='Upload/'+src; 29 document.getElementById('producti_b').href='Upload/'+src; 30} 31function enlange(){ 32 var nowpic = g('producti_img'); 33 window.open(nowpic.src); 34} 35function generateMixed(n) { 36 var chars = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'); 37 var res = ""; 38 for (var i = 0; i < n ; i ++) { 39 var id = Math.ceil(Math.random()*35); 40 res += chars[id]; 41 } 42 return res; 43} 44//è·åæµç§°ä¸çéæ³å符 45String.prototype.getInvalidChars = function(){ 46 var str=this.replace(/[0-9a-z_\u4E00-\u9FA5]/g,''); 47 return str; 48}; 49//计ç®å符串转为unicodeç¼ç åçåèæ° 50String.prototype.getByteLength = function(){
51 return this.replace(/[^\u0000-\u00ff]/ig,'**').length; 52}; 53function to_url(nexturl){ 54 window.location.href=nexturl; 55} 56function orderCheck(){ 57 if(g('title').value==''){ 58 alert('请è¾å ¥è¯¢ä»·æ é¢'); 59 g('title').focus(); 60 return false; 61 } 62 if(g('name').value==''){ 63 alert('请è¾å ¥æ¨çå§å'); 64 g('name').focus(); 65 return false; 66 } 67 if(g('email').value==''){ 68 alert('请è¾å ¥æ¨ççµåé®ä»¶å°å'); 69 g('email').focus(); 70 return false; 71 } 72 if(!checkemail('email')){ 73 alert('Email error,Please Retry'); 74 g('email').focus(); 75 return false; 76 } 77 document.orderform.submit(); 78} 79function msgCheck(){ 80 if(g('fname').value==''){ 81 alert('Full Name can not be blank!'); 82 g('fname').focus(); 83 return false; 84 } 85 if(g('email').value==''){ 86 alert('Contact Email can not be blank!'); 87 g('email').focus(); 88 return false; 89 } 90 if(!checkemail('email')){ 91 alert('Incorrect Email address, please check!'); 92 g('email').focus(); 93 return false; 94 } 95 if(g('imgcode').value==''){ 96 alert('Verification code can not be blank!'); 97 g('imgcode').focus(); 98 return false; 99 } 100 if(g('content').value==''){ 101 alert('Message can not be blank!'); 102 return false; 103 } 104 document.msgform.submit(); 105} 106function quoteCheck(){ 107 if(g('company').value==''){ 108 alert('Company can not be blank!'); 109 g('company').focus(); 110 return false; 111 } 112 if(g('product').value==''){ 113 alert('Product can not be blank!'); 114 g('product').focus(); 115 return false; 116 } 117 if(g('username').value==''){ 118 alert('Contact can not be blank!'); 119 g('username').focus(); 120 return false; 121 } 122 if(g('email').value==''){ 123 alert('Email can not be blank!'); 124 g('email').focus(); 125 return false; 126 } 127 if(!checkemail('email')){ 128 alert('Incorrect Email address, please check!'); 129 g('email').focus(); 130 return false; 131 } 132 if(g('phone').value==''){ 133 alert('Phone can not be blank!'); 134 g('phone').focus(); 135 return false; 136 } 137 if(g('imgcode').value==''){ 138 alert('Verification code can not be blank!'); 139 g('imgcode').focus(); 140 return false; 141 } 142 if(g('content').value==''){ 143 alert('Message can not be blank!'); 144 return false; 145 } 146 document.msgform.submit(); 147} 148function changecode(){ 149 var code = g('code'); 150 code.src = 'index.php?controller=Default&action=imgCode&tt'+generateMixed(6); 151}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.