Commits

3k committed b55035f

updated page handling

Comments (0)

Files changed (2)

elements/about.php

 <div id="about-page">
-  <h1>About</h1>
+  <h1>About YouTube Mixer</h1>
   <p>Contents of this page:</p>
   <ul>
     <li><a href="#rationale">Rationale</a></li>
   if (isset($_GET['url']) && !empty($_GET['url']))
     $page = trim(strtolower($_GET['url']));
   $homepage = $_SERVER['SERVER_NAME'];
-  $mixerhome = pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME);
   header('content-type: text/html; charset=utf-8');
 ?>
 <!DOCTYPE html>
     <meta charset="utf-8" />
 		<meta property="og:title" content="YouTube Mixer" />
 		<meta property="og:type" content="website" />
-		<meta property="og:url" content="<?php echo sprintf("http://%s%s", $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI']) ?>" />
+		<meta property="og:url" content="<?php echo BASE_URL ?>" />
 		<title>Tecső Mixer!</title>
     <link rel="stylesheet" type="text/css" href="<?php echo BASE_URL ?>css/hejes.css" />
     <link rel="stylesheet" type="text/css" href="<?php echo BASE_URL ?>css/yt.css" />
       <div class="clear"></div>
 
       <div id="footer">
-        <a href="<?php echo $mixerhome ?>">mixer</a>
+        <a href="<?php echo BASE_URL ?>">mixer</a>
         &nbsp;
-        <a href="about">about</a>
+        <a href="<?php echo BASE_URL ?>about">about</a>
         &nbsp;
-        <a href="http://<?php echo $homepage ?>/"><?php echo $homepage ?></a>
+        <a href="http<?php echo empty($_SERVER['HTTPS']) ? '' : 's' ?>://<?php echo $homepage ?>/"><?php echo $homepage ?></a>
         &nbsp;
         |
         &nbsp;