Advertisement
Guest User

php and css

a guest
Jul 8th, 2012
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. <?php
  2. // get first folder in URL
  3. $f_folder = substr(substr($_SERVER["REQUEST_URI"],1), 0, strpos(substr($_SERVER["REQUEST_URI"],1), "/"));
  4. //get full directory structure for current page
  5. $full_path = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
  6. #css for account
  7. if ($f_folder='account') {
  8. ?>
  9.     <link rel="stylesheet" href="/mainstyle/common.css" type="text/css" charset="utf-8" />
  10.     <link rel="stylesheet" href="/mainstyle/account.css" type="text/css" charset="utf-8" />
  11. <?php
  12. } elseif ($f_folder='signin'||$f_folder='signup'||$full_path='/account/resetPassword'||$full_path='/account/logout') {
  13. ?>
  14.     <link rel="stylesheet" href="/mainstyle/login-signup.css" type="text/css" charset="utf-8" />
  15. <?php
  16. } else {
  17. ?>
  18.     <link rel="stylesheet" href="/mainstyle/common.css" type="text/css" charset="utf-8" />
  19. <?php
  20. }
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement