מדיה ויקי:Common.js: הבדלים בין גרסאות בדף
קפיצה לניווט
קפיצה לחיפוש
אין תקציר עריכה |
אין תקציר עריכה |
||
שורה 9: | שורה 9: | ||
sIDs = "ad1,ad2"; | sIDs = "ad1,ad2"; | ||
aIDs = sIDs.split(","); | aIDs = sIDs.split(","); | ||
url="http://click.inn.co.il/infojs.php?&zones_list=" + sZones + "&"+new Date().getTime(); | url="http:\/\/click.inn.co.il\/infojs.php?&zones_list=" + sZones + "&"+new Date().getTime(); | ||
var scriptElem = document.createElement('script'); | var scriptElem = document.createElement('script'); | ||
scriptElem.setAttribute('src',url); | scriptElem.setAttribute('src',url); | ||
document.getElementsByTagName('head')[0].appendChild(scriptElem); | document.getElementsByTagName('head')[0].appendChild(scriptElem); | ||
function InsertBad(i,bid,cid,zone,type,url,file,ver,height,width) { | function InsertBad(i,bid,cid,zone,type,url,file,ver,height,width) { | ||
newurl = "http://click.inn.co.il/phpA"+"dsNew/a"+"d"; | newurl = "http:\/\/click.inn.co.il\/phpA"+"dsNew\/a"+"d"; | ||
newurle = ".php?bannerid="+bid+"&zoneid="+zone+"&clientid="+cid+"&dest="+url; | newurle = ".php?bannerid="+bid+"&zoneid="+zone+"&clientid="+cid+"&dest="+url; | ||
fileurl ='http://click.inn.co.il/info_he/'+file; | fileurl ='http:\/\/click.inn.co.il\/info_he\/'+file; | ||
clickurl= newurl+"click"+newurle; | clickurl= newurl+"click"+newurle; | ||
logurl= newurl+"log"+newurle; | logurl= newurl+"log"+newurle; | ||
שורה 26: | שורה 26: | ||
case "swf": | case "swf": | ||
fileurl += "?alink1="+escape(clickurl)+"&atar1=_blank" | fileurl += "?alink1="+escape(clickurl)+"&atar1=_blank" | ||
code = "<OBJECT codeBase=http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0 height="+height+" width="+width+" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><param name=\"flashvars\" value=\"alink="+fileurl+"\" /><PARAM NAME=Movie VALUE='"+fileurl+"'><PARAM NAME=Src VALUE='"+fileurl+"'><PARAM NAME=WMode VALUE=Transparent><PARAM NAME=Menu VALUE=-1><PARAM NAME=AllowScriptAccess VALUE=never><PARAM NAME=AllowFullScreen VALUE=false><embed src='"+fileurl+"' quality=high wmode='transparent' width='"+width+"' height='"+height+"' type='application/x-shockwave-flash' pluginspace='http://www.adobe.com/go/getflashplayer' allowScriptAccess='never' FlashVars=\"alink="+escape(fileurl)+"\"></embed></OBJECT>"; break; | code = "<OBJECT codeBase=http:\/\/fpdownload.adobe.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=7,0,0,0 height="+height+" width="+width+" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><param name=\"flashvars\" value=\"alink="+fileurl+"\" \/><PARAM NAME=Movie VALUE='"+fileurl+"'><PARAM NAME=Src VALUE='"+fileurl+"'><PARAM NAME=WMode VALUE=Transparent><PARAM NAME=Menu VALUE=-1><PARAM NAME=AllowScriptAccess VALUE=never><PARAM NAME=AllowFullScreen VALUE=false><embed src='"+fileurl+"' quality=high wmode='transparent' width='"+width+"' height='"+height+"' type='application\/x-shockwave-flash' pluginspace='http:\/\/www.adobe.com\/go\/getflashplayer' allowScriptAccess='never' FlashVars=\"alink="+escape(fileurl)+"\"><\/embed><\/OBJECT>"; break; | ||
case "html": | case "html": | ||
code=file.replace("◄",""); | code=file.replace("◄",""); |
גרסה מ־18:48, 10 ביוני 2008
|
/* כל סקריפט JavaScript שנכתב כאן ירוץ עבור כל המשתמשים בכל טעינת עמוד */ <script language="JavaScript"> // צריך להיות זהה לצד שרת בקובץ הפונקציות var count=0; //מספר החלפות var sZones = ""; var sIDs = ""; var aIDs = [] sZones = "40,50"; sIDs = "ad1,ad2"; aIDs = sIDs.split(","); url="http:\/\/click.inn.co.il\/infojs.php?&zones_list=" + sZones + "&"+new Date().getTime(); var scriptElem = document.createElement('script'); scriptElem.setAttribute('src',url); document.getElementsByTagName('head')[0].appendChild(scriptElem); function InsertBad(i,bid,cid,zone,type,url,file,ver,height,width) { newurl = "http:\/\/click.inn.co.il\/phpA"+"dsNew\/a"+"d"; newurle = ".php?bannerid="+bid+"&zoneid="+zone+"&clientid="+cid+"&dest="+url; fileurl ='http:\/\/click.inn.co.il\/info_he\/'+file; clickurl= newurl+"click"+newurle; logurl= newurl+"log"+newurle; code=""; switch (type) { case "jpeg":case "png":case "gif": code="<a href="+clickurl+"><img width="+width+" height="+height+" src="+fileurl+"></a>"; break; case "swf": fileurl += "?alink1="+escape(clickurl)+"&atar1=_blank" code = "<OBJECT codeBase=http:\/\/fpdownload.adobe.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=7,0,0,0 height="+height+" width="+width+" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><param name=\"flashvars\" value=\"alink="+fileurl+"\" \/><PARAM NAME=Movie VALUE='"+fileurl+"'><PARAM NAME=Src VALUE='"+fileurl+"'><PARAM NAME=WMode VALUE=Transparent><PARAM NAME=Menu VALUE=-1><PARAM NAME=AllowScriptAccess VALUE=never><PARAM NAME=AllowFullScreen VALUE=false><embed src='"+fileurl+"' quality=high wmode='transparent' width='"+width+"' height='"+height+"' type='application\/x-shockwave-flash' pluginspace='http:\/\/www.adobe.com\/go\/getflashplayer' allowScriptAccess='never' FlashVars=\"alink="+escape(fileurl)+"\"><\/embed><\/OBJECT>"; break; case "html": code=file.replace("◄",""); } code+="<img src="+logurl+"&"+new Date().getTime()+" style=display:none>"; try { document.getElementById(aIDs[i]).innerHTML = code; } catch(e) {alert(i +" "+ aIDs[i]+"\n"+ sIDs)} } </script>