Code

Updated workstation Startup.
[gosa.git] / gosa-core / html / getvcard.php
index a1c68bc829a5259d3484a875d46bf5836700250a..919f1b3b7bc4f60fa5b4db34533525dc5205b236 100644 (file)
@@ -1,31 +1,34 @@
 <?php
 /*
-   This code is part of GOsa (https://gosa.gonicus.de)
-   Copyright (C) 2003  Cajus Pollmeier
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 /* Basic setup, remove eventually registered sessions */
 @require_once ("../include/php_setup.inc");
 @require_once ("functions.inc");
 error_reporting (0);
-session_start ();
+session::start();
+session::set('errorsAlreadyPosted',array());
 
 /* Logged in? Simple security check */
-if (!isset($_SESSION['ui'])){
+if (!session::is_set('ui')){
   new log("security","all/all","",array(),"Error: getvcard.php called without session") ;
   header ("Location: index.php");
   exit;
@@ -33,7 +36,7 @@ if (!isset($_SESSION['ui'])){
 
 /* Uid parameter set? */
 if (!isset($_GET['dn']) || $_GET['dn'] == ""){
-  print_red (_("Error: getcvard.php needs a parameter to export a vcard!"));
+  msg_dialog::display(_("Internal error"), _("Missing parameters!"), FATAL_ERROR_DIALOG);
   exit;
 }
 
@@ -53,7 +56,7 @@ if (preg_match('/MSIE 5.5/', $HTTP_USER_AGENT) ||
 }
 
 /* Get entry */
-$config= $_SESSION['config'];
+$config= session::get('config');
 $ldap= $config->get_ldap_link();
 $ldap->cat(base64_decode(validate($_GET['dn'])));