* * and Joseph Engo * * This is the central class for the phpGroupWare API * * Copyright (C) 2000, 2001 Dan Kuykendall * * -------------------------------------------------------------------------* * This library is part of the phpGroupWare API * * http://www.phpgroupware.org/api * * ------------------------------------------------------------------------ * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published by * * the Free Software Foundation; either version 2.1 of the License, * * or any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * * along with this library; if not, write to the Free Software Foundation, * * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * \**************************************************************************/ /* $Id$ */ /*! @class phpgw @abstract Main class. Has a few functions but is more importantly used as a parent class for everything else. @discussion written by: Seek3r
Syntax: CreateObject('phpgwapi.phpgw');
Example1: $phpgw = CreateObject('phpgwapi.acl'); */ class phpgw { var $accounts; var $applications; var $acl; var $auth; /*! @var db */ var $db; var $debug = 0; // This will turn on debugging information. var $crypto; var $categories; var $common; var $hooks; var $network; var $nextmatchs; var $preferences; var $session; var $send; var $template; var $translation; var $utilities; var $vfs; var $calendar; var $msg; var $addressbook; var $todo; /**************************************************************************\ * Core functions * \**************************************************************************/ /*! @function strip_html @abstract strips out html chars @discussion Author: Seek3r.
Description: Used as a shortcut for stripping out html special chars.
Example1: $reg_string = strip_html($urlencode_string); @param urlencode_string string-the string to be stripped of html special chars. @result Object - the string with html special characters removed */ function strip_html($s) { return htmlspecialchars(stripslashes($s)); } /*! @function link @abstract wrapper to session->link() @discussion Used for backwards compatibility and as a shortcut. If not url is passed, it will use PHP_SELF
*/ function link($url = "", $extravars = "") { global $phpgw, $phpgw_info, $usercookie, $kp3, $PHP_SELF; return $this->session->link($url, $extravars); } /*! @function redirect @abstract Handles redirects under iis and apache @discussion Author: Seek3r
Title: Handles redirects under iis and apache
Description: This function handles redirects under iis and apache it assumes that $phpgw->link() has already been called
Syntax: string redirect(url as string)
Example1: None yet @param url */ function redirect($url = "") { global $HTTP_ENV_VARS; $iis = strpos($HTTP_ENV_VARS["SERVER_SOFTWARE"], "IIS", 0); if ( !$url ) { $url = $PHP_SELF; } if ( $iis ) { echo "\n\n\nRedirecting to $url"; echo "\n"; echo "\n"; echo "

Please continue to this page

"; echo "\n"; exit; } else { Header("Location: $url"); print("\n\n"); exit; } } /*! @function lang @abstract Shortcut to tranlation class @discussion Author: Jengo
Title: Shortcut to translation class
Description: This function is a basic wrapper to translation->translate()
Syntax: string redirect(key as string)
Example1: None yet */ function lang($key, $m1 = "", $m2 = "", $m3 = "", $m4 = "") { global $phpgw; return $this->translation->translate($key); } /* end of class */ } ?>