Autor Zpráva
javeel
Profil
Prosim kamarad ma jednoduche www stranky na webu zdarma. Chtel na ne umistit datum a svatek. Na netu jsem nasel script, ktery jsem mu tam umistil. Mam jediny problem. Potreboval bych misto cerneho pisma bile a jiny font. Pokud si script zobrazim jako HTML, tak tam zadna moznost upravy Prosim poradte jak na to. Dekuji
MCKAY
Profil
Tak sem uveď ten skript ne?
javeel
Profil
<SCRIPT>

var now = new Date();
var yr = now.getYear();
var mName = now.getMonth() + 1;
var dName = now.getDay() + 1.;
var dayNr = ((now.getDate()<10) ? "" : "")+ now.getDate();

if(dName==1) Day = "Neděle";
if(dName==2) Day = "Pondělí";
if(dName==3) Day = "Úterý";
if(dName==4) Day = "Středa";
if(dName==5) Day = "Čtvrtek";
if(dName==6) Day = "Pátek";
if(dName==7) Day = "Sobota";
if(mName==1) Month="1.";
if(mName==2) Month="2.";
if(mName==3) Month="3.";
if(mName==4) Month="4.";
if(mName==5) Month="5.";
if(mName==6) Month="6.";
if(mName==7) Month="7.";
if(mName==8) Month="8.";
if(mName==9) Month="9.";
if(mName==10) Month="10.";
if(mName==11) Month="11.";
if(mName==12) Month="12.";

// String to display current date.
var todaysDate =(" "
+ Day
+ " "
+ dayNr
+ ". "
+ Month
+ " "
+ yr);
// Write date to page.

document.open();
document.write("Dnes je <b> "+todaysDate+"</b> a svátek má <b>");

