Results 1 to 5 of 5
Thread: PHP & HTML
Hybrid View
-
21st April 2015 14:49 #1Registered User
Join Date: Apr:2011
Location: Bulgaria
Posts: 83
PHP & HTML
, , . !
<??>
<html>
<head>
<TITLE></TITLE>
</head>
<body>
<?
echo time();
echo "<br>";
echo date("Y-m-d H:i:s l",mktime(0,0,0,5,1,2015));
echo "<table border=\"1\">\n\t<tr>";
$day=1;
$month=4;
$year=2015;
$lenght=date("t",mktime(0,0,0,$month,$da y,$year)); echo "</tr><tr>";
echo "$lenght";
while($day<=$lenght){
if($day==1)
{
$firstday=date("N",mktime(0,0,0,$month,$ day,$year));
for($i=1;$i<$firstday;$i++) echo "</td><td>";
}
if (date("N",mktime(0,0,0,$month,$day,$year ))==1) echo"</tr><tr>";
echo <td>'<a href='index.php'>$GET_date'>$</a>'</td>;
$day++;
}
echo "</tr></table>";
?>
</body>
</html>
-
21st April 2015 16:41 #2Registered User
Join Date: Jan:2014
Location: somewhere
Posts: 48
, , .
- <td> backcolor="red"
-
23rd April 2015 04:00 #3Registered User
Join Date: Apr:2011
Location: Bulgaria
Posts: 83
, ;
- - - - - -
- - - - - -
?
-
23rd April 2015 23:52 #4Registered User
Join Date: Sep:2003
Location: Where you live
Posts: 976
-
26th April 2015 02:28 #5Registered User
Join Date: Apr:2011
Location: Bulgaria
Posts: 83
:
<html>
<head>
<TITLE></TITLE>
</head>
<body>
<style>
.red{background-color:red;color:white}
.red a{color:white;}
</style>
<?
echo time();
echo "<br>";
echo date("Y-m-d H:i:s l",mktime(0,0,0,5,1,2015));
echo "<table border=\"1\">\n\t<tr>";
$day=1;
$month=4;
$year=2015;
$lenght=date("t",mktime(0,0,0,$month,$da y,$year)); echo "<tr></tr>";
//$date1=date(mktime(0,0,0,$month,$day,$ye ar));
echo "$lenght";
while($day<=$lenght)
{
$datee=date("Y-m-d",mktime(0,0,0,$month,$day,$year));
if($day==1)
{
$firstday=date("N",mktime(0,0,0,$month,$ day,$year));
for($i=1;$i<$firstday;$i++) echo "<td></td>";
}
if (date("N",mktime(0,0,0,$month,$day,$year ))==1)
echo"<tr></tr>";
$class="";
if(isset($_GET["date"])&&$_GET["date"]==$datee)$class=" class=\"red\"";
echo "<td$class><a href=\"index.php?date=$datee\">$day</a></td>";
$day++;
}
echo "</tr></table>";
?>
</body>
</html>
reset, .




Reply With Quote

...
7th May 2023, 14:24 in