title: Joomla: How to check if admin is logged in
body: <p>I've added a custom PHP page which does not use any Joomla component.
  I made changes inside .htaccess so the page is now accessible.</p>
  
  <p>the link will be like <a href="http://www.example.com/administrator/mypage.php" rel="nofollow">http://www.example.com/administrator/mypage.php</a></p>
  
  <p>But the page is accessible by everyone without logging in to admin panel.
  How can I make it only view-able by Admin?</p>
  
  <p>My Joomla version is 3.</p>
  
  <p>Thanks a lot.</p>