Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Automatically changing Footer

Asked Modified Viewed 3,172 times
Y
Yodix
Y
Yodix 10
Happy Hunger Games! And may the odds be ever in your favor.
  • Member, joined since
  • Contributed 62 posts on the community forums.
  • Started 20 threads in the forums
  • Started this discussions
asked
Member

[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"wink;
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"wink; - 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.
0 replies

2 posts

R
Rolf Mayer
R
Ex
  • Senior Member, joined since
  • Contributed 391 posts on the community forums.
  • Started 7 threads in the forums
answered
Senior Member

Nice!
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

You can take the date with "year to create a website" from 1st user registration also.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
Y
Y
Yodix 10
Happy Hunger Games! And may the odds be ever in your favor.
  • Member, joined since
  • Contributed 62 posts on the community forums.
  • Started 20 threads in the forums
  • Started this discussions
R
R
Ex
  • Senior Member, joined since
  • Contributed 391 posts on the community forums.
  • Started 7 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet