The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Link coming soon =)
> ...and daily image thingy.
Can still help you with that if you want. That you've switched the Perl doesnt make a great deal of difference.
Now onto the poll and daily image thingy. I''l see if I can find some scripts. Matt doesnt seem to have any free poll scripts, how disappointing :(
print "$Hour\:$Minute\:$Second";to
print "$Hour\:$Minute"; Excellent, well done where can I snip to take ou the seconds? It's a bit confusing with it in there.
Wow this is great :D one problem solved, one step closer to completing my site. Cheers Garin.
>
print "$current_zone\r\n";Remove this line from the CGI script, left it in there by mistake.
Otherwise I've just tried this on my dataflame hosting and it works fine.
Any other things it might be?
Instead of
<!--#exec cgi="/cgi-bin/textclock.cgi?zone=Singapore"--> try...
<!--#include virtual="/cgi-bin/textclock.cgi?zone=Singapore"-->
$Standard_Time_Zone = 'EST';
$Daylight_Time_Zone = 'EDT';Not sure if it's interupting the rest of the code. Does the index.shtml need to be 755 aswell?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content=" " />
<meta name="description" content=" " />
<title>Learn The Language</title>
</head>
<body text=#000000>
This is the time in Singapore;<br />
<!--#exec cgi="/cgi-bin/textclock.cgi?zone=Singapore"--><br />
</body>
</html>and for textclock.cgi...
#!/usr/bin/perl
use CGI qw(:standard);
# Define Variables #
%Time_Zones= (
'GMT' => '0',
'NewYork' => '-5',
'Singapore' => '8',
);
$Display_Week_Day = '1';
$Display_Month = '0';
$Display_Month_Day = '0';
$Display_Year = '0';
$Display_Time = '1';
$Display_Time_Zone = '0';
$Standard_Time_Zone = 'EST';
$Daylight_Time_Zone = 'EDT';
$Display_Link = '0';
# Done
#
@Week_Days = ('Sunday','Monday',
'Tuesday','Wednesday',
'Thursday','Friday','Saturday');
@Months = ('January','February',
'March','April'
,'May','June','July',
'August','September','October'
,'November','December');
$query = new CGI;
if (($query->param('zone')) && ($Time_Zones{$query->param('zone')})) {
$current_zone=$query->param('zone');
} else {
$current_zone='GMT';
}
print "$current_zone\r\n";
print "Content-type: text/html\n\n";
if ($Display_Link != 0) {
print "<a href=\"http://www.scriptarchive.com/\">";
}
($Second,$Minute,$Hour,$Month_Day,
$Month,$Year,$Week_Day,$IsDST) = gmtime(time+($Time_Zones{$current_zone}*3600));
if ($IsDST == 1) {
$Time_Zone = $Daylight_Time_Zone;
}
else {
$Time_Zone = $Standard_Time_Zone;
}
if ($Second < 10) {
$Second = "0$Second";
}
if ($Minute < 10) {
$Minute = "0$Minute";
}
if ($Hour < 10) {
$Hour = "0$Hour";
}
if ($Month_Day < 10) {
$Month_Day = "0$Month_Day";
}
$Year += 1900;
if ($Display_Month != 0) {
print "$Months[$Month] ";
}
if ($Display_Month_Day != 0) {
print "$Month_Day";
if ($Display_Year != 0) {
print ", ";
}
}
if ($Display_Year != 0) {
print "$Year";
if ($Display_Time != 0) {
print " - ";
}
elsif ($Display_Time_Zone != 0) {
print " ";
}
}
if ($Display_Time != 0) {
print "$Hour\:$Minute\:$Second";
if ($Display_Time_Zone != 0) {
print " ";
}
}
if ($Display_Week_Day != 0) {
print " on $Week_Days[$Week_Day]";
}
if ($Display_Time_Zone != 0) {
print "$Time_Zone";
}
if ($Display_Link != 0) {
print "</a>";
}
exit;