Revision: 6286
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at May 14, 2008 14:05 by iTony
Initial Code
<?php function setBodyId() { $path = $_SERVER['REQUEST_URI']; if(!isset($bodyId)) { if(eregi(’^/about/’,$path) == 1) { $bodyId = ‘about’; } else if(eregi(’^/blog/’,$path) == 1) { $bodyId = ‘blog’; } else if(eregi(’^/contact/’,$path) == 1) { $bodyId = ‘contact’; } else if(eregi(’^/work/’,$path) == 1) { $bodyId = ‘work’; } else if(eregi(’^/play/’,$path) == 1) { $bodyId = ‘play’; } else if ($path == â€) { $bodyId = ‘home’; } else { $bodyId = ‘general’; } } return $bodyId; } $bodyID=setBodyId(); ?> <body id="<?=$bodyID?>">
Initial URL
Initial Description
Initial Title
simple Body ID Function
Initial Tags
simple, function, body
Initial Language
PHP