Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4793796
index.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
479 B
Referenced Files
None
Subscribers
None
index.php
View Options
<?php
require
(
'color/color.php'
);
//Gets the URL part after /color/screen
$url
=
get_current_url_fragments
();
array_shift
(
$url
);
array_shift
(
$url
);
//Parses color or if omitted uses a random one.
if
(
count
(
$url
)
==
0
||
!
$url
[
0
])
{
$color
=
Color
::
random
();
}
else
{
try
{
$color
=
new
Color
(
$url
[
0
]);
}
catch
(
Exception
$ex
)
{
die
(
"Can't parse color $url[0]. "
.
$ex
->
getMessage
());
}
}
?>
<style>
body {
background-color:
<?
=
$color
?>
;
}
</style>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Feb 28, 22:47 (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2440818
Default Alt Text
index.php (479 B)
Attached To
Mode
rTOOLS Nasqueron Tools
Attached
Detach File
Event Timeline
Log In to Comment