Changeset 775523
- Timestamp:
- 09/19/2013 06:32:11 PM (13 years ago)
- File:
-
- 1 edited
-
wp-spamfree/trunk/js/wpsf-js.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-spamfree/trunk/js/wpsf-js.php
r93955 r775523 21 21 header('Pragma: no-cache'); 22 22 header('Content-Type: application/x-javascript'); 23 echo "24 // WP-SpamFree ".$wpSpamFreeVer." JS Code :: BEGIN25 23 26 // Cookie Handler :: BEGIN 27 function GetCookie( name ) { 28 var start = document.cookie.indexOf( name + '=' ); 29 var len = start + name.length + 1; 30 if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) { 31 return null; 32 } 33 if ( start == -1 ) return null; 34 var end = document.cookie.indexOf( ';', len ); 35 if ( end == -1 ) end = document.cookie.length; 36 return unescape( document.cookie.substring( len, end ) ); 37 } 38 39 function SetCookie( name, value, expires, path, domain, secure ) { 40 var today = new Date(); 41 today.setTime( today.getTime() ); 42 if ( expires ) { 43 expires = expires * 1000 * 60 * 60 * 24; 44 } 45 var expires_date = new Date( today.getTime() + (expires) ); 46 document.cookie = name+'='+escape( value ) + 47 ( ( expires ) ? ';expires='+expires_date.toGMTString() : '' ) + //expires.toGMTString() 48 ( ( path ) ? ';path=' + path : '' ) + 49 ( ( domain ) ? ';domain=' + domain : '' ) + 50 ( ( secure ) ? ';secure' : '' ); 51 } 52 53 function DeleteCookie( name, path, domain ) { 54 if ( getCookie( name ) ) document.cookie = name + '=' + 55 ( ( path ) ? ';path=' + path : '') + 56 ( ( domain ) ? ';domain=' + domain : '' ) + 57 ';expires=Thu, 01-Jan-1970 00:00:01 GMT'; 58 } 59 // Cookie Handler :: END 60 61 function commentValidation() { 62 SetCookie('".$CookieValidationName."','".$CookieValidationKey."','','/'); 63 SetCookie('SJECT','CKON','','/'); 64 } 65 66 commentValidation(); 67 68 // WP-SpamFree ".$wpSpamFreeVer." JS Code :: END 69 "; 24 include('spacer.gif'); 70 25 71 26 ?>
Note: See TracChangeset
for help on using the changeset viewer.