[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]<?php
function stopka() {
$rok_zalozenia = 2011;
$nazwa_strony = "OnDeckPL";
$rok_obecny = date("Y"
;
if ($rok_obecny == $rok_zalozenia) {
print "Copyright by ". $nazwa_strony ." ". $rok_obecny .".";
} else {
print "Copyright by ". $nazwa_strony ." ". $rok_zalozenia ." - ". $rok_obecny .".";
}
}
stopka();
?>[/syntaxhighlighter]
The principle is simple:
[ulist=disc]$rok_zalozenia = 2011; - Enter here for year to create a website.
$nazwa_strony = "OnDeckPL"; - Site name.
$rok_obecny = date("Y"
; - Current year. You do not need to change anything because it is retrieved from the server.[/ulist]
The first part of the code is displayed if the party was founded in the current year and the second when a party is older.