var nabeq_id = 305586; var nabeq_add_log = new Array(); function adClick( adUrl ) { var xhr = new XMLHttpRequest(); var form_data = new FormData(); form_data.append( "url" , adUrl ); xhr.open("post", "/nabeq/ad_log.php", true ); xhr.send( form_data ); // xhr.open("get", "/nabeq/ad_log.php", true ); // xhr.send(); window.open( adUrl, "_blank" ); } function setAddLog( setPath ) { nabeq_add_log.push( setPath ); } function EncodeHTMLForm( data ) { var params = []; for( var name in data ) { var value = data[ name ]; var param = encodeURIComponent( name ) + '=' + encodeURIComponent( value ); params.push( param ); } return params.join( '&' ).replace( /%20/g, '+' ); } window.onload = function() { var xhr = new XMLHttpRequest(); var form_data = new FormData(); form_data.append( "urls" , JSON.stringify( nabeq_add_log ) ); form_data.append( "type" , 'index' ); xhr.open("post", "/nabeq/set_access_log.php", true ); xhr.send( form_data ); }