today = new Date();
den=today.getDate();
mesic=(today.getMonth()+1);
if (mesic==1) {
if (den==01) document.write("Nový rok");
if (den==02) document.write("Karina");
if (den==03) document.write("Radmila");
if (den==04) document.write("Diana");
if (den==05) document.write("Dalimil");
if (den==06) document.write("Tři králové");
if (den==07) document.write("Vilma");
if (den==08) document.write("Čestmír");
if (den==09) document.write("Vladan");
if (den==10) document.write("Břetislav");
if (den==11) document.write("Bohdana");
if (den==12) document.write("Pravoslav");
if (den==13) document.write("Edita");
if (den==14) document.write("Radovan");
if (den==15) document.write("Alice");
if (den==16) document.write("Ctirad");
if (den==17) document.write("Drahoslav");
if (den==18) document.write("Vladislav");
if (den==19) document.write("Doubravka");
if (den==20) document.write("Ilona");
if (den==21) document.write("Běla");
if (den==22) document.write("Slavomír");
if (den==23) document.write("Zdeněk");
if (den==24) document.write("Milena");
if (den==25) document.write("Miloš");
if (den==26) document.write("Zora");
if (den==27) document.write("Ingrid");
if (den==28) document.write("Otýlie");
if (den==29) document.write("Zdislava");
if (den==30) document.write("Robin");
if (den==31) document.write("Marika");
}
if (mesic==2) {
if (den==01) document.write("Hynek");
if (den==02) document.write("Nela");
if (den==03) document.write("Blažej");
if (den==04) document.write("Jarmila");
if (den==05) document.write("Dobromila");
if (den==06) document.write("Vanda");
if (den==07) document.write("Veronika");
if (den==08) document.write("Milada");
if (den==09) document.write("Apolena");
if (den==10) document.write("Mojmír");
if (den==11) document.write("Božena");
if (den==12) document.write("Slavěna");
if (den==13) document.write("Věnceslav");
if (den==14) document.write("Valentýn");
if (den==15) document.write("Jiřina");
if (den==16) document.write("Ljuba");
if (den==17) document.write("Miloslava");
if (den==18) document.write("Gizela");
if (den==19) document.write("Patrik");
if (den==20) document.write("Oldřich");
if (den==21) document.write("Lenka");
if (den==22) document.write("Petr");
if (den==23) document.write("Svatopluk");
if (den==24) document.write("Matěj");
if (den==25) document.write("Liliana");
if (den==26) document.write("Dorota");
if (den==27) document.write("Alexandr");
if (den==28) document.write("Lumír");
if (den==29) document.write(".....");
}
if (mesic==3) {
if (den==01) document.write("Bedřich");
if (den==02) document.write("Anežka");
if (den==03) document.write("Kamil");
if (den==04) document.write("Stela");
if (den==05) document.write("Kazimir");
if (den==06) document.write("Miroslav");
if (den==07) document.write("Tomáš");
if (den==08) document.write("Gabriela");
if (den==09) document.write("Františka");
if (den==10) document.write("Viktorie");
if (den==11) document.write("Anděla");
if (den==12) document.write("Řehoř");
if (den==13) document.write("Růžena");
if (den==14) document.write("Růt a Matylda");
if (den==15) document.write("Ida");
if (den==16) document.write("Elena a Herbert");
if (den==17) document.write("Vlastimil");
if (den==18) document.write("Eduard");
if (den==19) document.write("Josef");
if (den==20) document.write("Světlana");
if (den==21) document.write("Radek");
if (den==22) document.write("Leona");
if (den==23) document.write("Ivona");
if (den==24) document.write("Gabriel");
if (den==25) document.write("Marian");
if (den==26) document.write("Emanuel");
if (den==27) document.write("Dita");
if (den==28) document.write("Soňa");
if (den==29) document.write("Taťána");
if (den==30) document.write("Arnošt");
if (den==31) document.write("Kvido");
}
if (mesic==4) {
if (den==01) document.write("Hugo");
if (den==02) document.write("Erika");
if (den==03) document.write("Richard");
if (den==04) document.write("Ivana");
if (den==05) document.write("Miroslava");
if (den==06) document.write("Vendula");
if (den==07) document.write("Heřman a Hermína");
if (den==08) document.write("Ema");
if (den==09) document.write("Dušan");
if (den==10) document.write("Darja");
if (den==11) document.write("Izabela");
if (den==12) document.write("Julius");
if (den==13) document.write("Aleš");
if (den==14) document.write("Vincenc");
if (den==15) document.write("Anastázie");
if (den==16) document.write("Irena");
if (den==17) document.write("Rudolf");
if (den==18) document.write("Valérie");
if (den==19) document.write("Rostislav");
if (den==20) document.write("Marcela");
if (den==21) document.write("Alexandra");
if (den==22) document.write("Evženie");
if (den==23) document.write("Vojtěch");
if (den==24) document.write("Jiří");
if (den==25) document.write("Marek");
if (den==26) document.write("Oto");
if (den==27) document.write("Jaroslav");
if (den==28) document.write("Vlastislav");
if (den==29) document.write("Robert");
if (den==30) document.write("Blahoslav");
}
if (mesic==5) {
if (den==01) document.write(".....");
if (den==02) document.write("Zikmund");
if (den==03) document.write("Alexej");
if (den==04) document.write("Květoslav");
if (den==05) document.write("Klaudie");
if (den==06) document.write("Radoslav");
if (den==07) document.write("Stanislav");
if (den==08) document.write(".....");
if (den==09) document.write("Ctibor");
if (den==10) document.write("Blažena");
if (den==11) document.write("Svatava");
if (den==12) document.write("Pankrác");
if (den==13) document.write("Servác");
if (den==14) document.write("Bonifác");
if (den==15) document.write("Žofie");
if (den==16) document.write("Přemysl");
if (den==17) document.write("Aneta");
if (den==18) document.write("Nataša");
if (den==19) document.write("Ivo");
if (den==20) document.write("Zbyšek");
if (den==21) document.write("Monika");
if (den==22) document.write("Emil");
if (den==23) document.write("Vladimír");
if (den==24) document.write("Jana");
if (den==25) document.write("Viola");
if (den==26) document.write("Filip");
if (den==27) document.write("Valdemar");
if (den==28) document.write("Vilém");
if (den==29) document.write("Maxmilián");
if (den==30) document.write("Ferdinand");
if (den==31) document.write("Kamila");
}
if (mesic==6) {
if (den==01) document.write("Laura");
if (den==02) document.write("Jarmil");
if (den==03) document.write("Tamara");
if (den==04) document.write("Dalibor");
if (den==05) document.write("Dobroslav");
if (den==06) document.write("Norbert");
if (den==07) document.write("Iveta a Slavoj");
if (den==08) document.write("Medard");
if (den==09) document.write("Stanislava");
if (den==10) document.write("Gita");
if (den==11) document.write("Bruno");
if (den==12) document.write("Antonie");
if (den==13) document.write("Antonín");
if (den==14) document.write("Roland");
if (den==15) document.write("Vít");
if (den==16) document.write("Zbyněk");
if (den==17) document.write("Adolf");
if (den==18) document.write("Milan");
if (den==19) document.write("Leoš");
if (den==20) document.write("Květa");
if (den==21) document.write("Alois");
if (den==22) document.write("Pavla");
if (
MCKAY
Profil
Spíš než přes javascript bych to řešil přes php. To, kde si nastavíš barvu písma záleží na tom, kde v dokumentu to vkládáš a protu část si to nastavit třeba v css. Jinak ta verze v php je
ZDE
javeel
Profil
To MCKAY: Zkusim to a napisi jak jsem dopadl. Dekuji
javeel
Profil
Tak ten soubor tam bohuzel ke stazeni neni. Nemate ho nekdo stazeny?? Dekuji
MCKAY
Profil
mam tu jeden inlineovej: bohuzel nevim, jestli mi ho to tady diskuse necha cely
<?php $svatky=array('Nový rok','Karina','Radmila','Diana','Dalimil','Tři králové','Vilma','Čestmír','Vladan','Břetislav','Bohdana','Pravoslav','Edita','Radovan','Alice','Ctirad','Drahoslav','Vladislav','Doubravka','Ilona','Běla','Slavomír','Zdeněk','Milena','Miloš','Zora','Ingrid','Otýlie','Zdislava','Robin','Marika','Hynek','Nela','Blažej','Jarmila','Dobromila','Vanda','Veronika','Milada','Apolena','Mojmír','Božena','Slavěna','Věnceslav','Valentýn','Jiřina','Ljuba','Miloslava','Gizela','Patrik','Oldřich','Lenka','Petr','Svatopluk','Matěj','Liliana','Dorota','Alexandr','Lumír','Horymír', /* 29. 2. !! */'Bedřich','Anežka','Kamil','Stela','Kazimír','Miroslav','Tomáš','Gabriela','Františka','Viktorie','Anděla','Řehoř','Růžena','Rút / Matylda','Ida','Elena/Herbert','Vlastimil','Eduard','Josef','Světlana','Radek','Leona','Ivona','Gabriel','Marián','Emanuel','Dita','Soňa','Taťána','Arnošt','Kvido','Hugo','Erika','Richard','Ivana','Miroslava','Vendula','Heřman / Hermína','Ema','Dušan','Darja','Izabela','Julius','Aleš','Vincenc','Anastázie','Irena','Rudolf','Valérie','Rostislav','Marcela','Alexandra','Evžénie','Vojtěch','Jiří','Marek','Oto','Jaroslav','Vlastislav','Robert','Blahoslav','Svátek práce','Zikmund','Alexej','Květoslav','Klaudie','Radoslav','Stanislav','Statní svátek','Ctibor','Blažena','Svatava','Pankrác','Servác','Bonifác','Žofie','Přemysl','Aneta','Nataša','Ivo','Zbyšek','Monika','Emil','Vladimír','Jana','Viola','Filip','Valdemar','Vilém','Maxim','Ferdinand','Kamila','Laura','Jarmil','Tamara','Dalibor','Dobroslav','Norbert','Iveta','Medard','Stanislava','Gita','Bruno','Antonie','Antonín','Roland','Vít','Zbyněk','Adolf','Milan','Leoš','Květa','Alois','Pavla','Zdeňka','Jan','Ivan','Adriana','Ladislav','Lubomír','Petr a Pavel','Šárka','Jaroslava','Patricie','Radomír','Prokop','Státní svátek - Cyril a Metoděj','Státní svátek - Mistr Jan Hus','Bohuslava','Nora','Drahoslava','Libuše / Amálie','Olga','Bořek','Markéta','Karolína','Jindřich','Luboš','Martina','Drahomíra','Čeněk','Ilja','Vítězslav','Magdaléna','Libor','Kristýna','Jakub','Anna','Věroslav','Viktor','Marta','Bořivoj','Ignác','Oskar','Gustav','Miluše','Dominik','Kristián','Oldřiška','Lada','Soběslav','Roman','Vavřinec','Zuzana','Klára','Alena','Alan','Hana','Jáchym','Petra','Helena','Ludvík','Bernard','Johana','Bohuslav','Sandra','Bartoloměj','Radim','Luděk','Otakar','Augustýn','Evelína','Vladěna','Pavlína','Linda / Samuel','Adéla','Bronislav','Jindřiška','Boris','Boleslav','Regína','Mariana','Daniela','Irma','Denisa','Marie','Lubor','Radka','Jolana','Ludmila','Naděžda','Kryštof','Zita','Oleg','Matouš','Darina','Berta','Jaromír','Zlata','Andrea','Jonáš','Václav','Michal','Jeroným','Igor','Olívie / Oliver','Bohumil','František','Eliška','Hanuš','Justýna','Věra','Štefan / Sára','Marina','Andrej','Marcel','Renáta','Agáta','Tereza','Havel','Hedvika','Lukáš','Michaela','Vendelín','Brigita','Sabina','Teodor','Nina','Beáta','Erik','Šarlota / Zoe','Státní svátek','Silvie','Tadeáš','Štěpánka','Felix','Památka zesnulých','Hubert','Karel','Miriam','Liběna','Saskie','Bohumír','Bohdan','Evžen','Martin','Benedikt','Tibor','Sáva','Leopold','Otmar','Mahulena','Romana','Alžběta','Nikola','Albert','Cecílie','Klement','Emílie','Kateřina','Artur','Xenie','René','Zina','Ondřej','Iva','Blanka','Svatoslav','Barbora','Jitka','Mikuláš','Ambrož','Květoslava','Vratislav','Julie','Dana','Simona','Lucie','Lýdie','Radana','Albína','Daniel','Miloslav','Ester','Dagmar','Natálie','Šimon','Vlasta','Adam a Eva / Štědrý den','1.svátek vánoční','Štěpán / 2.svátek vánoční','Žaneta','Bohumila','Judita','David','Silvestr','Nový rok');$d=getdate();$datum=date("d. m. Y");$yday=$d["yday"];if (($yday>58) && ((date("Y")%4)!=0)) $yday++;$svatek_dnes=$svatky[$yday];if (($yday==58) && ((date("Y")%4)!=0)) $yday++;$svatek_zitra=$svatky[$yday%366+1];echo "Dnes je ".$datum." - Dnes má svátek $svatek_dnes, zítra $svatek_zitra";?>
javeel
Profil
To MCKAY: Promin ne a ne to zkopirovat. Posili mi to prosim na javeel@centrum.cz. Velmi dekuji

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0