Jump to content
  • 0

pomoc Script Na Změnu Pozadí


Niker-CZ

Dotaz

ahoj, mám script na změnu pozadí

<img src="<?php  
print (((date("H") > 6) && (date("H") < 7)) ? 'body.jpg' : 'body.png');
?>">

a potřebuji to dat do css

body {
margin: 0px;
padding: 0px;
color: white;
font-family: Tahoma, Geneva, sans-serif;
font-size: 12px;
line-height: 1.5em;
background-color: #000000;
background-image: url(images/body.jpg);
background-repeat: no-repeat;
background-position: top center
}

jak to mám spojit ??

Link to comment
Share on other sites

4 odpovědí na tuto otázku

Recommended Posts

  • 0
  • Administrátor

if(date("H") > 6 && date("H") ";

else echo "body.png";

 

a z css musis vymazat background-image: url(images/body.jpg);

  • Líbí se mi to! (+1) 2
Link to comment
Share on other sites

  • 0
  • Administrátor

do html stránky tento způsob nijak to by jsi musel :

do html stránky :

v css background-image: url(images/body.php);

 

A v body.php

<?php

 

if(date("H") > 6 && date("H")

{

 

header('Content-type: image/jpg');

header('Content-Disposition: filename=body.jpg');

readfile('body.jpg');

}else{

header('Content-type: image/jpg');

header('Content-Disposition: filename=body.png');

readfile('body.png');

}

 

 

?>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...