Renk Değiştiren Yazı PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
<BODY topmargin="0" leftmargin="0" link="#0000FF" vlink="#800080" alink="#FF0000">
<!-- Type your text here //-->
<SCRIPT LANGUAGE="JavaScript">
<!--
//enter the message you wish to be shown, including html tags
var message='<b><font color=000000 size=5>Mesajınız</font></b>'
//enter a color name to be used as the background color of the message
var backgroundcolor="yellow"
//enter 0 for always display, 1 for a set period, 2 for random display mode
var displaymode=0
//if displaymode is set to display for a set period, enter the period below (1000=1 sec)
var displayduration=10000
//enter 0 for non-flashing message, 1 for flashing
var flashmode=1
//if above is set to flashing, enter the flash-to color below
var flashtocolor="lightgreen"
function regenerate(){
window.location.reload()
}
var which=0
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",400)
}
function display2(){
if (document.layers){
if (topmsg.visibility=="show")
topmsg.visibility="hide"
else
topmsg.visibility="show"
}
else if (document.all){
if (topmsg.style.visibility=="visible")
topmsg.style.visibility="hidden"
else
topmsg.style.visibility="visible"
setTimeout("display2()",Math.round(Math.random()*1 0000)+10000)
}
}
function flash(){
if (which==0){
if (document.layers)
topmsg.bgColor=flashtocolor
else
topmsg.style.backgroundColor=flashtocolor
which=1
}
else{
if (document.layers)
topmsg.bgColor=backgroundcolor
else
topmsg.style.backgroundColor=backgroundcolor
which=0
}
}
if (document.all){
***************('<span id="topmsg" style="position:absolute;visibility:hidden">'+mess age+'</span>')
}
function logoit(){
document.all.topmsg.style.left=document.body.scrol lLeft+document.body.clientWidth/2-document.all.topmsg.offsetWidth/2
document.all.topmsg.style.top=document.body.scroll Top+document.body.clientHeight-document.all.topmsg.offsetHeight-4
}
function logoit2(){
topmsg.left=pageXOffset+window.innerWidth/2-topmsg.document.width/2
topmsg.top=pageYOffset+window.innerHeight-topmsg.document.height-5
setTimeout("logoit2()",90)
}
function setmessage(){
document.all.topmsg.style.left=document.body.scrol lLeft+document.body.clientWidth/2-document.all.topmsg.offsetWidth/2
document.all.topmsg.style.top=document.body.scroll Top+document.body.clientHeight-document.all.topmsg.offsetHeight-4
document.all.topmsg.style.backgroundColor=backgrou ndcolor
document.all.topmsg.style.visibility="visible"
if (displaymode==1)
setTimeout("topmsg.style.visibility='hidden'",disp layduration)
else if (displaymode==2)
display2()
if (flashmode==1)
setInterval("flash()",1000)
window.onscroll=logoit
window.onresize=new Function("window.location.reload()")
}
function setmessage2(){
topmsg=new Layer(window.innerWidth)
topmsg.bgColor=backgroundcolor
regenerate2()
topmsg.***************(message)
topmsg.document.close()
logoit2()
topmsg.visibility="show"
if (displaymode==1)
setTimeout("topmsg.visibility='hide'",displaydurat ion)
else if (displaymode==2)
display2()
if (flashmode==1)
setInterval("flash()",1000)
}
if (document.layers)
window.onload=setmessage2
else if (document.all)
window.onload=setmessage
//-->
</SCRIPT>
Takvim PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
<script language="JavaScript">
<!-- for sucky browsers
Months = new Array(12);
Months[0] = "January";
Months[1] = "February";
Months[2] = "March";
Months[3] = "April";
Months[4] = "May";
Months[5] = "June";
Months[6] = "July";
Months[7] = "August";
Months[8] = "September";
Months[9] = "October";
Months[10] = "November";
Months[11] = "December";
function PadSpaces(TheString)
{
var Spaces = " ";
len = Math.round((9 - TheString.length)/2);
return Spaces.substring(0,len) + TheString;
}
function NumLeapYears(StartYear, EndYear)
{
var LeapYears, i;
if (EndYear >= StartYear){
for(LeapYears = 0; StartYear <= EndYear; StartYear++)
if (IsLeapYear(StartYear)) LeapYears++;
}else{
for(LeapYears = 0; EndYear <= StartYear; EndYear++)
if (IsLeapYear(EndYear)) LeapYears++;
}
return LeapYears;
}
function IsLeapYear(Year)
{
if(Math.round(Year/4) == Year/4){
if(Math.round(Year/100) == Year/100){
if(Math.round(Year/400) == Year/400)
return true;
else return false;
}else return true;
}
return false;
}
function Trim(TheString)
{
var len;
len = TheString.length;
while(TheString.substring(0,1) == " "){ //trim left
TheString = TheString.substring(1, len);
len = TheString.length;
}
while(TheString.substring(len-1, len) == " "){ //trim right
TheString = TheString.substring(0, len-1);
len = TheString.length;
}
return TheString;
}
function DetermineMonthIdx()
{
var i, month, month_s, len;
month = Trim(document.calform.elements[4].value);
len = month.length;
for( i = 0; i <12; i++){
month_s = Months[i].substring(0,len);
if (month_s.toUpperCase() == month.toUpperCase())
return (i);
}
return -1;
}
function FindNewYearStartingDay(Year)
{
var LeapYears, Years, Day;
LeapYears = NumLeapYears(1995, Year);
if (Year >=1995)
Years = (Year -1995)+LeapYears;
else Years = (Year -1995)-LeapYears;
if (Year >=1995)
Day = Math.round(((Years/7 - Math.floor(Years/7))*7)+.1);
else Day = Math.round(((Years/7 - Math.ceil(Years/7))*7)-.1);
if (Year >=1995){
if(IsLeapYear(Year)) Day--;
}else Day += 7;
if(Day < 0) Day = 6;
if(Day > 6) Day = 0;
return Day;
}
function FindNumDaysInMonth(Year, Month)
{
if(Month == 1){
if(IsLeapYear(Year)) return 29;
else return 28;
}else{
if(Month >6) Month++;
if(Month/2 == Math.round(Month/2)) return 31;
}
return 30;
}
function FindMonthStartDay(NewYearDay, Year, Month)
{
var MonthStartDay;
AddArray = new Array(12);
AddArray[0]=0;AddArray[1]=3;AddArray[2]=3;AddArray[3]=6;
AddArray[4]=1;AddArray[5]=4;AddArray[6]=6;AddArray[7]=2;
AddArray[8]=5;AddArray[9]=0;AddArray[10]=3;AddArray[11]=5;
MonthStartDay = NewYearDay + AddArray[Month];
if(IsLeapYear(Year) && (Month ) > 1) MonthStartDay ++;
if (MonthStartDay > 6) MonthStartDay -= 7;
return MonthStartDay;
}
function FillCalendar()
{
var Year, Month, Midx, NewYearDay, MonthStartDay;
var NumDaysInMonth, i, t;
Year = parseFloat(document.calform.elements[1].value);
Month = document.calform.elements[4].value;
Midx = DetermineMonthIdx();
if (Midx == -1){
alert ("Can't recognize that month");
return;
}
NewYearDay = FindNewYearStartingDay(Year);
MonthStartDay = FindMonthStartDay(NewYearDay, Year, Midx);
NumDaysInMonth = FindNumDaysInMonth(Year, Midx);
for(i = 6; i < 43; i++){
t = i-5-MonthStartDay;
if ( t >= 1 && t <= NumDaysInMonth)
document.calform.elements[i].value =t;
else document.calform.elements[i].value = "";
}
}
function IncDecYear(val)
{
var valNum = parseInt(val);
var valNum2 = parseInt(document.calform.elements[1].value)
document.calform.elements[1].value = valNum2 + valNum;
FillCalendar()
}
function IncDecMonth(val)
{
var valNum = parseInt(val);
var Midx = DetermineMonthIdx();
Midx += valNum;
if(Midx > 11) Midx = 0;
if(Midx < 0) Midx = 11;
document.calform.elements[4].value = PadSpaces(Months[Midx]);
FillCalendar()
}
// -->
</script>
<table border=1 bgcolor="#000000"><tr><td align=center>
<table border=0 cellspacing=0>
<form name="calform">
<tr><td align=center bgcolor="#000000"><input type=button value="<<" onClick="IncDecYear(-1)"></td>
<th bgcolor="#aaaaaa" colspan=5 align=center><input size=4 type=text value="1993"></th>
<td align=center bgcolor="#000000"><input type=button value=">>" onClick="IncDecYear(1)"></td></tr>
<tr><td align=center bgcolor="#000000"><input type=button value="<<" onClick="IncDecMonth(-1)"></td>
<th bgcolor="#aaaaaa" colspan=5 align=center><input size=9 type=text value=" January "></th>
<td align=center bgcolor="#000000"><input type=button value=">>" onClick="IncDecMonth(1)"></td></tr>
<tr><th bgcolor="#ffcccc">Sun</td>
<th bgcolor="#ccccff">Mon</td>
<th bgcolor="#ccccff">Tue</td>
<th bgcolor="#ccccff">Wed</td>
<th bgcolor="#ccccff">Thu</td>
<th bgcolor="#ccccff">Fri</td>
<th bgcolor="#ccccff">Sat</td></tr>
<tr><td bgcolor="#ffcccc"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td></tr>
<tr><td bgcolor="#ffcccc"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td></tr>
<tr><td bgcolor="#ffcccc"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td></tr>
<tr><td bgcolor="#ffcccc"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td></tr>
<tr><td bgcolor="#ffcccc"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#ccccff" ><input type=text size=2></td></tr>
<tr><td bgcolor="#ffcccc"><input type=text size=2></td>
<td bgcolor="#ccccff"><input type=text size=2></td>
<td bgcolor="#aaaaaa" colspan=5><input type=text></td></tr>
</form>
</table>
</td></tr></table>
<script language="JavaScript">
<!--
//include this script segment if you want to set the calendar to today's date.
//this MUST come after the tabled form which contains the calendar
//set calendar to today's date
myDate = new Date();
var Month = parseInt(myDate.getMonth());
document.calform.elements[1].value = myDate.getYear();
document.calform.elements[4].value = PadSpaces(Months[Month]);
document.calform.elements[43].value = "Today is: " +
myDate.getDate() + " " + Months[Month].substring(0,3)
+ ", " + (myDate.getYear());
FillCalendar();
// -->
</script>
Sayfa Yüklendikçe Mesaj PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
<script language="JavaScript">
<!-- Hide the script from old browsers --
function loadalert ()
{alert("HEY! NABER DOSTUM... 2006 SANA ŞANS GETİRSİN...")}
// --End Hiding Here -->
</script>
Status barda Tarih ve Saat PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
<script language="JavaScript">
var timerID = null;
var timerRunning = false;
function startclock ()
{
stopclock();
time();
}
function stopclock ()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
window.status = ""
}
function time ()
{
var now = new Date();
var yr = now.getYear();
var mName = now.getMonth() + 1;
var dName = now.getDay() + 1;
var dayNr = ((now.getDate()<10) ? "0" : "")+ now.getDate();
var ampm = (now.getHours() >= 12) ? " A.M"
: " P.M"
var hours = now.getHours();
hours = ((hours > 12) ? hours - 12 : hours);
var minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes();
var seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds();
if(dName==1) Day = "Pazar";
if(dName==2) Day = "Pazartesi";
if(dName==3) Day = "Salı";
if(dName==4) Day = "Çarşamba";
if(dName==5) Day = "Perşembe";
if(dName==6) Day = "Cuma";
if(dName==7) Day = "Cumartesi";
if(mName==1) Month="Ocak";
if(mName==2) Month="Şubat";
if(mName==3) Month="Mart";
if(mName==4) Month="Nisan";
if(mName==5) Month="Mayıs";
if(mName==6) Month="Haziran";
if(mName==7) Month="Temmuz";
if(mName== Month="Ağustos";
if(mName==9) Month="Eylül";
if(mName==10) Month="Ekim";
if(mName==11) Month="Kasım";
if(mName==12) Month="Aralık";
// String to display current date.
var DayDateTime=(" "
+ dayNr
+ " "
+ Month
+ " "
+ "19"
+ yr
+ ", "
+ Day
+ " // Saat: "
+ hours
+ minutes
+ seconds
+ " "
+ ampm
);
window.status=DayDateTime;
timerID = setTimeout("time()",1000);
timerRunning = true;
}
function clearStatus()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
window.status=" ";
}
// -- End Hiding Here -->
</script>