Replacing tabs with spaces, trimming white space at EOL and newline at EOF
[squirrelmail.git] / src / addrbook_popup.php
index 11b293e4ee84ad923813fb8ddd8d8ad02728c18c..54617ef1950b183d8960123d620a86bdc4eed83b 100644 (file)
@@ -1,43 +1,44 @@
 <?php
-   /**
-    **  addrbook_popup.php
-    **
-    **  Frameset for the JavaScript version of the address book.
-    **
-    **/
 
-   if(!isset($logged_in)) {
-      echo _("You must ");
-      echo _("login");
-      echo _(" first.");
-      exit;
-   }
-   if(!isset($username) || !isset($key)) {
-      echo _("You need a valid user and password to access this page!");
-      exit;
-   }
+/**
+ * addrbook_popup.php
+ *
+ * Copyright (c) 1999-2004 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Frameset for the JavaScript version of the address book.
+ *
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage addressbook
+ */
 
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($addressbook_php))
-      include("../functions/addressbook.php");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
+/**
+ * Path for SquirrelMail required files.
+ * @ignore
+ */
+define('SM_PATH','../');
 
-<HTML>
-<HEAD>
-<TITLE><?php 
-   printf("%s: %s", $org_title, _("Address Book")); 
-?></TITLE>
-</HEAD>
+/** SquirrelMail required files. */
+require_once(SM_PATH . 'include/validate.php');
+require_once(SM_PATH . 'functions/addressbook.php');
 
-<FRAMESET ROWS="60,*" BORDER=0>
- <FRAME NAME="abookmain" MARGINWIDTH=0 SCROLLING=NO
-        SRC="addrbook_search.php?show=form" BORDER=0>
- <FRAME NAME="abookres" MARGINWIDTH=0 SRC="addrbook_search.php?show=blank"
-        BORDER=0>
-</FRAMESET>
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
 
-</HTML>
+<html>
+    <head>
+        <title><?php echo "$org_title: " . _("Address Book"); ?></title>
+    </head>
+    <frameset rows="60,*" border="0">
+        <frame name="abookmain"
+               marginwidth="0"
+               scrolling="no"
+               border="0"
+               src="addrbook_search.php?show=form" />
+        <frame name="abookres"
+               marginwidth="0"
+               border="0"
+               src="addrbook_search.php?show=blank" />
+    </frameset>
+</html>
\ No newline at end of file