File Source for auth.php

Source for file auth.php

Documentation is available at auth.php

  • <?php
    •

  • // $Id: auth.php 694 2006-09-04 11:33:22Z skalpa $
    •

  • // auth.php - defines abstract authentification wrapper class
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  auth
    •

  •  * @description    Authentification base class
    •

  •  * @author        Pierre-Eric MENUET    <pemphp@free.fr>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsAuth {
    •

  •
    •

  •     var    $_dao;
    •

  •
    •

  •     var    $_errors;
    •

  •     /**
    •

  •      * Authentication Service constructor
    •

  •      */
    •

  •     function XoopsAuth (&$dao){
    •

  •         $this->_dao = $dao;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * @abstract need to be write in the dervied class
    •

  •      */
    •

  •     function authenticate() {
    •

  •         $authenticated = false;
    •

  •
    •

  •         return $authenticated;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * add an error
    •

  •      *
    •

  •      * @param string $value error to add
    •

  •      * @access public
    •

  •      */
    •

  •     function setErrors($err_no, $err_str)
    •

  •     {
    •

  •         $this->_errors[$err_no] = trim($err_str);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * return the errors for this object as an array
    •

  •      *
    •

  •      * @return array an array of errors
    •

  •      * @access public
    •

  •      */
    •

  •     function getErrors()
    •

  •     {
    •

  •         return $this->_errors;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * return the errors for this object as html
    •

  •      *
    •

  •      * @return string html listing the errors
    •

  •      * @access public
    •

  •      */
    •

  •     function getHtmlErrors()
    •

  •     {
    •

  •         global $xoopsConfig;
    •

  •         $ret = '<br>';
    •

  •         if ( $xoopsConfig['debug_mode'] == 1 || $xoopsConfig['debug_mode'] == 2 )
    •

  •         {
    •

  •             if (!empty($this->_errors)) {
    •

  •                 foreach ($this->_errors as $errno => $errstr) {
    •

  •                     $ret .=  $errstr . '<br/>';
    •

  •                 }
    •

  •             } else {
    •

  •                 $ret .= _NONE.'<br />';
    •

  •             }
    •

  •             $ret .= sprintf(_AUTH_MSG_AUTH_METHOD, $this->auth_method);
    •

  •         }
    •

  •         else {
    •

  •             $ret .= _US_INCORRECTLOGIN;
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:56:22 +0200 by phpDocumentor 1.4.0a2


File Source for authfactory.php

Source for file authfactory.php

Documentation is available at authfactory.php

  • <?php
    •

  • // $Id: authfactory.php 845 2007-07-04 14:09:28Z malanciault $
    •

  • // authfactory.php - Authentification class factory
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  auth
    •

  •  * @description    Authentification class factory
    •

  •  * @author        Pierre-Eric MENUET    <pemphp@free.fr>
    •

  •  * @copyright    copyright (c) 2000-2005 XOOPS.org
    •

  •  */
    •

  • class XoopsAuthFactory
    •

  • {
    •

  •
    •

  •     /**
    •

  •      * Get a reference to the only instance of authentication class
    •

  •      *
    •

  •      * if the class has not been instantiated yet, this will also take
    •

  •      * care of that
    •

  •      *
    •

  •      * @static
    •

  •      * @return      object  Reference to the only instance of authentication class
    •

  •      */
    •

  •     function &getAuthConnection($uname)
    •

  •     {
    •

  •         static $auth_instance;
    •

  •         if (!isset($auth_instance)) {
    •

  •             $config_handler =& xoops_gethandler('config');
    •

  •             $authConfig =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH);
    •

  •             require_once XOOPS_ROOT_PATH.'/class/auth/auth.php';
    •

  •             if (empty($authConfig['auth_method'])) { // If there is a config error, we use xoops
    •

  •                 $xoops_auth_method = 'xoops';
    •

  •             } else {
    •

  •                 $xoops_auth_method = $authConfig['auth_method'];
    •

  •             }
    •

  •             // Verify if uname allow to bypass LDAP auth
    •

  •             if (in_array($uname, $authConfig['ldap_users_bypass'])) $xoops_auth_method = 'xoops';
    •

  •             $file = XOOPS_ROOT_PATH . '/class/auth/auth_' . $xoops_auth_method . '.php';
    •

  •             require_once $file;
    •

  •             $class = 'XoopsAuth' . ucfirst($xoops_auth_method);
    •

  •             switch ($xoops_auth_method) {
    •

  •                 case 'xoops' :
    •

  •                     $dao =& $GLOBALS['xoopsDB'];
    •

  •                     break;
    •

  •                 case 'ldap'  :
    •

  •                     $dao = null;
    •

  •                     break;
    •

  •                 case 'ads'  :
    •

  •                     $dao = null;
    •

  •                     break;
    •

  •
    •

  •             }
    •

  •             $auth_instance = new $class($dao);
    •

  •         }
    •

  •         return $auth_instance;
    •

  •     }
    •

  •
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:56:25 +0200 by phpDocumentor 1.4.0a2


File Source for auth_ads.php

Source for file auth_ads.php

Documentation is available at auth_ads.php

  • <?php
    •

  • // $Id: auth_ads.php 933 2007-08-04 17:05:27Z pemen $
    •

  • // auth_ads.php - Authentification class for Active Directory
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  auth
    •

  •  * @description    Authentification class for Active Directory
    •

  •  * @author        Pierre-Eric MENUET    <pemphp@free.fr>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH . '/class/auth/auth_ldap.php';
    •

  •
    •

  • class XoopsAuthAds extends XoopsAuthLdap {
    •

  •        /**
    •

  •      * Authentication Service constructor
    •

  •      */
    •

  •     function XoopsAuthAds (&$dao) {
    •

  •         parent::XoopsAuthLdap($dao);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      *  Authenticate  user again LDAP directory (Bind)
    •

  •      *  2 options :
    •

  •      *         Authenticate directly with uname in the DN
    •

  •      *         Authenticate with manager, search the dn
    •

  •      *
    •

  •      * @param string $uname Username
    •

  •      * @param string $pwd Password
    •

  •      *
    •

  •      * @return bool
    •

  •      */
    •

  •     function authenticate($uname, $pwd = null) {
    •

  •         $authenticated = false;
    •

  •         if (!extension_loaded('ldap')) {
    •

  •             $this->setErrors(0, _AUTH_LDAP_EXTENSION_NOT_LOAD);
    •

  •             return $authenticated;
    •

  •         }
    •

  •         $this->_ds = ldap_connect($this->ldap_server, $this->ldap_port);
    •

  •         if ($this->_ds) {
    •

  •             ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION, $this->ldap_version);
    •

  •             ldap_set_option($this->_ds, LDAP_OPT_REFERRALS, 0);
    •

  •             if ($this->ldap_use_TLS) { // We use TLS secure connection
    •

  •                    if (!ldap_start_tls($this->_ds))
    •

  •                     $this->setErrors(0, _AUTH_LDAP_START_TLS_FAILED);
    •

  •             }
    •

  •             // If the uid is not in the DN we proceed to a search
    •

  •             // The uid is not always in the dn
    •

  •             $userUPN = $this->getUPN($uname);
    •

  •             if (!$userUPN) return false;
    •

  •             // We bind as user to test the credentials
    •

  •             $authenticated = ldap_bind($this->_ds, $userUPN, $this->cp1252_to_utf8(stripslashes($pwd)));
    •

  •             if ($authenticated) {
    •

  •                 // We load the Xoops User database
    •

  •                 $dn = $this->getUserDN($uname);
    •

  •                 if ($dn)
    •

  •                     return $this->loadXoopsUser($dn, $uname, $pwd);
    •

  •                 else return false;
    •

  •             } else $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $userUPN . ')');
    •

  •         }
    •

  •         else {
    •

  •             $this->setErrors(0, _AUTH_LDAP_SERVER_NOT_FOUND);
    •

  •         }
    •

  •         @ldap_close($this->_ds);
    •

  •         return $authenticated;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      *  Return the UPN = userPrincipalName (Active Directory)
    •

  •      *  userPrincipalName = guyt@CP.com    Often abbreviated to UPN, and
    •

  •      *  looks like an email address.  Very useful for logging on especially in
    •

  •      *  a large Forest.   Note UPN must be unique in the forest.
    •

  •      *
    •

  •      *  @return userDN or false
    •

  •      */
    •

  •     function getUPN($uname) {
    •

  •         $userDN = false;
    •

  •         $userDN = $uname."@".$this->ldap_domain_name;
    •

  •         return $userDN;
    •

  •     }
    •

  •
    •

  • } // end class
    •

  •
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:56:28 +0200 by phpDocumentor 1.4.0a2


File Source for auth_ldap.php

Source for file auth_ldap.php

Documentation is available at auth_ldap.php

  • <?php
    •

  • // $Id: auth_ldap.php 925 2007-08-04 14:35:40Z pemen $
    •

  • // auth_ldap.php - LDAP authentification class
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  auth
    •

  •  * @description    Authentification class for standard LDAP Server V2 or V3
    •

  •  * @author        Pierre-Eric MENUET    <pemphp@free.fr>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH . '/class/auth/auth_provisionning.php';
    •

  •
    •

  • class XoopsAuthLdap extends XoopsAuth {
    •

  •
    •

  • var $cp1252_map = array (
    •

  •     "\xc2\x80" => "\xe2\x82\xac", /* EURO SIGN */
    •

  •     "\xc2\x82" => "\xe2\x80\x9a", /* SINGLE LOW-9 QUOTATION MARK */
    •

  •     "\xc2\x83" => "\xc6\x92",     /* LATIN SMALL LETTER F WITH HOOK */
    •

  •     "\xc2\x84" => "\xe2\x80\x9e", /* DOUBLE LOW-9 QUOTATION MARK */
    •

  •     "\xc2\x85" => "\xe2\x80\xa6", /* HORIZONTAL ELLIPSIS */
    •

  •     "\xc2\x86" => "\xe2\x80\xa0", /* DAGGER */
    •

  •     "\xc2\x87" => "\xe2\x80\xa1", /* DOUBLE DAGGER */
    •

  •     "\xc2\x88" => "\xcb\x86",     /* MODIFIER LETTER CIRCUMFLEX ACCENT */
    •

  •     "\xc2\x89" => "\xe2\x80\xb0", /* PER MILLE SIGN */
    •

  •     "\xc2\x8a" => "\xc5\xa0",     /* LATIN CAPITAL LETTER S WITH CARON */
    •

  •     "\xc2\x8b" => "\xe2\x80\xb9", /* SINGLE LEFT-POINTING ANGLE QUOTATION */
    •

  •     "\xc2\x8c" => "\xc5\x92",     /* LATIN CAPITAL LIGATURE OE */
    •

  •     "\xc2\x8e" => "\xc5\xbd",     /* LATIN CAPITAL LETTER Z WITH CARON */
    •

  •     "\xc2\x91" => "\xe2\x80\x98", /* LEFT SINGLE QUOTATION MARK */
    •

  •     "\xc2\x92" => "\xe2\x80\x99", /* RIGHT SINGLE QUOTATION MARK */
    •

  •     "\xc2\x93" => "\xe2\x80\x9c", /* LEFT DOUBLE QUOTATION MARK */
    •

  •     "\xc2\x94" => "\xe2\x80\x9d", /* RIGHT DOUBLE QUOTATION MARK */
    •

  •     "\xc2\x95" => "\xe2\x80\xa2", /* BULLET */
    •

  •     "\xc2\x96" => "\xe2\x80\x93", /* EN DASH */
    •

  •     "\xc2\x97" => "\xe2\x80\x94", /* EM DASH */
    •

  •     "\xc2\x98" => "\xcb\x9c",     /* SMALL TILDE */
    •

  •     "\xc2\x99" => "\xe2\x84\xa2", /* TRADE MARK SIGN */
    •

  •     "\xc2\x9a" => "\xc5\xa1",     /* LATIN SMALL LETTER S WITH CARON */
    •

  •     "\xc2\x9b" => "\xe2\x80\xba", /* SINGLE RIGHT-POINTING ANGLE QUOTATION*/
    •

  •     "\xc2\x9c" => "\xc5\x93",     /* LATIN SMALL LIGATURE OE */
    •

  •     "\xc2\x9e" => "\xc5\xbe",     /* LATIN SMALL LETTER Z WITH CARON */
    •

  •     "\xc2\x9f" => "\xc5\xb8"      /* LATIN CAPITAL LETTER Y WITH DIAERESIS*/
    •

  •     );
    •

  •
    •

  •     var $ldap_server;
    •

  •     var $ldap_port = '389';
    •

  •     var $ldap_version = '3';
    •

  •     var $ldap_base_dn;
    •

  •     var $ldap_loginname_asdn;
    •

  •     var $ldap_loginldap_attr;
    •

  •     var $ldap_mail_attr;
    •

  •     var $ldap_name_attr;
    •

  •     var $ldap_surname_attr;
    •

  •     var $ldap_givenname_attr;
    •

  •     var $ldap_manager_dn;
    •

  •     var $ldap_manager_pass;
    •

  •     var $_ds;
    •

  •
    •

  •     /**
    •

  •      * Authentication Service constructor
    •

  •      */
    •

  •     function XoopsAuthLdap (&$dao) {
    •

  •         $this->_dao = $dao;
    •

  •         //The config handler object allows us to look at the configuration options that are stored in the database
    •

  •         $config_handler =& xoops_gethandler('config');
    •

  •         $config =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH);
    •

  •         $confcount = count($config);
    •

  •         foreach ($config as $key => $val) {
    •

  •             $this->$key = $val;
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     function cp1252_to_utf8($str) {
    •

  •             return  strtr(utf8_encode($str), $this->cp1252_map);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      *  Authenticate  user again LDAP directory (Bind)
    •

  •      *  2 options :
    •

  •      *         Authenticate directly with uname in the DN
    •

  •      *         Authenticate with manager, search the dn
    •

  •      *
    •

  •      * @param string $uname Username
    •

  •      * @param string $pwd Password
    •

  •      *
    •

  •      * @return bool
    •

  •      */
    •

  •     function authenticate($uname, $pwd = null) {
    •

  •         $authenticated = false;
    •

  •         if (!extension_loaded('ldap')) {
    •

  •             $this->setErrors(0, _AUTH_LDAP_EXTENSION_NOT_LOAD);
    •

  •             return $authenticated;
    •

  •         }
    •

  •         $this->_ds = ldap_connect($this->ldap_server, $this->ldap_port);
    •

  •         if ($this->_ds) {
    •

  •             ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION, $this->ldap_version);
    •

  •             if ($this->ldap_use_TLS) { // We use TLS secure connection
    •

  •                    if (!ldap_start_tls($this->_ds))
    •

  •                     $this->setErrors(0, _AUTH_LDAP_START_TLS_FAILED);
    •

  •             }
    •

  •             // If the uid is not in the DN we proceed to a search
    •

  •             // The uid is not always in the dn
    •

  •             $userDN = $this->getUserDN($uname);
    •

  •             if (!$userDN) return false;
    •

  •             // We bind as user to test the credentials
    •

  •             $authenticated = ldap_bind($this->_ds, $userDN, stripslashes($pwd));
    •

  •             if ($authenticated) {
    •

  •                 // We load the Xoops User database
    •

  •                 return $this->loadXoopsUser($userDN, $uname, $pwd);
    •

  •             } else $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $userDN . ')');
    •

  •         }
    •

  •         else {
    •

  •             $this->setErrors(0, _AUTH_LDAP_SERVER_NOT_FOUND);
    •

  •         }
    •

  •         @ldap_close($this->_ds);
    •

  •         return $authenticated;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      *  Compose the user DN with the configuration.
    •

  •      *
    •

  •      *
    •

  •      * @return userDN or false
    •

  •      */
    •

  •     function getUserDN($uname) {
    •

  •         $userDN = false;
    •

  •         if (!$this->ldap_loginname_asdn) {
    •

  •             // Bind with the manager
    •

  •             if (!ldap_bind($this->_ds, $this->ldap_manager_dn, stripslashes($this->ldap_manager_pass))) {
    •

  •                  $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $this->ldap_manager_dn . ')');
    •

  •                  return false;
    •

  •             }
    •

  •             $filter = $this->getFilter($uname);
    •

  •             $sr = ldap_search($this->_ds, $this->ldap_base_dn, $filter);
    •

  •             $info = ldap_get_entries($this->_ds, $sr);
    •

  •             if ($info["count"] > 0) {
    •

  •                 $userDN = $info[0]['dn'];
    •

  •             } else $this->setErrors(0, sprintf(_AUTH_LDAP_USER_NOT_FOUND, $uname, $filter, $this->ldap_base_dn));
    •

  •         }
    •

  •         else {
    •

  •             $userDN = $this->ldap_loginldap_attr."=".$uname.",".$this->ldap_base_dn;
    •

  •         }
    •

  •         return $userDN;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      *  Load user from XOOPS Database
    •

  •      *
    •

  •      * @return XoopsUser object
    •

  •      */
    •

  •      function getFilter($uname) {
    •

  •          $filter = '';
    •

  •          if ($this->ldap_filter_person != '') {
    •

  •             $filter = str_replace('@@loginname@@',$uname, $this->ldap_filter_person);
    •

  •          }
    •

  •          else {
    •

  •              $filter = $this->ldap_loginldap_attr . "=" . $uname;
    •

  •          }
    •

  •          return $filter;
    •

  •      }
    •

  •
    •

  •
    •

  •     function loadXoopsUser($userdn, $uname, $pwd = null) {
    •

  •         $provisHandler = XoopsAuthProvisionning::getInstance($this);
    •

  •         $sr = ldap_read($this->_ds, $userdn, '(objectclass=*)');
    •

  •         $entries = ldap_get_entries($this->_ds, $sr);
    •

  •         if ($entries["count"] > 0) {
    •

  •             $xoopsUser = $provisHandler->sync($entries[0], $uname, $pwd);
    •

  •         }
    •

  •         else $this->setErrors(0, sprintf('loadXoopsUser - ' . _AUTH_LDAP_CANT_READ_ENTRY, $userdn));
    •

  •         return $xoopsUser;
    •

  •     }
    •

  •
    •

  •
    •

  • } // end class
    •

  •
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:56:32 +0200 by phpDocumentor 1.4.0a2


File Source for auth_provisionning.php

Source for file auth_provisionning.php

Documentation is available at auth_provisionning.php

  • <?php
    •

  • // $Id: auth_provisionning.php 733 2006-09-11 20:42:29Z pemen $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  auth
    •

  •  * @description    Authentification provisionning class. This class is responsible to
    •

  •  *  provide synchronisation method to Xoops User Database
    •

  •  *
    •

  •  * @author        Pierre-Eric MENUET    <pemphp@free.fr>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsAuthProvisionning {
    •

  •
    •

  •     var $_auth_instance;
    •

  •
    •

  •     function &getInstance(&$auth_instance)
    •

  •     {
    •

  •         static $provis_instance;
    •

  •         if (!isset($provis_instance)) {
    •

  •             $provis_instance = new XoopsAuthProvisionning($auth_instance);
    •

  •         }
    •

  •         return $provis_instance;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Authentication Service constructor
    •

  •      */
    •

  •     function XoopsAuthProvisionning (&$auth_instance) {
    •

  •         $this->_auth_instance = &$auth_instance;
    •

  •         $config_handler =& xoops_gethandler('config');
    •

  •         $config =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH);
    •

  •         foreach ($config as $key => $val) {
    •

  •             $this->$key = $val;
    •

  •         }
    •

  •         $config_gen =& $config_handler->getConfigsByCat(XOOPS_CONF);
    •

  •         $this->default_TZ = $config_gen['default_TZ'];
    •

  •         $this->theme_set = $config_gen['theme_set'];
    •

  •         $this->com_mode = $config_gen['com_mode'];
    •

  •         $this->com_order = $config_gen['com_order'];
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      *  Return a Xoops User Object
    •

  •      *
    •

  •      * @return XoopsUser or false
    •

  •      */
    •

  •     function getXoopsUser($uname) {
    •

  •         $member_handler =& xoops_gethandler('member');
    •

  •         $criteria = new Criteria('uname', $uname);
    •

  •         $getuser = $member_handler->getUsers($criteria);
    •

  •         if (count($getuser) == 1)
    •

  •             return $getuser[0];
    •

  •         else return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      *  Launch the synchronisation process
    •

  •      *
    •

  •      * @return bool
    •

  •      */
    •

  •     function sync($datas, $uname, $pwd = null) {
    •

  •         $xoopsUser = $this->getXoopsUser($uname);
    •

  •         if (!$xoopsUser) { // Xoops User Database not exists
    •

  •             if ($this->ldap_provisionning) {
    •

  •                 $xoopsUser = $this->add($datas, $uname, $pwd);
    •

  •             } else $this->_auth_instance->setErrors(0, sprintf(_AUTH_LDAP_XOOPS_USER_NOTFOUND, $uname));
    •

  •         } else { // Xoops User Database exists
    •

  •             if ($this->ldap_provisionning && $this->ldap_provisionning_upd) {
    •

  •                 $xoopsUser = $this->change($xoopsUser, $datas, $uname, $pwd);
    •

  •             }
    •

  •         }
    •

  •         return $xoopsUser;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      *  Add a new user to the system
    •

  •      *
    •

  •      * @return bool
    •

  •      */
    •

  •     function add($datas, $uname, $pwd = null) {
    •

  •         $ret = false;
    •

  •         $member_handler =& xoops_gethandler('member');
    •

  •         // Create XOOPS Database User
    •

  •         $newuser = $member_handler->createUser();
    •

  •         $newuser->setVar('uname', $uname);
    •

  •         $newuser->setVar('pass', md5(stripslashes($pwd)));
    •

  •         //$newuser->setVar('name', utf8_decode($datas[$this->ldap_givenname_attr][0]) . ' ' . utf8_decode($datas[$this->ldap_surname_attr][0]));
    •

  •         //$newuser->setVar('email', $datas[$this->ldap_mail_attr][0]);
    •

  •         $newuser->setVar('rank', 0);
    •

  •         $newuser->setVar('level', 1);
    •

  •         $newuser->setVar('timezone_offset', $this->default_TZ);
    •

  •         $newuser->setVar('theme',     $this->theme_set);
    •

  •         $newuser->setVar('umode',     $this->com_mode);
    •

  •         $newuser->setVar('uorder',     $this->com_order);
    •

  •         $tab_mapping = explode('|', $this->ldap_field_mapping);
    •

  •         foreach ($tab_mapping as $mapping) {
    •

  •             $fields = explode('=', trim($mapping));
    •

  •             if ($fields[0] && $fields[1])
    •

  •                 $newuser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])][0]));
    •

  •         }
    •

  •         if ($member_handler->insertUser($newuser)) {
    •

  •             foreach ($this->ldap_provisionning_group as $groupid)
    •

  •                 $member_handler->addUserToGroup($groupid, $newuser->getVar('uid'));
    •

  •             $newuser->unsetNew();
    •

  •             return $newuser;
    •

  •         } else redirect_header(XOOPS_URL.'/user.php', 5, $newuser->getHtmlErrors());
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      *  Modify user information
    •

  •      *
    •

  •      * @return bool
    •

  •      */
    •

  •     function change(&$xoopsUser, $datas, $uname, $pwd = null) {
    •

  •         $ret = false;
    •

  •         $member_handler =& xoops_gethandler('member');
    •

  •         $xoopsUser->setVar('pass', md5(stripslashes($pwd)));
    •

  •         $tab_mapping = explode('|', $this->ldap_field_mapping);
    •

  •         foreach ($tab_mapping as $mapping) {
    •

  •             $fields = explode('=', trim($mapping));
    •

  •             if ($fields[0] && $fields[1])
    •

  •                 $xoopsUser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])][0]));
    •

  •         }
    •

  •         if ($member_handler->insertUser($xoopsUser)) {
    •

  •             return $xoopsUser;
    •

  •         } else redirect_header(XOOPS_URL.'/user.php', 5, $xoopsUser->getHtmlErrors());
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      *  Modify a user
    •

  •      *
    •

  •      * @return bool
    •

  •      */
    •

  •     function delete() {
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      *  Suspend a user
    •

  •      *
    •

  •      * @return bool
    •

  •      */
    •

  •     function suspend() {
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      *  Restore a user
    •

  •      *
    •

  •      * @return bool
    •

  •      */
    •

  •     function restore() {
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      *  Add a new user to the system
    •

  •      *
    •

  •      * @return bool
    •

  •      */
    •

  •     function resetpwd() {
    •

  •     }
    •

  •
    •

  •
    •

  • } // end class
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:56:36 +0200 by phpDocumentor 1.4.0a2


File Source for auth_xoops.php

Source for file auth_xoops.php

Documentation is available at auth_xoops.php

  • <?php
    •

  • // $Id: auth_xoops.php 694 2006-09-04 11:33:22Z skalpa $
    •

  • // auth_xoops.php - XOOPS authentification class
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  auth
    •

  •  * @description    Authentification class for Native XOOPS
    •

  •  * @author        Pierre-Eric MENUET    <pemphp@free.fr>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsAuthXoops extends XoopsAuth {
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Authentication Service constructor
    •

  •      */
    •

  •     function XoopsAuthXoops (&$dao) {
    •

  •         $this->_dao = $dao;
    •

  •         $this->auth_method = 'xoops';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      *  Authenticate user
    •

  •      *
    •

  •      * @param string $uname
    •

  •      * @param string $pwd
    •

  •      *
    •

  •      * @return bool
    •

  •      */
    •

  •     function authenticate($uname, $pwd = null) {
    •

  •         $member_handler =& xoops_gethandler('member');
    •

  •           $user =& $member_handler->loginUser($uname, $pwd);
    •

  •           if ($user == false) {
    •

  •               $this->setErrors(1, _US_INCORRECTLOGIN);
    •

  •           }
    •

  •           return ($user);
    •

  •     }
    •

  •
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:56:38 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsAuth

Class XoopsAuth

[line 35]

Classes extended from XoopsAuth:

XoopsAuthLdap

XoopsAuthXoops

Location: /auth/auth.php

author

Pierre-Eric MENUET    <pemphp@free.fr>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_dao =

  • $_errors =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsAuth::XoopsAuth

XoopsAuth(

&$dao );

    Parameters

    &$dao

    Remarks

    Authentication Service constructor

    [ Top ]

    XoopsAuth::authenticate

authenticate(
 );

    Overridden in child classes as:

    XoopsAuthLdap::authenticate()

    Authenticate  user again LDAP directory (Bind)

    XoopsAuthAds::authenticate()

    Authenticate  user again LDAP directory (Bind)

    XoopsAuthXoops::authenticate()

    Authenticate user

    abstract

    need to be write in the dervied class

    [ Top ]

    XoopsAuth::getErrors

getErrors(
 );

    Returns

    an array of errors

    Remarks

    return the errors for this object as an array

    access

    public

    [ Top ]

    XoopsAuth::getHtmlErrors

getHtmlErrors(
 );

    Returns

    html listing the errors

    Remarks

    return the errors for this object as html

    access

    public

    [ Top ]

    XoopsAuth::setErrors

setErrors(

$err_no,
$err_str, string
$value );

    Parameters

    $value

    error to add

    $err_no

    $err_str

    Remarks

    add an error

    access

    public

    [ Top ]

Variable Detail

  • $_dao =  [line 37]
    •

  • Data type: mixed
    •

  • $_errors =  [line 39]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:56:23 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsAuthFactory

Class XoopsAuthFactory

[line 35]

Location: /auth/authfactory.php

author

Pierre-Eric MENUET    <pemphp@free.fr>

copyright

copyright (c) 2000-2005 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

  • static object Reference getAuthConnection()

    Get a reference to the only instance of authentication class

  • object Reference getAuthConnection()

    Get a reference to the only instance of authentication class

Inherited Method Summary

Method Detail

    static XoopsAuthFactory::getAuthConnection

static &getAuthConnection(

$uname );

    Parameters

    $uname

    Returns

    to the only instance of authentication class

    Remarks

    Get a reference to the only instance of authentication class

    if the class has not been instantiated yet, this will also take  care of that

    [ Top ]

Variable Detail

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:56:25 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsAuthAds

Class XoopsAuthAds

[line 37]
XoopsAuth
   |
   --XoopsAuthLdap
      |
      --XoopsAuthAds
Location: /auth/auth_ads.php

author

Pierre-Eric MENUET <pemphp@free.fr>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsAuthLdap

  • XoopsAuthLdap::$cp1252_map = array (
    "\xc2\x80" => "\xe2\x82\xac", /* EURO SIGN */
    "\xc2\x82" => "\xe2\x80\x9a", /* SINGLE LOW-9 QUOTATION MARK */
    "\xc2\x83" => "\xc6\x92",     /* LATIN SMALL LETTER F WITH HOOK */
    "\xc2\x84" => "\xe2\x80\x9e", /* DOUBLE LOW-9 QUOTATION MARK */
    "\xc2\x85" => "\xe2\x80\xa6", /* HORIZONTAL ELLIPSIS */
    "\xc2\x86" => "\xe2\x80\xa0", /* DAGGER */
    "\xc2\x87" => "\xe2\x80\xa1", /* DOUBLE DAGGER */
    "\xc2\x88" => "\xcb\x86",     /* MODIFIER LETTER CIRCUMFLEX ACCENT */
    "\xc2\x89" => "\xe2\x80\xb0", /* PER MILLE SIGN */
    "\xc2\x8a" => "\xc5\xa0",     /* LATIN CAPITAL LETTER S WITH CARON */
    "\xc2\x8b" => "\xe2\x80\xb9", /* SINGLE LEFT-POINTING ANGLE QUOTATION */
    "\xc2\x8c" => "\xc5\x92",     /* LATIN CAPITAL LIGATURE OE */
    "\xc2\x8e" => "\xc5\xbd",     /* LATIN CAPITAL LETTER Z WITH CARON */
    "\xc2\x91" => "\xe2\x80\x98", /* LEFT SINGLE QUOTATION MARK */
    "\xc2\x92" => "\xe2\x80\x99", /* RIGHT SINGLE QUOTATION MARK */
    "\xc2\x93" => "\xe2\x80\x9c", /* LEFT DOUBLE QUOTATION MARK */
    "\xc2\x94" => "\xe2\x80\x9d", /* RIGHT DOUBLE QUOTATION MARK */
    "\xc2\x95" => "\xe2\x80\xa2", /* BULLET */
    "\xc2\x96" => "\xe2\x80\x93", /* EN DASH */
    "\xc2\x97" => "\xe2\x80\x94", /* EM DASH */
    "\xc2\x98" => "\xcb\x9c",     /* SMALL TILDE */
    "\xc2\x99" => "\xe2\x84\xa2", /* TRADE MARK SIGN */
    "\xc2\x9a" => "\xc5\xa1",     /* LATIN SMALL LETTER S WITH CARON */
    "\xc2\x9b" => "\xe2\x80\xba", /* SINGLE RIGHT-POINTING ANGLE QUOTATION*/
    "\xc2\x9c" => "\xc5\x93",     /* LATIN SMALL LIGATURE OE */
    "\xc2\x9e" => "\xc5\xbe",     /* LATIN SMALL LETTER Z WITH CARON */
    "\xc2\x9f" => "\xc5\xb8"      /* LATIN CAPITAL LETTER Y WITH DIAERESIS*/
    )
  • XoopsAuthLdap::$ldap_base_dn =
  • XoopsAuthLdap::$ldap_givenname_attr =
  • XoopsAuthLdap::$ldap_loginldap_attr =
  • XoopsAuthLdap::$ldap_loginname_asdn =
  • XoopsAuthLdap::$ldap_mail_attr =
  • XoopsAuthLdap::$ldap_manager_dn =
  • XoopsAuthLdap::$ldap_manager_pass =
  • XoopsAuthLdap::$ldap_name_attr =
  • XoopsAuthLdap::$ldap_port = '389'
  • XoopsAuthLdap::$ldap_server =
  • XoopsAuthLdap::$ldap_surname_attr =
  • XoopsAuthLdap::$ldap_version = '3'
  • XoopsAuthLdap::$_ds =

Inherited From Class XoopsAuth

  • XoopsAuth::$_dao =
  • XoopsAuth::$_errors =

Method Summary

Inherited Method Summary

Inherited From Class XoopsAuthLdap

  • XoopsAuthLdap::XoopsAuthLdap()
    Authentication Service constructor
  • XoopsAuthLdap::authenticate()
    Authenticate user again LDAP directory (Bind)
  • XoopsAuthLdap::cp1252_to_utf8()
  • XoopsAuthLdap::getFilter()
    Load user from XOOPS Database
  • XoopsAuthLdap::getUserDN()
    Compose the user DN with the configuration.
  • XoopsAuthLdap::loadXoopsUser()

Inherited From Class XoopsAuth

  • XoopsAuth::XoopsAuth()
    Authentication Service constructor
  • XoopsAuth::authenticate()
  • XoopsAuth::getErrors()
    return the errors for this object as an array
  • XoopsAuth::getHtmlErrors()
    return the errors for this object as html
  • XoopsAuth::setErrors()
    add an error

Method Detail

    XoopsAuthAds::XoopsAuthAds

    XoopsAuthAds( &$dao );

    Parameters

    &$dao

    Remarks

    Authentication Service constructor

    [ Top ]

    XoopsAuthAds::authenticate

    authenticate( string $uname, [string $pwd = null] );

    Overrides XoopsAuthLdap::authenticate() (Authenticate user again LDAP directory (Bind))

    Parameters

    $uname

    Username

    $pwd

    Password

    Remarks

    Authenticate user again LDAP directory (Bind)

    2 options : Authenticate directly with uname in the DN Authenticate with manager, search the dn

    [ Top ]

    XoopsAuthAds::getUPN

    getUPN( $uname );

    Parameters

    $uname

    Returns

    or false

    Remarks

    Return the UPN = userPrincipalName (Active Directory) userPrincipalName = guyt@CP.com Often abbreviated to UPN, and looks like an email address. Very useful for logging on especially in a large Forest. Note UPN must be unique in the forest.

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:56:28 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsAuthLdap

Class XoopsAuthLdap

[line 37]
XoopsAuth
   |
   --XoopsAuthLdap
Classes extended from XoopsAuthLdap:
XoopsAuthAds

Location: /auth/auth_ldap.php

author

Pierre-Eric MENUET <pemphp@free.fr>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $cp1252_map = array (
       "\xc2\x80" => "\xe2\x82\xac", /* EURO SIGN */
        "\xc2\x82" => "\xe2\x80\x9a", /* SINGLE LOW-9 QUOTATION MARK */
        "\xc2\x83" => "\xc6\x92",     /* LATIN SMALL LETTER F WITH HOOK */
        "\xc2\x84" => "\xe2\x80\x9e", /* DOUBLE LOW-9 QUOTATION MARK */
        "\xc2\x85" => "\xe2\x80\xa6", /* HORIZONTAL ELLIPSIS */
        "\xc2\x86" => "\xe2\x80\xa0", /* DAGGER */
        "\xc2\x87" => "\xe2\x80\xa1", /* DOUBLE DAGGER */
        "\xc2\x88" => "\xcb\x86",     /* MODIFIER LETTER CIRCUMFLEX ACCENT */
        "\xc2\x89" => "\xe2\x80\xb0", /* PER MILLE SIGN */
        "\xc2\x8a" => "\xc5\xa0",     /* LATIN CAPITAL LETTER S WITH CARON */
        "\xc2\x8b" => "\xe2\x80\xb9", /* SINGLE LEFT-POINTING ANGLE QUOTATION */
        "\xc2\x8c" => "\xc5\x92",     /* LATIN CAPITAL LIGATURE OE */
        "\xc2\x8e" => "\xc5\xbd",     /* LATIN CAPITAL LETTER Z WITH CARON */
        "\xc2\x91" => "\xe2\x80\x98", /* LEFT SINGLE QUOTATION MARK */
        "\xc2\x92" => "\xe2\x80\x99", /* RIGHT SINGLE QUOTATION MARK */
        "\xc2\x93" => "\xe2\x80\x9c", /* LEFT DOUBLE QUOTATION MARK */
        "\xc2\x94" => "\xe2\x80\x9d", /* RIGHT DOUBLE QUOTATION MARK */
        "\xc2\x95" => "\xe2\x80\xa2", /* BULLET */
        "\xc2\x96" => "\xe2\x80\x93", /* EN DASH */
        "\xc2\x97" => "\xe2\x80\x94", /* EM DASH */
        "\xc2\x98" => "\xcb\x9c",     /* SMALL TILDE */
        "\xc2\x99" => "\xe2\x84\xa2", /* TRADE MARK SIGN */
        "\xc2\x9a" => "\xc5\xa1",     /* LATIN SMALL LETTER S WITH CARON */
        "\xc2\x9b" => "\xe2\x80\xba", /* SINGLE RIGHT-POINTING ANGLE QUOTATION*/
        "\xc2\x9c" => "\xc5\x93",     /* LATIN SMALL LIGATURE OE */
        "\xc2\x9e" => "\xc5\xbe",     /* LATIN SMALL LETTER Z WITH CARON */
        "\xc2\x9f" => "\xc5\xb8"      /* LATIN CAPITAL LETTER Y WITH DIAERESIS*/
        )
  • $ldap_base_dn =
  • $ldap_givenname_attr =
  • $ldap_loginldap_attr =
  • $ldap_loginname_asdn =
  • $ldap_mail_attr =
  • $ldap_manager_dn =
  • $ldap_manager_pass =
  • $ldap_name_attr =
  • $ldap_port =  '389'
  • $ldap_server =
  • $ldap_surname_attr =
  • $ldap_version =  '3'
  • $_ds =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsAuth

  • XoopsAuth::$_dao =
  • XoopsAuth::$_errors =

Method Summary

Inherited Method Summary

Inherited From Class XoopsAuth

  • XoopsAuth::XoopsAuth()
    Authentication Service constructor
  • XoopsAuth::authenticate()
  • XoopsAuth::getErrors()
    return the errors for this object as an array
  • XoopsAuth::getHtmlErrors()
    return the errors for this object as html
  • XoopsAuth::setErrors()
    add an error

Method Detail

    XoopsAuthLdap::XoopsAuthLdap

    XoopsAuthLdap( &$dao );

    Parameters

    &$dao

    Remarks

    Authentication Service constructor

    [ Top ]

    XoopsAuthLdap::authenticate

    authenticate( string $uname, [string $pwd = null] );

    Overridden in child classes as:

    XoopsAuthAds::authenticate()
    Authenticate user again LDAP directory (Bind)

    Overrides XoopsAuth::authenticate() (parent method not documented)

    Parameters

    $uname

    Username

    $pwd

    Password

    Remarks

    Authenticate user again LDAP directory (Bind)

    2 options : Authenticate directly with uname in the DN Authenticate with manager, search the dn

    [ Top ]

    XoopsAuthLdap::cp1252_to_utf8

    cp1252_to_utf8( $str );

    Parameters

    $str

    [ Top ]

    XoopsAuthLdap::getFilter

    getFilter( $uname );

    Parameters

    $uname

    Returns

    object

    Remarks

    Load user from XOOPS Database

    [ Top ]

    XoopsAuthLdap::getUserDN

    getUserDN( $uname );

    Parameters

    $uname

    Returns

    or false

    Remarks

    Compose the user DN with the configuration.

    [ Top ]

    XoopsAuthLdap::loadXoopsUser

    loadXoopsUser( $userdn, $uname, [ $pwd = null] );

    Parameters

    $userdn

    $uname

    $pwd

    [ Top ]

Variable Detail

  • $cp1252_map = array (
       "\xc2\x80" => "\xe2\x82\xac", /* EURO SIGN */
        "\xc2\x82" => "\xe2\x80\x9a", /* SINGLE LOW-9 QUOTATION MARK */
        "\xc2\x83" => "\xc6\x92",     /* LATIN SMALL LETTER F WITH HOOK */
        "\xc2\x84" => "\xe2\x80\x9e", /* DOUBLE LOW-9 QUOTATION MARK */
        "\xc2\x85" => "\xe2\x80\xa6", /* HORIZONTAL ELLIPSIS */
        "\xc2\x86" => "\xe2\x80\xa0", /* DAGGER */
        "\xc2\x87" => "\xe2\x80\xa1", /* DOUBLE DAGGER */
        "\xc2\x88" => "\xcb\x86",     /* MODIFIER LETTER CIRCUMFLEX ACCENT */
        "\xc2\x89" => "\xe2\x80\xb0", /* PER MILLE SIGN */
        "\xc2\x8a" => "\xc5\xa0",     /* LATIN CAPITAL LETTER S WITH CARON */
        "\xc2\x8b" => "\xe2\x80\xb9", /* SINGLE LEFT-POINTING ANGLE QUOTATION */
        "\xc2\x8c" => "\xc5\x92",     /* LATIN CAPITAL LIGATURE OE */
        "\xc2\x8e" => "\xc5\xbd",     /* LATIN CAPITAL LETTER Z WITH CARON */
        "\xc2\x91" => "\xe2\x80\x98", /* LEFT SINGLE QUOTATION MARK */
        "\xc2\x92" => "\xe2\x80\x99", /* RIGHT SINGLE QUOTATION MARK */
        "\xc2\x93" => "\xe2\x80\x9c", /* LEFT DOUBLE QUOTATION MARK */
        "\xc2\x94" => "\xe2\x80\x9d", /* RIGHT DOUBLE QUOTATION MARK */
        "\xc2\x95" => "\xe2\x80\xa2", /* BULLET */
        "\xc2\x96" => "\xe2\x80\x93", /* EN DASH */
        "\xc2\x97" => "\xe2\x80\x94", /* EM DASH */
        "\xc2\x98" => "\xcb\x9c",     /* SMALL TILDE */
        "\xc2\x99" => "\xe2\x84\xa2", /* TRADE MARK SIGN */
        "\xc2\x9a" => "\xc5\xa1",     /* LATIN SMALL LETTER S WITH CARON */
        "\xc2\x9b" => "\xe2\x80\xba", /* SINGLE RIGHT-POINTING ANGLE QUOTATION*/
        "\xc2\x9c" => "\xc5\x93",     /* LATIN SMALL LIGATURE OE */
        "\xc2\x9e" => "\xc5\xbe",     /* LATIN SMALL LETTER Z WITH CARON */
        "\xc2\x9f" => "\xc5\xb8"      /* LATIN CAPITAL LETTER Y WITH DIAERESIS*/
        )     [line 39]
  • Data type: mixed

  • $ldap_base_dn = [line 72]
  • Data type: mixed

  • $ldap_givenname_attr = [line 78]
  • Data type: mixed

  • $ldap_loginldap_attr = [line 74]
  • Data type: mixed

  • $ldap_loginname_asdn = [line 73]
  • Data type: mixed

  • $ldap_mail_attr = [line 75]
  • Data type: mixed

  • $ldap_manager_dn = [line 79]
  • Data type: mixed

  • $ldap_manager_pass = [line 80]
  • Data type: mixed

  • $ldap_name_attr = [line 76]
  • Data type: mixed

  • $ldap_port =  '389' [line 70]
  • Data type: mixed

  • $ldap_server = [line 69]
  • Data type: mixed

  • $ldap_surname_attr = [line 77]
  • Data type: mixed

  • $ldap_version =  '3' [line 71]
  • Data type: mixed

  • $_ds = [line 81]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:56:33 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsAuthProvisionning

Class XoopsAuthProvisionning

[line 36]

Location: /auth/auth_provisionning.php

author

Pierre-Eric MENUET    <pemphp@free.fr>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_auth_instance =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsAuthProvisionning::XoopsAuthProvisionning

XoopsAuthProvisionning(

&$auth_instance );

    Parameters

    &$auth_instance

    Remarks

    Authentication Service constructor

    [ Top ]

    XoopsAuthProvisionning::add

add(

$datas,
$uname, [
$pwd = null] );

    Parameters

    $datas

    $uname

    $pwd

    Remarks

    Add a new user to the system

    [ Top ]

    XoopsAuthProvisionning::change

change(

&$xoopsUser,
$datas,
$uname, [
$pwd = null] );

    Parameters

    &$xoopsUser

    $datas

    $uname

    $pwd

    Remarks

    Modify user information

    [ Top ]

    XoopsAuthProvisionning::delete

delete(
 );

    Remarks

    Modify a user

    [ Top ]

    XoopsAuthProvisionning::getInstance

&getInstance(

&$auth_instance );

    Parameters

    &$auth_instance

    [ Top ]

    XoopsAuthProvisionning::getXoopsUser

getXoopsUser(

$uname );

    Parameters

    $uname

    Returns

    or false

    Remarks

    Return a Xoops User Object

    [ Top ]

    XoopsAuthProvisionning::resetpwd

resetpwd(
 );

    Remarks

    Add a new user to the system

    [ Top ]

    XoopsAuthProvisionning::restore

restore(
 );

    Remarks

    Restore a user

    [ Top ]

    XoopsAuthProvisionning::suspend

suspend(
 );

    Remarks

    Suspend a user

    [ Top ]

    XoopsAuthProvisionning::sync

sync(

$datas,
$uname, [
$pwd = null] );

    Parameters

    $datas

    $uname

    $pwd

    Remarks

    Launch the synchronisation process

    [ Top ]

Variable Detail

  • $_auth_instance =  [line 38]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:56:36 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsAuthXoops

Class XoopsAuthXoops

[line 35]
XoopsAuth
   |
   --XoopsAuthXoops
Location: /auth/auth_xoops.php

author

Pierre-Eric MENUET <pemphp@free.fr>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsAuth

  • XoopsAuth::$_dao =
  • XoopsAuth::$_errors =

Method Summary

Inherited Method Summary

Inherited From Class XoopsAuth

  • XoopsAuth::XoopsAuth()
    Authentication Service constructor
  • XoopsAuth::authenticate()
  • XoopsAuth::getErrors()
    return the errors for this object as an array
  • XoopsAuth::getHtmlErrors()
    return the errors for this object as html
  • XoopsAuth::setErrors()
    add an error

Method Detail

    XoopsAuthXoops::XoopsAuthXoops

    XoopsAuthXoops( &$dao );

    Parameters

    &$dao

    Remarks

    Authentication Service constructor

    [ Top ]

    XoopsAuthXoops::authenticate

    authenticate( string $uname, [string $pwd = null] );

    Overrides XoopsAuth::authenticate() (parent method not documented)

    Parameters

    $uname

    $pwd

    Remarks

    Authenticate user

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:56:38 +0200 by phpDocumentor 1.4.0a2


Docs for page auth.php

File: /auth/auth.php

filesource

Source Code for this file

Classes in this file:
XoopsAuth

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:56:21 +0200 by phpDocumentor 1.4.0a2


Docs for page authfactory.php

File: /auth/authfactory.php

filesource

Source Code for this file

Classes in this file:
XoopsAuthFactory

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:56:24 +0200 by phpDocumentor 1.4.0a2


Docs for page auth_ads.php

File: /auth/auth_ads.php

author

Pierre-Eric MENUET <pemphp@free.fr>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsAuthAds

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH.'/class/auth/auth_ldap.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH.'/class/auth/auth_ldap.php' [line 35]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:56:26 +0200 by phpDocumentor 1.4.0a2


Docs for page auth_ldap.php

File: /auth/auth_ldap.php

author

Pierre-Eric MENUET <pemphp@free.fr>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsAuthLdap

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH.'/class/auth/auth_provisionning.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH.'/class/auth/auth_provisionning.php' [line 35]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:56:29 +0200 by phpDocumentor 1.4.0a2


Docs for page auth_provisionning.php

File: /auth/auth_provisionning.php

filesource

Source Code for this file

Classes in this file:
XoopsAuthProvisionning

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:56:34 +0200 by phpDocumentor 1.4.0a2


Docs for page auth_xoops.php

File: /auth/auth_xoops.php

filesource

Source Code for this file

Classes in this file:
XoopsAuthXoops

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:56:37 +0200 by phpDocumentor 1.4.0a2


File Source for class.tar.php

Source for file class.tar.php

Documentation is available at class.tar.php

  • <?php
    •

  • // $Id: class.tar.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • /*
    •

  •     package::i.tools
    •

  •
    •

  •     php-downloader    v1.0    -    www.ipunkt.biz
    •

  •
    •

  •     (c)    2002 - www.ipunkt.biz (rok)
    •

  • */
    •

  •
    •

  • /*
    •

  • =======================================================================
    •

  • Name:
    •

  •     tar Class
    •

  •
    •

  • Author:
    •

  •     Josh Barger <joshb@npt.com>
    •

  •
    •

  • Description:
    •

  •     This class reads and writes Tape-Archive (TAR) Files and Gzip
    •

  •     compressed TAR files, which are mainly used on UNIX systems.
    •

  •     This class works on both windows AND unix systems, and does
    •

  •     NOT rely on external applications!! Woohoo!
    •

  •
    •

  • Usage:
    •

  •     Copyright (C) 2002  Josh Barger
    •

  •
    •

  •     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 (at your option) 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 at:
    •

  •         http://www.gnu.org/copyleft/lesser.html
    •

  •
    •

  •     If you use this script in your application/website, please
    •

  •     send me an e-mail letting me know about it :)
    •

  •
    •

  • Bugs:
    •

  •     Please report any bugs you might find to my e-mail address
    •

  •     at joshb@npt.com.  If you have already created a fix/patch
    •

  •     for the bug, please do send it to me so I can incorporate it into my release.
    •

  •
    •

  • Version History:
    •

  •     1.0    04/10/2002    - InitialRelease
    •

  •
    •

  •     2.0    04/11/2002    - Merged both tarReader and tarWriter
    •

  •                   classes into one
    •

  •                 - Added support for gzipped tar files
    •

  •                   Remember to name for .tar.gz or .tgz
    •

  •                   if you use gzip compression!
    •

  •                   :: THIS REQUIRES ZLIB EXTENSION ::
    •

  •                 - Added additional comments to
    •

  •                   functions to help users
    •

  •                 - Added ability to remove files and
    •

  •                   directories from archive
    •

  •     2.1    04/12/2002    - Fixed serious bug in generating tar
    •

  •                 - Created another example file
    •

  •                 - Added check to make sure ZLIB is
    •

  •                   installed before running GZIP
    •

  •                   compression on TAR
    •

  •     2.2    05/07/2002    - Added automatic detection of Gzipped
    •

  •                   tar files (Thanks go to Jidgen Falch
    •

  •                   for the idea)
    •

  •                 - Changed "private" functions to have
    •

  •                   special function names beginning with
    •

  •                   two underscores
    •

  • =======================================================================
    •

  • XOOPS changes onokazu <webmaster@xoops.org>
    •

  •
    •

  •     12/25/2002 - Added flag to addFile() function for binary files
    •

  •
    •

  • =======================================================================
    •

  • */
    •

  •
    •

  • /**
    •

  •  * tar Class
    •

  •  *
    •

  •  * This class reads and writes Tape-Archive (TAR) Files and Gzip
    •

  •  * compressed TAR files, which are mainly used on UNIX systems.
    •

  •  * This class works on both windows AND unix systems, and does
    •

  •  * NOT rely on external applications!! Woohoo!
    •

  •  *
    •

  •  * @author    Josh Barger <joshb@npt.com>
    •

  •  * @copyright    Copyright (C) 2002  Josh Barger
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  core
    •

  •  */
    •

  • class tar
    •

  • {
    •

  •     /**#@+
    •

  •      * Unprocessed Archive Information
    •

  •      */
    •

  •     var $filename;
    •

  •     var $isGzipped;
    •

  •     var $tar_file;
    •

  •     /**#@-*/
    •

  •
    •

  •     /**#@+
    •

  •      * Processed Archive Information
    •

  •      */
    •

  •     var $files;
    •

  •     var $directories;
    •

  •     var $numFiles;
    •

  •     var $numDirectories;
    •

  •     /**#@-*/
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Class Constructor -- Does nothing...
    •

  •      */
    •

  •     function tar()
    •

  •     {
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Computes the unsigned Checksum of a file's header
    •

  •      * to try to ensure valid file
    •

  •      *
    •

  •      * @param    string  $bytestring
    •

  •      *
    •

  •      * @access    private
    •

  •      */
    •

  •     function __computeUnsignedChecksum($bytestring)
    •

  •     {
    •

  •         $unsigned_chksum = '';
    •

  •         for($i=0; $i<512; $i++)
    •

  •             $unsigned_chksum += ord($bytestring[$i]);
    •

  •         for($i=0; $i<8; $i++)
    •

  •             $unsigned_chksum -= ord($bytestring[148 + $i]);
    •

  •         $unsigned_chksum += ord(" ") * 8;
    •

  •
    •

  •         return $unsigned_chksum;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Converts a NULL padded string to a non-NULL padded string
    •

  •      *
    •

  •      * @param   string  $string
    •

  •      *
    •

  •      * @return  string
    •

  •      *
    •

  •      * @access    private
    •

  •      ***/
    •

  •     function __parseNullPaddedString($string)
    •

  •     {
    •

  •         $position = strpos($string,chr(0));
    •

  •         return substr($string,0,$position);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * This function parses the current TAR file
    •

  •      *
    •

  •      * @return  bool    always TRUE
    •

  •      *
    •

  •      * @access    private
    •

  •      ***/
    •

  •     function __parseTar()
    •

  •     {
    •

  •         // Read Files from archive
    •

  •         $tar_length = strlen($this->tar_file);
    •

  •         $main_offset = 0;
    •

  •         $this->numFiles = 0;
    •

  •         while ( $main_offset < $tar_length ) {
    •

  •             // If we read a block of 512 nulls, we are at the end of the archive
    •

  •             if(substr($this->tar_file,$main_offset,512) == str_repeat(chr(0),512))
    •

  •                 break;
    •

  •
    •

  •             // Parse file name
    •

  •             $file_name        = $this->__parseNullPaddedString(substr($this->tar_file,$main_offset,100));
    •

  •
    •

  •             // Parse the file mode
    •

  •             $file_mode        = substr($this->tar_file,$main_offset + 100,8);
    •

  •
    •

  •             // Parse the file user ID
    •

  •             $file_uid        = octdec(substr($this->tar_file,$main_offset + 108,8));
    •

  •
    •

  •             // Parse the file group ID
    •

  •             $file_gid        = octdec(substr($this->tar_file,$main_offset + 116,8));
    •

  •
    •

  •             // Parse the file size
    •

  •             $file_size        = octdec(substr($this->tar_file,$main_offset + 124,12));
    •

  •
    •

  •             // Parse the file update time - unix timestamp format
    •

  •             $file_time        = octdec(substr($this->tar_file,$main_offset + 136,12));
    •

  •
    •

  •             // Parse Checksum
    •

  •             $file_chksum        = octdec(substr($this->tar_file,$main_offset + 148,6));
    •

  •
    •

  •             // Parse user name
    •

  •             $file_uname        = $this->__parseNullPaddedString(substr($this->tar_file,$main_offset + 265,32));
    •

  •
    •

  •             // Parse Group name
    •

  •             $file_gname        = $this->__parseNullPaddedString(substr($this->tar_file,$main_offset + 297,32));
    •

  •
    •

  •             // Make sure our file is valid
    •

  •             if($this->__computeUnsignedChecksum(substr($this->tar_file,$main_offset,512)) != $file_chksum)
    •

  •                 return false;
    •

  •
    •

  •             // Parse File Contents
    •

  •             $file_contents        = substr($this->tar_file,$main_offset + 512,$file_size);
    •

  •
    •

  •             /*    ### Unused Header Information ###
    •

  •                 $activeFile["typeflag"]        = substr($this->tar_file,$main_offset + 156,1);
    •

  •                 $activeFile["linkname"]        = substr($this->tar_file,$main_offset + 157,100);
    •

  •                 $activeFile["magic"]        = substr($this->tar_file,$main_offset + 257,6);
    •

  •                 $activeFile["version"]        = substr($this->tar_file,$main_offset + 263,2);
    •

  •                 $activeFile["devmajor"]        = substr($this->tar_file,$main_offset + 329,8);
    •

  •                 $activeFile["devminor"]        = substr($this->tar_file,$main_offset + 337,8);
    •

  •                 $activeFile["prefix"]        = substr($this->tar_file,$main_offset + 345,155);
    •

  •                 $activeFile["endheader"]    = substr($this->tar_file,$main_offset + 500,12);
    •

  •             */
    •

  •
    •

  •             if ( $file_size > 0 ) {
    •

  •                 // Increment number of files
    •

  •                 $this->numFiles++;
    •

  •
    •

  •                 // Create us a new file in our array
    •

  •                 $activeFile = &$this->files[];
    •

  •
    •

  •                 // Asign Values
    •

  •                 $activeFile["name"]        = $file_name;
    •

  •                 $activeFile["mode"]        = $file_mode;
    •

  •                 $activeFile["size"]        = $file_size;
    •

  •                 $activeFile["time"]        = $file_time;
    •

  •                 $activeFile["user_id"]        = $file_uid;
    •

  •                 $activeFile["group_id"]        = $file_gid;
    •

  •                 $activeFile["user_name"]    = $file_uname;
    •

  •                 $activeFile["group_name"]    = $file_gname;
    •

  •                 $activeFile["checksum"]        = $file_chksum;
    •

  •                 $activeFile["file"]        = $file_contents;
    •

  •             } else {
    •

  •                 // Increment number of directories
    •

  •                 $this->numDirectories++;
    •

  •
    •

  •                 // Create a new directory in our array
    •

  •                 $activeDir = &$this->directories[];
    •

  •
    •

  •                 // Assign values
    •

  •                 $activeDir["name"]        = $file_name;
    •

  •                 $activeDir["mode"]        = $file_mode;
    •

  •                 $activeDir["time"]        = $file_time;
    •

  •                 $activeDir["user_id"]        = $file_uid;
    •

  •                 $activeDir["group_id"]        = $file_gid;
    •

  •                 $activeDir["user_name"]        = $file_uname;
    •

  •                 $activeDir["group_name"]    = $file_gname;
    •

  •                 $activeDir["checksum"]        = $file_chksum;
    •

  •             }
    •

  •
    •

  •             // Move our offset the number of blocks we have processed
    •

  •             $main_offset += 512 + (ceil($file_size / 512) * 512);
    •

  •         }
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Read a non gzipped tar file in for processing.
    •

  •      *
    •

  •      * @param   string  $filename   full filename
    •

  •      * @return  bool    always TRUE
    •

  •      *
    •

  •      * @access    private
    •

  •      ***/
    •

  •     function __readTar($filename='')
    •

  •     {
    •

  •         // Set the filename to load
    •

  •         if(!$filename)
    •

  •             $filename = $this->filename;
    •

  •
    •

  •         // Read in the TAR file
    •

  •         $fp = fopen($filename,"rb");
    •

  •         $this->tar_file = fread($fp,filesize($filename));
    •

  •         fclose($fp);
    •

  •
    •

  •         if($this->tar_file[0] == chr(31) && $this->tar_file[1] == chr(139) && $this->tar_file[2] == chr(8)) {
    •

  •             if(!function_exists("gzinflate"))
    •

  •                 return false;
    •

  •
    •

  •             $this->isGzipped = true;
    •

  •
    •

  •             $this->tar_file = gzinflate(substr($this->tar_file,10,-4));
    •

  •         }
    •

  •
    •

  •         // Parse the TAR file
    •

  •         $this->__parseTar();
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Generates a TAR file from the processed data
    •

  •      *
    •

  •      * @return  bool    always TRUE
    •

  •      *
    •

  •      * @access    private
    •

  •      ***/
    •

  •     function __generateTAR()
    •

  •     {
    •

  •         // Clear any data currently in $this->tar_file
    •

  •         unset($this->tar_file);
    •

  •
    •

  •         // Generate Records for each directory, if we have directories
    •

  •         if($this->numDirectories > 0) {
    •

  •             foreach($this->directories as $key => $information) {
    •

  •                 unset($header);
    •

  •
    •

  •                 // Generate tar header for this directory
    •

  •                 // Filename, Permissions, UID, GID, size, Time, checksum, typeflag, linkname, magic, version, user name, group name, devmajor, devminor, prefix, end
    •

  •                 $header .= str_pad($information["name"],100,chr(0));
    •

  •                 $header .= str_pad(decoct($information["mode"]),7,"0",STR_PAD_LEFT) . chr(0);
    •

  •                 $header .= str_pad(decoct($information["user_id"]),7,"0",STR_PAD_LEFT) . chr(0);
    •

  •                 $header .= str_pad(decoct($information["group_id"]),7,"0",STR_PAD_LEFT) . chr(0);
    •

  •                 $header .= str_pad(decoct(0),11,"0",STR_PAD_LEFT) . chr(0);
    •

  •                 $header .= str_pad(decoct($information["time"]),11,"0",STR_PAD_LEFT) . chr(0);
    •

  •                 $header .= str_repeat(" ",8);
    •

  •                 $header .= "5";
    •

  •                 $header .= str_repeat(chr(0),100);
    •

  •                 $header .= str_pad("ustar",6,chr(32));
    •

  •                 $header .= chr(32) . chr(0);
    •

  •                 $header .= str_pad("",32,chr(0));
    •

  •                 $header .= str_pad("",32,chr(0));
    •

  •                 $header .= str_repeat(chr(0),8);
    •

  •                 $header .= str_repeat(chr(0),8);
    •

  •                 $header .= str_repeat(chr(0),155);
    •

  •                 $header .= str_repeat(chr(0),12);
    •

  •
    •

  •                 // Compute header checksum
    •

  •                 $checksum = str_pad(decoct($this->__computeUnsignedChecksum($header)),6,"0",STR_PAD_LEFT);
    •

  •                 for($i=0; $i<6; $i++) {
    •

  •                     $header[(148 + $i)] = substr($checksum,$i,1);
    •

  •                 }
    •

  •                 $header[154] = chr(0);
    •

  •                 $header[155] = chr(32);
    •

  •
    •

  •                 // Add new tar formatted data to tar file contents
    •

  •                 $this->tar_file .= $header;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         // Generate Records for each file, if we have files (We should...)
    •

  •         if($this->numFiles > 0) {
    •

  •             $this->tar_file = '';
    •

  •             foreach($this->files as $key => $information) {
    •

  •                 unset($header);
    •

  •
    •

  •                 // Generate the TAR header for this file
    •

  •                 // Filename, Permissions, UID, GID, size, Time, checksum, typeflag, linkname, magic, version, user name, group name, devmajor, devminor, prefix, end
    •

  •                 $header = str_pad($information["name"],100,chr(0));
    •

  •                 $header .= str_pad(decoct($information["mode"]),7,"0",STR_PAD_LEFT) . chr(0);
    •

  •                 $header .= str_pad(decoct($information["user_id"]),7,"0",STR_PAD_LEFT) . chr(0);
    •

  •                 $header .= str_pad(decoct($information["group_id"]),7,"0",STR_PAD_LEFT) . chr(0);
    •

  •                 $header .= str_pad(decoct($information["size"]),11,"0",STR_PAD_LEFT) . chr(0);
    •

  •                 $header .= str_pad(decoct($information["time"]),11,"0",STR_PAD_LEFT) . chr(0);
    •

  •                 $header .= str_repeat(" ",8);
    •

  •                 $header .= "0";
    •

  •                 $header .= str_repeat(chr(0),100);
    •

  •                 $header .= str_pad("ustar",6,chr(32));
    •

  •                 $header .= chr(32) . chr(0);
    •

  •                 $header .= str_pad($information["user_name"],32,chr(0));    // How do I get a file's user name from PHP?
    •

  •                 $header .= str_pad($information["group_name"],32,chr(0));    // How do I get a file's group name from PHP?
    •

  •                 $header .= str_repeat(chr(0),8);
    •

  •                 $header .= str_repeat(chr(0),8);
    •

  •                 $header .= str_repeat(chr(0),155);
    •

  •                 $header .= str_repeat(chr(0),12);
    •

  •
    •

  •                 // Compute header checksum
    •

  •                 $checksum = str_pad(decoct($this->__computeUnsignedChecksum($header)),6,"0",STR_PAD_LEFT);
    •

  •                 for($i=0; $i<6; $i++) {
    •

  •                     $header[(148 + $i)] = substr($checksum,$i,1);
    •

  •                 }
    •

  •                 $header[154] = chr(0);
    •

  •                 $header[155] = chr(32);
    •

  •
    •

  •                 // Pad file contents to byte count divisible by 512
    •

  •                 $file_contents = str_pad($information["file"],(ceil($information["size"] / 512) * 512),chr(0));
    •

  •
    •

  •                 // Add new tar formatted data to tar file contents
    •

  •                 $this->tar_file .= $header . $file_contents;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         // Add 512 bytes of NULLs to designate EOF
    •

  •         $this->tar_file .= str_repeat(chr(0),512);
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Open a TAR file
    •

  •      *
    •

  •      * @param   string  $filename
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function openTAR($filename)
    •

  •     {
    •

  •         // Clear any values from previous tar archives
    •

  •         unset($this->filename);
    •

  •         unset($this->isGzipped);
    •

  •         unset($this->tar_file);
    •

  •         unset($this->files);
    •

  •         unset($this->directories);
    •

  •         unset($this->numFiles);
    •

  •         unset($this->numDirectories);
    •

  •
    •

  •         // If the tar file doesn't exist...
    •

  •         if(!file_exists($filename))
    •

  •             return false;
    •

  •
    •

  •         $this->filename = $filename;
    •

  •
    •

  •         // Parse this file
    •

  •         $this->__readTar();
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Appends a tar file to the end of the currently opened tar file.
    •

  •      *
    •

  •      * @param   string  $filename
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function appendTar($filename)
    •

  •     {
    •

  •         // If the tar file doesn't exist...
    •

  •         if(!file_exists($filename))
    •

  •             return false;
    •

  •
    •

  •         $this->__readTar($filename);
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Retrieves information about a file in the current tar archive
    •

  •      *
    •

  •      * @param   string  $filename
    •

  •      * @return  string  FALSE on fail
    •

  •      ***/
    •

  •     function getFile($filename)
    •

  •     {
    •

  •         if ( $this->numFiles > 0 ) {
    •

  •             foreach($this->files as $key => $information) {
    •

  •                 if($information["name"] == $filename)
    •

  •                     return $information;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Retrieves information about a directory in the current tar archive
    •

  •      *
    •

  •      * @param   string  $dirname
    •

  •      * @return  string  FALSE on fail
    •

  •      ***/
    •

  •     function getDirectory($dirname)
    •

  •     {
    •

  •         if($this->numDirectories > 0) {
    •

  •             foreach($this->directories as $key => $information) {
    •

  •                 if($information["name"] == $dirname)
    •

  •                     return $information;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Check if this tar archive contains a specific file
    •

  •      *
    •

  •      * @param   string  $filename
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function containsFile($filename)
    •

  •     {
    •

  •         if ( $this->numFiles > 0 ) {
    •

  •             foreach($this->files as $key => $information) {
    •

  •                 if($information["name"] == $filename)
    •

  •                     return true;
    •

  •             }
    •

  •         }
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Check if this tar archive contains a specific directory
    •

  •      *
    •

  •      * @param   string  $dirname
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function containsDirectory($dirname)
    •

  •     {
    •

  •         if ( $this->numDirectories > 0 ) {
    •

  •             foreach ( $this->directories as $key => $information ) {
    •

  •                 if ( $information["name"] == $dirname ) {
    •

  •                     return true;
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add a directory to this tar archive
    •

  •      *
    •

  •      * @param   string  $dirname
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function addDirectory($dirname)
    •

  •     {
    •

  •         if ( !file_exists($dirname) ) {
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         // Get directory information
    •

  •         $file_information = stat($dirname);
    •

  •
    •

  •         // Add directory to processed data
    •

  •         $this->numDirectories++;
    •

  •         $activeDir        = &$this->directories[];
    •

  •         $activeDir["name"]    = $dirname;
    •

  •         $activeDir["mode"]    = $file_information["mode"];
    •

  •         $activeDir["time"]    = $file_information["time"];
    •

  •         $activeDir["user_id"]    = $file_information["uid"];
    •

  •         $activeDir["group_id"]    = $file_information["gid"];
    •

  •         $activeDir["checksum"]    = $checksum;
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add a file to the tar archive
    •

  •      *
    •

  •      * @param   string  $filename
    •

  •      * @param   boolean $binary     Binary file?
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function addFile($filename, $binary = false)
    •

  •     {
    •

  •         // Make sure the file we are adding exists!
    •

  •         if ( !file_exists($filename) ) {
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         // Make sure there are no other files in the archive that have this same filename
    •

  •         if ( $this->containsFile($filename) ) {
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         // Get file information
    •

  •         $file_information = stat($filename);
    •

  •
    •

  •         // Read in the file's contents
    •

  •         if (!$binary) {
    •

  •             $fp = fopen($filename, "r");
    •

  •         } else {
    •

  •             $fp = fopen($filename, "rb");
    •

  •         }
    •

  •         $file_contents = fread($fp,filesize($filename));
    •

  •         fclose($fp);
    •

  •
    •

  •         // Add file to processed data
    •

  •         $this->numFiles++;
    •

  •         $activeFile            = &$this->files[];
    •

  •         $activeFile["name"]        = $filename;
    •

  •         $activeFile["mode"]        = $file_information["mode"];
    •

  •         $activeFile["user_id"]        = $file_information["uid"];
    •

  •         $activeFile["group_id"]        = $file_information["gid"];
    •

  •         $activeFile["size"]        = $file_information["size"];
    •

  •         $activeFile["time"]        = $file_information["mtime"];
    •

  •         $activeFile["checksum"]        = isset($checksum) ? $checksum : '';
    •

  •         $activeFile["user_name"]    = "";
    •

  •         $activeFile["group_name"]    = "";
    •

  •         $activeFile["file"]        = trim($file_contents);
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Remove a file from the tar archive
    •

  •      *
    •

  •      * @param   string  $filename
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function removeFile($filename)
    •

  •     {
    •

  •         if ( $this->numFiles > 0 ) {
    •

  •             foreach ( $this->files as $key => $information ) {
    •

  •                 if ( $information["name"] == $filename ) {
    •

  •                     $this->numFiles--;
    •

  •                     unset($this->files[$key]);
    •

  •                     return true;
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Remove a directory from the tar archive
    •

  •      *
    •

  •      * @param   string  $dirname
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function removeDirectory($dirname)
    •

  •     {
    •

  •         if ( $this->numDirectories > 0 ) {
    •

  •             foreach ( $this->directories as $key => $information ) {
    •

  •                 if ( $information["name"] == $dirname ) {
    •

  •                     $this->numDirectories--;
    •

  •                     unset($this->directories[$key]);
    •

  •                     return true;
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Write the currently loaded tar archive to disk
    •

  •      *
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function saveTar()
    •

  •     {
    •

  •         if ( !$this->filename ) {
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         // Write tar to current file using specified gzip compression
    •

  •         $this->toTar($this->filename,$this->isGzipped);
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Saves tar archive to a different file than the current file
    •

  •      *
    •

  •      * @param   string  $filename
    •

  •      * @param   bool    $useGzip    Use GZ compression?
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function toTar($filename,$useGzip)
    •

  •     {
    •

  •         if ( !$filename ) {
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         // Encode processed files into TAR file format
    •

  •         $this->__generateTar();
    •

  •
    •

  •         // GZ Compress the data if we need to
    •

  •         if ( $useGzip ) {
    •

  •             // Make sure we have gzip support
    •

  •             if ( !function_exists("gzencode") ) {
    •

  •                 return false;
    •

  •             }
    •

  •
    •

  •             $file = gzencode($this->tar_file);
    •

  •         } else {
    •

  •             $file = $this->tar_file;
    •

  •         }
    •

  •
    •

  •         // Write the TAR file
    •

  •         $fp = fopen($filename,"wb");
    •

  •         fwrite($fp,$file);
    •

  •         fclose($fp);
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sends tar archive to stdout
    •

  •      *
    •

  •      * @param   string  $filename
    •

  •      * @param   bool    $useGzip    Use GZ compression?
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function toTarOutput($filename,$useGzip)
    •

  •     {
    •

  •         if ( !$filename ) {
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         // Encode processed files into TAR file format
    •

  •         $this->__generateTar();
    •

  •
    •

  •         // GZ Compress the data if we need to
    •

  •         if ( $useGzip ) {
    •

  •             // Make sure we have gzip support
    •

  •             if ( !function_exists("gzencode") ) {
    •

  •                 return false;
    •

  •             }
    •

  •
    •

  •             $file = gzencode($this->tar_file);
    •

  •         } else {
    •

  •             $file = $this->tar_file;
    •

  •         }
    •

  •
    •

  •         return $file;
    •

  •     }
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:14 +0200 by phpDocumentor 1.4.0a2


File Source for downloader.php

Source for file downloader.php

Documentation is available at downloader.php

  • <?php
    •

  • // $Id: downloader.php 887 2007-07-28 08:54:53Z phppp $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • /**
    •

  •  * Sends non HTML files through a http socket
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  core
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsDownloader
    •

  • {
    •

  •
    •

  •     /**#@+
    •

  •      * file information
    •

  •      */
    •

  •     var $mimetype;
    •

  •     var $ext;
    •

  •     var $archiver;
    •

  •     /**#@-*/
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      */
    •

  •     function XoopsDownloader()
    •

  •     {
    •

  •         //EMPTY
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Send the HTTP header
    •

  •      *
    •

  •      * @param    string  $filename
    •

  •      *
    •

  •      * @access    private
    •

  •      */
    •

  •     function _header($filename)
    •

  •     {
    •

  •         if (function_exists('mb_http_output')) {
    •

  •             mb_http_output('pass');
    •

  •         }
    •

  •         header('Content-Type: '.$this->mimetype);
    •

  •         if (preg_match("/MSIE ([0-9]\.[0-9]{1,2})/", $_SERVER['HTTP_USER_AGENT'])) {
    •

  •             header('Content-Disposition: attachment; filename="'.$filename.'"');
    •

  •             header('Expires: 0');
    •

  •             header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    •

  •             header('Pragma: public');
    •

  •         } else {
    •

  •             header('Content-Disposition: attachment; filename="'.$filename.'"');
    •

  •             header('Expires: 0');
    •

  •             header('Pragma: no-cache');
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * XoopsDownloader::addFile()
    •

  •      *
    •

  •      * @param   string  $filepath
    •

  •      * @param   string   $newfilename
    •

  •      ***/
    •

  •     function addFile($filepath, $newfilename=null)
    •

  •     {
    •

  •         //EMPTY
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * XoopsDownloader::addBinaryFile()
    •

  •      *
    •

  •      * @param   string  $filepath
    •

  •      * @param   string  $newfilename
    •

  •      ***/
    •

  •     function addBinaryFile($filepath, $newfilename=null)
    •

  •     {
    •

  •         //EMPTY
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * XoopsDownloader::addFileData()
    •

  •      *
    •

  •      * @param   mixed     $data
    •

  •      * @param   string    $filename
    •

  •      * @param   integer   $time
    •

  •      ***/
    •

  •     function addFileData(&$data, $filename, $time=0)
    •

  •     {
    •

  •         //EMPTY
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * XoopsDownloader::addBinaryFileData()
    •

  •      *
    •

  •      * @param   mixed   $data
    •

  •      * @param   string  $filename
    •

  •      * @param   integer $time
    •

  •      ***/
    •

  •     function addBinaryFileData(&$data, $filename, $time=0)
    •

  •     {
    •

  •         //EMPTY
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * XoopsDownloader::download()
    •

  •      *
    •

  •      * @param   string  $name
    •

  •      * @param   boolean $gzip
    •

  •      ***/
    •

  •     function download($name, $gzip = true)
    •

  •     {
    •

  •         //EMPTY
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:49 +0200 by phpDocumentor 1.4.0a2


File Source for module.errorhandler.php

Source for file module.errorhandler.php

Documentation is available at module.errorhandler.php

  • <?php
    •

  • // $Id: module.errorhandler.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author of File: Goghs (http://www.eqiao.com/)                             //
    •

  • ################################################################################
    •

  •
    •

  • if ( !defined("XOOPS_C_ERRORHANDLER_INCLUDED") ) {
    •

  •     define("XOOPS_C_ERRORHANDLER_INCLUDED",1);
    •

  •
    •

  •     /**
    •

  •      * Error Handler class
    •

  •      *
    •

  •      * @package        kernel
    •

  •      * @subpackage    core
    •

  •      *
    •

  •      * @author        Goghs (http://www.eqiao.com/)
    •

  •      * @copyright    (c) 2000-2003 The Xoops Project - www.xoops.org
    •

  •      */
    •

  •     class ErrorHandler
    •

  •     {
    •

  •         /**
    •

  •          * Show an error message
    •

  •          *
    •

  •          * @param   string  $e_code Errorcode
    •

  •          * @param   integer $pages  How many pages should the link take you back?
    •

  •          *
    •

  •          * @global  $xoopsConfig
    •

  •          ***/
    •

  •         function show($e_code, $pages=1)
    •

  •         {
    •

  •             global $xoopsConfig, $xoopsUser, $xoopsRequestUri, $xoopsModule, $xoopsLogger;
    •

  •             $errmsg = array(
    •

  •             "0001" =>"Could not connect to the forums database.",
    •

  •             "0002" => "The forum you selected does not exist. Please go back and try again.",
    •

  •             "0003" => "Password Incorrect.",
    •

  •             "0004" => "Could not query the topics database.",
    •

  •             "0005" => "Error getting messages from the database.",
    •

  •             "0006" => "Please enter the Nickname and the Password.",
    •

  •             "0007" => "You are not the Moderator of this forum therefore you can't perform this function.",
    •

  •             "0008" => "You did not enter the correct password, please go back and try again.",
    •

  •             "0009" => "Could not remove posts from the database.",
    •

  •             "0010" => "Could not move selected topic to selected forum. Please go back and try again.",
    •

  •             "0011" => "Could not lock the selected topic. Please go back and try again.",
    •

  •             "0012" => "Could not unlock the selected topic. Please go back and try again.",
    •

  •             "0013" => "Could not query the database. <br />Error: ".mysql_error()."",
    •

  •             "0014" => "No such user or post in the database.",
    •

  •             "0015" => "Search Engine was unable to query the forums database.",
    •

  •             "0016" => "That user does not exist. Please go back and search again.",
    •

  •             "0017" => "You must type a subject to post. You can't post an empty subject. Go back and enter the subject",
    •

  •             "0018" => "You must choose message icon to post. Go back and choose message icon.",
    •

  •             "0019" => "You must type a message to post. You can't post an empty message. Go back and enter a message.",
    •

  •             "0020" => "Could not enter data into the database. Please go back and try again.",
    •

  •             "0021" => "Can't delete the selected message.",
    •

  •             "0022" => "An error ocurred while querying the database.",
    •

  •             "0023" => "Selected message was not found in the forum database.",
    •

  •             "0024" => "You can't reply to that message. It wasn't sent to you.",
    •

  •             "0025" => "You can't post a reply to this topic, it has been locked. Contact the administrator if you have any question.",
    •

  •             "0026" => "The forum or topic you are attempting to post to does not exist. Please try again.",
    •

  •             "0027" => "You must enter your username and password. Go back and do so.",
    •

  •             "0028" => "You have entered an incorrect password. Go back and try again.",
    •

  •             "0029" => "Couldn't update post count.",
    •

  •             "0030" => "The forum you are attempting to post to does not exist. Please try again.",
    •

  •             "0031" => "Unknown Error",
    •

  •             "0035" => "You can't edit a post that's not yours.",
    •

  •             "0036" => "You do not have permission to edit this post.",
    •

  •             "0037" => "You did not supply the correct password or do not have permission to edit this post. Please go back and try again.",
    •

  •             "1001" => "Please enter value for Title.",
    •

  •             "1002" => "Please enter value for Phone.",
    •

  •             "1003" => "Please enter value for Summary.",
    •

  •             "1004" => "Please enter value for Address.",
    •

  •             "1005" => "Please enter value for City.",
    •

  •             "1006" => "Please enter value for State/Province.",
    •

  •             "1007" => "Please enter value for Zipcode.",
    •

  •             "1008" => "Please enter value for Description.",
    •

  •             "1009" => "Vote for the selected resource only once.<br />All votes are logged and reviewed.",
    •

  •             "1010" => "You cannot vote on the resource you submitted.<br />All votes are logged and reviewed.",
    •

  •             "1011" => "No rating selected - no vote tallied.",
    •

  •             "1013" => "Please enter a search query.",
    •

  •             "1016" => "Please enter value for URL.",
    •

  •             "1017" => "Please enter value for Home Page.",
    •

  •             "9999" => "OOPS! God Knows"
    •

  •             );
    •

  •
    •

  •             $errorno = array_keys($errmsg);
    •

  •             if (!in_array($e_code, $errorno)) {
    •

  •                 $e_code = '9999';
    •

  •             }
    •

  •             include_once XOOPS_ROOT_PATH."/header.php";
    •

  •             //OpenTable();
    •

  •             echo "<div><b>".$xoopsConfig['sitename']." Error</b><br /><br />";
    •

  •             echo "Error Code: $e_code<br /><br /><br />";
    •

  •             echo "<b>ERROR:</b> $errmsg[$e_code]<br /><br /><br />";
    •

  •             echo "[ <a href='javascript:history.go(-".$pages.")'>Go Back</a> ]</div>";
    •

  •             //CloseTable();
    •

  •             include_once XOOPS_ROOT_PATH."/footer.php";
    •

  •             exit();
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:03 +0200 by phpDocumentor 1.4.0a2


File Source for module.textsanitizer.php

Source for file module.textsanitizer.php

Documentation is available at module.textsanitizer.php

  • <?php
    •

  • // $Id: module.textsanitizer.php 957 2007-08-06 23:40:36Z malanciault $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (http://www.myweb.ne.jp/, http://jp.xoops.org/)        //
    •

  • //         Goghs Cheng (http://www.eqiao.com, http://www.devbeez.com/)       //
    •

  • // Project: The XOOPS Project (http://www.xoops.org/)                        //
    •

  • // ------------------------------------------------------------------------- //
    •

  •
    •

  • /**
    •

  •  * Class to "clean up" text for various uses
    •

  •  *
    •

  •  * <b>Singleton</b>
    •

  •  *
    •

  •  * @package        kernel
    •

  •  * @subpackage    core
    •

  •  *
    •

  •  * @author        Kazumi Ono     <onokazu@xoops.org>
    •

  •  * @author      Goghs Cheng
    •

  •  * @copyright    (c) 2000-2003 The Xoops Project - www.xoops.org
    •

  •  */
    •

  • class MyTextSanitizer
    •

  • {
    •

  •     /**
    •

  •      * @var    array
    •

  •      */
    •

  •     var $smileys = array();
    •

  •
    •

  •     /**
    •

  •      *
    •

  •      */
    •

  •     var $censorConf;
    •

  •
    •

  •     /*
    •

  •     * Constructor of this class
    •

  •     *
    •

  •     * Gets allowed html tags from admin config settings
    •

  •     * <br> should not be allowed since nl2br will be used
    •

  •     * when storing data.
    •

  •     *
    •

  •     * @access    private
    •

  •     *
    •

  •     * @todo Sofar, this does nuttin' ;-)
    •

  •     */
    •

  •     function MyTextSanitizer()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Access the only instance of this class
    •

  •      *
    •

  •      * @return    object
    •

  •      *
    •

  •      * @static
    •

  •      * @staticvar   object
    •

  •      */
    •

  •     function &getInstance()
    •

  •     {
    •

  •         static $instance;
    •

  •         if (!isset($instance)) {
    •

  •             $instance = new MyTextSanitizer();
    •

  •         }
    •

  •         return $instance;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the smileys
    •

  •      *
    •

  •      * @return    array
    •

  •      */
    •

  •     function getSmileys()
    •

  •     {
    •

  •         return $this->smileys;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Replace emoticons in the message with smiley images
    •

  •      *
    •

  •      * @param    string  $message
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function smiley($message)
    •

  •     {
    •

  •         $db =& Database::getInstance();
    •

  •         if (count($this->smileys) == 0) {
    •

  •             if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles"))){
    •

  •                 while ($smiles = $db->fetchArray($getsmiles)) {
    •

  •                     $message = str_replace($smiles['code'], '<img src="'.XOOPS_UPLOAD_URL.'/'.htmlspecialchars($smiles['smile_url']).'" alt="" />', $message);
    •

  •                     array_push($this->smileys, $smiles);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         elseif (is_array($this->smileys)) {
    •

  •             foreach ($this->smileys as $smile) {
    •

  •                 $message = str_replace($smile['code'], '<img src="'.XOOPS_UPLOAD_URL.'/'.htmlspecialchars($smile['smile_url']).'" alt="" />', $message);
    •

  •             }
    •

  •         }
    •

  •         return $message;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Make links in the text clickable
    •

  •      *
    •

  •      * @param   string  $text
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function makeClickable(&$text)
    •

  •     {
    •

  •         $patterns = array("/(^|[^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/])ftp\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/:\.])([a-z0-9\-_\.]+?)@([^, \r\n\"\(\)'<>\[\]]+)/i");
    •

  •         $replacements = array("\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", "\\1<a href=\"http://www.\\2.\\3\" target=\"_blank\">www.\\2.\\3</a>", "\\1<a href=\"ftp://ftp.\\2.\\3\" target=\"_blank\">ftp.\\2.\\3</a>", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>");
    •

  •         return preg_replace($patterns, $replacements, $text);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Replace XoopsCodes with their equivalent HTML formatting
    •

  •      *
    •

  •      * @param   string  $text
    •

  •      * @param   bool    $allowimage Allow images in the text?
    •

  •      *                               On FALSE, uses links to images.
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function &xoopsCodeDecode(&$text, $allowimage = 1)
    •

  •     {
    •

  •         $patterns = array();
    •

  •         $replacements = array();
    •

  •         //$patterns[] = "/\[code](.*)\[\/code\]/esU";
    •

  •         //$replacements[] = "'<div class=\"xoopsCode\"><code><pre>'.wordwrap(MyTextSanitizer::htmlSpecialChars('\\1'), 100).'</pre></code></div>'";
    •

  •         // RMV: added new markup for intrasite url (allows easier site moves)
    •

  •         // TODO: automatically convert other URLs to this format if XOOPS_URL matches??
    •

  •         $patterns[] = "/\[siteurl=(['\"]?)([^\"'<>]*)\\1](.*)\[\/siteurl\]/sU";
    •

  •         $replacements[] = '<a href="'.XOOPS_URL.'/\\2">\\3</a>';
    •

  •         $patterns[] = "/\[url=(['\"]?)(http[s]?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU";
    •

  •         $replacements[] = '<a href="\\2" target="_blank">\\3</a>';
    •

  •         $patterns[] = "/\[url=(['\"]?)(ftp?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU";
    •

  •         $replacements[] = '<a href="\\2" target="_blank">\\3</a>';
    •

  •         $patterns[] = "/\[url=(['\"]?)([^\"'<>]*)\\1](.*)\[\/url\]/sU";
    •

  •         $replacements[] = '<a href="http://\\2" target="_blank">\\3</a>';
    •

  •         $patterns[] = "/\[color=(['\"]?)([a-zA-Z0-9]*)\\1](.*)\[\/color\]/sU";
    •

  •         $replacements[] = '<span style="color: #\\2;">\\3</span>';
    •

  •         $patterns[] = "/\[size=(['\"]?)([a-z0-9-]*)\\1](.*)\[\/size\]/sU";
    •

  •         $replacements[] = '<span style="font-size: \\2;">\\3</span>';
    •

  •         $patterns[] = "/\[font=(['\"]?)([^;<>\*\(\)\"']*)\\1](.*)\[\/font\]/sU";
    •

  •         $replacements[] = '<span style="font-family: \\2;">\\3</span>';
    •

  •         $patterns[] = "/\[email]([^;<>\*\(\)\"']*)\[\/email\]/sU";
    •

  •         $replacements[] = '<a href="mailto:\\1">\\1</a>';
    •

  •         $patterns[] = "/\[b](.*)\[\/b\]/sU";
    •

  •         $replacements[] = '<b>\\1</b>';
    •

  •         $patterns[] = "/\[i](.*)\[\/i\]/sU";
    •

  •         $replacements[] = '<i>\\1</i>';
    •

  •         $patterns[] = "/\[u](.*)\[\/u\]/sU";
    •

  •         $replacements[] = '<u>\\1</u>';
    •

  •         $patterns[] = "/\[d](.*)\[\/d\]/sU";
    •

  •         $replacements[] = '<del>\\1</del>';
    •

  •         //$patterns[] = "/\[li](.*)\[\/li\]/sU";
    •

  •         //$replacements[] = '<li>\\1</li>';
    •

  •         $patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
    •

  •         $patterns[] = "/\[img]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
    •

  •         $patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1 id=(['\"]?)([0-9]*)\\3]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
    •

  •         $patterns[] = "/\[img id=(['\"]?)([0-9]*)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
    •

  •         if ($allowimage != 1) {
    •

  •             $replacements[] = '<a href="\\3" target="_blank">\\3</a>';
    •

  •             $replacements[] = '<a href="\\1" target="_blank">\\1</a>';
    •

  •             $replacements[] = '<a href="'.XOOPS_URL.'/image.php?id=\\4" target="_blank">\\5</a>';
    •

  •             $replacements[] = '<a href="'.XOOPS_URL.'/image.php?id=\\2" target="_blank">\\3</a>';
    •

  •         } else {
    •

  •             $replacements[] = '<img src="\\3" align="\\2" alt="" />';
    •

  •             $replacements[] = '<img src="\\1" alt="" />';
    •

  •             $replacements[] = '<img src="'.XOOPS_URL.'/image.php?id=\\4" align="\\2" alt="\\5" />';
    •

  •             $replacements[] = '<img src="'.XOOPS_URL.'/image.php?id=\\2" alt="\\3" />';
    •

  •         }
    •

  •         $patterns[] = "/\[quote]/sU";
    •

  •         $replacements[] = _QUOTEC.'<div class="xoopsQuote"><blockquote>';
    •

  •         //$replacements[] = 'Quote: <div class="xoopsQuote"><blockquote>';
    •

  •         $patterns[] = "/\[\/quote]/sU";
    •

  •         $replacements[] = '</blockquote></div>';
    •

  •         $text = str_replace( "\x00", "", $text );
    •

  •         $c = "[\x01-\x1f]*";
    •

  •         $patterns[] = "/j{$c}a{$c}v{$c}a{$c}s{$c}c{$c}r{$c}i{$c}p{$c}t{$c}:/si";
    •

  •         $replacements[] = "(script removed)";
    •

  •         $patterns[] = "/a{$c}b{$c}o{$c}u{$c}t{$c}:/si";
    •

  •         $replacements[] = "about :";
    •

  •         $text = preg_replace($patterns, $replacements, $text);
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Convert linebreaks to <br /> tags
    •

  •      *
    •

  •      * @param    string  $text
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function nl2Br($text)
    •

  •     {
    •

  •         return preg_replace("/(\015\012)|(\015)|(\012)/","<br />",$text);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add slashes to the text if magic_quotes_gpc is turned off.
    •

  •      *
    •

  •      * @param   string  $text
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function addSlashes($text)
    •

  •     {
    •

  •         if (!get_magic_quotes_gpc()) {
    •

  •             $text = addslashes($text);
    •

  •         }
    •

  •         return $text;
    •

  •     }
    •

  •     /*
    •

  •     * if magic_quotes_gpc is on, stirip back slashes
    •

  •     *
    •

  •     * @param    string  $text
    •

  •     *
    •

  •     * @return    string
    •

  •     */
    •

  •     function stripSlashesGPC($text)
    •

  •     {
    •

  •         if (get_magic_quotes_gpc()) {
    •

  •             $text = stripslashes($text);
    •

  •         }
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     /*
    •

  •     *  for displaying data in html textbox forms
    •

  •     *
    •

  •     * @param    string  $text
    •

  •     *
    •

  •     * @return    string
    •

  •     */
    •

  •     function htmlSpecialChars($text)
    •

  •     {
    •

  •         //return preg_replace("/&amp;/i", '&', htmlspecialchars($text, ENT_QUOTES));
    •

  •         return preg_replace(array("/&amp;/i", "/&nbsp;/i"), array('&', '&amp;nbsp;'), htmlspecialchars($text, ENT_QUOTES));
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Reverses {@link htmlSpecialChars()}
    •

  •      *
    •

  •      * @param   string  $text
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function undoHtmlSpecialChars( $text )
    •

  •     {
    •

  •         return preg_replace(array("/&gt;/i", "/&lt;/i", "/&quot;/i", "/&#039;/i", '/&amp;nbsp;/i'), array(">", "<", "\"", "'", "&nbsp;"), $text);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Filters textarea form data in DB for display
    •

  •      *
    •

  •      * @param   string  $text
    •

  •      * @param   bool    $html   allow html?
    •

  •      * @param   bool    $smiley allow smileys?
    •

  •      * @param   bool    $xcode  allow xoopscode?
    •

  •      * @param   bool    $image  allow inline images?
    •

  •      * @param   bool    $br     convert linebreaks?
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function &displayTarea( $text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
    •

  •     {
    •

  •         if ($html != 1) {
    •

  •             // html not allowed
    •

  •             $text = $this->htmlSpecialChars($text);
    •

  •         }
    •

  •         $text = $this->codePreConv($text, $xcode); // Ryuji_edit(2003-11-18)
    •

  •         $text = $this->makeClickable($text);
    •

  •         if ($smiley != 0) {
    •

  •             // process smiley
    •

  •             $text = $this->smiley($text);
    •

  •         }
    •

  •         if ($xcode != 0) {
    •

  •             // decode xcode
    •

  •             if ($image != 0) {
    •

  •                 // image allowed
    •

  •                 $text = $this->xoopsCodeDecode($text);
    •

  •             } else {
    •

  •                 // image not allowed
    •

  •                 $text = $this->xoopsCodeDecode($text, 0);
    •

  •             }
    •

  •         }
    •

  •         if ($br != 0) {
    •

  •             $text = $this->nl2Br($text);
    •

  •         }
    •

  •         $text = $this->codeConv($text, $xcode, $image);    // Ryuji_edit(2003-11-18)
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Filters textarea form data submitted for preview
    •

  •      *
    •

  •      * @param   string  $text
    •

  •      * @param   bool    $html   allow html?
    •

  •      * @param   bool    $smiley allow smileys?
    •

  •      * @param   bool    $xcode  allow xoopscode?
    •

  •      * @param   bool    $image  allow inline images?
    •

  •      * @param   bool    $br     convert linebreaks?
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function &previewTarea( $text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
    •

  •     {
    •

  •         $text = $this->stripSlashesGPC($text);
    •

  •         if ($html != 1) {
    •

  •             // html not allowed
    •

  •             $text = $this->htmlSpecialChars($text);
    •

  •         }
    •

  •         $text = $this->codePreConv($text, $xcode); // Ryuji_edit(2003-11-18)
    •

  •         $text = $this->makeClickable($text);
    •

  •         if ($smiley != 0) {
    •

  •             // process smiley
    •

  •             $text = $this->smiley($text);
    •

  •         }
    •

  •         if ($xcode != 0) {
    •

  •             // decode xcode
    •

  •             if ($image != 0) {
    •

  •                 // image allowed
    •

  •                 $text = $this->xoopsCodeDecode($text);
    •

  •             } else {
    •

  •                 // image not allowed
    •

  •                 $text = $this->xoopsCodeDecode($text, 0);
    •

  •             }
    •

  •         }
    •

  •         if ($br != 0) {
    •

  •             $text = $this->nl2Br($text);
    •

  •         }
    •

  •         $text = $this->codeConv($text, $xcode, $image);    // Ryuji_edit(2003-11-18)
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Replaces banned words in a string with their replacements
    •

  •      *
    •

  •      * @param   string $text
    •

  •      * @return  string
    •

  •      *
    •

  •      * @deprecated
    •

  •      ***/
    •

  •     function &censorString(&$text)
    •

  •     {
    •

  •         if (!isset($this->censorConf)) {
    •

  •             $config_handler =& xoops_gethandler('config');
    •

  •             $this->censorConf =& $config_handler->getConfigsByCat(XOOPS_CONF_CENSOR);
    •

  •         }
    •

  •         if ($this->censorConf['censor_enable'] == 1) {
    •

  •             $replacement = $this->censorConf['censor_replace'];
    •

  •             foreach ($this->censorConf['censor_words'] as $bad) {
    •

  •                 if ( !empty($bad) ) {
    •

  •                      $bad = quotemeta($bad);
    •

  •                     $patterns[] = "/(\s)".$bad."/siU";
    •

  •                     $replacements[] = "\\1".$replacement;
    •

  •                     $patterns[] = "/^".$bad."/siU";
    •

  •                     $replacements[] = $replacement;
    •

  •                     $patterns[] = "/(\n)".$bad."/siU";
    •

  •                     $replacements[] = "\\1".$replacement;
    •

  •                     $patterns[] = "/]".$bad."/siU";
    •

  •                     $replacements[] = "]".$replacement;
    •

  •                     $text = preg_replace($patterns, $replacements, $text);
    •

  •                 }
    •

  •                }
    •

  •         }
    •

  •            return $text;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**#@+
    •

  •      * Sanitizing of [code] tag
    •

  •      */
    •

  •     function codePreConv($text, $xcode = 1) {
    •

  •         if($xcode != 0){
    •

  •             $patterns = "/\[code](.*)\[\/code\]/esU";
    •

  •             $replacements = "'[code]'.base64_encode('$1').'[/code]'";
    •

  •             $text =  preg_replace($patterns, $replacements, $text);
    •

  •         }
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     function codeConv($text, $xcode = 1, $image = 1){
    •

  •         if($xcode != 0){
    •

  •             $patterns = "/\[code](.*)\[\/code\]/esU";
    •

  •             if ($image != 0) {
    •

  •                 // image allowed
    •

  •                 $replacements = "'<div class=\"xoopsCode\"><code><pre>'.MyTextSanitizer::codeSanitizer('$1').'</pre></code></div>'";
    •

  •                 //$text =& $this->xoopsCodeDecode($text);
    •

  •             } else {
    •

  •                 // image not allowed
    •

  •                 $replacements = "'<div class=\"xoopsCode\"><code><pre>'.MyTextSanitizer::codeSanitizer('$1', 0).'</pre></code></div>'";
    •

  •                 //$text =& $this->xoopsCodeDecode($text, 0);
    •

  •             }
    •

  •             $text =  preg_replace($patterns, $replacements, $text);
    •

  •         }
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     function codeSanitizer($str, $image = 1){
    •

  •         if($image != 0){
    •

  •             $str = $this->xoopsCodeDecode(
    •

  •                 $this->htmlSpecialChars(str_replace('\"', '"', base64_decode($str)))
    •

  •                 );
    •

  •         }else{
    •

  •             $str = $this->xoopsCodeDecode(
    •

  •                 $this->htmlSpecialChars(str_replace('\"', '"', base64_decode($str))),0
    •

  •                 );
    •

  •         }
    •

  •         return $str;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**#@-*/
    •

  •
    •

  •
    •

  • ##################### Deprecated Methods ######################
    •

  •
    •

  •     /**#@+
    •

  •      * @deprecated
    •

  •      */
    •

  •     function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
    •

  •     {
    •

  •         if ( $allowhtml == 0 ) {
    •

  •             $text = $this->htmlSpecialChars($text);
    •

  •         } else {
    •

  •             //$config =& $GLOBALS['xoopsConfig'];
    •

  •             //$allowed = $config['allowed_html'];
    •

  •             //$text = strip_tags($text, $allowed);
    •

  •             $text = $this->makeClickable($text);
    •

  •         }
    •

  •         if ( $smiley == 1 ) {
    •

  •             $text = $this->smiley($text);
    •

  •         }
    •

  •         if ( $bbcode == 1 ) {
    •

  •             $text = $this->xoopsCodeDecode($text);
    •

  •         }
    •

  •         $text = $this->nl2Br($text);
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
    •

  •     {
    •

  •         $text = $this->oopsStripSlashesGPC($text);
    •

  •         if ( $allowhtml == 0 ) {
    •

  •             $text = $this->htmlSpecialChars($text);
    •

  •         } else {
    •

  •             //$config =& $GLOBALS['xoopsConfig'];
    •

  •             //$allowed = $config['allowed_html'];
    •

  •             //$text = strip_tags($text, $allowed);
    •

  •             $text = $this->makeClickable($text);
    •

  •         }
    •

  •         if ( $smiley == 1 ) {
    •

  •             $text = $this->smiley($text);
    •

  •         }
    •

  •         if ( $bbcode == 1 ) {
    •

  •             $text = $this->xoopsCodeDecode($text);
    •

  •         }
    •

  •         $text = $this->nl2Br($text);
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     function makeTboxData4Save($text)
    •

  •     {
    •

  •         //$text = $this->undoHtmlSpecialChars($text);
    •

  •         return $this->addSlashes($text);
    •

  •     }
    •

  •
    •

  •     function makeTboxData4Show($text, $smiley=0)
    •

  •     {
    •

  •         $text = $this->htmlSpecialChars($text);
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     function makeTboxData4Edit($text)
    •

  •     {
    •

  •         return $this->htmlSpecialChars($text);
    •

  •     }
    •

  •
    •

  •     function makeTboxData4Preview($text, $smiley=0)
    •

  •     {
    •

  •         $text = $this->stripSlashesGPC($text);
    •

  •         $text = $this->htmlSpecialChars($text);
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     function makeTboxData4PreviewInForm($text)
    •

  •     {
    •

  •         $text = $this->stripSlashesGPC($text);
    •

  •         return $this->htmlSpecialChars($text);
    •

  •     }
    •

  •
    •

  •     function makeTareaData4Save($text)
    •

  •     {
    •

  •         return $this->addSlashes($text);
    •

  •     }
    •

  •
    •

  •     function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1)
    •

  •     {
    •

  •         $text = $this->displayTarea($text, $html, $smiley, $xcode);
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     function makeTareaData4Edit($text)
    •

  •     {
    •

  •         return $this->htmlSpecialChars($text);
    •

  •     }
    •

  •
    •

  •     function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1)
    •

  •     {
    •

  •         $text = $this->previewTarea($text, $html, $smiley, $xcode);
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     function makeTareaData4PreviewInForm($text)
    •

  •     {
    •

  •         //if magic_quotes_gpc is on, do stipslashes
    •

  •         $text = $this->stripSlashesGPC($text);
    •

  •         return $this->htmlSpecialChars($text);
    •

  •     }
    •

  •
    •

  •     function makeTareaData4InsideQuotes($text)
    •

  •     {
    •

  •         return $this->htmlSpecialChars($text);
    •

  •     }
    •

  •
    •

  •     function oopsStripSlashesGPC($text)
    •

  •     {
    •

  •         return $this->stripSlashesGPC($text);
    •

  •     }
    •

  •
    •

  •     function oopsStripSlashesRT($text)
    •

  •     {
    •

  •         if (get_magic_quotes_runtime()) {
    •

  •             $text = stripslashes($text);
    •

  •         }
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     function oopsAddSlashes($text)
    •

  •     {
    •

  •         return $this->addSlashes($text);
    •

  •     }
    •

  •
    •

  •     function oopsHtmlSpecialChars($text)
    •

  •     {
    •

  •         return $this->htmlSpecialChars($text);
    •

  •     }
    •

  •
    •

  •     function oopsNl2Br($text)
    •

  •     {
    •

  •         return $this->nl2br($text);
    •

  •     }
    •

  •     /**#@-*/
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:05 +0200 by phpDocumentor 1.4.0a2


File Source for tardownloader.php

Source for file tardownloader.php

Documentation is available at tardownloader.php

  • <?php
    •

  • // $Id: tardownloader.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     exit();
    •

  • }
    •

  •
    •

  • /**
    •

  •  * base class
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH.'/class/downloader.php';
    •

  • /**
    •

  •  * Class to handle tar files
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH.'/class/class.tar.php';
    •

  •
    •

  • /**
    •

  •  * Send tar files through a http socket
    •

  •  *
    •

  •  * @package        kernel
    •

  •  * @subpackage    core
    •

  •  *
    •

  •  * @author        Kazumi Ono     <onokazu@xoops.org>
    •

  •  * @copyright    (c) 2000-2003 The Xoops Project - www.xoops.org
    •

  •  */
    •

  • class XoopsTarDownloader extends XoopsDownloader
    •

  • {
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param string $ext       file extension
    •

  •      * @param string $mimyType  Mimetype
    •

  •      ***/
    •

  •     function XoopsTarDownloader($ext = '.tar.gz', $mimyType = 'application/x-gzip')
    •

  •     {
    •

  •         $this->archiver = new tar();
    •

  •         $this->ext = trim($ext);
    •

  •         $this->mimeType = trim($mimyType);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add a file to the archive
    •

  •      *
    •

  •      * @param   string  $filepath       Full path to the file
    •

  •      * @param   string  $newfilename    Filename (if you don't want to use the original)
    •

  •      ***/
    •

  •     function addFile($filepath, $newfilename=null)
    •

  •     {
    •

  •         $this->archiver->addFile($filepath);
    •

  •         if (isset($newfilename)) {
    •

  •             // dirty, but no other way
    •

  •             for ($i = 0; $i < $this->archiver->numFiles; $i++) {
    •

  •                 if ($this->archiver->files[$i]['name'] == $filepath) {
    •

  •                     $this->archiver->files[$i]['name'] = trim($newfilename);
    •

  •                     break;
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add a binary file to the archive
    •

  •      *
    •

  •      * @param   string  $filepath       Full path to the file
    •

  •      * @param   string  $newfilename    Filename (if you don't want to use the original)
    •

  •      ***/
    •

  •     function addBinaryFile($filepath, $newfilename=null)
    •

  •     {
    •

  •         $this->archiver->addFile($filepath, true);
    •

  •         if (isset($newfilename)) {
    •

  •             // dirty, but no other way
    •

  •             for ($i = 0; $i < $this->archiver->numFiles; $i++) {
    •

  •                 if ($this->archiver->files[$i]['name'] == $filepath) {
    •

  •                     $this->archiver->files[$i]['name'] = trim($newfilename);
    •

  •                     break;
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add a dummy file to the archive
    •

  •      *
    •

  •      * @param   string  $data       Data to write
    •

  •      * @param   string  $filename   Name for the file in the archive
    •

  •      * @param   integer $time
    •

  •      ***/
    •

  •     function addFileData(&$data, $filename, $time=0)
    •

  •     {
    •

  •         $dummyfile = XOOPS_CACHE_PATH.'/dummy_'.time().'.html';
    •

  •         $fp = fopen($dummyfile, 'w');
    •

  •         fwrite($fp, $data);
    •

  •         fclose($fp);
    •

  •         $this->archiver->addFile($dummyfile);
    •

  •         unlink($dummyfile);
    •

  •
    •

  •         // dirty, but no other way
    •

  •         for ($i = 0; $i < $this->archiver->numFiles; $i++) {
    •

  •             if ($this->archiver->files[$i]['name'] == $dummyfile) {
    •

  •                 $this->archiver->files[$i]['name'] = $filename;
    •

  •                 if ($time != 0) {
    •

  •                     $this->archiver->files[$i]['time'] = $time;
    •

  •                 }
    •

  •                 break;
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add a binary dummy file to the archive
    •

  •      *
    •

  •      * @param   string  $data   Data to write
    •

  •      * @param   string  $filename   Name for the file in the archive
    •

  •      * @param   integer $time
    •

  •      ***/
    •

  •     function addBinaryFileData(&$data, $filename, $time=0)
    •

  •     {
    •

  •         $dummyfile = XOOPS_CACHE_PATH.'/dummy_'.time().'.html';
    •

  •         $fp = fopen($dummyfile, 'wb');
    •

  •         fwrite($fp, $data);
    •

  •         fclose($fp);
    •

  •         $this->archiver->addFile($dummyfile, true);
    •

  •         unlink($dummyfile);
    •

  •
    •

  •         // dirty, but no other way
    •

  •         for ($i = 0; $i < $this->archiver->numFiles; $i++) {
    •

  •             if ($this->archiver->files[$i]['name'] == $dummyfile) {
    •

  •                 $this->archiver->files[$i]['name'] = $filename;
    •

  •                 if ($time != 0) {
    •

  •                     $this->archiver->files[$i]['time'] = $time;
    •

  •                 }
    •

  •                 break;
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Send the file to the client
    •

  •      *
    •

  •      * @param   string  $name   Filename
    •

  •      * @param   boolean $gzip   Use GZ compression
    •

  •      ***/
    •

  •     function download($name, $gzip = true)
    •

  •     {
    •

  •         $this->_header($name.$this->ext);
    •

  •         echo $this->archiver->toTarOutput($name.$this->ext, $gzip);
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:06 +0200 by phpDocumentor 1.4.0a2


File Source for template.php

Source for file template.php

Documentation is available at template.php

  • <?php
    •

  • // $Id: template.php 943 2007-08-05 15:46:37Z dugris $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  •
    •

  • if (!defined('SMARTY_DIR')) {
    •

  •     exit();
    •

  • }
    •

  • /**
    •

  •  * Base class: Smarty template engine
    •

  •  */
    •

  • require_once SMARTY_DIR.'Smarty.class.php';
    •

  •
    •

  • /**
    •

  •  * Template engine
    •

  •  *
    •

  •  * @package        kernel
    •

  •  * @subpackage    core
    •

  •  *
    •

  •  * @author        Kazumi Ono     <onokazu@xoops.org>
    •

  •  * @copyright    (c) 2000-2003 The Xoops Project - www.xoops.org
    •

  •  */
    •

  • class XoopsTpl extends Smarty {
    •

  •
    •

  •     var $left_delimiter = '<{';
    •

  •     var $right_delimiter = '}>';
    •

  •
    •

  •     var $template_dir = XOOPS_THEME_PATH;
    •

  •     var $cache_dir = XOOPS_CACHE_PATH;
    •

  •     var $compile_dir = XOOPS_COMPILE_PATH;
    •

  •
    •

  •     function XoopsTpl() {
    •

  •         global $xoopsConfig;
    •

  •
    •

  •         $this->compile_id = $xoopsConfig['template_set'] . '-' . $xoopsConfig['theme_set'];
    •

  •         $this->_compile_id = $this->compile_id;
    •

  •         $this->compile_check = ( $xoopsConfig['theme_fromfile'] == 1 );
    •

  •         $this->plugins_dir = array(
    •

  •             XOOPS_ROOT_PATH . '/class/smarty/xoops_plugins',
    •

  •             XOOPS_ROOT_PATH . '/class/smarty/plugins',
    •

  •         );
    •

  •         if ( $xoopsConfig['debug_mode'] ) {
    •

  •             $this->debugging_ctrl = 'URL';
    •

  •             if ( $xoopsConfig['debug_mode'] == 3 ) {
    •

  •                 $this->debugging = true;
    •

  •             }
    •

  •         }
    •

  •         $this->Smarty();
    •

  •
    •

  •         $this->assign( array(
    •

  •             'xoops_url' => XOOPS_URL,
    •

  •             'xoops_rootpath' => XOOPS_ROOT_PATH,
    •

  •             'xoops_langcode' => _LANGCODE,
    •

  •             'xoops_charset' => _CHARSET,
    •

  •             'xoops_version' => XOOPS_VERSION,
    •

  •             'xoops_upload_url' => XOOPS_UPLOAD_URL
    •

  •         ) );
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Renders output from template data
    •

  •      *
    •

  •      * @param   string  $data        The template to render
    •

  •      * @param    bool    $display    If rendered text should be output or returned
    •

  •      * @return  string  Rendered output if $display was false
    •

  •      ***/
    •

  •     function fetchFromData( $tplSource, $display = false, $vars = null ) {
    •

  •         if ( !function_exists('smarty_function_eval') ) {
    •

  •             require_once SMARTY_DIR . '/plugins/function.eval.php';
    •

  •         }
    •

  •         if ( isset( $vars ) ) {
    •

  •             $oldVars = $this->_tpl_vars;
    •

  •             $this->assign( $vars );
    •

  •             $out = smarty_function_eval( array('var' => $tplSource), $this );
    •

  •             $this->_tpl_vars = $oldVars;
    •

  •             return $out;
    •

  •         }
    •

  •         return smarty_function_eval( array('var' => $tplSource), $this );
    •

  •     }
    •

  •
    •

  •     function touch( $resourceName ) {
    •

  •         $isForced = $this->force_compile;
    •

  •         $this->force_compile = true;
    •

  •         $this->clear_cache( $resourceName );
    •

  •         $result = $this->_compile_resource( $resourceName, $this->_get_compile_path( $resourceName ) );
    •

  •         $this->force_compile = $isForced;
    •

  •         return $result;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * @deprecated DO NOT USE THESE METHODS, ACCESS THE CORRESPONDING PROPERTIES INSTEAD
    •

  •      */
    •

  •     function xoops_setTemplateDir($dirname) {        $this->template_dir = $dirname;            }
    •

  •     function xoops_getTemplateDir() {                return $this->template_dir;                }
    •

  •     function xoops_setDebugging($flag=false) {        $this->debugging = is_bool($flag) ? $flag : false;    }
    •

  •     function xoops_setCaching( $num = 0 ) {            $this->caching = (int)$num;                }
    •

  •     function xoops_setCompileDir($dirname) {        $this->compile_dir = $dirname;            }
    •

  •     function xoops_setCacheDir($dirname) {            $this->cache_dir = $dirname;            }
    •

  •     function xoops_canUpdateFromFile() {            return $this->compile_check;            }
    •

  •     function xoops_fetchFromData( $data ) {            return $this->fetchFromData( $data );    }
    •

  •     function xoops_setCacheTime( $num = 0 ) {
    •

  •         if ( ( $num = (int)$num ) <= 0) {
    •

  •             $this->caching = 0;
    •

  •         } else {
    •

  •             $this->cache_lifetime = $num;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • /**
    •

  •  * function to update compiled template file in templates_c folder
    •

  •  *
    •

  •  * @param   string  $tpl_id
    •

  •  * @param   boolean $clear_old
    •

  •  * @return  boolean
    •

  •  ***/
    •

  • function xoops_template_touch($tpl_id, $clear_old = true) {
    •

  •     $tplfile_handler =& xoops_gethandler('tplfile');
    •

  •     $tplfile =& $tplfile_handler->get($tpl_id);
    •

  •
    •

  •     if ( is_object($tplfile) ) {
    •

  •         $file = $tplfile->getVar( 'tpl_file', 'n' );
    •

  •         $tpl = new XoopsTpl();
    •

  •         return $tpl->touch( "db:$file" );
    •

  •     }
    •

  •     return false;
    •

  • }
    •

  •
    •

  • /**
    •

  •  * Clear the module cache
    •

  •  *
    •

  •  * @param   int $mid    Module ID
    •

  •  * @return
    •

  •  ***/
    •

  • function xoops_template_clear_module_cache($mid)
    •

  • {
    •

  •     $block_arr = XoopsBlock::getByModule($mid);
    •

  •     $count = count($block_arr);
    •

  •     if ($count > 0) {
    •

  •         $xoopsTpl = new XoopsTpl();
    •

  •         $xoopsTpl->xoops_setCaching(2);
    •

  •         for ($i = 0; $i < $count; $i++) {
    •

  •             if ($block_arr[$i]->getVar('template') != '') {
    •

  •                 $xoopsTpl->clear_cache('db:'.$block_arr[$i]->getVar('template'), 'blk_'.$block_arr[$i]->getVar('bid'));
    •

  •             }
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:08 +0200 by phpDocumentor 1.4.0a2


File Source for tree.php

Source for file tree.php

Documentation is available at tree.php

  • <?php
    •

  • // $Id: tree.php 953 2007-08-06 22:05:56Z dugris $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.xoops.org/ http://jp.xoops.org/  http://www.myweb.ne.jp/  //
    •

  • // Project: The XOOPS Project (http://www.xoops.org/)                        //
    •

  • // ------------------------------------------------------------------------- //
    •

  •
    •

  • /**
    •

  •  * A tree structures with {@link XoopsObject}s as nodes
    •

  •  *
    •

  •  * @package        kernel
    •

  •  * @subpackage    core
    •

  •  *
    •

  •  * @author        Kazumi Ono     <onokazu@xoops.org>
    •

  •  * @copyright    (c) 2000-2003 The Xoops Project - www.xoops.org
    •

  •  */
    •

  • class XoopsObjectTree {
    •

  •
    •

  •     /**#@+
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_parentId;
    •

  •     var $_myId;
    •

  •     var $_rootId = null;
    •

  •     var $_tree = array();
    •

  •     var $_objects;
    •

  •     /**#@-*/
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param   array   $objectArr  Array of {@link XoopsObject}s
    •

  •      * @param   string     $myId       field name of object ID
    •

  •      * @param   string     $parentId   field name of parent object ID
    •

  •      * @param   string     $rootId     field name of root object ID
    •

  •      ***/
    •

  •     function XoopsObjectTree(&$objectArr, $myId, $parentId, $rootId = null)
    •

  •     {
    •

  •         $this->_objects =& $objectArr;
    •

  •         $this->_myId = $myId;
    •

  •         $this->_parentId = $parentId;
    •

  •         if (isset($rootId)) {
    •

  •             $this->_rootId = $rootId;
    •

  •         }
    •

  •         $this->_initialize();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Initialize the object
    •

  •      *
    •

  •      * @access    private
    •

  •      ***/
    •

  •     function _initialize()
    •

  •     {
    •

  •         foreach (array_keys($this->_objects) as $i) {
    •

  •             $key1 = $this->_objects[$i]->getVar($this->_myId);
    •

  •             $this->_tree[$key1]['obj'] =& $this->_objects[$i];
    •

  •             $key2 = $this->_objects[$i]->getVar($this->_parentId);
    •

  •             $this->_tree[$key1]['parent'] = $key2;
    •

  •             $this->_tree[$key2]['child'][] = $key1;
    •

  •             if (isset($this->_rootId)) {
    •

  •                 $this->_tree[$key1]['root'] = $this->_objects[$i]->getVar($this->_rootId);
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the tree
    •

  •      *
    •

  •      * @return  array   Associative array comprising the tree
    •

  •      ***/
    •

  •     function &getTree()
    •

  •     {
    •

  •         return $this->_tree;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * returns an object from the tree specified by its id
    •

  •      *
    •

  •      * @param   string  $key    ID of the object to retrieve
    •

  •      * @return  object  Object within the tree
    •

  •      ***/
    •

  •     function &getByKey($key)
    •

  •     {
    •

  •         return $this->_tree[$key]['obj'];
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * returns an array of all the first child object of an object specified by its id
    •

  •      *
    •

  •      * @param   string  $key    ID of the parent object
    •

  •      * @return  array   Array of children of the parent
    •

  •      ***/
    •

  •     function getFirstChild($key)
    •

  •     {
    •

  •         $ret = array();
    •

  •         if (isset($this->_tree[$key]['child'])) {
    •

  •             foreach ($this->_tree[$key]['child'] as $childkey) {
    •

  •                 $ret[$childkey] =& $this->_tree[$childkey]['obj'];
    •

  •             }
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * returns an array of all child objects of an object specified by its id
    •

  •      *
    •

  •      * @param   string     $key    ID of the parent
    •

  •      * @param   array   $ret    (Empty when called from client) Array of children from previous recursions.
    •

  •      * @return  array   Array of child nodes.
    •

  •      ***/
    •

  •     function getAllChild($key, $ret = array())
    •

  •     {
    •

  •         if (isset($this->_tree[$key]['child'])) {
    •

  •             foreach ($this->_tree[$key]['child'] as $childkey) {
    •

  •                 $ret[$childkey] =& $this->_tree[$childkey]['obj'];
    •

  •                 $children =& $this->getAllChild($childkey, $ret);
    •

  •                 foreach (array_keys($children) as $newkey) {
    •

  •                     $ret[$newkey] =& $children[$newkey];
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * returns an array of all parent objects.
    •

  •      * the key of returned array represents how many levels up from the specified object
    •

  •      *
    •

  •      * @param   string     $key    ID of the child object
    •

  •      * @param   array   $ret    (empty when called from outside) Result from previous recursions
    •

  •      * @param   int $uplevel (empty when called from outside) level of recursion
    •

  •      * @return  array   Array of parent nodes.
    •

  •      ***/
    •

  •     function getAllParent($key, $ret = array(), $uplevel = 1)
    •

  •     {
    •

  •         if (isset($this->_tree[$key]['parent']) && isset($this->_tree[$this->_tree[$key]['parent']]['obj'])) {
    •

  •             $ret[$uplevel] =& $this->_tree[$this->_tree[$key]['parent']]['obj'];
    •

  •             $parents =& $this->getAllParent($this->_tree[$key]['parent'], $ret, $uplevel+1);
    •

  •             foreach (array_keys($parents) as $newkey) {
    •

  •                 $ret[$newkey] =& $parents[$newkey];
    •

  •             }
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Make options for a select box from
    •

  •      *
    •

  •      * @param   string  $fieldName   Name of the member variable from the
    •

  •      *   node objects that should be used as the title for the options.
    •

  •      * @param   string  $selected    Value to display as selected
    •

  •      * @param   int $key         ID of the object to display as the root of select options
    •

  •      * @param   string  $ret         (reference to a string when called from outside) Result from previous recursions
    •

  •      * @param   string  $prefix_orig  String to indent items at deeper levels
    •

  •      * @param   string  $prefix_curr  String to indent the current item
    •

  •      * @return
    •

  •      *
    •

  •      * @access    private
    •

  •      ***/
    •

  •     function _makeSelBoxOptions($fieldName, $selected, $key, &$ret, $prefix_orig, $prefix_curr = '')
    •

  •     {
    •

  •         if ($key > 0) {
    •

  •             $value = $this->_tree[$key]['obj']->getVar($this->_myId);
    •

  •             $ret .= '<option value="'.$value.'"';
    •

  •             if ($value == $selected) {
    •

  •                 $ret .= ' selected="selected"';
    •

  •             }
    •

  •             $ret .= '>'.$prefix_curr.$this->_tree[$key]['obj']->getVar($fieldName).'</option>';
    •

  •             $prefix_curr .= $prefix_orig;
    •

  •         }
    •

  •         if (isset($this->_tree[$key]['child']) && !empty($this->_tree[$key]['child'])) {
    •

  •             foreach ($this->_tree[$key]['child'] as $childkey) {
    •

  •                 $this->_makeSelBoxOptions($fieldName, $selected, $childkey, $ret, $prefix_orig, $prefix_curr);
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Make a select box with options from the tree
    •

  •      *
    •

  •      * @param   string  $name            Name of the select box
    •

  •      * @param   string  $fieldName       Name of the member variable from the
    •

  •      *   node objects that should be used as the title for the options.
    •

  •      * @param   string  $prefix          String to indent deeper levels
    •

  •      * @param   string  $selected        Value to display as selected
    •

  •      * @param   bool    $addEmptyOption  Set TRUE to add an empty option with value "0" at the top of the hierarchy
    •

  •      * @param   integer $key             ID of the object to display as the root of select options
    •

  •      * @return  string  HTML select box
    •

  •      ***/
    •

  •     function makeSelBox($name, $fieldName, $prefix='-', $selected='', $addEmptyOption = false, $key=0)
    •

  •     {
    •

  •         $ret = '<select name="'.$name.'" id="'.$name.'">';
    •

  •         if (false != $addEmptyOption) {
    •

  •             $ret .= '<option value="0"></option>';
    •

  •         }
    •

  •         $this->_makeSelBoxOptions($fieldName, $selected, $key, $ret, $prefix);
    •

  •         return $ret.'</select>';
    •

  •     }
    •

  •
    •

  •
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:22 +0200 by phpDocumentor 1.4.0a2


File Source for uploader.php

Source for file uploader.php

Documentation is available at uploader.php

  • <?php
    •

  • // $Id: uploader.php 888 2007-07-28 09:03:03Z phppp $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • /*!
    •

  • Example
    •

  •
    •

  •   include_once 'uploader.php';
    •

  •   $allowed_mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png');
    •

  •   $maxfilesize = 50000;
    •

  •   $maxfilewidth = 120;
    •

  •   $maxfileheight = 120;
    •

  •   $uploader = new XoopsMediaUploader('/home/xoops/uploads', $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
    •

  •   if ($uploader->fetchMedia($_POST['uploade_file_name'])) {
    •

  •     if (!$uploader->upload()) {
    •

  •        echo $uploader->getErrors();
    •

  •     } else {
    •

  •        echo '<h4>File uploaded successfully!</h4>'
    •

  •        echo 'Saved as: ' . $uploader->getSavedFileName() . '<br />';
    •

  •        echo 'Full path: ' . $uploader->getSavedDestination();
    •

  •     }
    •

  •   } else {
    •

  •     echo $uploader->getErrors();
    •

  •   }
    •

  •
    •

  • */
    •

  •
    •

  • /**
    •

  •  * Upload Media files
    •

  •  *
    •

  •  * Example of usage:
    •

  •  * <code>
    •

  •  * include_once 'uploader.php';
    •

  •  * $allowed_mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png');
    •

  •  * $maxfilesize = 50000;
    •

  •  * $maxfilewidth = 120;
    •

  •  * $maxfileheight = 120;
    •

  •  * $uploader = new XoopsMediaUploader('/home/xoops/uploads', $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
    •

  •  * if ($uploader->fetchMedia($_POST['uploade_file_name'])) {
    •

  •  *   if (!$uploader->upload()) {
    •

  •  *      echo $uploader->getErrors();
    •

  •  *   } else {
    •

  •  *      echo '<h4>File uploaded successfully!</h4>'
    •

  •  *      echo 'Saved as: ' . $uploader->getSavedFileName() . '<br />';
    •

  •  *      echo 'Full path: ' . $uploader->getSavedDestination();
    •

  •  *   }
    •

  •  * } else {
    •

  •  *   echo $uploader->getErrors();
    •

  •  * }
    •

  •  * </code>
    •

  •  *
    •

  •  * @package        kernel
    •

  •  * @subpackage    core
    •

  •  *
    •

  •  * @author        Kazumi Ono     <onokazu@xoops.org>
    •

  •  * @copyright    (c) 2000-2003 The Xoops Project - www.xoops.org
    •

  •  */
    •

  • class XoopsMediaUploader
    •

  • {
    •

  •     /**
    •

  •     * Flag indicating if unrecognized mimetypes should be allowed (use with precaution ! may lead to security issues )
    •

  •     **/
    •

  •
    •

  •      var $allowUnknownTypes = false;
    •

  •
    •

  •     var $mediaName;
    •

  •     var $mediaType;
    •

  •     var $mediaSize;
    •

  •     var $mediaTmpName;
    •

  •     var $mediaError;
    •

  •     var $mediaRealType = '';
    •

  •
    •

  •     var $uploadDir = '';
    •

  •
    •

  •     var $allowedMimeTypes = array();
    •

  •
    •

  •     var $maxFileSize = 0;
    •

  •     var $maxWidth;
    •

  •     var $maxHeight;
    •

  •
    •

  •     var $targetFileName;
    •

  •
    •

  •     var $prefix;
    •

  •
    •

  •     var $errors = array();
    •

  •
    •

  •     var $savedDestination;
    •

  •
    •

  •     var $savedFileName;
    •

  •
    •

  •     var $extensionToMime = array();
    •

  •     var $checkImageType = true;
    •

  •
    •

  •     var $extensionsToBeSanitized = array( 'php' , 'phtml' , 'phtm' , 'php3' , 'php4' , 'cgi' , 'pl' , 'asp', 'php5' );
    •

  •     // extensions needed image check (anti-IE Content-Type XSS)
    •

  •     var $imageExtensions = array( 1 => 'gif', 2 => 'jpg', 3 => 'png', 4 => 'swf', 5 => 'psd', 6 => 'bmp', 7 => 'tif', 8 => 'tif', 9 => 'jpc', 10 => 'jp2', 11 => 'jpx', 12 => 'jb2', 13 => 'swc', 14 => 'iff', 15 => 'wbmp', 16 => 'xbm' );
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param   string  $uploadDir
    •

  •      * @param   array   $allowedMimeTypes
    •

  •      * @param   int     $maxFileSize
    •

  •      * @param   int     $maxWidth
    •

  •      * @param   int     $maxHeight
    •

  •      * @param   int     $cmodvalue
    •

  •      ***/
    •

  •     function XoopsMediaUploader($uploadDir, $allowedMimeTypes, $maxFileSize=0, $maxWidth=null, $maxHeight=null)
    •

  •     {
    •

  •         @$this->extensionToMime = include( XOOPS_ROOT_PATH . '/class/mimetypes.inc.php' );
    •

  •         if ( !is_array( $this->extensionToMime ) ) {
    •

  •              $this->extensionToMime = array();
    •

  •             return false;
    •

  •         }
    •

  •         if (is_array($allowedMimeTypes)) {
    •

  •             $this->allowedMimeTypes =& $allowedMimeTypes;
    •

  •         }
    •

  •         $this->uploadDir = $uploadDir;
    •

  •         $this->maxFileSize = intval($maxFileSize);
    •

  •         if(isset($maxWidth)) {
    •

  •             $this->maxWidth = intval($maxWidth);
    •

  •         }
    •

  •         if(isset($maxHeight)) {
    •

  •             $this->maxHeight = intval($maxHeight);
    •

  •         }
    •

  •
    •

  •         if ( ! @ include_once XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/uploader.php" ) {
    •

  •             include_once XOOPS_ROOT_PATH."/language/english/uploader.php";
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Fetch the uploaded file
    •

  •      *
    •

  •      * @param   string  $media_name Name of the file field
    •

  •      * @param   int     $index      Index of the file (if more than one uploaded under that name)
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function fetchMedia($media_name, $index = null)
    •

  •     {
    •

  •         if ( empty( $this->extensionToMime ) ) {
    •

  •             $this->setErrors( _ER_UP_MIMETYPELOAD );
    •

  •             return false;
    •

  •         }
    •

  •         if (!isset($_FILES[$media_name])) {
    •

  •             $this->setErrors(_ER_UP_FILENOTFOUND);
    •

  •             return false;
    •

  •         } elseif (is_array($_FILES[$media_name]['name']) && isset($index)) {
    •

  •             $index = intval($index);
    •

  •             $this->mediaName = (get_magic_quotes_gpc()) ? stripslashes($_FILES[$media_name]['name'][$index]) : $_FILES[$media_name]['name'][$index];
    •

  •             $this->mediaType = $_FILES[$media_name]['type'][$index];
    •

  •             $this->mediaSize = $_FILES[$media_name]['size'][$index];
    •

  •             $this->mediaTmpName = $_FILES[$media_name]['tmp_name'][$index];
    •

  •             $this->mediaError = !empty($_FILES[$media_name]['error'][$index]) ? $_FILES[$media_name]['error'][$index] : 0;
    •

  •         } else {
    •

  •             $media_name =& $_FILES[$media_name];
    •

  •             $this->mediaName = (get_magic_quotes_gpc()) ? stripslashes($media_name['name']) : $media_name['name'];
    •

  •             $this->mediaName = $media_name['name'];
    •

  •             $this->mediaType = $media_name['type'];
    •

  •             $this->mediaSize = $media_name['size'];
    •

  •             $this->mediaTmpName = $media_name['tmp_name'];
    •

  •             $this->mediaError = !empty($media_name['error']) ? $media_name['error'] : 0;
    •

  •         }
    •

  •         if ( ($ext = strrpos( $this->mediaName, '.' )) !== false ) {
    •

  •             $ext = strtolower(substr( $this->mediaName, $ext + 1 ));
    •

  •             if ( isset( $this->extensionToMime[$ext] ) ) {
    •

  •                 $this->mediaRealType = $this->extensionToMime[$ext];
    •

  •             }
    •

  •         }
    •

  •         $this->errors = array();
    •

  •         if (intval($this->mediaSize) < 0) {
    •

  •             $this->setErrors(_ER_UP_INVALIDFILESIZE);
    •

  •             return false;
    •

  •         }
    •

  •         if ($this->mediaName == '') {
    •

  •             $this->setErrors( _ER_UP_FILENAMEEMPTY);
    •

  •             return false;
    •

  •         }
    •

  •         if ($this->mediaTmpName == 'none' || !is_uploaded_file($this->mediaTmpName)) {
    •

  •             $this->setErrors(_ER_UP_NOFILEUPLOADED);
    •

  •             return false;
    •

  •         }
    •

  •         if ($this->mediaError > 0) {
    •

  •             $this->setErrors(sprintf(_ER_UP_ERROROCCURRED, $this->mediaError));
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Set the target filename
    •

  •      *
    •

  •      * @param   string  $value
    •

  •      ***/
    •

  •     function setTargetFileName($value){
    •

  •         $this->targetFileName = strval(trim($value));
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Set the prefix
    •

  •      *
    •

  •      * @param   string  $value
    •

  •      ***/
    •

  •     function setPrefix($value){
    •

  •         $this->prefix = strval(trim($value));
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the uploaded filename
    •

  •      *
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function getMediaName()
    •

  •     {
    •

  •         return $this->mediaName;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the type of the uploaded file
    •

  •      *
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function getMediaType()
    •

  •     {
    •

  •         return $this->mediaType;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the size of the uploaded file
    •

  •      *
    •

  •      * @return  int
    •

  •      ***/
    •

  •     function getMediaSize()
    •

  •     {
    •

  •         return $this->mediaSize;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the temporary name that the uploaded file was stored under
    •

  •      *
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function getMediaTmpName()
    •

  •     {
    •

  •         return $this->mediaTmpName;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the saved filename
    •

  •      *
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function getSavedFileName(){
    •

  •         return $this->savedFileName;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the destination the file is saved to
    •

  •      *
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function getSavedDestination(){
    •

  •         return $this->savedDestination;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Check the file and copy it to the destination
    •

  •      *
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function upload($chmod = 0644)
    •

  •     {
    •

  •         if ($this->uploadDir == '') {
    •

  •             $this->setErrors(_ER_UP_UPLOADDIRNOTSET);
    •

  •             return false;
    •

  •         }
    •

  •         if (!is_dir($this->uploadDir)) {
    •

  •             $this->setErrors(sprintf(_ER_UP_FAILEDOPENDIR, $this->uploadDir));
    •

  •         }
    •

  •         if (!is_writeable($this->uploadDir)) {
    •

  •             $this->setErrors(sprintf(_ER_UP_FAILEDOPENDIRWRITE, $this->uploadDir));
    •

  •         }
    •

  •         $this->sanitizeMultipleExtensions();
    •

  •
    •

  •         $this->checkMaxFileSize();
    •

  •         $this->checkMaxWidth();
    •

  •         $this->checkMaxHeight();
    •

  •         $this->checkMimeType();
    •

  •         $this->checkImageType();
    •

  •         if (count($this->errors) > 0) {
    •

  •             return false;
    •

  •         }
    •

  •         return $this->_copyFile($chmod);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Copy the file to its destination
    •

  •      *
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function _copyFile($chmod)
    •

  •     {
    •

  •         $matched = array();
    •

  •         if (!preg_match("/\.([a-zA-Z0-9]+)$/", $this->mediaName, $matched)) {
    •

  •             $this->setErrors(sprintf(_ER_UP_INVALIDFILENAME, $this->mediaName));
    •

  •             return false;
    •

  •         }
    •

  •         if (isset($this->targetFileName)) {
    •

  •             $this->savedFileName = $this->targetFileName;
    •

  •         } elseif (isset($this->prefix)) {
    •

  •             $this->savedFileName = uniqid($this->prefix).'.'.strtolower($matched[1]);
    •

  •         } else {
    •

  •             $this->savedFileName = strtolower($this->mediaName);
    •

  •         }
    •

  •         $this->savedDestination = $this->uploadDir.'/'.$this->savedFileName;
    •

  •         if (!move_uploaded_file($this->mediaTmpName, $this->savedDestination)) {
    •

  •             $this->setErrors(sprintf(_ER_UP_FAILEDSAVEFILE, $this->savedDestination));
    •

  •             return false;
    •

  •         }
    •

  •         // Check IE XSS before returning success
    •

  •         $ext = strtolower( substr( strrchr( $this->savedDestination , '.' ) , 1 ) ) ;
    •

  •         if( in_array( $ext , $this->imageExtensions ) ) {
    •

  •             $info = @getimagesize( $this->savedDestination ) ;
    •

  •             if( $info === false || $this->imageExtensions[ (int)$info[2] ] != $ext ) {
    •

  •                 $this->setErrors( _ER_UP_SUSPICIOUSREFUSED );
    •

  •                 @unlink( $this->savedDestination );
    •

  •                 return false;
    •

  •             }
    •

  •         }
    •

  •         @chmod($this->savedDestination, $chmod);
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Is the file the right size?
    •

  •      *
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function checkMaxFileSize()
    •

  •     {
    •

  •         if ($this->mediaSize > $this->maxFileSize) {
    •

  •             $this->setErrors(sprintf(_ER_UP_FILESIZETOOLARGE, $this->maxFileSize, $this->mediaSize));
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Is the picture the right width?
    •

  •      *
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function checkMaxWidth()
    •

  •     {
    •

  •         if (!isset($this->maxWidth)) {
    •

  •             return true;
    •

  •         }
    •

  •         if (false !== $dimension = getimagesize($this->mediaTmpName)) {
    •

  •             if ($dimension[0] > $this->maxWidth) {
    •

  •                 $this->setErrors(sprintf(_ER_UP_FILEWIDTHTOOLARGE, $this->maxWidth, $dimension[0]));
    •

  •                 return false;
    •

  •             }
    •

  •         } else {
    •

  •             trigger_error(sprintf(_ER_UP_FAILEDFETCHIMAGESIZE, $this->mediaTmpName), E_USER_WARNING);
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Is the picture the right height?
    •

  •      *
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function checkMaxHeight()
    •

  •     {
    •

  •         if (!isset($this->maxHeight)) {
    •

  •             return true;
    •

  •         }
    •

  •         if (false !== $dimension = getimagesize($this->mediaTmpName)) {
    •

  •             if ($dimension[1] > $this->maxHeight) {
    •

  •                 $this->setErrors(sprintf(_ER_UP_FILEHEIGHTTOOLARGE, $this->maxHeight, $dimension[1]));
    •

  •                 return false;
    •

  •             }
    •

  •         } else {
    •

  •             trigger_error(sprintf(_ER_UP_FAILEDFETCHIMAGESIZE, $this->mediaTmpName), E_USER_WARNING);
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Check whether or not the uploaded file type is allowed
    •

  •      *
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function checkMimeType()
    •

  •     {
    •

  •         if ( empty( $this->mediaRealType ) && empty($this->allowUnknownTypes) ) {
    •

  •             $this->setErrors( _ER_UP_UNKNOWNFILETYPEREJECTED );
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         if( !empty($this->allowedMimeTypes) && !in_array($this->mediaRealType, $this->allowedMimeTypes) ) {
    •

  •             $this->setErrors(sprintf(_ER_UP_MIMETYPENOTALLOWED, $this->mediaType));
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Check whether or not the uploaded image type is valid
    •

  •      *
    •

  •      * @return  bool
    •

  •      ***/
    •

  •     function checkImageType()
    •

  •     {
    •

  •         if(empty($this->checkImageType)) return true;
    •

  •
    •

  •         if( ("image" == substr($this->mediaType, 0, strpos($this->mediaType, "/"))) ||
    •

  •             (!empty($this->mediaRealType) && "image" == substr($this->mediaRealType, 0, strpos($this->mediaRealType, "/")))
    •

  •         ){
    •

  •             if ( ! ( $info = @getimagesize( $this->mediaTmpName ) ) ) {
    •

  •                 $this->setErrors(_ER_UP_INVALIDIMAGEFILE);
    •

  •                 return false;
    •

  •             }
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sanitize executable filename with multiple extensions
    •

  •      *
    •

  •      **/
    •

  •
    •

  •     function sanitizeMultipleExtensions()
    •

  •     {
    •

  •         if(empty($this->extensionsToBeSanitized)) return;
    •

  •         $patterns = array();
    •

  •         $replaces = array();
    •

  •         foreach($this->extensionsToBeSanitized as $ext){
    •

  •             $patterns[] = "/\.".preg_quote($ext)."\./i";
    •

  •             $replaces[] = "_".$ext.".";
    •

  •         }
    •

  •         $this->mediaName = preg_replace($patterns, $replaces, $this->mediaName);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add an error
    •

  •      *
    •

  •      * @param   string  $error
    •

  •      ***/
    •

  •     function setErrors($error)
    •

  •     {
    •

  •         $this->errors[] = trim($error);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get generated errors
    •

  •      *
    •

  •      * @param    bool    $ashtml Format using HTML?
    •

  •      *
    •

  •      * @return    array|string   Array of array messages OR HTML string
    •

  •      */
    •

  •     function &getErrors($ashtml = true)
    •

  •     {
    •

  •         if (!$ashtml) {
    •

  •             return $this->errors;
    •

  •         } else {
    •

  •             $ret = '';
    •

  •             if (count($this->errors) > 0) {
    •

  •                 $ret = '<h4>'._ER_UP_ERRORSRETURNED.'</h4>';
    •

  •                 foreach ($this->errors as $error) {
    •

  •                     $ret .= $error.'<br />';
    •

  •                 }
    •

  •             }
    •

  •             return $ret;
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:26 +0200 by phpDocumentor 1.4.0a2


Docs For Class tar

Class tar

[line 93]

Location: /class.tar.php

Remarks

tar Class

This class reads and writes Tape-Archive (TAR) Files and Gzip  compressed TAR files, which are mainly used on UNIX systems.  This class works on both windows AND unix systems, and does  NOT rely on external applications!! Woohoo!

author

Josh Barger <joshb@npt.com>

copyright

Copyright (C) 2002  Josh Barger

Class Variable Summary

  • $directories =

        Processed Archive Information

  • $filename =

        Unprocessed Archive Information

  • $files =

        Processed Archive Information

  • $isGzipped =

        Unprocessed Archive Information

  • $numDirectories =

        Processed Archive Information

  • $numFiles =

        Processed Archive Information

  • $tar_file =

        Unprocessed Archive Information

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    tar::tar

tar(
 );

    Remarks

    Class Constructor -- Does nothing...

    [ Top ]

    tar::addDirectory

addDirectory(
string
$dirname );

    Parameters

    $dirname

    Remarks

    Add a directory to this tar archive

    [ Top ]

    tar::addFile

addFile(
string
$filename, [boolean
$binary = false] );

    Parameters

    $filename

    $binary

    Binary file?

    Remarks

    Add a file to the tar archive

    [ Top ]

    tar::appendTar

appendTar(
string
$filename );

    Parameters

    $filename

    Remarks

    Appends a tar file to the end of the currently opened tar file.

    [ Top ]

    tar::containsDirectory

containsDirectory(
string
$dirname );

    Parameters

    $dirname

    Remarks

    Check if this tar archive contains a specific directory

    [ Top ]

    tar::containsFile

containsFile(
string
$filename );

    Parameters

    $filename

    Remarks

    Check if this tar archive contains a specific file

    [ Top ]

    tar::getDirectory

getDirectory(
string
$dirname );

    Parameters

    $dirname

    Returns

    FALSE on fail

    Remarks

    Retrieves information about a directory in the current tar archive

    [ Top ]

    tar::getFile

getFile(
string
$filename );

    Parameters

    $filename

    Returns

    FALSE on fail

    Remarks

    Retrieves information about a file in the current tar archive

    [ Top ]

    tar::openTAR

openTAR(
string
$filename );

    Parameters

    $filename

    Remarks

    Open a TAR file

    [ Top ]

    tar::removeDirectory

removeDirectory(
string
$dirname );

    Parameters

    $dirname

    Remarks

    Remove a directory from the tar archive

    [ Top ]

    tar::removeFile

removeFile(
string
$filename );

    Parameters

    $filename

    Remarks

    Remove a file from the tar archive

    [ Top ]

    tar::saveTar

saveTar(
 );

    Remarks

    Write the currently loaded tar archive to disk

    [ Top ]

    tar::toTar

toTar(
string
$filename, bool
$useGzip );

    Parameters

    $filename

    $useGzip

    Use GZ compression?

    Remarks

    Saves tar archive to a different file than the current file

    [ Top ]

    tar::toTarOutput

toTarOutput(
string
$filename, bool
$useGzip );

    Parameters

    $filename

    $useGzip

    Use GZ compression?

    Remarks

    Sends tar archive to stdout

    [ Top ]

    tar::__computeUnsignedChecksum

__computeUnsignedChecksum(
string
$bytestring );

    Parameters

    $bytestring

    Remarks

    Computes the unsigned Checksum of a file's header  to try to ensure valid file

    access

    private

    [ Top ]

    tar::__generateTAR

__generateTAR(
 );

    Returns

    always TRUE

    Remarks

    Generates a TAR file from the processed data

    access

    private

    [ Top ]

    tar::__parseNullPaddedString

__parseNullPaddedString(
string
$string );

    Parameters

    $string

    Remarks

    Converts a NULL padded string to a non-NULL padded string

    access

    private

    [ Top ]

    tar::__parseTar

__parseTar(
 );

    Returns

    always TRUE

    Remarks

    This function parses the current TAR file

    access

    private

    [ Top ]

    tar::__readTar

__readTar(
[string
$filename = ''] );

    Parameters

    $filename

    full filename

    Returns

    always TRUE

    Remarks

    Read a non gzipped tar file in for processing.

    access

    private

    [ Top ]

Variable Detail

  • $directories =  [line 107]
    •

  • Data type: mixed
    •

    Remarks

    Processed Archive Information

  • $filename =  [line 98]
    •

  • Data type: mixed
    •

    Remarks

    Unprocessed Archive Information

  • $files =  [line 106]
    •

  • Data type: mixed
    •

    Remarks

    Processed Archive Information

  • $isGzipped =  [line 99]
    •

  • Data type: mixed
    •

    Remarks

    Unprocessed Archive Information

  • $numDirectories =  [line 109]
    •

  • Data type: mixed
    •

    Remarks

    Processed Archive Information

  • $numFiles =  [line 108]
    •

  • Data type: mixed
    •

    Remarks

    Processed Archive Information

  • $tar_file =  [line 100]
    •

  • Data type: mixed
    •

    Remarks

    Unprocessed Archive Information

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:57:14 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsDownloader

Class XoopsDownloader

[line 40]

Classes extended from XoopsDownloader:

XoopsTarDownloader

Send tar files through a http socket

XoopsZipDownloader

Sends non HTML files through a http socket

Location: /downloader.php

Remarks

Sends non HTML files through a http socket

author

Kazumi Ono    <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $archiver =

        file information

  • $ext =

        file information

  • $mimetype =

        file information

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsDownloader::XoopsDownloader

XoopsDownloader(
 );

    Remarks

    Constructor

    [ Top ]

    XoopsDownloader::addBinaryFile

addBinaryFile(
string
$filepath, [string
$newfilename = null] );

    Overridden in child classes as:

    XoopsTarDownloader::addBinaryFile()

    Add a binary file to the archive

    XoopsZipDownloader::addBinaryFile()

    Parameters

    $filepath

    $newfilename

    Remarks

    XoopsDownloader::addBinaryFile()

    [ Top ]

    XoopsDownloader::addBinaryFileData

addBinaryFileData(

&$data, string
$filename, [integer
$time = 0], mixed
$data );

    Overridden in child classes as:

    XoopsTarDownloader::addBinaryFileData()

    Add a binary dummy file to the archive

    XoopsZipDownloader::addBinaryFileData()

    Parameters

    $data

    $filename

    $time

    &$data

    Remarks

    XoopsDownloader::addBinaryFileData()

    [ Top ]

    XoopsDownloader::addFile

addFile(
string
$filepath, [string
$newfilename = null] );

    Overridden in child classes as:

    XoopsTarDownloader::addFile()

    Add a file to the archive

    XoopsZipDownloader::addFile()

    Parameters

    $filepath

    $newfilename

    Remarks

    XoopsDownloader::addFile()

    [ Top ]

    XoopsDownloader::addFileData

addFileData(

&$data, string
$filename, [integer
$time = 0], mixed
$data );

    Overridden in child classes as:

    XoopsTarDownloader::addFileData()

    Add a dummy file to the archive

    XoopsZipDownloader::addFileData()

    Parameters

    $data

    $filename

    $time

    &$data

    Remarks

    XoopsDownloader::addFileData()

    [ Top ]

    XoopsDownloader::download

download(
string
$name, [boolean
$gzip = true] );

    Overridden in child classes as:

    XoopsTarDownloader::download()

    Send the file to the client

    XoopsZipDownloader::download()

    Parameters

    $name

    $gzip

    Remarks

    XoopsDownloader::download()

    [ Top ]

    XoopsDownloader::_header

_header(
string
$filename );

    Parameters

    $filename

    Remarks

    Send the HTTP header

    access

    private

    [ Top ]

Variable Detail

  • $archiver =  [line 48]
    •

  • Data type: mixed
    •

    Remarks

    file information

  • $ext =  [line 47]
    •

  • Data type: mixed
    •

    Remarks

    file information

  • $mimetype =  [line 46]
    •

  • Data type: mixed
    •

    Remarks

    file information

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:57:49 +0200 by phpDocumentor 1.4.0a2


Docs For Class ErrorHandler

Class ErrorHandler

[line 42]

Location: /module.errorhandler.php

Remarks

Error Handler class

author

Goghs (http://www.eqiao.com/)

copyright

(c) 2000-2003 The Xoops Project - www.xoops.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    ErrorHandler::show

show(
string
$e_code, [integer
$pages = 1] );

    Parameters

    $e_code

    Errorcode

    $pages

    How many pages should the link take you back?

    Remarks

    Show an error message

    global

    $xoopsConfig $xoopsConfig:

    [ Top ]

Variable Detail

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:59:03 +0200 by phpDocumentor 1.4.0a2


Docs For Class MyTextSanitizer

Class MyTextSanitizer

[line 44]

Location: /module.textsanitizer.php

Remarks

Class to "clean up" text for various uses

Singleton

author

Goghs Cheng

author

Kazumi Ono     <onokazu@xoops.org>

copyright

(c) 2000-2003 The Xoops Project - www.xoops.org

Class Variable Summary

  • $censorConf =

  • $smileys = array()

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

  • static object getInstance()

    Access the only instance of this class

  • object getInstance()

    Access the only instance of this class

Inherited Method Summary

Method Detail

    static MyTextSanitizer::getInstance

static &getInstance(
 );

    Remarks

    Access the only instance of this class

    staticvar

    object $instance:

    [ Top ]

    MyTextSanitizer::MyTextSanitizer

MyTextSanitizer(
 );

    [ Top ]

    MyTextSanitizer::addSlashes

addSlashes(
string
$text );

    Parameters

    $text

    Remarks

    Add slashes to the text if magic_quotes_gpc is turned off.

    [ Top ]

    MyTextSanitizer::censorString

&censorString(

&$text, string
$text );

    Parameters

    $text

    &$text

    Remarks

    Replaces banned words in a string with their replacements

    deprecated

    [ Top ]

    MyTextSanitizer::codeConv

codeConv(

$text, [
$xcode = 1], [
$image = 1] );

    Parameters

    $text

    $xcode

    $image

    Remarks

    Sanitizing of [code] tag

    [ Top ]

    MyTextSanitizer::codePreConv

codePreConv(

$text, [
$xcode = 1] );

    Parameters

    $text

    $xcode

    Remarks

    Sanitizing of [code] tag

    [ Top ]

    MyTextSanitizer::codeSanitizer

codeSanitizer(

$str, [
$image = 1] );

    Parameters

    $str

    $image

    Remarks

    Sanitizing of [code] tag

    [ Top ]

    MyTextSanitizer::displayTarea

    &displayTarea(
string
$text, [bool
$html = 0], [bool
$smiley = 1], [bool
$xcode = 1], [bool
$image = 1], [bool
$br = 1] );

    Parameters

    $text

    $html

    allow html?

    $smiley

    allow smileys?

    $xcode

    allow xoopscode?

    $image

    allow inline images?

    $br

    convert linebreaks?

    Remarks

    Filters textarea form data in DB for display

    [ Top ]

    MyTextSanitizer::getSmileys

getSmileys(
 );

    Remarks

    Get the smileys

    [ Top ]

    MyTextSanitizer::htmlSpecialChars

htmlSpecialChars(

$text );

    Parameters

    $text

    [ Top ]

    MyTextSanitizer::makeClickable

makeClickable(

&$text, string
$text );

    Parameters

    $text

    &$text

    Remarks

    Make links in the text clickable

    [ Top ]

    MyTextSanitizer::makeTareaData4Edit

makeTareaData4Edit(

$text );

    Parameters

    $text

    deprecated

    [ Top ]

    MyTextSanitizer::makeTareaData4InsideQuotes

makeTareaData4InsideQuotes(

$text );

    Parameters

    $text

    deprecated

    [ Top ]

    MyTextSanitizer::makeTareaData4Preview

    &makeTareaData4Preview(

&$text, [
$html = 1], [
$smiley = 1], [
$xcode = 1] );

    Parameters

    &$text

    $html

    $smiley

    $xcode

    deprecated

    [ Top ]

    MyTextSanitizer::makeTareaData4PreviewInForm

makeTareaData4PreviewInForm(

$text );

    Parameters

    $text

    deprecated

    [ Top ]

    MyTextSanitizer::makeTareaData4Save

makeTareaData4Save(

$text );

    Parameters

    $text

    deprecated

    [ Top ]

    MyTextSanitizer::makeTareaData4Show

    &makeTareaData4Show(

&$text, [
$html = 1], [
$smiley = 1], [
$xcode = 1] );

    Parameters

    &$text

    $html

    $smiley

    $xcode

    deprecated

    [ Top ]

    MyTextSanitizer::makeTboxData4Edit

makeTboxData4Edit(

$text );

    Parameters

    $text

    deprecated

    [ Top ]

    MyTextSanitizer::makeTboxData4Preview

makeTboxData4Preview(

$text, [
$smiley = 0] );

    Parameters

    $text

    $smiley

    deprecated

    [ Top ]

    MyTextSanitizer::makeTboxData4PreviewInForm

makeTboxData4PreviewInForm(

$text );

    Parameters

    $text

    deprecated

    [ Top ]

    MyTextSanitizer::makeTboxData4Save

makeTboxData4Save(

$text );

    Parameters

    $text

    deprecated

    [ Top ]

    MyTextSanitizer::makeTboxData4Show

makeTboxData4Show(

$text, [
$smiley = 0] );

    Parameters

    $text

    $smiley

    deprecated

    [ Top ]

    MyTextSanitizer::nl2Br

nl2Br(
string
$text );

    Parameters

    $text

    Remarks

    Convert linebreaks to
     tags

    [ Top ]

    MyTextSanitizer::oopsAddSlashes

oopsAddSlashes(

$text );

    Parameters

    $text

    deprecated

    [ Top ]

    MyTextSanitizer::oopsHtmlSpecialChars

oopsHtmlSpecialChars(

$text );

    Parameters

    $text

    deprecated

    [ Top ]

    MyTextSanitizer::oopsNl2Br

oopsNl2Br(

$text );

    Parameters

    $text

    deprecated

    [ Top ]

    MyTextSanitizer::oopsStripSlashesGPC

oopsStripSlashesGPC(

$text );

    Parameters

    $text

    deprecated

    [ Top ]

    MyTextSanitizer::oopsStripSlashesRT

oopsStripSlashesRT(

$text );

    Parameters

    $text

    deprecated

    [ Top ]

    MyTextSanitizer::previewTarea

    &previewTarea(
string
$text, [bool
$html = 0], [bool
$smiley = 1], [bool
$xcode = 1], [bool
$image = 1], [bool
$br = 1] );

    Parameters

    $text

    $html

    allow html?

    $smiley

    allow smileys?

    $xcode

    allow xoopscode?

    $image

    allow inline images?

    $br

    convert linebreaks?

    Remarks

    Filters textarea form data submitted for preview

    [ Top ]

    MyTextSanitizer::sanitizeForDisplay

    sanitizeForDisplay(

$text, [
$allowhtml = 0], [
$smiley = 1], [
$bbcode = 1] );

    Parameters

    $text

    $allowhtml

    $smiley

    $bbcode

    deprecated

    [ Top ]

    MyTextSanitizer::sanitizeForPreview

    sanitizeForPreview(

$text, [
$allowhtml = 0], [
$smiley = 1], [
$bbcode = 1] );

    Parameters

    $text

    $allowhtml

    $smiley

    $bbcode

    deprecated

    [ Top ]

    MyTextSanitizer::smiley

smiley(
string
$message );

    Parameters

    $message

    Remarks

    Replace emoticons in the message with smiley images

    [ Top ]

    MyTextSanitizer::stripSlashesGPC

stripSlashesGPC(

$text );

    Parameters

    $text

    [ Top ]

    MyTextSanitizer::undoHtmlSpecialChars

undoHtmlSpecialChars(
string
$text );

    Parameters

    $text

    Remarks

    Reverses htmlSpecialChars()

    [ Top ]

    MyTextSanitizer::xoopsCodeDecode

&xoopsCodeDecode(

&$text, [bool
$allowimage = 1], string
$text );

    Parameters

    $text

    $allowimage

    Allow images in the text?                               On FALSE, uses links to images.

    &$text

    Remarks

    Replace XoopsCodes with their equivalent HTML formatting

    [ Top ]

Variable Detail

  • $censorConf =  [line 54]
    •

  • Data type: mixed
    •

  • $smileys = array() [line 49]
    •

  • Data type: array
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:59:05 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsTarDownloader

Class XoopsTarDownloader

[line 53]
XoopsDownloader
   |
   --XoopsTarDownloader
Location: /tardownloader.php

Remarks

Send tar files through a http socket

author

Kazumi Ono <onokazu@xoops.org>

copyright

(c) 2000-2003 The Xoops Project - www.xoops.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsDownloader

  • XoopsDownloader::$archiver =
    file information
  • XoopsDownloader::$ext =
    file information
  • XoopsDownloader::$mimetype =
    file information

Method Summary

Inherited Method Summary

Inherited From Class XoopsDownloader

  • XoopsDownloader::XoopsDownloader()
    Constructor
  • XoopsDownloader::addBinaryFile()
    XoopsDownloader::addBinaryFile()
  • XoopsDownloader::addBinaryFileData()
    XoopsDownloader::addBinaryFileData()
  • XoopsDownloader::addFile()
    XoopsDownloader::addFile()
  • XoopsDownloader::addFileData()
    XoopsDownloader::addFileData()
  • XoopsDownloader::download()
    XoopsDownloader::download()
  • XoopsDownloader::_header()
    Send the HTTP header

Method Detail

    XoopsTarDownloader::XoopsTarDownloader

    XoopsTarDownloader( [string $ext = '.tar.gz'], [string $mimyType = 'application/x-gzip'] );

    Parameters

    $ext

    file extension

    $mimyType

    Mimetype

    Remarks

    Constructor

    [ Top ]

    XoopsTarDownloader::addBinaryFile

    addBinaryFile( string $filepath, [string $newfilename = null] );

    Overrides XoopsDownloader::addBinaryFile() (XoopsDownloader::addBinaryFile())

    Parameters

    $filepath

    Full path to the file

    $newfilename

    Filename (if you don't want to use the original)

    Remarks

    Add a binary file to the archive

    [ Top ]

    XoopsTarDownloader::addBinaryFileData

    addBinaryFileData( &$data, string $filename, [integer $time = 0], string $data );

    Overrides XoopsDownloader::addBinaryFileData() (XoopsDownloader::addBinaryFileData())

    Parameters

    $data

    Data to write

    $filename

    Name for the file in the archive

    $time

    &$data

    Remarks

    Add a binary dummy file to the archive

    [ Top ]

    XoopsTarDownloader::addFile

    addFile( string $filepath, [string $newfilename = null] );

    Overrides XoopsDownloader::addFile() (XoopsDownloader::addFile())

    Parameters

    $filepath

    Full path to the file

    $newfilename

    Filename (if you don't want to use the original)

    Remarks

    Add a file to the archive

    [ Top ]

    XoopsTarDownloader::addFileData

    addFileData( &$data, string $filename, [integer $time = 0], string $data );

    Overrides XoopsDownloader::addFileData() (XoopsDownloader::addFileData())

    Parameters

    $data

    Data to write

    $filename

    Name for the file in the archive

    $time

    &$data

    Remarks

    Add a dummy file to the archive

    [ Top ]

    XoopsTarDownloader::download

    download( string $name, [boolean $gzip = true] );

    Overrides XoopsDownloader::download() (XoopsDownloader::download())

    Parameters

    $name

    Filename

    $gzip

    Use GZ compression

    Remarks

    Send the file to the client

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:06 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsTpl

Class XoopsTpl

[line 49]
Smarty
   |
   --XoopsTpl
Location: /template.php

Remarks

Template engine

author

Kazumi Ono <onokazu@xoops.org>

copyright

(c) 2000-2003 The Xoops Project - www.xoops.org

Class Variable Summary

  • $cache_dir =  XOOPS_CACHE_PATH
  • $compile_dir =  XOOPS_COMPILE_PATH
  • $left_delimiter =  '<{'
  • $right_delimiter =  '}>'
  • $template_dir =  XOOPS_THEME_PATH

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class Smarty

  • Smarty::$autoload_filters = array()
    This indicates which filters are automatically loaded into Smarty.
  • Smarty::$cache_handler_func = null
    The function used for cache file handling. If not set, built-in caching is used.
  • Smarty::$cache_lifetime = 3600
    This is the number of seconds cached content will persist.
  • Smarty::$cache_modified_check = false
    Only used when $caching is enabled. If true, then If-Modified-Since headers are respected with cached content, and appropriate HTTP headers are sent.
  • Smarty::$caching = 0
    This enables template caching.
  • Smarty::$compiler_class = 'Smarty_Compiler'
    The class used for compiling templates.
  • Smarty::$compiler_file = 'Smarty_Compiler.class.php'
    The file that contains the compiler class. This can a full pathname, or relative to the php_include path.
  • Smarty::$compile_check = true
    This tells Smarty whether to check for recompiling or not. Recompiling does not need to happen unless a template or config file is changed.
  • Smarty::$compile_id = null
    Set this if you want different sets of compiled files for the same templates. This is useful for things like different languages.
  • Smarty::$config_booleanize = true
    This tells whether or not to automatically booleanize config file variables.
  • Smarty::$config_class = 'Config_File'
    The class used to load config vars.
  • Smarty::$config_dir = 'configs'
    The directory where config files are located.
  • Smarty::$config_fix_newlines = true
    This tells whether or not automatically fix newlines in config files.
  • Smarty::$config_overwrite = true
    This tells if config file vars of the same name overwrite each other or not.
  • Smarty::$config_read_hidden = false
    This tells whether hidden sections [.foobar] are readable from the tempalates or not. Normally you would never allow this since that is the point behind hidden sections: the application can access them, but the templates cannot.
  • Smarty::$debugging = false
    If debugging is enabled, a debug console window will display when the page loads (make sure your browser allows unrequested popup windows)
  • Smarty::$debugging_ctrl = 'NONE'
    This determines if debugging is enable-able from the browser.
  • Smarty::$debug_tpl = ''
    This is the path to the debug console template. If not set, the default one will be used.
  • Smarty::$default_modifiers = array()
    This is a list of the modifiers to apply to all template variables.
  • Smarty::$default_resource_type = 'file'
    This is the resource type to be used when not specified
  • Smarty::$default_template_handler_func = ''
    If a template cannot be found, this PHP function will be executed.
  • Smarty::$error_reporting = null
    When set, smarty does uses this value as error_reporting-level.
  • Smarty::$force_compile = false
    This forces templates to compile every time. Useful for development or debugging.
  • Smarty::$php_handling = SMARTY_PHP_PASSTHRU
    This determines how Smarty handles "<?php ... ?>" tags in templates.
  • Smarty::$plugins_dir = array('plugins')
    An array of directories searched for plugins.
  • Smarty::$request_use_auto_globals = true
    Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false)
  • Smarty::$request_vars_order = 'EGPCS'
    The order in which request variables are registered, similar to variables_order in php.ini E = Environment, G = GET, P = POST, C = Cookies, S = Server
  • Smarty::$secure_dir = array()
    This is the list of template directories that are considered secure. This is used only if $security is enabled. One directory per array element. $template_dir is in this list implicitly.
  • Smarty::$security = false
    This enables template security. When enabled, many things are restricted
  • Smarty::$security_settings = array( 'PHP_HANDLING' => false, 'IF_FUNCS' => array('array', 'list', 'isset', 'empty', 'count', 'sizeof', 'in_array', 'is_array', 'true', 'false', 'null'),'INCLUDE_ANY'=>false,'PHP_TAGS'=>false,'MODIFIER_FUNCS'=>array('count'),'ALLOW_CONSTANTS'=>false)
    These are the security settings for Smarty. They are used only when $security is enabled.
  • Smarty::$trusted_dir = array()
    This is an array of directories where trusted php scripts reside.
  • Smarty::$use_sub_dirs = false
    This tells Smarty whether or not to use sub dirs in the cache/ and templates_c/ directories. sub directories better organized, but may not work well with PHP safe mode enabled.
  • Smarty::$_cache_include = null
    name of optional cache include file
  • Smarty::$_cache_including = false
    indicate if the current code is used in a compiled include
  • Smarty::$_cache_info = array()
    info that makes up a cache file
  • Smarty::$_cache_serials = array()
    cache serials
  • Smarty::$_compile_id = null
    for different compiled templates
  • Smarty::$_config = array(array('vars' => array(),'files'=>array()))
    loaded configuration settings
  • Smarty::$_conf_obj = null
    configuration object
  • Smarty::$_dir_perms = 0771
    default dir permissions
  • Smarty::$_file_perms = 0644
    default file permissions
  • Smarty::$_foreach = array()
    keeps track of foreach blocks
  • Smarty::$_inclusion_depth = 0
    current template inclusion depth
  • Smarty::$_plugins = array( 'modifier' => array(),'function'=>array(),'block'=>array(),'compiler'=>array(),'prefilter'=>array(),'postfilter'=>array(),'outputfilter'=>array(),'resource'=>array(),'insert'=>array())
    table keeping track of plugins
  • Smarty::$_reg_objects = array()
    registered objects
  • Smarty::$_sections = array()
    keeps track of sections
  • Smarty::$_smarty_debug_id = 'SMARTY_DEBUG'
    text in URL to enable debug mode
  • Smarty::$_smarty_debug_info = array()
    debugging information for debug console
  • Smarty::$_smarty_md5 = 'f8d698aea36fcbead2b9d5359ffca76f'
    md5 checksum of the string 'Smarty'
  • Smarty::$_smarty_vars = null
    stores run-time $smarty.* vars
  • Smarty::$_tag_stack = array()
    keeps track of tag hierarchy
  • Smarty::$_tpl_vars = array()
    where assigned template vars are kept
  • Smarty::$_version = '2.6.18'
    Smarty version number

Method Summary

Inherited Method Summary

Inherited From Class Smarty

  • Smarty::Smarty()
    The class constructor.
  • Smarty::append()
    appends values to template variables
  • Smarty::append_by_ref()
    appends values to template variables by reference
  • Smarty::assign()
    assigns values to template variables
  • Smarty::assign_by_ref()
    assigns values to template variables by reference
  • Smarty::clear_all_assign()
    clear all the assigned template variables.
  • Smarty::clear_all_cache()
    clear the entire contents of cache (all templates)
  • Smarty::clear_assign()
    clear the given assigned template variable.
  • Smarty::clear_cache()
    clear cached content for the given template and cache id
  • Smarty::clear_compiled_tpl()
    clears compiled version of specified template resource, or all compiled template files if one is not specified.
  • Smarty::clear_config()
    clear configuration values
  • Smarty::config_load()
    load configuration values
  • Smarty::display()
    executes & displays the template results
  • Smarty::fetch()
    executes & returns or displays the template results
  • Smarty::get_config_vars()
    Returns an array containing config variables
  • Smarty::get_registered_object()
    return a reference to a registered object
  • Smarty::get_template_vars()
    Returns an array containing template variables
  • Smarty::is_cached()
    test to see if valid cache exists for this template
  • Smarty::load_filter()
    load a filter of specified type and name
  • Smarty::register_block()
    Registers block function to be used in templates
  • Smarty::register_compiler_function()
    Registers compiler function
  • Smarty::register_function()
    Registers custom function to be used in templates
  • Smarty::register_modifier()
    Registers modifier to be used in templates
  • Smarty::register_object()
    Registers object to be used in templates
  • Smarty::register_outputfilter()
    Registers an output filter function to apply to a template output
  • Smarty::register_postfilter()
    Registers a postfilter function to apply to a compiled template after compilation
  • Smarty::register_prefilter()
    Registers a prefilter function to apply to a template before compiling
  • Smarty::register_resource()
    Registers a resource to fetch a template
  • Smarty::template_exists()
    Checks whether requested template exists.
  • Smarty::trigger_error()
    trigger Smarty error
  • Smarty::unregister_block()
    Unregisters block function
  • Smarty::unregister_compiler_function()
    Unregisters compiler function
  • Smarty::unregister_function()
    Unregisters custom function
  • Smarty::unregister_modifier()
    Unregisters modifier
  • Smarty::unregister_object()
    Unregisters object
  • Smarty::unregister_outputfilter()
    Unregisters an outputfilter function
  • Smarty::unregister_postfilter()
    Unregisters a postfilter function
  • Smarty::unregister_prefilter()
    Unregisters a prefilter function
  • Smarty::unregister_resource()
    Unregisters a resource
  • Smarty::_compile_resource()
    compile the template
  • Smarty::_compile_source()
    compile the given source
  • Smarty::_dequote()
    Remove starting and ending quotes from the string
  • Smarty::_eval()
    wrapper for eval() retaining $this
  • Smarty::_fetch_resource_info()
    fetch the template info. Gets timestamp, and source if get_source is true
  • Smarty::_get_auto_filename()
    get a concrete filename for automagically created content
  • Smarty::_get_auto_id()
    returns an auto_id for auto-file-functions
  • Smarty::_get_compile_path()
    Get the compile path for this resource
  • Smarty::_get_plugin_filepath()
    get filepath of requested plugin
  • Smarty::_include()
    wrapper for include() retaining $this
  • Smarty::_is_compiled()
    test if resource needs compiling
  • Smarty::_parse_resource_name()
    parse out the type and name from the resource
  • Smarty::_process_compiled_include_callback()
    callback function for preg_replace, to call a non-cacheable block
  • Smarty::_read_file()
    read in a file
  • Smarty::_run_mod_handler()
    Handle modifiers
  • Smarty::_smarty_cache_attrs()
    get or set an array of cached attributes for function that is
  • Smarty::_smarty_include()
    called for included templates
  • Smarty::_trigger_fatal_error()
    trigger Smarty plugin error
  • Smarty::_unlink()
    unlink a file, possibly using expiration time

Method Detail

    XoopsTpl::XoopsTpl

    XoopsTpl( );

    [ Top ]

    XoopsTpl::fetchFromData

    fetchFromData(

$tplSource, [bool
$display = false], [
$vars = null], string
$data );

    Parameters

    $data

    The template to render

    $display

    If rendered text should be output or returned

    $tplSource

    $vars

    Returns

    Rendered output if $display was false

    Remarks

    Renders output from template data

    [ Top ]

    XoopsTpl::touch

    touch( $resourceName );

    Parameters

    $resourceName

    [ Top ]

    XoopsTpl::xoops_canUpdateFromFile

    xoops_canUpdateFromFile( );

    [ Top ]

    XoopsTpl::xoops_fetchFromData

    xoops_fetchFromData( $data );

    Parameters

    $data

    [ Top ]

    XoopsTpl::xoops_getTemplateDir

    xoops_getTemplateDir( );

    [ Top ]

    XoopsTpl::xoops_setCacheDir

    xoops_setCacheDir( $dirname );

    Parameters

    $dirname

    [ Top ]

    XoopsTpl::xoops_setCacheTime

    xoops_setCacheTime( [ $num = 0] );

    Parameters

    $num

    [ Top ]

    XoopsTpl::xoops_setCaching

    xoops_setCaching( [ $num = 0] );

    Parameters

    $num

    [ Top ]

    XoopsTpl::xoops_setCompileDir

    xoops_setCompileDir( $dirname );

    Parameters

    $dirname

    [ Top ]

    XoopsTpl::xoops_setDebugging

    xoops_setDebugging( [ $flag = false] );

    Parameters

    $flag

    [ Top ]

    XoopsTpl::xoops_setTemplateDir

    xoops_setTemplateDir( $dirname );

    Parameters

    $dirname

    deprecated

    DO NOT USE THESE METHODS, ACCESS THE CORRESPONDING PROPERTIES INSTEAD

    [ Top ]

Variable Detail

  • $cache_dir =  XOOPS_CACHE_PATH [line 55]
  • Data type: mixed Overrides: Array

  • $compile_dir =  XOOPS_COMPILE_PATH [line 56]
  • Data type: mixed Overrides: Array

  • $left_delimiter =  '<{' [line 51]
  • Data type: mixed Overrides: Array

  • $right_delimiter =  '}>' [line 52]
  • Data type: mixed Overrides: Array

  • $template_dir =  XOOPS_THEME_PATH [line 54]
  • Data type: mixed Overrides: Array

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:08 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsObjectTree

Class XoopsObjectTree

[line 41]

Location: /tree.php

Remarks

A tree structures with XoopsObjects as nodes

author

Kazumi Ono     <onokazu@xoops.org>

copyright

(c) 2000-2003 The Xoops Project - www.xoops.org

Class Variable Summary

  • $_myId =

  • $_objects =

  • $_parentId =

  • $_rootId =  null

  • $_tree = array()

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsObjectTree::XoopsObjectTree

XoopsObjectTree(

&$objectArr, string
$myId, string
$parentId, [string
$rootId = null], array
$objectArr );

    Parameters

    $objectArr

    Array of XoopsObjects

    $myId

    field name of object ID

    $parentId

    field name of parent object ID

    $rootId

    field name of root object ID

    &$objectArr

    Remarks

    Constructor

    [ Top ]

    XoopsObjectTree::getAllChild

getAllChild(
string
$key, [array
$ret = array()] );

    Parameters

    $key

    ID of the parent

    $ret

    (Empty when called from client) Array of children from previous recursions.

    Returns

    Array of child nodes.

    Remarks

    returns an array of all child objects of an object specified by its id

    [ Top ]

    XoopsObjectTree::getAllParent

getAllParent(
string
$key, [array
$ret = array()], [int
$uplevel = 1] );

    Parameters

    $key

    ID of the child object

    $ret

    (empty when called from outside) Result from previous recursions

    $uplevel

    (empty when called from outside) level of recursion

    Returns

    Array of parent nodes.

    Remarks

    returns an array of all parent objects.

    the key of returned array represents how many levels up from the specified object

    [ Top ]

    XoopsObjectTree::getByKey

&getByKey(
string
$key );

    Parameters

    $key

    ID of the object to retrieve

    Returns

    within the tree

    Remarks

    returns an object from the tree specified by its id

    [ Top ]

    XoopsObjectTree::getFirstChild

getFirstChild(
string
$key );

    Parameters

    $key

    ID of the parent object

    Returns

    Array of children of the parent

    Remarks

    returns an array of all the first child object of an object specified by its id

    [ Top ]

    XoopsObjectTree::getTree

&getTree(
 );

    Returns

    Associative array comprising the tree

    Remarks

    Get the tree

    [ Top ]

    XoopsObjectTree::makeSelBox

makeSelBox(
string
$name, string
$fieldName, [string
$prefix = '-'], [string
$selected = ''], [bool
$addEmptyOption = false], [integer
$key = 0] );

    Parameters

    $name

    Name of the select box

    $fieldName

    Name of the member variable from the   node objects that should be used as the title for the options.

    $prefix

    String to indent deeper levels

    $selected

    Value to display as selected

    $addEmptyOption

    Set TRUE to add an empty option with value "0" at the top of the hierarchy

    $key

    ID of the object to display as the root of select options

    Returns

    HTML select box

    Remarks

    Make a select box with options from the tree

    [ Top ]

    XoopsObjectTree::_initialize

_initialize(
 );

    Remarks

    Initialize the object

    access

    private

    [ Top ]

    XoopsObjectTree::_makeSelBoxOptions

_makeSelBoxOptions(
string
$fieldName, string
$selected, int
$key,
&$ret, string
$prefix_orig, [string
$prefix_curr = ''], string
$ret );

    Parameters

    $fieldName

    Name of the member variable from the   node objects that should be used as the title for the options.

    $selected

    Value to display as selected

    $key

    ID of the object to display as the root of select options

    $ret

    (reference to a string when called from outside) Result from previous recursions

    $prefix_orig

    String to indent items at deeper levels

    $prefix_curr

    String to indent the current item

    &$ret

    Remarks

    Make options for a select box from

    access

    private

    [ Top ]

Variable Detail

  • $_myId =  [line 47]
    •

  • Data type: mixed
    •

    access

    private

  • $_objects =  [line 50]
    •

  • Data type: mixed
    •

    access

    private

  • $_parentId =  [line 46]
    •

  • Data type: mixed
    •

    access

    private

  • $_rootId =  null [line 48]
    •

  • Data type: mixed
    •

    access

    private

  • $_tree = array() [line 49]
    •

  • Data type: mixed
    •

    access

    private

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:00:22 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsMediaUploader

Class XoopsMediaUploader

[line 84]

Location: /uploader.php

Remarks

Upload Media files

Example of usage:
  •  include_once 'uploader.php';
    •

  •  $allowed_mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png');
    •

  •  $maxfilesize = 50000;
    •

  •  $maxfilewidth = 120;
    •

  •  $maxfileheight = 120;
    •

  •  $uploader = new XoopsMediaUploader('/home/xoops/uploads', $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
    •

  •  if ($uploader->fetchMedia($_POST['uploade_file_name'])) {
    •

  •    if (!$uploader->upload()) {
    •

  •       echo $uploader->getErrors();
    •

  •    } else {
    •

  •       echo '<h4>File uploaded successfully!</h4>'
    •

  •       echo 'Saved as: ' . $uploader->getSavedFileName() . '<br />';
    •

  •       echo 'Full path: ' . $uploader->getSavedDestination();
    •

  •    }
    •

  •  } else {
    •

  •    echo $uploader->getErrors();
    •

  •  }
    •

    author

    Kazumi Ono     <onokazu@xoops.org>

    copyright

    (c) 2000-2003 The Xoops Project - www.xoops.org

    Class Variable Summary

    • $allowedMimeTypes = array()

    • $allowUnknownTypes =  false

        Flag indicating if unrecognized mimetypes should be allowed (use with precaution ! may lead to security issues )

    • $checkImageType =  true

    • $errors = array()

    • $extensionsToBeSanitized = array( 'php' , 'phtml' , 'phtm' , 'php3' , 'php4' , 'cgi' , 'pl' , 'asp', 'php5' )

    • $extensionToMime = array()

    • $imageExtensions = array( 1 => 'gif', 2 => 'jpg', 3 => 'png', 4 => 'swf', 5 => 'psd', 6 => 'bmp', 7 => 'tif', 8 => 'tif', 9 => 'jpc', 10 => 'jp2', 11 => 'jpx', 12 => 'jb2', 13 => 'swc', 14 => 'iff', 15 => 'wbmp', 16 => 'xbm' )

    • $maxFileSize =  0

    • $maxHeight =

    • $maxWidth =

    • $mediaError =

    • $mediaName =

    • $mediaRealType =  ''

    • $mediaSize =

    • $mediaTmpName =

    • $mediaType =

    • $prefix =

    • $savedDestination =

    • $savedFileName =

    • $targetFileName =

    • $uploadDir =  ''

    Class Constant Summary

    Inherited Class Constant Summary

    Inherited Class Variable Summary

    Method Summary

    Inherited Method Summary

    Method Detail

      XoopsMediaUploader::XoopsMediaUploader

XoopsMediaUploader(
string
$uploadDir, array
$allowedMimeTypes, [int
$maxFileSize = 0], [int
$maxWidth = null], [int
$maxHeight = null], int
$cmodvalue );

      Parameters

      $uploadDir

      $allowedMimeTypes

      $maxFileSize

      $maxWidth

      $maxHeight

      $cmodvalue

      Remarks

      Constructor

      [ Top ]

      XoopsMediaUploader::checkImageType

checkImageType(
 );

      Remarks

      Check whether or not the uploaded image type is valid

      [ Top ]

      XoopsMediaUploader::checkMaxFileSize

checkMaxFileSize(
 );

      Remarks

      Is the file the right size?

      [ Top ]

      XoopsMediaUploader::checkMaxHeight

checkMaxHeight(
 );

      Remarks

      Is the picture the right height?

      [ Top ]

      XoopsMediaUploader::checkMaxWidth

checkMaxWidth(
 );

      Remarks

      Is the picture the right width?

      [ Top ]

      XoopsMediaUploader::checkMimeType

checkMimeType(
 );

      Remarks

      Check whether or not the uploaded file type is allowed

      [ Top ]

      XoopsMediaUploader::fetchMedia

fetchMedia(
string
$media_name, [int
$index = null] );

      Parameters

      $media_name

      Name of the file field

      $index

      Index of the file (if more than one uploaded under that name)

      Remarks

      Fetch the uploaded file

      [ Top ]

      XoopsMediaUploader::getErrors

&getErrors(
[bool
$ashtml = true] );

      Parameters

      $ashtml

      Format using HTML?

      Returns

      Array of array messages OR HTML string

      Remarks

      Get generated errors

      [ Top ]

      XoopsMediaUploader::getMediaName

getMediaName(
 );

      Remarks

      Get the uploaded filename

      [ Top ]

      XoopsMediaUploader::getMediaSize

getMediaSize(
 );

      Remarks

      Get the size of the uploaded file

      [ Top ]

      XoopsMediaUploader::getMediaTmpName

getMediaTmpName(
 );

      Remarks

      Get the temporary name that the uploaded file was stored under

      [ Top ]

      XoopsMediaUploader::getMediaType

getMediaType(
 );

      Remarks

      Get the type of the uploaded file

      [ Top ]

      XoopsMediaUploader::getSavedDestination

getSavedDestination(
 );

      Remarks

      Get the destination the file is saved to

      [ Top ]

      XoopsMediaUploader::getSavedFileName

getSavedFileName(
 );

      Remarks

      Get the saved filename

      [ Top ]

      XoopsMediaUploader::sanitizeMultipleExtensions

sanitizeMultipleExtensions(
 );

      Remarks

      Sanitize executable filename with multiple extensions

      [ Top ]

      XoopsMediaUploader::setErrors

setErrors(
string
$error );

      Parameters

      $error

      Remarks

      Add an error

      [ Top ]

      XoopsMediaUploader::setPrefix

setPrefix(
string
$value );

      Parameters

      $value

      Remarks

      Set the prefix

      [ Top ]

      XoopsMediaUploader::setTargetFileName

setTargetFileName(
string
$value );

      Parameters

      $value

      Remarks

      Set the target filename

      [ Top ]

      XoopsMediaUploader::upload

upload(
[
$chmod = 0644] );

      Parameters

      $chmod

      Remarks

      Check the file and copy it to the destination

      [ Top ]

      XoopsMediaUploader::_copyFile

_copyFile(

$chmod );

      Parameters

      $chmod

      Remarks

      Copy the file to its destination

      [ Top ]

    Variable Detail

    • $allowedMimeTypes = array() [line 100]
      •

    • Data type: mixed
      •

    • $allowUnknownTypes =  false [line 89]
      •

    • Data type: mixed
      •

      Remarks

      Flag indicating if unrecognized mimetypes should be allowed (use with precaution ! may lead to security issues )

    • $checkImageType =  true [line 117]
      •

    • Data type: mixed
      •

    • $errors = array() [line 110]
      •

    • Data type: mixed
      •

    • $extensionsToBeSanitized = array( 'php' , 'phtml' , 'phtm' , 'php3' , 'php4' , 'cgi' , 'pl' , 'asp', 'php5' ) [line 119]
      •

    • Data type: mixed
      •

    • $extensionToMime = array() [line 116]
      •

    • Data type: mixed
      •

    • $imageExtensions = array( 1 => 'gif', 2 => 'jpg', 3 => 'png', 4 => 'swf', 5 => 'psd', 6 => 'bmp', 7 => 'tif', 8 => 'tif', 9 => 'jpc', 10 => 'jp2', 11 => 'jpx', 12 => 'jb2', 13 => 'swc', 14 => 'iff', 15 => 'wbmp', 16 => 'xbm' ) [line 121]
      •

    • Data type: mixed
      •

    • $maxFileSize =  0 [line 102]
      •

    • Data type: mixed
      •

    • $maxHeight =  [line 104]
      •

    • Data type: mixed
      •

    • $maxWidth =  [line 103]
      •

    • Data type: mixed
      •

    • $mediaError =  [line 95]
      •

    • Data type: mixed
      •

    • $mediaName =  [line 91]
      •

    • Data type: mixed
      •

    • $mediaRealType =  '' [line 96]
      •

    • Data type: mixed
      •

    • $mediaSize =  [line 93]
      •

    • Data type: mixed
      •

    • $mediaTmpName =  [line 94]
      •

    • Data type: mixed
      •

    • $mediaType =  [line 92]
      •

    • Data type: mixed
      •

    • $prefix =  [line 108]
      •

    • Data type: mixed
      •

    • $savedDestination =  [line 112]
      •

    • Data type: mixed
      •

    • $savedFileName =  [line 114]
      •

    • Data type: mixed
      •

    • $targetFileName =  [line 106]
      •

    • Data type: mixed
      •

    • $uploadDir =  '' [line 98]
      •

    • Data type: mixed
      •

    Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:00:26 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsZipDownloader

Class XoopsZipDownloader

[line 37]
XoopsDownloader
   |
   --XoopsZipDownloader
Location: /zipdownloader.php

Remarks

Sends non HTML files through a http socket

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsDownloader

  • XoopsDownloader::$archiver =
    file information
  • XoopsDownloader::$ext =
    file information
  • XoopsDownloader::$mimetype =
    file information

Method Summary

Inherited Method Summary

Inherited From Class XoopsDownloader

  • XoopsDownloader::XoopsDownloader()
    Constructor
  • XoopsDownloader::addBinaryFile()
    XoopsDownloader::addBinaryFile()
  • XoopsDownloader::addBinaryFileData()
    XoopsDownloader::addBinaryFileData()
  • XoopsDownloader::addFile()
    XoopsDownloader::addFile()
  • XoopsDownloader::addFileData()
    XoopsDownloader::addFileData()
  • XoopsDownloader::download()
    XoopsDownloader::download()
  • XoopsDownloader::_header()
    Send the HTTP header

Method Detail

    XoopsZipDownloader::XoopsZipDownloader

    XoopsZipDownloader( [ $ext = '.zip'], [ $mimyType = 'application/x-zip'] );

    Parameters

    $ext

    $mimyType

    [ Top ]

    XoopsZipDownloader::addBinaryFile

    addBinaryFile( $filepath, [ $newfilename = null] );

    Overrides XoopsDownloader::addBinaryFile() (XoopsDownloader::addBinaryFile())

    Parameters

    $filepath

    $newfilename

    [ Top ]

    XoopsZipDownloader::addBinaryFileData

    addBinaryFileData( &$data, $filename, [ $time = 0] );

    Overrides XoopsDownloader::addBinaryFileData() (XoopsDownloader::addBinaryFileData())

    Parameters

    &$data

    $filename

    $time

    [ Top ]

    XoopsZipDownloader::addFile

    addFile( $filepath, [ $newfilename = null] );

    Overrides XoopsDownloader::addFile() (XoopsDownloader::addFile())

    Parameters

    $filepath

    $newfilename

    [ Top ]

    XoopsZipDownloader::addFileData

    addFileData( &$data, $filename, [ $time = 0] );

    Overrides XoopsDownloader::addFileData() (XoopsDownloader::addFileData())

    Parameters

    &$data

    $filename

    $time

    [ Top ]

    XoopsZipDownloader::download

    download( $name, [ $gzip = true] );

    Overrides XoopsDownloader::download() (XoopsDownloader::download())

    Parameters

    $name

    $gzip

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:01:31 +0200 by phpDocumentor 1.4.0a2


Docs for page class.tar.php

File: /class.tar.php

filesource

Source Code for this file

Classes in this file:
tar
tar Class

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:08 +0200 by phpDocumentor 1.4.0a2


Docs for page downloader.php

File: /downloader.php

filesource

Source Code for this file

Classes in this file:
XoopsDownloader
Sends non HTML files through a http socket

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:49 +0200 by phpDocumentor 1.4.0a2


Docs for page module.errorhandler.php

File: /module.errorhandler.php

filesource

Source Code for this file

Classes in this file:
ErrorHandler
Error Handler class

Include Statements Summary

Global Variable Summary

Constant Summary

  • XOOPS_C_ERRORHANDLER_INCLUDED = 1

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

  • XOOPS_C_ERRORHANDLER_INCLUDED = 1 [line 31]

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:59:02 +0200 by phpDocumentor 1.4.0a2


Docs for page module.textsanitizer.php

File: /module.textsanitizer.php

filesource

Source Code for this file

Classes in this file:
MyTextSanitizer
Class to "clean up" text for various uses

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:59:03 +0200 by phpDocumentor 1.4.0a2


Docs for page tardownloader.php

File: /tardownloader.php

filesource

Source Code for this file

Classes in this file:
XoopsTarDownloader
Send tar files through a http socket

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH.'/class/downloader.php'
    base class
  • include_once = XOOPS_ROOT_PATH.'/class/class.tar.php'
    Class to handle tar files

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH.'/class/downloader.php' [line 38]

    Remarks

    base class

  • include_once file: = XOOPS_ROOT_PATH.'/class/class.tar.php' [line 42]

    Remarks

    Class to handle tar files

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:05 +0200 by phpDocumentor 1.4.0a2


Docs for page template.php

File: /template.php

filesource

Source Code for this file

Classes in this file:
XoopsTpl
Template engine

Include Statements Summary

  • require_once = Smarty.class.php
    Base class: Smarty template engine

Global Variable Summary

Constant Summary

Function Summary

  • void xoops_template_clear_module_cache()
    Clear the module cache
  • boolean xoops_template_touch()
    function to update compiled template file in templates_c folder

Include Statements Detail

  • require_once file: = Smarty.class.php [line 38]

    Remarks

    Base class: Smarty template engine

Global Variable Detail

Constant Detail

Function Detail

  • void xoops_template_clear_module_cache() [line 161]

    Usage: xoops_template_clear_module_cache( int $mid)

    Parameters

    $mid

    Module ID

    Remarks

    Clear the module cache

    [ Top ]

  • boolean xoops_template_touch() [line 143]

    Usage: xoops_template_touch( string $tpl_id, [boolean $clear_old = true])

    Parameters

    $tpl_id

    $clear_old

    Remarks

    function to update compiled template file in templates_c folder

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 23:00:07 +0200 by phpDocumentor 1.4.0a2


Docs for page tree.php

File: /tree.php

filesource

Source Code for this file

Classes in this file:
XoopsObjectTree
A tree structures with XoopsObjects as nodes

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:21 +0200 by phpDocumentor 1.4.0a2


Docs for page uploader.php

File: /uploader.php

filesource

Source Code for this file

Classes in this file:
XoopsMediaUploader
Upload Media files

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:23 +0200 by phpDocumentor 1.4.0a2


File Source for commentrenderer.php

Source for file commentrenderer.php

Documentation is available at commentrenderer.php

  • <?php
    •

  • // $Id: commentrenderer.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.xoops.org/ http://jp.xoops.org/  http://www.myweb.ne.jp/  //
    •

  • // Project: The XOOPS Project (http://www.xoops.org/)                        //
    •

  • // ------------------------------------------------------------------------- //
    •

  • /**
    •

  •  * Display comments
    •

  •  *
    •

  •  * @package        kernel
    •

  •  * @subpackage    comment
    •

  •  *
    •

  •  * @author        Kazumi Ono     <onokazu@xoops.org>
    •

  •  * @copyright    (c) 2000-2003 The Xoops Project - www.xoops.org
    •

  •  */
    •

  • class XoopsCommentRenderer {
    •

  •
    •

  •     /**#@+
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_tpl;
    •

  •     var $_comments = null;
    •

  •     var $_useIcons = true;
    •

  •     var $_doIconCheck = false;
    •

  •     var $_memberHandler;
    •

  •     var $_statusText;
    •

  •     /**#@-*/
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param   object  &$tpl
    •

  •      * @param   boolean $use_icons
    •

  •      * @param   boolean $do_iconcheck
    •

  •      ***/
    •

  •     function XoopsCommentRenderer(&$tpl, $use_icons = true, $do_iconcheck = false)
    •

  •     {
    •

  •         $this->_tpl =& $tpl;
    •

  •         $this->_useIcons = $use_icons;
    •

  •         $this->_doIconCheck = $do_iconcheck;
    •

  •         $this->_memberHandler =& xoops_gethandler('member');
    •

  •         $this->_statusText = array(XOOPS_COMMENT_PENDING => '<span style="text-decoration: none; font-weight: bold; color: #00ff00;">'._CM_PENDING.'</span>', XOOPS_COMMENT_ACTIVE => '<span style="text-decoration: none; font-weight: bold; color: #ff0000;">'._CM_ACTIVE.'</span>', XOOPS_COMMENT_HIDDEN => '<span style="text-decoration: none; font-weight: bold; color: #0000ff;">'._CM_HIDDEN.'</span>');
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Access the only instance of this class
    •

  •      *
    •

  •      * @param   object  $tpl        reference to a {@link Smarty} object
    •

  •      * @param   boolean $use_icons
    •

  •      * @param   boolean $do_iconcheck
    •

  •      * @return
    •

  •      ***/
    •

  •     function &instance(&$tpl, $use_icons = true, $do_iconcheck = false)
    •

  •     {
    •

  •         static $instance;
    •

  •         if (!isset($instance)) {
    •

  •             $instance = new XoopsCommentRenderer($tpl, $use_icons, $do_iconcheck);
    •

  •         }
    •

  •         return $instance;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Accessor
    •

  •      *
    •

  •      * @param   object  &$comments_arr  array of {@link XoopsComment} objects
    •

  •      ***/
    •

  •     function setComments(&$comments_arr)
    •

  •     {
    •

  •         if (isset($this->_comments)) {
    •

  •             unset($this->_comments);
    •

  •         }
    •

  •         $this->_comments =& $comments_arr;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Render the comments in flat view
    •

  •      *
    •

  •      * @param boolean $admin_view
    •

  •      ***/
    •

  •     function renderFlatView($admin_view = false)
    •

  •     {
    •

  •         $count = count($this->_comments);
    •

  •         for ($i = 0; $i < $count; $i++) {
    •

  •             if (false != $this->_useIcons) {
    •

  •                 $title = $this->_getTitleIcon($this->_comments[$i]->getVar('com_icon')).'&nbsp;'.$this->_comments[$i]->getVar('com_title');
    •

  •             } else {
    •

  •                 $title = $this->_comments[$i]->getVar('com_title');
    •

  •             }
    •

  •             $poster = $this->_getPosterArray($this->_comments[$i]->getVar('com_uid'));
    •

  •             if (false != $admin_view) {
    •

  •                 $text = $this->_comments[$i]->getVar('com_text').'<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'._CM_STATUS.': '.$this->_statusText[$this->_comments[$i]->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$this->_comments[$i]->getVar('com_ip').'</span></div>';
    •

  •             } else {
    •

  •                 // hide comments that are not active
    •

  •                 if (XOOPS_COMMENT_ACTIVE != $this->_comments[$i]->getVar('com_status')) {
    •

  •                     continue;
    •

  •                 } else {
    •

  •                     $text = $this->_comments[$i]->getVar('com_text');
    •

  •                 }
    •

  •             }
    •

  •             $this->_tpl->append('comments', array('id' => $this->_comments[$i]->getVar('com_id'), 'title' => $title, 'text' => $text, 'date_posted' => formatTimestamp($this->_comments[$i]->getVar('com_created'), 'm'), 'date_modified' => formatTimestamp($this->_comments[$i]->getVar('com_modified'), 'm'), 'poster' => $poster));
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Render the comments in thread view
    •

  •      *
    •

  •      * This method calls itself recursively
    •

  •      *
    •

  •      * @param integer $comment_id   Should be "0" when called by client
    •

  •      * @param boolean $admin_view
    •

  •      * @param boolean $show_nav
    •

  •      ***/
    •

  •     function renderThreadView($comment_id = 0, $admin_view = false, $show_nav = true)
    •

  •     {
    •

  •         include_once XOOPS_ROOT_PATH.'/class/tree.php';
    •

  •         // construct comment tree
    •

  •         $xot = new XoopsObjectTree($this->_comments, 'com_id', 'com_pid', 'com_rootid');
    •

  •         $tree =& $xot->getTree();
    •

  •
    •

  •         if (false != $this->_useIcons) {
    •

  •             $title = $this->_getTitleIcon($tree[$comment_id]['obj']->getVar('com_icon')).'&nbsp;'.$tree[$comment_id]['obj']->getVar('com_title');
    •

  •         } else {
    •

  •             $title = $tree[$comment_id]['obj']->getVar('com_title');
    •

  •         }
    •

  •         if (false != $show_nav && $tree[$comment_id]['obj']->getVar('com_pid') != 0) {
    •

  •             $this->_tpl->assign('lang_top', _CM_TOP);
    •

  •             $this->_tpl->assign('lang_parent', _CM_PARENT);
    •

  •             $this->_tpl->assign('show_threadnav', true);
    •

  •         } else {
    •

  •             $this->_tpl->assign('show_threadnav', false);
    •

  •         }
    •

  •         if (false != $admin_view) {
    •

  •             // admins can see all
    •

  •             $text = $tree[$comment_id]['obj']->getVar('com_text').'<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'._CM_STATUS.': '.$this->_statusText[$tree[$comment_id]['obj']->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$tree[$comment_id]['obj']->getVar('com_ip').'</span></div>';
    •

  •         } else {
    •

  •             // hide comments that are not active
    •

  •             if (XOOPS_COMMENT_ACTIVE != $tree[$comment_id]['obj']->getVar('com_status')) {
    •

  •                 // if there are any child comments, display them as root comments
    •

  •                 if (isset($tree[$comment_id]['child']) && !empty($tree[$comment_id]['child'])) {
    •

  •                     foreach ($tree[$comment_id]['child'] as $child_id) {
    •

  •                         $this->renderThreadView($child_id, $admin_view, false);
    •

  •                     }
    •

  •                 }
    •

  •                 return;
    •

  •             } else {
    •

  •                 $text = $tree[$comment_id]['obj']->getVar('com_text');
    •

  •             }
    •

  •         }
    •

  •         $replies = array();
    •

  •         $this->_renderThreadReplies($tree, $comment_id, $replies, '&nbsp;&nbsp;', $admin_view);
    •

  •         $show_replies = (count($replies) > 0) ? true : false;
    •

  •         $this->_tpl->append('comments', array('pid' => $tree[$comment_id]['obj']->getVar('com_pid'), 'id' => $tree[$comment_id]['obj']->getVar('com_id'), 'itemid' => $tree[$comment_id]['obj']->getVar('com_itemid'), 'rootid' => $tree[$comment_id]['obj']->getVar('com_rootid'), 'title' => $title, 'text' => $text, 'date_posted' => formatTimestamp($tree[$comment_id]['obj']->getVar('com_created'), 'm'), 'date_modified' => formatTimestamp($tree[$comment_id]['obj']->getVar('com_modified'), 'm'), 'poster' => $this->_getPosterArray($tree[$comment_id]['obj']->getVar('com_uid')), 'replies' => $replies, 'show_replies' => $show_replies));
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Render replies to a thread
    •

  •      *
    •

  •      * @param   array   &$thread
    •

  •      * @param   int     $key
    •

  •      * @param   array   $replies
    •

  •      * @param   string  $prefix
    •

  •      * @param   bool    $admin_view
    •

  •      * @param   integer $depth
    •

  •      * @param   string  $current_prefix
    •

  •      *
    •

  •      * @access    private
    •

  •      ***/
    •

  •     function _renderThreadReplies(&$thread, $key, &$replies, $prefix, $admin_view, $depth = 0, $current_prefix = '')
    •

  •     {
    •

  •         if ($depth > 0) {
    •

  •             if (false != $this->_useIcons) {
    •

  •                 $title = $this->_getTitleIcon($thread[$key]['obj']->getVar('com_icon')).'&nbsp;'.$thread[$key]['obj']->getVar('com_title');
    •

  •             } else {
    •

  •                 $title = $thread[$key]['obj']->getVar('com_title');
    •

  •             }
    •

  •             $title = (false != $admin_view) ? $title.' '.$this->_statusText[$thread[$key]['obj']->getVar('com_status')] : $title;
    •

  •             $replies[] = array('id' => $key, 'prefix' => $current_prefix, 'date_posted' => formatTimestamp($thread[$key]['obj']->getVar('com_created'), 'm'), 'title' => $title, 'root_id' => $thread[$key]['obj']->getVar('com_rootid'), 'status' => $this->_statusText[$thread[$key]['obj']->getVar('com_status')], 'poster' => $this->_getPosterName($thread[$key]['obj']->getVar('com_uid')));
    •

  •             $current_prefix .= $prefix;
    •

  •         }
    •

  •         if (isset($thread[$key]['child']) && !empty($thread[$key]['child'])) {
    •

  •             $depth++;
    •

  •             foreach ($thread[$key]['child'] as $childkey) {
    •

  •                 if (!$admin_view && $thread[$childkey]['obj']->getVar('com_status') != XOOPS_COMMENT_ACTIVE) {
    •

  •                     // skip this comment if it is not active and continue on processing its child comments instead
    •

  •                     if (isset($thread[$childkey]['child']) && !empty($thread[$childkey]['child'])) {
    •

  •                         foreach ($thread[$childkey]['child'] as $childchildkey) {
    •

  •                             $this->_renderThreadReplies($thread, $childchildkey, $replies, $prefix, $admin_view, $depth);
    •

  •                         }
    •

  •                     }
    •

  •                 } else {
    •

  •                     $this->_renderThreadReplies($thread, $childkey, $replies, $prefix, $admin_view, $depth, $current_prefix);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Render comments in nested view
    •

  •      *
    •

  •      * Danger: Recursive!
    •

  •      *
    •

  •      * @param integer $comment_id   Always "0" when called by client.
    •

  •      * @param boolean $admin_view
    •

  •      ***/
    •

  •     function renderNestView($comment_id = 0, $admin_view = false)
    •

  •     {
    •

  •         include_once XOOPS_ROOT_PATH.'/class/tree.php';
    •

  •         $xot = new XoopsObjectTree($this->_comments, 'com_id', 'com_pid', 'com_rootid');
    •

  •         $tree =& $xot->getTree();
    •

  •         if (false != $this->_useIcons) {
    •

  •             $title = $this->_getTitleIcon($tree[$comment_id]['obj']->getVar('com_icon')).'&nbsp;'.$tree[$comment_id]['obj']->getVar('com_title');
    •

  •         } else {
    •

  •             $title = $tree[$comment_id]['obj']->getVar('com_title');
    •

  •         }
    •

  •         if (false != $admin_view) {
    •

  •             $text = $tree[$comment_id]['obj']->getVar('com_text').'<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'._CM_STATUS.': '.$this->_statusText[$tree[$comment_id]['obj']->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$tree[$comment_id]['obj']->getVar('com_ip').'</span></div>';
    •

  •         } else {
    •

  •             // skip this comment if it is not active and continue on processing its child comments instead
    •

  •             if (XOOPS_COMMENT_ACTIVE != $tree[$comment_id]['obj']->getVar('com_status')) {
    •

  •                 // if there are any child comments, display them as root comments
    •

  •                 if (isset($tree[$comment_id]['child']) && !empty($tree[$comment_id]['child'])) {
    •

  •                     foreach ($tree[$comment_id]['child'] as $child_id) {
    •

  •                         $this->renderNestView($child_id, $admin_view);
    •

  •                     }
    •

  •                 }
    •

  •                 return;
    •

  •             } else {
    •

  •                 $text = $tree[$comment_id]['obj']->getVar('com_text');
    •

  •             }
    •

  •         }
    •

  •         $replies = array();
    •

  •         $this->_renderNestReplies($tree, $comment_id, $replies, 25, $admin_view);
    •

  •         $this->_tpl->append('comments', array('pid' => $tree[$comment_id]['obj']->getVar('com_pid'), 'id' => $tree[$comment_id]['obj']->getVar('com_id'), 'itemid' => $tree[$comment_id]['obj']->getVar('com_itemid'), 'rootid' => $tree[$comment_id]['obj']->getVar('com_rootid'), 'title' => $title, 'text' => $text, 'date_posted' => formatTimestamp($tree[$comment_id]['obj']->getVar('com_created'), 'm'), 'date_modified' => formatTimestamp($tree[$comment_id]['obj']->getVar('com_modified'), 'm'), 'poster' => $this->_getPosterArray($tree[$comment_id]['obj']->getVar('com_uid')), 'replies' => $replies));
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Render replies in nested view
    •

  •      *
    •

  •      * @param   array   $thread
    •

  •      * @param   int     $key
    •

  •      * @param   array   $replies
    •

  •      * @param   string  $prefix
    •

  •      * @param   bool    $admin_view
    •

  •      * @param   integer $depth
    •

  •      *
    •

  •      * @access    private
    •

  •      ***/
    •

  •     function _renderNestReplies(&$thread, $key, &$replies, $prefix, $admin_view, $depth = 0)
    •

  •     {
    •

  •         if ($depth > 0) {
    •

  •             if (false != $this->_useIcons) {
    •

  •                 $title = $this->_getTitleIcon($thread[$key]['obj']->getVar('com_icon')).'&nbsp;'.$thread[$key]['obj']->getVar('com_title');
    •

  •             } else {
    •

  •                 $title = $thread[$key]['obj']->getVar('com_title');
    •

  •             }
    •

  •             $text = (false != $admin_view) ? $thread[$key]['obj']->getVar('com_text').'<div style="text-align:right; margin-top: 2px; margin-right: 2px;">'._CM_STATUS.': '.$this->_statusText[$thread[$key]['obj']->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$thread[$key]['obj']->getVar('com_ip').'</span></div>' : $thread[$key]['obj']->getVar('com_text');
    •

  •             $replies[] = array('id' => $key, 'prefix' => $prefix, 'pid' => $thread[$key]['obj']->getVar('com_pid'), 'itemid' => $thread[$key]['obj']->getVar('com_itemid'), 'rootid' => $thread[$key]['obj']->getVar('com_rootid'), 'title' => $title, 'text' => $text, 'date_posted' => formatTimestamp($thread[$key]['obj']->getVar('com_created'), 'm'), 'date_modified' => formatTimestamp($thread[$key]['obj']->getVar('com_modified'), 'm'), 'poster' => $this->_getPosterArray($thread[$key]['obj']->getVar('com_uid')));
    •

  •
    •

  •             $prefix = $prefix + 25;
    •

  •         }
    •

  •         if (isset($thread[$key]['child']) && !empty($thread[$key]['child'])) {
    •

  •             $depth++;
    •

  •             foreach ($thread[$key]['child'] as $childkey) {
    •

  •                 if (!$admin_view && $thread[$childkey]['obj']->getVar('com_status') != XOOPS_COMMENT_ACTIVE) {
    •

  •                     // skip this comment if it is not active and continue on processing its child comments instead
    •

  •                     if (isset($thread[$childkey]['child']) && !empty($thread[$childkey]['child'])) {
    •

  •                         foreach ($thread[$childkey]['child'] as $childchildkey) {
    •

  •                             $this->_renderNestReplies($thread, $childchildkey, $replies, $prefix, $admin_view, $depth);
    •

  •                         }
    •

  •                     }
    •

  •                 } else {
    •

  •                     $this->_renderNestReplies($thread, $childkey, $replies, $prefix, $admin_view, $depth);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Get the name of the poster
    •

  •      *
    •

  •      * @param   int $poster_id
    •

  •      * @return  string
    •

  •      *
    •

  •      * @access    private
    •

  •      ***/
    •

  •     function _getPosterName($poster_id)
    •

  •     {
    •

  •         $poster['id'] = intval($poster_id);
    •

  •         if ($poster['id'] > 0) {
    •

  •             $com_poster =& $this->_memberHandler->getUser($poster_id);
    •

  •             if (is_object($com_poster)) {
    •

  •                 $poster['uname'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$poster['id'].'">'.$com_poster->getVar('uname').'</a>';
    •

  •                 return $poster;
    •

  •             }
    •

  •         }
    •

  •         $poster['id'] = 0; // to cope with deleted user accounts
    •

  •         $poster['uname'] = $GLOBALS['xoopsConfig']['anonymous'];
    •

  •         return $poster;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get an array with info about the poster
    •

  •      *
    •

  •      * @param   int $poster_id
    •

  •      * @return  array
    •

  •      *
    •

  •      * @access    private
    •

  •      ***/
    •

  •     function _getPosterArray($poster_id)
    •

  •     {
    •

  •         $poster['id'] = intval($poster_id);
    •

  •         if ($poster['id'] > 0) {
    •

  •             $com_poster =& $this->_memberHandler->getUser($poster['id']);
    •

  •             if (is_object($com_poster)) {
    •

  •                 $poster['uname'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$poster['id'].'">'.$com_poster->getVar('uname').'</a>';
    •

  •                 $poster_rank = $com_poster->rank();
    •

  •                 $poster['rank_image'] = ($poster_rank['image'] != '') ? $poster_rank['image'] : 'blank.gif';
    •

  •                 $poster['rank_title'] = $poster_rank['title'];
    •

  •                 $poster['avatar'] = $com_poster->getVar('user_avatar');
    •

  •                 $poster['regdate'] = formatTimestamp($com_poster->getVar('user_regdate'), 's');
    •

  •                 $poster['from'] = $com_poster->getVar('user_from');
    •

  •                 $poster['postnum'] = $com_poster->getVar('posts');
    •

  •                 $poster['status'] = $com_poster->isOnline() ? _CM_ONLINE : '';
    •

  •                 return $poster;
    •

  •             }
    •

  •         }
    •

  •         $poster['id'] = 0; // to cope with deleted user accounts
    •

  •         $poster['uname'] = $GLOBALS['xoopsConfig']['anonymous'];
    •

  •         $poster['rank_title'] = '';
    •

  •         $poster['avatar'] = 'blank.gif';
    •

  •         $poster['regdate'] = '';
    •

  •         $poster['from'] = '';
    •

  •         $poster['postnum'] = 0;
    •

  •         $poster['status'] = '';
    •

  •         return $poster;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the IMG tag for the title icon
    •

  •      *
    •

  •      * @param   string  $icon_image
    •

  •      * @return  string  HTML IMG tag
    •

  •      *
    •

  •      * @access    private
    •

  •      ***/
    •

  •     function _getTitleIcon($icon_image)
    •

  •     {
    •

  •         $icon_image = htmlspecialchars( trim( $icon_image ) );
    •

  •         if ($icon_image != '') {
    •

  •             if (false != $this->_doIconCheck) {
    •

  •                 if (!file_exists(XOOPS_URL.'/images/subject/'.$icon_image)) {
    •

  •                     return '<img src="'.XOOPS_URL.'/images/icons/no_posticon.gif" alt="" />';
    •

  •                 } else {
    •

  •                     return '<img src="'.XOOPS_URL.'/images/subject/'.$icon_image.'" alt="" />';
    •

  •                 }
    •

  •             } else {
    •

  •                 return '<img src="'.XOOPS_URL.'/images/subject/'.$icon_image.'" alt="" />';
    •

  •             }
    •

  •         }
    •

  •         return '<img src="'.XOOPS_URL.'/images/icons/no_posticon.gif" alt="" />';
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:21 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsCommentRenderer

Class XoopsCommentRenderer

[line 40]

Location: /commentrenderer.php

Remarks

Display comments

author

Kazumi Ono     <onokazu@xoops.org>

copyright

(c) 2000-2003 The Xoops Project - www.xoops.org

Class Variable Summary

  • $_comments =  null

  • $_doIconCheck =  false

  • $_memberHandler =

  • $_statusText =

  • $_tpl =

  • $_useIcons =  true

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsCommentRenderer::XoopsCommentRenderer

XoopsCommentRenderer(
object
&$tpl, [boolean
$use_icons = true], [boolean
$do_iconcheck = false] );

    Parameters

    &$tpl

    $use_icons

    $do_iconcheck

    Remarks

    Constructor

    [ Top ]

    XoopsCommentRenderer::instance

    &instance(

&$tpl, [boolean
$use_icons = true], [boolean
$do_iconcheck = false], object
$tpl );

    Parameters

    $tpl

    reference to a Smarty object

    $use_icons

    $do_iconcheck

    &$tpl

    Remarks

    Access the only instance of this class

    [ Top ]

    XoopsCommentRenderer::renderFlatView

renderFlatView(
[boolean
$admin_view = false] );

    Parameters

    $admin_view

    Remarks

    Render the comments in flat view

    [ Top ]

    XoopsCommentRenderer::renderNestView

renderNestView(
[integer
$comment_id = 0], [boolean
$admin_view = false] );

    Parameters

    $comment_id

    Always "0" when called by client.

    $admin_view

    Remarks

    Render comments in nested view

    Danger: Recursive!

    [ Top ]

    XoopsCommentRenderer::renderThreadView

    renderThreadView(
[integer
$comment_id = 0], [boolean
$admin_view = false], [boolean
$show_nav = true] );

    Parameters

    $comment_id

    Should be "0" when called by client

    $admin_view

    $show_nav

    Remarks

    Render the comments in thread view

    This method calls itself recursively

    [ Top ]

    XoopsCommentRenderer::setComments

setComments(
object
&$comments_arr );

    Parameters

    &$comments_arr

    array of XoopsComment objects

    Remarks

    Accessor

    [ Top ]

    XoopsCommentRenderer::_getPosterArray

_getPosterArray(
int
$poster_id );

    Parameters

    $poster_id

    Remarks

    Get an array with info about the poster

    access

    private

    [ Top ]

    XoopsCommentRenderer::_getPosterName

_getPosterName(
int
$poster_id );

    Parameters

    $poster_id

    Remarks

    Get the name of the poster

    access

    private

    [ Top ]

    XoopsCommentRenderer::_getTitleIcon

_getTitleIcon(
string
$icon_image );

    Parameters

    $icon_image

    Returns

    HTML IMG tag

    Remarks

    Get the IMG tag for the title icon

    access

    private

    [ Top ]

    XoopsCommentRenderer::_renderNestReplies

_renderNestReplies(

&$thread, int
$key,
&$replies, string
$prefix, bool
$admin_view, [integer
$depth = 0], array
$thread, array
$replies );

    Parameters

    $thread

    $key

    $replies

    $prefix

    $admin_view

    $depth

    &$thread

    &$replies

    Remarks

    Render replies in nested view

    access

    private

    [ Top ]

    XoopsCommentRenderer::_renderThreadReplies

_renderThreadReplies(
array
&$thread, int
$key,
&$replies, string
$prefix, bool
$admin_view, [integer
$depth = 0], [string
$current_prefix = ''], array
$replies );

    Parameters

    &$thread

    $key

    $replies

    $prefix

    $admin_view

    $depth

    $current_prefix

    &$replies

    Remarks

    Render replies to a thread

    access

    private

    [ Top ]

Variable Detail

  • $_comments =  null [line 46]
    •

  • Data type: mixed
    •

    access

    private

  • $_doIconCheck =  false [line 48]
    •

  • Data type: mixed
    •

    access

    private

  • $_memberHandler =  [line 49]
    •

  • Data type: mixed
    •

    access

    private

  • $_statusText =  [line 50]
    •

  • Data type: mixed
    •

    access

    private

  • $_tpl =  [line 45]
    •

  • Data type: mixed
    •

    access

    private

  • $_useIcons =  true [line 47]
    •

  • Data type: mixed
    •

    access

    private

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:57:21 +0200 by phpDocumentor 1.4.0a2


Docs for page commentrenderer.php

File: /commentrenderer.php

filesource

Source Code for this file

Classes in this file:
XoopsCommentRenderer
Display comments

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:17 +0200 by phpDocumentor 1.4.0a2


File Source for criteria.php

Source for file criteria.php

Documentation is available at criteria.php

  • <?php
    •

  • // $Id: criteria.php 785 2006-11-06 06:11:17Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • // Modified by: Nathan Dial                                                  //
    •

  • // Date: 20 March 2003                                                       //
    •

  • // Desc: added experimental LDAP filter generation code                      //
    •

  • //       also refactored to remove about 20 lines of redundant code.         //
    •

  • // ------------------------------------------------------------------------- //
    •

  •
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  database
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * A criteria (grammar?) for a database query.
    •

  •  *
    •

  •  * Abstract base class should never be instantiated directly.
    •

  •  *
    •

  •  * @abstract
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  database
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class CriteriaElement
    •

  • {
    •

  •     /**
    •

  •      * Sort order
    •

  •      * @var    string
    •

  •      */
    •

  •     var $order = 'ASC';
    •

  •
    •

  •     /**
    •

  •      * @var    string
    •

  •      */
    •

  •     var $sort = '';
    •

  •
    •

  •     /**
    •

  •      * Number of records to retrieve
    •

  •      * @var    int
    •

  •      */
    •

  •     var $limit = 0;
    •

  •
    •

  •     /**
    •

  •      * Offset of first record
    •

  •      * @var    int
    •

  •      */
    •

  •     var $start = 0;
    •

  •
    •

  •     /**
    •

  •      * @var    string
    •

  •      */
    •

  •     var $groupby = '';
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      **/
    •

  •
    •

  •     function CriteriaElement()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Render the criteria element
    •

  •      */
    •

  •     function render()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     /**#@+
    •

  •     * Accessor
    •

  •     */
    •

  •     /**
    •

  •      * @param    string  $sort
    •

  •      */
    •

  •     function setSort($sort)
    •

  •     {
    •

  •         $this->sort = $sort;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * @return    string
    •

  •      */
    •

  •     function getSort()
    •

  •     {
    •

  •         return $this->sort;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * @param    string  $order
    •

  •      */
    •

  •     function setOrder($order)
    •

  •     {
    •

  •         if ('DESC' == strtoupper($order)) {
    •

  •             $this->order = 'DESC';
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * @return    string
    •

  •      */
    •

  •     function getOrder()
    •

  •     {
    •

  •         return $this->order;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * @param    int $limit
    •

  •      */
    •

  •     function setLimit($limit=0)
    •

  •     {
    •

  •         $this->limit = intval($limit);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * @return    int
    •

  •      */
    •

  •     function getLimit()
    •

  •     {
    •

  •         return $this->limit;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * @param    int $start
    •

  •      */
    •

  •     function setStart($start=0)
    •

  •     {
    •

  •         $this->start = intval($start);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * @return    int
    •

  •      */
    •

  •     function getStart()
    •

  •     {
    •

  •         return $this->start;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * @param    string  $group
    •

  •      */
    •

  •     function setGroupby($group){
    •

  •         $this->groupby = $group;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * @return    string
    •

  •      */
    •

  •     function getGroupby(){
    •

  •         return ' GROUP BY '.$this->groupby;
    •

  •     }
    •

  •     /**#@-*/
    •

  • }
    •

  •
    •

  • /**
    •

  •  * Collection of multiple {@link CriteriaElement}s
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  database
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class CriteriaCompo extends CriteriaElement
    •

  • {
    •

  •
    •

  •     /**
    •

  •      * The elements of the collection
    •

  •      * @var    array   Array of {@link CriteriaElement} objects
    •

  •      */
    •

  •     var $criteriaElements = array();
    •

  •
    •

  •     /**
    •

  •      * Conditions
    •

  •      * @var    array
    •

  •      */
    •

  •     var $conditions = array();
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param   object  $ele
    •

  •      * @param   string  $condition
    •

  •      ***/
    •

  •     function CriteriaCompo($ele=null, $condition='AND')
    •

  •     {
    •

  •         if (isset($ele) && is_object($ele)) {
    •

  •             $this->add($ele, $condition);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add an element
    •

  •      *
    •

  •      * @param   object  &$criteriaElement
    •

  •      * @param   string  $condition
    •

  •      *
    •

  •      * @return  object  reference to this collection
    •

  •      ***/
    •

  •     function &add(&$criteriaElement, $condition='AND')
    •

  •     {
    •

  •         $this->criteriaElements[] =& $criteriaElement;
    •

  •         $this->conditions[] = $condition;
    •

  •         return $this;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Make the criteria into a query string
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function render()
    •

  •     {
    •

  •         $ret = '';
    •

  •         $count = count($this->criteriaElements);
    •

  •         if ($count > 0) {
    •

  •             $ret = '('. $this->criteriaElements[0]->render();
    •

  •             for ($i = 1; $i < $count; $i++) {
    •

  •                 $ret .= ' '.$this->conditions[$i].' '.$this->criteriaElements[$i]->render();
    •

  •             }
    •

  •             $ret .= ')';
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Make the criteria into a SQL "WHERE" clause
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function renderWhere()
    •

  •     {
    •

  •         $ret = $this->render();
    •

  •         $ret = ($ret != '') ? 'WHERE ' . $ret : $ret;
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Generate an LDAP filter from criteria
    •

  •      *
    •

  •      * @return string
    •

  •      * @author Nathan Dial ndial@trillion21.com
    •

  •      */
    •

  •     function renderLdap(){
    •

  •         $retval = '';
    •

  •         $count = count($this->criteriaElements);
    •

  •         if ($count > 0) {
    •

  •             $retval = $this->criteriaElements[0]->renderLdap();
    •

  •             for ($i = 1; $i < $count; $i++) {
    •

  •                 $cond = $this->conditions[$i];
    •

  •                 if(strtoupper($cond) == 'AND'){
    •

  •                     $op = '&';
    •

  •                 } elseif (strtoupper($cond)=='OR'){
    •

  •                     $op = '|';
    •

  •                 }
    •

  •                 $retval = "($op$retval" . $this->criteriaElements[$i]->renderLdap().")";
    •

  •             }
    •

  •         }
    •

  •         return $retval;
    •

  •     }
    •

  • }
    •

  •
    •

  •
    •

  • /**
    •

  •  * A single criteria
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  database
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class Criteria extends CriteriaElement
    •

  • {
    •

  •
    •

  •     /**
    •

  •      * @var    string
    •

  •      */
    •

  •     var $prefix;
    •

  •     var $function;
    •

  •     var $column;
    •

  •     var $operator;
    •

  •     var $value;
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param   string  $column
    •

  •      * @param   string  $value
    •

  •      * @param   string  $operator
    •

  •      ***/
    •

  •     function Criteria($column, $value='', $operator='=', $prefix = '', $function = '') {
    •

  •         $this->prefix = $prefix;
    •

  •         $this->function = $function;
    •

  •         $this->column = $column;
    •

  •         $this->value = $value;
    •

  •         $this->operator = $operator;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Make a sql condition string
    •

  •      *
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function render() {
    •

  •         $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column;
    •

  •         if ( !empty($this->function) ) {
    •

  •             $clause = sprintf($this->function, $clause);
    •

  •         }
    •

  •         if ( in_array( strtoupper( $this->operator ), array( 'IS NULL', 'IS NOT NULL' ) ) ) {
    •

  •             $clause .= ' ' . $this->operator;
    •

  •         } else {
    •

  •             if ( '' === ($value = trim($this->value) ) ) {
    •

  •                 return '';
    •

  •             }
    •

  •             if ( !in_array( strtoupper($this->operator), array('IN', 'NOT IN') ) ) {
    •

  •                 if ( ( substr( $value, 0, 1 ) != '`' ) && ( substr( $value, -1 ) != '`' ) ) {
    •

  •                     $value = "'$value'";
    •

  •                 } elseif ( !preg_match( '/^[a-zA-Z0-9_\.\-`]*$/', $value ) ) {
    •

  •                     $value = '``';
    •

  •                 }
    •

  •             }
    •

  •             $clause .= " {$this->operator} $value";
    •

  •         }
    •

  •         return $clause;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Generate an LDAP filter from criteria
    •

  •      *
    •

  •      * @return string
    •

  •      * @author Nathan Dial ndial@trillion21.com, improved by Pierre-Eric MENUET pemen@sourceforge.net
    •

  •      */
    •

  •     function renderLdap(){
    •

  •         if ($this->operator == '>') {
    •

  •             $this->operator = '>=';
    •

  •         }
    •

  •         if ($this->operator == '<') {
    •

  •             $this->operator = '<=';
    •

  •         }
    •

  •
    •

  •         if ($this->operator == '!=' || $this->operator == '<>') {
    •

  •             $operator = '=';
    •

  •             $clause = "(!(" . $this->column . $operator . $this->value . "))";
    •

  •         }
    •

  •         else {
    •

  •             if ($this->operator == 'IN') {
    •

  •                 $newvalue = str_replace(array('(',')'),'',
    •

  •                 $this->value);
    •

  •                 $tab = explode(',',$newvalue);
    •

  •                 foreach ($tab as $uid)
    •

  •                 {
    •

  •                     $clause .= '(' . $this->column . '=' . $uid
    •

  •                     .')';
    •

  •                 }
    •

  •                 $clause = '(|' . $clause . ')';
    •

  •             }
    •

  •             else {
    •

  •                 $clause = "(" . $this->column . $this->operator . $this->value . ")";
    •

  •             }
    •

  •         }
    •

  •         return $clause;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Make a SQL "WHERE" clause
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function renderWhere() {
    •

  •         $cond = $this->render();
    •

  •         return empty($cond) ? '' : "WHERE $cond";
    •

  •     }
    •

  • }
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:45 +0200 by phpDocumentor 1.4.0a2


File Source for database.php

Source for file database.php

Documentation is available at database.php

  • <?php
    •

  • // $Id: database.php 506 2006-05-26 23:10:37Z skalpa $
    •

  • // database.php - defines abstract database wrapper class
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  database
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * make sure this is only included once!
    •

  •  */
    •

  • if ( !defined("XOOPS_C_DATABASE_INCLUDED") ) {
    •

  •     define("XOOPS_C_DATABASE_INCLUDED",1);
    •

  •
    •

  • /**
    •

  •  * Abstract base class for Database access classes
    •

  •  *
    •

  •  * @abstract
    •

  •  *
    •

  •  * @author Kazumi Ono <onokazu@xoops.org>
    •

  •  * @copyright copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package kernel
    •

  •  * @subpackage database
    •

  •  */
    •

  • class XoopsDatabase
    •

  •     {
    •

  •         /**
    •

  •          * Prefix for tables in the database
    •

  •          * @var string
    •

  •          */
    •

  •         var $prefix = '';
    •

  •         /**
    •

  •          * reference to a {@link XoopsLogger} object
    •

  •          * @see XoopsLogger
    •

  •          * @var object XoopsLogger
    •

  •          */
    •

  •         var $logger;
    •

  •
    •

  •         /**
    •

  •          * constructor
    •

  •          *
    •

  •          * will always fail, because this is an abstract class!
    •

  •          */
    •

  •         function XoopsDatabase()
    •

  •         {
    •

  •             // exit("Cannot instantiate this class directly");
    •

  •         }
    •

  •
    •

  •         /**
    •

  •          * assign a {@link XoopsLogger} object to the database
    •

  •          *
    •

  •          * @see XoopsLogger
    •

  •          * @param object $logger reference to a {@link XoopsLogger} object
    •

  •          */
    •

  •         function setLogger(&$logger)
    •

  •         {
    •

  •             $this->logger =& $logger;
    •

  •         }
    •

  •
    •

  •         /**
    •

  •          * set the prefix for tables in the database
    •

  •          *
    •

  •          * @param string $value table prefix
    •

  •          */
    •

  •         function setPrefix($value)
    •

  •         {
    •

  •             $this->prefix = $value;
    •

  •         }
    •

  •
    •

  •         /**
    •

  •          * attach the prefix.'_' to a given tablename
    •

  •          *
    •

  •          * if tablename is empty, only prefix will be returned
    •

  •          *
    •

  •          * @param string $tablename tablename
    •

  •          * @return string prefixed tablename, just prefix if tablename is empty
    •

  •          */
    •

  •         function prefix($tablename='')
    •

  •         {
    •

  •             if ( $tablename != '' ) {
    •

  •                 return $this->prefix .'_'. $tablename;
    •

  •             } else {
    •

  •                 return $this->prefix;
    •

  •             }
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  •
    •

  • /**
    •

  •  * Only for backward compatibility
    •

  •  *
    •

  •  * @deprecated
    •

  •  */
    •

  • class Database
    •

  • {
    •

  •
    •

  •     function &getInstance() {
    •

  •         $inst =& XoopsDatabaseFactory::getDatabaseConnection();
    •

  •         return $inst;
    •

  •     }
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:47 +0200 by phpDocumentor 1.4.0a2


File Source for mysqldatabase.php

Source for file mysqldatabase.php

Documentation is available at mysqldatabase.php

  • <?php
    •

  • // $Id: mysqldatabase.php 694 2006-09-04 11:33:22Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined("XOOPS_ROOT_PATH")) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  database
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * base class
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/database/database.php";
    •

  •
    •

  • /**
    •

  •  * connection to a mysql database
    •

  •  *
    •

  •  * @abstract
    •

  •  *
    •

  •  * @author      Kazumi Ono  <onokazu@xoops.org>
    •

  •  * @copyright   copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  database
    •

  •  */
    •

  • class XoopsMySQLDatabase extends XoopsDatabase
    •

  • {
    •

  •     /**
    •

  •      * Database connection
    •

  •      * @var resource
    •

  •      */
    •

  •     var $conn;
    •

  •
    •

  •     /**
    •

  •      * connect to the database
    •

  •      *
    •

  •      * @param bool $selectdb select the database now?
    •

  •      * @return bool successful?
    •

  •      */
    •

  •     function connect($selectdb = true)
    •

  •     {
    •

  •         if ( !extension_loaded( 'mysql' ) ) {
    •

  •             trigger_error( 'notrace:mysql extension not loaded', E_USER_ERROR );
    •

  •             return false;
    •

  •         }
    •

  •         if (XOOPS_DB_PCONNECT == 1) {
    •

  •             $this->conn = @mysql_pconnect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS);
    •

  •         } else {
    •

  •             $this->conn = @mysql_connect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS);
    •

  •         }
    •

  •
    •

  •         if (!$this->conn) {
    •

  •             $this->logger->addQuery('', $this->error(), $this->errno());
    •

  •             return false;
    •

  •         }
    •

  •         if($selectdb != false){
    •

  •             if (!mysql_select_db(XOOPS_DB_NAME)) {
    •

  •                 $this->logger->addQuery('', $this->error(), $this->errno());
    •

  •                 return false;
    •

  •             }
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * generate an ID for a new row
    •

  •      *
    •

  •      * This is for compatibility only. Will always return 0, because MySQL supports
    •

  •      * autoincrement for primary keys.
    •

  •      *
    •

  •      * @param string $sequence name of the sequence from which to get the next ID
    •

  •      * @return int always 0, because mysql has support for autoincrement
    •

  •      */
    •

  •     function genId($sequence)
    •

  •     {
    •

  •         return 0; // will use auto_increment
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get a result row as an enumerated array
    •

  •      *
    •

  •      * @param resource $result
    •

  •      * @return array
    •

  •      */
    •

  •     function fetchRow($result)
    •

  •     {
    •

  •         return @mysql_fetch_row($result);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Fetch a result row as an associative array
    •

  •      *
    •

  •      * @return array
    •

  •      */
    •

  •     function fetchArray($result)
    •

  •     {
    •

  •         return @mysql_fetch_assoc( $result );
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Fetch a result row as an associative array
    •

  •      *
    •

  •      * @return array
    •

  •      */
    •

  •     function fetchBoth($result)
    •

  •     {
    •

  •         return @mysql_fetch_array( $result, MYSQL_BOTH );
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the ID generated from the previous INSERT operation
    •

  •      *
    •

  •      * @return int
    •

  •      */
    •

  •     function getInsertId()
    •

  •     {
    •

  •         return mysql_insert_id($this->conn);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get number of rows in result
    •

  •      *
    •

  •      * @param resource query result
    •

  •      * @return int
    •

  •      */
    •

  •     function getRowsNum($result)
    •

  •     {
    •

  •         return @mysql_num_rows($result);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get number of affected rows
    •

  •      *
    •

  •      * @return int
    •

  •      */
    •

  •     function getAffectedRows()
    •

  •     {
    •

  •         return mysql_affected_rows($this->conn);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Close MySQL connection
    •

  •      *
    •

  •      */
    •

  •     function close()
    •

  •     {
    •

  •         mysql_close($this->conn);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * will free all memory associated with the result identifier result.
    •

  •      *
    •

  •      * @param resource query result
    •

  •      * @return bool TRUE on success or FALSE on failure.
    •

  •      */
    •

  •     function freeRecordSet($result)
    •

  •     {
    •

  •         return mysql_free_result($result);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns the text of the error message from previous MySQL operation
    •

  •      *
    •

  •      * @return bool Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred.
    •

  •      */
    •

  •     function error()
    •

  •     {
    •

  •         return @mysql_error();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns the numerical value of the error message from previous MySQL operation
    •

  •      *
    •

  •      * @return int Returns the error number from the last MySQL function, or 0 (zero) if no error occurred.
    •

  •      */
    •

  •     function errno()
    •

  •     {
    •

  •         return @mysql_errno();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns escaped string text with single quotes around it to be safely stored in database
    •

  •      *
    •

  •      * @param string $str unescaped string text
    •

  •      * @return string escaped string text with single quotes around
    •

  •      */
    •

  •     function quoteString($str)
    •

  •     {
    •

  •          $str = "'".str_replace('\\"', '"', addslashes($str))."'";
    •

  •          return $str;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * perform a query on the database
    •

  •      *
    •

  •      * @param string $sql a valid MySQL query
    •

  •      * @param int $limit number of records to return
    •

  •      * @param int $start offset of first record to return
    •

  •      * @return resource query result or FALSE if successful
    •

  •      *  or TRUE if successful and no result
    •

  •      */
    •

  •     function queryF($sql, $limit=0, $start=0)
    •

  •     {
    •

  •         if ( !empty($limit) ) {
    •

  •             if (empty($start)) {
    •

  •                 $start = 0;
    •

  •             }
    •

  •             $sql = $sql. ' LIMIT '.(int)$start.', '.(int)$limit;
    •

  •         }
    •

  •         $result = mysql_query($sql, $this->conn);
    •

  •         if ( $result ) {
    •

  •             $this->logger->addQuery($sql);
    •

  •             return $result;
    •

  •         } else {
    •

  •             $this->logger->addQuery($sql, $this->error(), $this->errno());
    •

  •             return false;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * perform a query
    •

  •      *
    •

  •      * This method is empty and does nothing! It should therefore only be
    •

  •      * used if nothing is exactly what you want done! ;-)
    •

  •      *
    •

  •      * @param string $sql a valid MySQL query
    •

  •      * @param int $limit number of records to return
    •

  •      * @param int $start offset of first record to return
    •

  •      *
    •

  •      * @abstract
    •

  •      */
    •

  •     function query($sql, $limit=0, $start=0)
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * perform queries from SQL dump file in a batch
    •

  •      *
    •

  •      * @param string $file file path to an SQL dump file
    •

  •      *
    •

  •      * @return bool FALSE if failed reading SQL file or TRUE if the file has been read and queries executed
    •

  •      */
    •

  •     function queryFromFile($file){
    •

  •         if (false !== ($fp = fopen($file, 'r'))) {
    •

  •             include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php';
    •

  •             $sql_queries = trim(fread($fp, filesize($file)));
    •

  •             SqlUtility::splitMySqlFile($pieces, $sql_queries);
    •

  •             foreach ($pieces as $query) {
    •

  •                 // [0] contains the prefixed query
    •

  •                 // [4] contains unprefixed table name
    •

  •                 $prefixed_query = SqlUtility::prefixQuery(trim($query), $this->prefix());
    •

  •                 if ($prefixed_query != false) {
    •

  •                     $this->query($prefixed_query[0]);
    •

  •                 }
    •

  •             }
    •

  •             return true;
    •

  •         }
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get field name
    •

  •      *
    •

  •      * @param resource $result query result
    •

  •      * @param int numerical field index
    •

  •      * @return string
    •

  •      */
    •

  •     function getFieldName($result, $offset)
    •

  •     {
    •

  •         return mysql_field_name($result, $offset);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get field type
    •

  •      *
    •

  •      * @param resource $result query result
    •

  •      * @param int $offset numerical field index
    •

  •      * @return string
    •

  •      */
    •

  •     function getFieldType($result, $offset)
    •

  •     {
    •

  •         return mysql_field_type($result, $offset);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get number of fields in result
    •

  •      *
    •

  •      * @param resource $result query result
    •

  •      * @return int
    •

  •      */
    •

  •     function getFieldsNum($result)
    •

  •     {
    •

  •         return mysql_num_fields($result);
    •

  •     }
    •

  • }
    •

  •
    •

  • /**
    •

  •  * Safe Connection to a MySQL database.
    •

  •  *
    •

  •  *
    •

  •  * @author Kazumi Ono <onokazu@xoops.org>
    •

  •  * @copyright copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package kernel
    •

  •  * @subpackage database
    •

  •  */
    •

  • class XoopsMySQLDatabaseSafe extends XoopsMySQLDatabase
    •

  • {
    •

  •
    •

  •     /**
    •

  •      * perform a query on the database
    •

  •      *
    •

  •      * @param string $sql a valid MySQL query
    •

  •      * @param int $limit number of records to return
    •

  •      * @param int $start offset of first record to return
    •

  •      * @return resource query result or FALSE if successful
    •

  •      *  or TRUE if successful and no result
    •

  •      */
    •

  •     function query($sql, $limit=0, $start=0)
    •

  •     {
    •

  •         return $this->queryF($sql, $limit, $start);
    •

  •     }
    •

  • }
    •

  •
    •

  • /**
    •

  •  * Read-Only connection to a MySQL database.
    •

  •  *
    •

  •  * This class allows only SELECT queries to be performed through its
    •

  •  * {@link query()} method for security reasons.
    •

  •  *
    •

  •  *
    •

  •  * @author Kazumi Ono <onokazu@xoops.org>
    •

  •  * @copyright copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package kernel
    •

  •  * @subpackage database
    •

  •  */
    •

  • class XoopsMySQLDatabaseProxy extends XoopsMySQLDatabase
    •

  • {
    •

  •
    •

  •     /**
    •

  •      * perform a query on the database
    •

  •      *
    •

  •      * this method allows only SELECT queries for safety.
    •

  •      *
    •

  •      * @param string $sql a valid MySQL query
    •

  •      * @param int $limit number of records to return
    •

  •      * @param int $start offset of first record to return
    •

  •      * @return resource query result or FALSE if unsuccessful
    •

  •      */
    •

  •     function query($sql, $limit=0, $start=0)
    •

  •     {
    •

  •         $sql = ltrim($sql);
    •

  •         if (strtolower(substr($sql, 0, 6)) == 'select') {
    •

  •         //if (preg_match("/^SELECT.*/i", $sql)) {
    •

  •             return $this->queryF($sql, $limit, $start);
    •

  •         }
    •

  •         $this->logger->addQuery($sql, 'Database update not allowed during processing of a GET request', 0);
    •

  •         return false;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:09 +0200 by phpDocumentor 1.4.0a2


File Source for sqlutility.php

Source for file sqlutility.php

Documentation is available at sqlutility.php

  • <?php
    •

  • // $Id: sqlutility.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • // sqlutility.php - defines utility class for MySQL database
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  database
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * provide some utility methods for databases
    •

  •  *
    •

  •  * @author Kazumi Ono <onokazu@xoops.org>
    •

  •  * @copyright copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package kernel
    •

  •  * @subpackage  database
    •

  •  */
    •

  • class SqlUtility
    •

  • {
    •

  •     /**
    •

  •     * Function from phpMyAdmin (http://phpwizard.net/projects/phpMyAdmin/)
    •

  •     *
    •

  •      * Removes comment and splits large sql files into individual queries
    •

  •      *
    •

  •     * Last revision: September 23, 2001 - gandon
    •

  •      *
    •

  •      * @param   array    the splitted sql commands
    •

  •      * @param   string   the sql commands
    •

  •      * @return  boolean  always true
    •

  •      * @access  public
    •

  •      */
    •

  •     function splitMySqlFile(&$ret, $sql)
    •

  •     {
    •

  •         $sql               = trim($sql);
    •

  •         $sql_len           = strlen($sql);
    •

  •         $char              = '';
    •

  •         $string_start      = '';
    •

  •         $in_string         = false;
    •

  •
    •

  •         for ($i = 0; $i < $sql_len; ++$i) {
    •

  •             $char = $sql[$i];
    •

  •
    •

  •            // We are in a string, check for not escaped end of
    •

  •            // strings except for backquotes that can't be escaped
    •

  •            if ($in_string) {
    •

  •                    for (;;) {
    •

  •                        $i         = strpos($sql, $string_start, $i);
    •

  •                     // No end of string found -> add the current
    •

  •                     // substring to the returned array
    •

  •                     if (!$i) {
    •

  •                         $ret[] = $sql;
    •

  •                         return true;
    •

  •                     }
    •

  •                     // Backquotes or no backslashes before
    •

  •                     // quotes: it's indeed the end of the
    •

  •                     // string -> exit the loop
    •

  •                     else if ($string_start == '`' || $sql[$i-1] != '\\') {
    •

  •                         $string_start      = '';
    •

  •                            $in_string         = false;
    •

  •                         break;
    •

  •                     }
    •

  •                     // one or more Backslashes before the presumed
    •

  •                     // end of string...
    •

  •                     else {
    •

  •                         // first checks for escaped backslashes
    •

  •                         $j                     = 2;
    •

  •                         $escaped_backslash     = false;
    •

  •                         while ($i-$j > 0 && $sql[$i-$j] == '\\') {
    •

  •                             $escaped_backslash = !$escaped_backslash;
    •

  •                             $j++;
    •

  •                         }
    •

  •                         // ... if escaped backslashes: it's really the
    •

  •                         // end of the string -> exit the loop
    •

  •                         if ($escaped_backslash) {
    •

  •                             $string_start  = '';
    •

  •                             $in_string     = false;
    •

  •                             break;
    •

  •                         }
    •

  •                         // ... else loop
    •

  •                         else {
    •

  •                             $i++;
    •

  •                         }
    •

  •                     } // end if...elseif...else
    •

  •                 } // end for
    •

  •             } // end if (in string)
    •

  •             // We are not in a string, first check for delimiter...
    •

  •             else if ($char == ';') {
    •

  •                 // if delimiter found, add the parsed part to the returned array
    •

  •                 $ret[]    = substr($sql, 0, $i);
    •

  •                 $sql      = ltrim(substr($sql, min($i + 1, $sql_len)));
    •

  •                    $sql_len  = strlen($sql);
    •

  •                 if ($sql_len) {
    •

  •                     $i      = -1;
    •

  •                 } else {
    •

  •                     // The submited statement(s) end(s) here
    •

  •                     return true;
    •

  •                 }
    •

  •             } // end else if (is delimiter)
    •

  •             // ... then check for start of a string,...
    •

  •             else if (($char == '"') || ($char == '\'') || ($char == '`')) {
    •

  •                 $in_string    = true;
    •

  •                 $string_start = $char;
    •

  •             } // end else if (is start of string)
    •

  •
    •

  •             // for start of a comment (and remove this comment if found)...
    •

  •             else if ($char == '#' || ($char == ' ' && $i > 1 && $sql[$i-2] . $sql[$i-1] == '--')) {
    •

  •                 // starting position of the comment depends on the comment type
    •

  •                    $start_of_comment = (($sql[$i] == '#') ? $i : $i-2);
    •

  •                 // if no "\n" exits in the remaining string, checks for "\r"
    •

  •                 // (Mac eol style)
    •

  •                    $end_of_comment   = (strpos(' ' . $sql, "\012", $i+2))
    •

  •                               ? strpos(' ' . $sql, "\012", $i+2)
    •

  •                               : strpos(' ' . $sql, "\015", $i+2);
    •

  •                    if (!$end_of_comment) {
    •

  •                 // no eol found after '#', add the parsed part to the returned
    •

  •                 // array and exit
    •

  •                     // RMV fix for comments at end of file
    •

  •                        $last = trim(substr($sql, 0, $i-1));
    •

  •                     if (!empty($last)) {
    •

  •                         $ret[] = $last;
    •

  •                     }
    •

  •                        return true;
    •

  •                 } else {
    •

  •                     $sql     = substr($sql, 0, $start_of_comment) . ltrim(substr($sql, $end_of_comment));
    •

  •                     $sql_len = strlen($sql);
    •

  •                     $i--;
    •

  •                 } // end if...else
    •

  •             } // end else if (is comment)
    •

  •         } // end for
    •

  •
    •

  •         // add any rest to the returned array
    •

  •         if (!empty($sql) && trim($sql) != '') {
    •

  •             $ret[] = $sql;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * add a prefix.'_' to all tablenames in a query
    •

  •      *
    •

  •      * @param   string  $query  valid SQL query string
    •

  •      * @param   string  $prefix prefix to add to all table names
    •

  •      * @return  mixed   FALSE on failure
    •

  •      */
    •

  •     function prefixQuery($query, $prefix)
    •

  •     {
    •

  •         $pattern = "/^(INSERT INTO|CREATE TABLE|ALTER TABLE|UPDATE)(\s)+([`]?)([^`\s]+)\\3(\s)+/siU";
    •

  •         $pattern2 = "/^(DROP TABLE)(\s)+([`]?)([^`\s]+)\\3(\s)?$/siU";
    •

  •         if (preg_match($pattern, $query, $matches) || preg_match($pattern2, $query, $matches)) {
    •

  •             $replace = "\\1 ".$prefix."_\\4\\5";
    •

  •             $matches[0] = preg_replace($pattern, $replace, $query);
    •

  •             return $matches;
    •

  •         }
    •

  •         return false;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:04 +0200 by phpDocumentor 1.4.0a2


Docs For Class Criteria

Class Criteria

[line 309]
CriteriaElement
   |
   --Criteria
Location: /criteria.php

Remarks

A single criteria

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $column =
  • $function =
  • $operator =
  • $prefix =
  • $value =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class CriteriaElement

  • CriteriaElement::$groupby = ''
  • CriteriaElement::$limit = 0
    Number of records to retrieve
  • CriteriaElement::$order = 'ASC'
    Sort order
  • CriteriaElement::$sort = ''
  • CriteriaElement::$start = 0
    Offset of first record

Method Summary

Inherited Method Summary

Inherited From Class CriteriaElement

  • CriteriaElement::CriteriaElement()
    Constructor
  • CriteriaElement::getGroupby()
  • CriteriaElement::getLimit()
  • CriteriaElement::getOrder()
  • CriteriaElement::getSort()
  • CriteriaElement::getStart()
  • CriteriaElement::render()
    Render the criteria element
  • CriteriaElement::setGroupby()
  • CriteriaElement::setLimit()
  • CriteriaElement::setOrder()
  • CriteriaElement::setSort()
  • CriteriaElement::setStart()

Method Detail

    Criteria::Criteria

    Criteria( string $column, [string $value = ''], [string $operator = '='], [ $prefix = ''], [ $function = ''] );

    Parameters

    $column

    $value

    $operator

    $prefix

    $function

    Remarks

    Constructor

    [ Top ]

    Criteria::render

    render( );

    Overrides CriteriaElement::render() (Render the criteria element)

    Remarks

    Make a sql condition string

    [ Top ]

    Criteria::renderLdap

    renderLdap( );

    Remarks

    Generate an LDAP filter from criteria

    author

    Nathan Dial ndial@trillion21.com, improved by Pierre-Eric MENUET pemen@sourceforge.net

    [ Top ]

    Criteria::renderWhere

    renderWhere( );

    Remarks

    Make a SQL "WHERE" clause

    [ Top ]

Variable Detail

  • $column = [line 317]
  • Data type: mixed

  • $function = [line 316]
  • Data type: mixed

  • $operator = [line 318]
  • Data type: mixed

  • $prefix = [line 315]
  • Data type: string

  • $value = [line 319]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:57:45 +0200 by phpDocumentor 1.4.0a2


Docs For Class CriteriaCompo

Class CriteriaCompo

[line 200]
CriteriaElement
   |
   --CriteriaCompo
Location: /criteria.php

Remarks

Collection of multiple CriteriaElements

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $conditions = array()
    Conditions
  • $criteriaElements = array()
    The elements of the collection

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class CriteriaElement

  • CriteriaElement::$groupby = ''
  • CriteriaElement::$limit = 0
    Number of records to retrieve
  • CriteriaElement::$order = 'ASC'
    Sort order
  • CriteriaElement::$sort = ''
  • CriteriaElement::$start = 0
    Offset of first record

Method Summary

Inherited Method Summary

Inherited From Class CriteriaElement

  • CriteriaElement::CriteriaElement()
    Constructor
  • CriteriaElement::getGroupby()
  • CriteriaElement::getLimit()
  • CriteriaElement::getOrder()
  • CriteriaElement::getSort()
  • CriteriaElement::getStart()
  • CriteriaElement::render()
    Render the criteria element
  • CriteriaElement::setGroupby()
  • CriteriaElement::setLimit()
  • CriteriaElement::setOrder()
  • CriteriaElement::setSort()
  • CriteriaElement::setStart()

Method Detail

    CriteriaCompo::CriteriaCompo

    CriteriaCompo( [object $ele = null], [string $condition = 'AND'] );

    Parameters

    $ele

    $condition

    Remarks

    Constructor

    [ Top ]

    CriteriaCompo::add

    &add( object &$criteriaElement, [string $condition = 'AND'] );

    Parameters

    &$criteriaElement

    $condition

    Returns

    to this collection

    Remarks

    Add an element

    [ Top ]

    CriteriaCompo::render

    render( );

    Overrides CriteriaElement::render() (Render the criteria element)

    Remarks

    Make the criteria into a query string

    [ Top ]

    CriteriaCompo::renderLdap

    renderLdap( );

    Remarks

    Generate an LDAP filter from criteria

    author

    Nathan Dial ndial@trillion21.com

    [ Top ]

    CriteriaCompo::renderWhere

    renderWhere( );

    Remarks

    Make the criteria into a SQL "WHERE" clause

    [ Top ]

Variable Detail

  • $conditions = array() [line 213]
  • Data type: array

    • Remarks

    Conditions

  • $criteriaElements = array() [line 207]
  • Data type: array

    • Remarks

    The elements of the collection

    var

    Array of CriteriaElement objects

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:57:46 +0200 by phpDocumentor 1.4.0a2


Docs For Class CriteriaElement

Class CriteriaElement

[line 60]

Classes extended from CriteriaElement:

CriteriaCompo

Collection of multiple CriteriaElements

Criteria

A single criteria

Location: /criteria.php

Remarks

A criteria (grammar?) for a database query.

Abstract base class should never be instantiated directly.

author

Kazumi Ono    <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

abstract

Class Variable Summary

  • $groupby =  ''

  • $limit =  0

        Number of records to retrieve

  • $order =  'ASC'

        Sort order

  • $sort =  ''

  • $start =  0

        Offset of first record

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    CriteriaElement::CriteriaElement

CriteriaElement(
 );

    Remarks

    Constructor

    [ Top ]

    CriteriaElement::getGroupby

getGroupby(
 );

    Remarks

    Accessor

    [ Top ]

    CriteriaElement::getLimit

getLimit(
 );

    Remarks

    Accessor

    [ Top ]

    CriteriaElement::getOrder

getOrder(
 );

    Remarks

    Accessor

    [ Top ]

    CriteriaElement::getSort

getSort(
 );

    Remarks

    Accessor

    [ Top ]

    CriteriaElement::getStart

getStart(
 );

    Remarks

    Accessor

    [ Top ]

    CriteriaElement::render

render(
 );

    Overridden in child classes as:

    CriteriaCompo::render()

    Make the criteria into a query string

    Criteria::render()

    Make a sql condition string

    Remarks

    Render the criteria element

    [ Top ]

    CriteriaElement::setGroupby

setGroupby(
string
$group );

    Parameters

    $group

    Remarks

    Accessor

    [ Top ]

    CriteriaElement::setLimit

setLimit(
[int
$limit = 0] );

    Parameters

    $limit

    Remarks

    Accessor

    [ Top ]

    CriteriaElement::setOrder

setOrder(
string
$order );

    Parameters

    $order

    Remarks

    Accessor

    [ Top ]

    CriteriaElement::setSort

setSort(
string
$sort );

    Parameters

    $sort

    Remarks

    Accessor

    [ Top ]

    CriteriaElement::setStart

setStart(
[int
$start = 0] );

    Parameters

    $start

    Remarks

    Accessor

    [ Top ]

Variable Detail

  • $groupby =  '' [line 88]
    •

  • Data type: string
    •

  • $limit =  0 [line 77]
    •

  • Data type: int
    •

    Remarks

    Number of records to retrieve

  • $order =  'ASC' [line 66]
    •

  • Data type: string
    •

    Remarks

    Sort order

  • $sort =  '' [line 71]
    •

  • Data type: string
    •

  • $start =  0 [line 83]
    •

  • Data type: int
    •

    Remarks

    Offset of first record

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:57:46 +0200 by phpDocumentor 1.4.0a2


Docs For Class Database

Class Database

[line 123]

Location: /database/database.php

Remarks

Only for backward compatibility

deprecated

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    Database::getInstance

&getInstance(
 );

    [ Top ]

Variable Detail

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:57:47 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsDatabase

Class XoopsDatabase

[line 53]

Classes extended from XoopsDatabase:

XoopsMySQLDatabase

connection to a mysql database

Location: /database/database.php

Remarks

Abstract base class for Database access classes

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

abstract

Class Variable Summary

  • $logger =

        reference to a XoopsLogger object

  • $prefix =  ''

        Prefix for tables in the database

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsDatabase::XoopsDatabase

XoopsDatabase(
 );

    Remarks

    constructor

    will always fail, because this is an abstract class!

    [ Top ]

    XoopsDatabase::prefix

prefix(
[string
$tablename = ''] );

    Parameters

    $tablename

    tablename

    Returns

    prefixed tablename, just prefix if tablename is empty

    Remarks

    attach the prefix.'_' to a given tablename

    if tablename is empty, only prefix will be returned

    [ Top ]

    XoopsDatabase::setLogger

setLogger(

&$logger, object
$logger );

    Parameters

    $logger

    reference to a XoopsLogger object

    &$logger

    Remarks

    assign a XoopsLogger object to the database

    see

    XoopsLogger

    [ Top ]

    XoopsDatabase::setPrefix

setPrefix(
string
$value );

    Parameters

    $value

    table prefix

    Remarks

    set the prefix for tables in the database

    [ Top ]

Variable Detail

  • $logger =  [line 65]
    •

  • Data type: object XoopsLogger
    •

    Remarks

    reference to a XoopsLogger object

    see

    XoopsLogger

  • $prefix =  '' [line 59]
    •

  • Data type: string
    •

    Remarks

    Prefix for tables in the database

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:57:47 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsMySQLDatabase

Class XoopsMySQLDatabase

[line 58]
XoopsDatabase
   |
   --XoopsMySQLDatabase
Classes extended from XoopsMySQLDatabase:
XoopsMySQLDatabaseSafe
Safe Connection to a MySQL database.
XoopsMySQLDatabaseProxy
Read-Only connection to a MySQL database.

Location: /database/mysqldatabase.php

Remarks

connection to a mysql database

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

abstract

Class Variable Summary

  • $conn =
    Database connection

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsDatabase

  • XoopsDatabase::$logger =
    reference to a XoopsLogger object
  • XoopsDatabase::$prefix = ''
    Prefix for tables in the database

Method Summary

Inherited Method Summary

Inherited From Class XoopsDatabase

  • XoopsDatabase::XoopsDatabase()
    constructor
  • XoopsDatabase::prefix()
    attach the prefix.'_' to a given tablename
  • XoopsDatabase::setLogger()
    assign a XoopsLogger object to the database
  • XoopsDatabase::setPrefix()
    set the prefix for tables in the database

Method Detail

    XoopsMySQLDatabase::close

    close( );

    Remarks

    Close MySQL connection

    [ Top ]

    XoopsMySQLDatabase::connect

    connect( [bool $selectdb = true] );

    Parameters

    $selectdb

    select the database now?

    Returns

    successful?

    Remarks

    connect to the database

    [ Top ]

    XoopsMySQLDatabase::errno

    errno( );

    Returns

    Returns the error number from the last MySQL function, or 0 (zero) if no error occurred.

    Remarks

    Returns the numerical value of the error message from previous MySQL operation

    [ Top ]

    XoopsMySQLDatabase::error

    error( );

    Returns

    Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred.

    Remarks

    Returns the text of the error message from previous MySQL operation

    [ Top ]

    XoopsMySQLDatabase::fetchArray

    fetchArray( $result );

    Parameters

    $result

    Remarks

    Fetch a result row as an associative array

    [ Top ]

    XoopsMySQLDatabase::fetchBoth

    fetchBoth( $result );

    Parameters

    $result

    Remarks

    Fetch a result row as an associative array

    [ Top ]

    XoopsMySQLDatabase::fetchRow

    fetchRow( resource $result );

    Parameters

    $result

    Remarks

    Get a result row as an enumerated array

    [ Top ]

    XoopsMySQLDatabase::freeRecordSet

    freeRecordSet( resource $result );

    Parameters

    $result

    query result

    Returns

    TRUE on success or FALSE on failure.

    Remarks

    will free all memory associated with the result identifier result.

    [ Top ]

    XoopsMySQLDatabase::genId

    genId( string $sequence );

    Parameters

    $sequence

    name of the sequence from which to get the next ID

    Returns

    always 0, because mysql has support for autoincrement

    Remarks

    generate an ID for a new row

    This is for compatibility only. Will always return 0, because MySQL supports autoincrement for primary keys.

    [ Top ]

    XoopsMySQLDatabase::getAffectedRows

    getAffectedRows( );

    Remarks

    Get number of affected rows

    [ Top ]

    XoopsMySQLDatabase::getFieldName

    getFieldName( resource $result, int $offset );

    Parameters

    $result

    query result

    $offset

    numerical field index

    Remarks

    Get field name

    [ Top ]

    XoopsMySQLDatabase::getFieldsNum

    getFieldsNum( resource $result );

    Parameters

    $result

    query result

    Remarks

    Get number of fields in result

    [ Top ]

    XoopsMySQLDatabase::getFieldType

    getFieldType( resource $result, int $offset );

    Parameters

    $result

    query result

    $offset

    numerical field index

    Remarks

    Get field type

    [ Top ]

    XoopsMySQLDatabase::getInsertId

    getInsertId( );

    Remarks

    Get the ID generated from the previous INSERT operation

    [ Top ]

    XoopsMySQLDatabase::getRowsNum

    getRowsNum( resource $result );

    Parameters

    $result

    query result

    Remarks

    Get number of rows in result

    [ Top ]

    XoopsMySQLDatabase::query

    query( string $sql, [int $limit = 0], [int $start = 0] );

    Overridden in child classes as:

    XoopsMySQLDatabaseSafe::query()
    perform a query on the database
    XoopsMySQLDatabaseProxy::query()
    perform a query on the database

    Parameters

    $sql

    a valid MySQL query

    $limit

    number of records to return

    $start

    offset of first record to return

    Remarks

    perform a query

    This method is empty and does nothing! It should therefore only be used if nothing is exactly what you want done! ;-)

    abstract

    [ Top ]

    XoopsMySQLDatabase::queryF

    queryF( string $sql, [int $limit = 0], [int $start = 0] );

    Parameters

    $sql

    a valid MySQL query

    $limit

    number of records to return

    $start

    offset of first record to return

    Returns

    query result or FALSE if successful or TRUE if successful and no result

    Remarks

    perform a query on the database

    [ Top ]

    XoopsMySQLDatabase::queryFromFile

    queryFromFile( string $file );

    Parameters

    $file

    file path to an SQL dump file

    Returns

    FALSE if failed reading SQL file or TRUE if the file has been read and queries executed

    Remarks

    perform queries from SQL dump file in a batch

    [ Top ]

    XoopsMySQLDatabase::quoteString

    quoteString( string $str );

    Parameters

    $str

    unescaped string text

    Returns

    escaped string text with single quotes around

    Remarks

    Returns escaped string text with single quotes around it to be safely stored in database

    [ Top ]

Variable Detail

  • $conn = [line 64]
  • Data type: resource

    • Remarks

    Database connection

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:59:09 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsMySQLDatabaseProxy

Class XoopsMySQLDatabaseProxy

[line 371]
XoopsDatabase
   |
   --XoopsMySQLDatabase
      |
      --XoopsMySQLDatabaseProxy
Location: /database/mysqldatabase.php

Remarks

Read-Only connection to a MySQL database.

This class allows only SELECT queries to be performed through its query() method for security reasons.

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsMySQLDatabase

  • XoopsMySQLDatabase::$conn =
    Database connection

Inherited From Class XoopsDatabase

  • XoopsDatabase::$logger =
    reference to a XoopsLogger object
  • XoopsDatabase::$prefix = ''
    Prefix for tables in the database

Method Summary

Inherited Method Summary

Inherited From Class XoopsMySQLDatabase

  • XoopsMySQLDatabase::close()
    Close MySQL connection
  • XoopsMySQLDatabase::connect()
    connect to the database
  • XoopsMySQLDatabase::errno()
    Returns the numerical value of the error message from previous MySQL operation
  • XoopsMySQLDatabase::error()
    Returns the text of the error message from previous MySQL operation
  • XoopsMySQLDatabase::fetchArray()
    Fetch a result row as an associative array
  • XoopsMySQLDatabase::fetchBoth()
    Fetch a result row as an associative array
  • XoopsMySQLDatabase::fetchRow()
    Get a result row as an enumerated array
  • XoopsMySQLDatabase::freeRecordSet()
    will free all memory associated with the result identifier result.
  • XoopsMySQLDatabase::genId()
    generate an ID for a new row
  • XoopsMySQLDatabase::getAffectedRows()
    Get number of affected rows
  • XoopsMySQLDatabase::getFieldName()
    Get field name
  • XoopsMySQLDatabase::getFieldsNum()
    Get number of fields in result
  • XoopsMySQLDatabase::getFieldType()
    Get field type
  • XoopsMySQLDatabase::getInsertId()
    Get the ID generated from the previous INSERT operation
  • XoopsMySQLDatabase::getRowsNum()
    Get number of rows in result
  • XoopsMySQLDatabase::query()
    perform a query
  • XoopsMySQLDatabase::queryF()
    perform a query on the database
  • XoopsMySQLDatabase::queryFromFile()
    perform queries from SQL dump file in a batch
  • XoopsMySQLDatabase::quoteString()
    Returns escaped string text with single quotes around it to be safely stored in database

Inherited From Class XoopsDatabase

  • XoopsDatabase::XoopsDatabase()
    constructor
  • XoopsDatabase::prefix()
    attach the prefix.'_' to a given tablename
  • XoopsDatabase::setLogger()
    assign a XoopsLogger object to the database
  • XoopsDatabase::setPrefix()
    set the prefix for tables in the database

Method Detail

    XoopsMySQLDatabaseProxy::query

    query( string $sql, [int $limit = 0], [int $start = 0] );

    Overrides XoopsMySQLDatabase::query() (perform a query)

    Parameters

    $sql

    a valid MySQL query

    $limit

    number of records to return

    $start

    offset of first record to return

    Returns

    query result or FALSE if unsuccessful

    Remarks

    perform a query on the database

    this method allows only SELECT queries for safety.

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:59:10 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsMySQLDatabaseSafe

Class XoopsMySQLDatabaseSafe

[line 340]
XoopsDatabase
   |
   --XoopsMySQLDatabase
      |
      --XoopsMySQLDatabaseSafe
Location: /database/mysqldatabase.php

Remarks

Safe Connection to a MySQL database.

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsMySQLDatabase

  • XoopsMySQLDatabase::$conn =
    Database connection

Inherited From Class XoopsDatabase

  • XoopsDatabase::$logger =
    reference to a XoopsLogger object
  • XoopsDatabase::$prefix = ''
    Prefix for tables in the database

Method Summary

Inherited Method Summary

Inherited From Class XoopsMySQLDatabase

  • XoopsMySQLDatabase::close()
    Close MySQL connection
  • XoopsMySQLDatabase::connect()
    connect to the database
  • XoopsMySQLDatabase::errno()
    Returns the numerical value of the error message from previous MySQL operation
  • XoopsMySQLDatabase::error()
    Returns the text of the error message from previous MySQL operation
  • XoopsMySQLDatabase::fetchArray()
    Fetch a result row as an associative array
  • XoopsMySQLDatabase::fetchBoth()
    Fetch a result row as an associative array
  • XoopsMySQLDatabase::fetchRow()
    Get a result row as an enumerated array
  • XoopsMySQLDatabase::freeRecordSet()
    will free all memory associated with the result identifier result.
  • XoopsMySQLDatabase::genId()
    generate an ID for a new row
  • XoopsMySQLDatabase::getAffectedRows()
    Get number of affected rows
  • XoopsMySQLDatabase::getFieldName()
    Get field name
  • XoopsMySQLDatabase::getFieldsNum()
    Get number of fields in result
  • XoopsMySQLDatabase::getFieldType()
    Get field type
  • XoopsMySQLDatabase::getInsertId()
    Get the ID generated from the previous INSERT operation
  • XoopsMySQLDatabase::getRowsNum()
    Get number of rows in result
  • XoopsMySQLDatabase::query()
    perform a query
  • XoopsMySQLDatabase::queryF()
    perform a query on the database
  • XoopsMySQLDatabase::queryFromFile()
    perform queries from SQL dump file in a batch
  • XoopsMySQLDatabase::quoteString()
    Returns escaped string text with single quotes around it to be safely stored in database

Inherited From Class XoopsDatabase

  • XoopsDatabase::XoopsDatabase()
    constructor
  • XoopsDatabase::prefix()
    attach the prefix.'_' to a given tablename
  • XoopsDatabase::setLogger()
    assign a XoopsLogger object to the database
  • XoopsDatabase::setPrefix()
    set the prefix for tables in the database

Method Detail

    XoopsMySQLDatabaseSafe::query

    query( string $sql, [int $limit = 0], [int $start = 0] );

    Overrides XoopsMySQLDatabase::query() (perform a query)

    Parameters

    $sql

    a valid MySQL query

    $limit

    number of records to return

    $start

    offset of first record to return

    Returns

    query result or FALSE if successful or TRUE if successful and no result

    Remarks

    perform a query on the database

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:59:11 +0200 by phpDocumentor 1.4.0a2


Docs For Class SqlUtility

Class SqlUtility

[line 21]

Location: /database/sqlutility.php

Remarks

provide some utility methods for databases

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    SqlUtility::prefixQuery

prefixQuery(
string
$query, string
$prefix );

    Parameters

    $query

    valid SQL query string

    $prefix

    prefix to add to all table names

    Returns

    FALSE on failure

    Remarks

    add a prefix.'_' to all tablenames in a query

    [ Top ]

    SqlUtility::splitMySqlFile

splitMySqlFile(
array
&$ret, string
$sql );

    Parameters

    &$ret

    the splitted sql commands

    $sql

    the sql commands

    Returns

    always true

    Remarks

    Function from phpMyAdmin (http://phpwizard.net/projects/phpMyAdmin/)

    Removes comment and splits large sql files into individual queries
    Last revision: September 23, 2001 - gandon

    access

    public

    [ Top ]

Variable Detail

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:00:04 +0200 by phpDocumentor 1.4.0a2


Docs for page criteria.php

File: /criteria.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
CriteriaElement
A criteria (grammar?) for a database query.
CriteriaCompo
Collection of multiple CriteriaElements
Criteria
A single criteria

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:44 +0200 by phpDocumentor 1.4.0a2


Docs for page database.php

File: /database/database.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsDatabase
Abstract base class for Database access classes
Database
Only for backward compatibility

Include Statements Summary

Global Variable Summary

Constant Summary

  • XOOPS_C_DATABASE_INCLUDED = 1
    make sure this is only included once!

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

  • XOOPS_C_DATABASE_INCLUDED = 1 [line 40]

    Remarks

    make sure this is only included once!

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:47 +0200 by phpDocumentor 1.4.0a2


Docs for page mysqldatabase.php

File: /database/mysqldatabase.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsMySQLDatabase
connection to a mysql database
XoopsMySQLDatabaseSafe
Safe Connection to a MySQL database.
XoopsMySQLDatabaseProxy
Read-Only connection to a MySQL database.

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/database/database.php"
    base class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/database/database.php" [line 45]

    Remarks

    base class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:59:08 +0200 by phpDocumentor 1.4.0a2


Docs for page sqlutility.php

File: /database/sqlutility.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
SqlUtility
provide some utility methods for databases

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:03 +0200 by phpDocumentor 1.4.0a2


File Source for form.php

Source for file form.php

Documentation is available at form.php

  • <?php
    •

  • // $Id: form.php 984 2007-08-11 16:31:54Z phppp $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • // public abstruct
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Abstract base class for forms
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  */
    •

  • class XoopsForm {
    •

  •     /**#@+
    •

  •      * @access  private
    •

  •      */
    •

  •     /**
    •

  •      * "action" attribute for the html form
    •

  •      * @var string
    •

  •      */
    •

  •     var $_action;
    •

  •
    •

  •     /**
    •

  •      * "method" attribute for the form.
    •

  •      * @var string
    •

  •      */
    •

  •     var $_method;
    •

  •
    •

  •     /**
    •

  •      * "name" attribute of the form
    •

  •      * @var string
    •

  •      */
    •

  •     var $_name;
    •

  •
    •

  •     /**
    •

  •      * title for the form
    •

  •      * @var string
    •

  •      */
    •

  •     var $_title;
    •

  •
    •

  •     /**
    •

  •      * array of {@link XoopsFormElement} objects
    •

  •      * @var  array
    •

  •      */
    •

  •     var $_elements = array();
    •

  •
    •

  •     /**
    •

  •      * extra information for the <form> tag
    •

  •      * @var string
    •

  •      */
    •

  •     var $_extra;
    •

  •
    •

  •     /**
    •

  •      * required elements
    •

  •      * @var array
    •

  •      */
    •

  •     var $_required = array();
    •

  •
    •

  •     /**#@-*/
    •

  •
    •

  •     /**
    •

  •      * constructor
    •

  •      *
    •

  •      * @param    string  $title  title of the form
    •

  •      * @param    string  $name   "name" attribute for the <form> tag
    •

  •      * @param    string  $action "action" attribute for the <form> tag
    •

  •      * @param   string  $method "method" attribute for the <form> tag
    •

  •      * @param   bool    $addtoken whether to add a security token to the form
    •

  •      */
    •

  •     function XoopsForm($title, $name, $action, $method="post", $addtoken=false){
    •

  •         $this->_title = $title;
    •

  •         $this->_name = $name;
    •

  •         $this->_action = $action;
    •

  •         $this->_method = $method;
    •

  •         if ($addtoken != false) {
    •

  •             $this->addElement(new XoopsFormHiddenToken());
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * return the title of the form
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getTitle(){
    •

  •         return $this->_title;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get the "name" attribute for the <form> tag
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getName(){
    •

  •         return $this->_name;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get the "action" attribute for the <form> tag
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getAction(){
    •

  •         return $this->_action;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get the "method" attribute for the <form> tag
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getMethod(){
    •

  •         return $this->_method;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add an element to the form
    •

  •      *
    •

  •      * @param    object  &$formElement    reference to a {@link XoopsFormElement}
    •

  •      * @param    bool    $required       is this a "required" element?
    •

  •      */
    •

  •     function addElement(&$formElement, $required = false){
    •

  •         if ( is_string( $formElement ) ) {
    •

  •             $this->_elements[] = $formElement;
    •

  •         } elseif ( is_subclass_of($formElement, 'xoopsformelement') ) {
    •

  •             $this->_elements[] =& $formElement;
    •

  •             if (!$formElement->isContainer()) {
    •

  •                 if ($required) {
    •

  •                     $formElement->_required = true;
    •

  •                     $this->_required[] =& $formElement;
    •

  •                 }
    •

  •             } else {
    •

  •                 $required_elements =& $formElement->getRequired();
    •

  •                 $count = count($required_elements);
    •

  •                 for ($i = 0 ; $i < $count; $i++) {
    •

  •                     $this->_required[] =& $required_elements[$i];
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get an array of forms elements
    •

  •      *
    •

  •      * @param    bool    get elements recursively?
    •

  •      * @return    array   array of {@link XoopsFormElement}s
    •

  •      */
    •

  •     function &getElements($recurse = false){
    •

  •         if (!$recurse) {
    •

  •             return $this->_elements;
    •

  •         } else {
    •

  •             $ret = array();
    •

  •             $count = count($this->_elements);
    •

  •             for ($i = 0; $i < $count; $i++) {
    •

  •                 if ( is_object( $this->_elements[$i] ) ) {
    •

  •                     if (!$this->_elements[$i]->isContainer()) {
    •

  •                         $ret[] =& $this->_elements[$i];
    •

  •                     } else {
    •

  •                         $elements =& $this->_elements[$i]->getElements(true);
    •

  •                         $count2 = count($elements);
    •

  •                         for ($j = 0; $j < $count2; $j++) {
    •

  •                             $ret[] =& $elements[$j];
    •

  •                         }
    •

  •                         unset($elements);
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •             return $ret;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get an array of "name" attributes of form elements
    •

  •      *
    •

  •      * @return    array   array of form element names
    •

  •      */
    •

  •     function getElementNames()
    •

  •     {
    •

  •         $ret = array();
    •

  •         $elements =& $this->getElements(true);
    •

  •         $count = count($elements);
    •

  •         for ($i = 0; $i < $count; $i++) {
    •

  •             $ret[] = $elements[$i]->getName();
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get a reference to a {@link XoopsFormElement} object by its "name"
    •

  •      *
    •

  •      * @param  string  $name    "name" attribute assigned to a {@link XoopsFormElement}
    •

  •      * @return object  reference to a {@link XoopsFormElement}, false if not found
    •

  •      */
    •

  •     function &getElementByName($name){
    •

  •         $elements = $this->getElements(true);
    •

  •         $count = count($elements);
    •

  •         for ($i = 0; $i < $count; $i++) {
    •

  •             if ($name == $elements[$i]->getName()) {
    •

  •                 return $elements[$i];
    •

  •             }
    •

  •         }
    •

  •         $elt = false;
    •

  •         return $elt;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sets the "value" attribute of a form element
    •

  •      *
    •

  •      * @param    string $name    the "name" attribute of a form element
    •

  •      * @param    string $value    the "value" attribute of a form element
    •

  •      */
    •

  •     function setElementValue($name, $value){
    •

  •         $ele =& $this->getElementByName($name);
    •

  •         if (is_object($ele) && method_exists($ele, 'setValue')) {
    •

  •             $ele->setValue($value);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sets the "value" attribute of form elements in a batch
    •

  •      *
    •

  •      * @param    array $values    array of name/value pairs to be assigned to form elements
    •

  •      */
    •

  •     function setElementValues($values){
    •

  •         if (is_array($values) && !empty($values)) {
    •

  •             // will not use getElementByName() for performance..
    •

  •             $elements =& $this->getElements(true);
    •

  •             $count = count($elements);
    •

  •             for ($i = 0; $i < $count; $i++) {
    •

  •                 $name = $elements[$i]->getName();
    •

  •                 if ($name && isset($values[$name]) && method_exists($elements[$i], 'setValue')) {
    •

  •                     $elements[$i]->setValue($values[$name]);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Gets the "value" attribute of a form element
    •

  •      *
    •

  •      * @param    string     $name    the "name" attribute of a form element
    •

  •      * @return    string     the "value" attribute assigned to a form element, null if not set
    •

  •      */
    •

  •     function getElementValue($name){
    •

  •         $ele =& $this->getElementByName($name);
    •

  •         if (is_object($ele) && method_exists($ele, 'getValue')) {
    •

  •             return $ele->getValue($value);
    •

  •         }
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * gets the "value" attribute of all form elements
    •

  •      *
    •

  •      * @return    array     array of name/value pairs assigned to form elements
    •

  •      */
    •

  •     function getElementValues(){
    •

  •         // will not use getElementByName() for performance..
    •

  •         $elements =& $this->getElements(true);
    •

  •         $count = count($elements);
    •

  •         $values = array();
    •

  •         for ($i = 0; $i < $count; $i++) {
    •

  •             $name = $elements[$i]->getName();
    •

  •             if ($name && method_exists($elements[$i], 'getValue')) {
    •

  •                 $values[$name] =& $elements[$i]->getValue();
    •

  •             }
    •

  •         }
    •

  •         return $values;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * set the extra attributes for the <form> tag
    •

  •      *
    •

  •      * @param    string  $extra  extra attributes for the <form> tag
    •

  •      */
    •

  •     function setExtra($extra){
    •

  •         $this->_extra = " ".$extra;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get the extra attributes for the <form> tag
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function &getExtra(){
    •

  •         if (isset($this->_extra)) {
    •

  •             return $this->_extra;
    •

  •         }
    •

  •         $extra = null;
    •

  •         return $extra;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * make an element "required"
    •

  •      *
    •

  •      * @param    object  &$formElement    reference to a {@link XoopsFormElement}
    •

  •      */
    •

  •     function setRequired(&$formElement){
    •

  •         $this->_required[] =& $formElement;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get an array of "required" form elements
    •

  •      *
    •

  •      * @return    array   array of {@link XoopsFormElement}s
    •

  •      */
    •

  •     function &getRequired(){
    •

  •         return $this->_required;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * insert a break in the form
    •

  •      *
    •

  •      * This method is abstract. It must be overwritten in the child classes.
    •

  •      *
    •

  •      * @param    string  $extra  extra information for the break
    •

  •      * @abstract
    •

  •      */
    •

  •     function insertBreak($extra = null){
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * returns renderered form
    •

  •      *
    •

  •      * This method is abstract. It must be overwritten in the child classes.
    •

  •      *
    •

  •      * @abstract
    •

  •      */
    •

  •     function render(){
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * displays rendered form
    •

  •      */
    •

  •     function display(){
    •

  •         echo $this->render();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Renders the Javascript function needed for client-side for validation
    •

  •      *
    •

  •      * Form elements that have been declared "required" and not set will prevent the form from being
    •

  •      * submitted. Additionally, each element class may provide its own "renderValidationJS" method
    •

  •      * that is supposed to return custom validation code for the element.
    •

  •      *
    •

  •      * The element validation code can assume that the JS "myform" variable points to the form, and must
    •

  •      * execute <i>return false</i> if validation fails.
    •

  •      *
    •

  •      * A basic element validation method may contain something like this:
    •

  •      * <code>
    •

  •      * function renderValidationJS() {
    •

  •      *   $name = $this->getName();
    •

  •      *   return "if ( myform.{$name}.value != 'valid' ) { " .
    •

  •      *     "myform.{$name}.focus(); window.alert( '$name is invalid' ); return false;" .
    •

  •      *     " }";
    •

  •      * }
    •

  •      * </code>
    •

  •      *
    •

  •      * @param        boolean  $withtags    Include the < javascript > tags in the returned string
    •

  •      */
    •

  •     function renderValidationJS( $withtags = true ) {
    •

  •         $js = "";
    •

  •         if ( $withtags ) {
    •

  •             $js .= "\n<!-- Start Form Validation JavaScript //-->\n<script type='text/javascript'>\n<!--//\n";
    •

  •         }
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         $formname = $this->getName();
    •

  •         $js .= "function xoopsFormValidate_{$formname}() { myform = window.document.{$formname}; ";
    •

  •         $elements = $this->getElements( true );
    •

  •         foreach ( $elements as $elt ) {
    •

  •             if ( method_exists( $elt, 'renderValidationJS' ) ) {
    •

  •                 $js .= $elt->renderValidationJS();
    •

  •             }
    •

  •         }
    •

  •         $js .= "return true;\n}\n";
    •

  •         if ( $withtags ) {
    •

  •             $js .= "//--></script>\n<!-- End Form Vaidation JavaScript //-->\n";
    •

  •         }
    •

  •         return $js;
    •

  •     }
    •

  •     /**
    •

  •      * assign to smarty form template instead of displaying directly
    •

  •      *
    •

  •      * @param    object  &$tpl    reference to a {@link Smarty} object
    •

  •      * @see     Smarty
    •

  •      */
    •

  •     function assign(&$tpl){
    •

  •         $i = -1;
    •

  •         $elements = array();
    •

  •         foreach ( $this->getElements() as $ele ) {
    •

  •             ++$i;
    •

  •             if(is_string( $ele )) {
    •

  •                 $elements[$i]['body']    = $ele;
    •

  •                 continue;
    •

  •             }
    •

  •             $n = ($ele->getName() != "") ? $ele->getName() : $i;
    •

  •             $elements[$n]['name']       = $ele->getName();
    •

  •             $elements[$n]['caption']    = $ele->getCaption();
    •

  •             $elements[$n]['body']       = $ele->render();
    •

  •             $elements[$n]['hidden']     = $ele->isHidden();
    •

  •             $elements[$n]['required']   = $ele->isRequired();
    •

  •             if ($ele->getDescription() != '') {
    •

  •                 $elements[$n]['description']  = $ele->getDescription();
    •

  •             }
    •

  •         }
    •

  •         $js = $this->renderValidationJS();
    •

  •         $tpl->assign($this->getName(), array('title' => $this->getTitle(), 'name' => $this->getName(), 'action' => $this->getAction(),  'method' => $this->getMethod(), 'extra' => 'onsubmit="return xoopsFormValidate_'.$this->getName().'();"'.$this->getExtra(), 'javascript' => $js, 'elements' => $elements));
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:52 +0200 by phpDocumentor 1.4.0a2


File Source for formbutton.php

Source for file formbutton.php

Documentation is available at formbutton.php

  • <?php
    •

  • // $Id: formbutton.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * A button
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  */
    •

  • class XoopsFormButton extends XoopsFormElement {
    •

  •
    •

  •     /**
    •

  •      * Value
    •

  •      * @var    string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_value;
    •

  •
    •

  •     /**
    •

  •      * Type of the button. This could be either "button", "submit", or "reset"
    •

  •      * @var    string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_type;
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string  $caption    Caption
    •

  •      * @param    string  $name
    •

  •      * @param    string  $value
    •

  •      * @param    string  $type       Type of the button.
    •

  •      *  This could be either "button", "submit", or "reset"
    •

  •      */
    •

  •     function XoopsFormButton($caption, $name, $value="", $type="button"){
    •

  •         $this->setCaption($caption);
    •

  •         $this->setName($name);
    •

  •         $this->_type = $type;
    •

  •         $this->setValue($value);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the initial value
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getValue(){
    •

  •         return $this->_value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Set the initial value
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function setValue($value){
    •

  •         $this->_value = $value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the type
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getType(){
    •

  •         return $this->_type;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * prepare HTML for output
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function render(){
    •

  •         return "<input type='".$this->getType()."' class='formButton' name='".$this->getName()."'  id='".$this->getName()."' value='".$this->getValue()."'".$this->getExtra()." />";
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:53 +0200 by phpDocumentor 1.4.0a2


File Source for formcheckbox.php

Source for file formcheckbox.php

Documentation is available at formcheckbox.php

  • <?php
    •

  • // $Id: formcheckbox.php 959 2007-08-07 12:53:33Z dugris $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * One or more Checkbox(es)
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsFormCheckBox extends XoopsFormElement {
    •

  •
    •

  •     /**
    •

  •      * Availlable options
    •

  •      * @var array
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_options = array();
    •

  •
    •

  •     /**
    •

  •      * pre-selected values in array
    •

  •      * @var    array
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_value = array();
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string  $caption
    •

  •      * @param    string  $name
    •

  •      * @param    mixed   $value  Either one value as a string or an array of them.
    •

  •      */
    •

  •     function XoopsFormCheckBox($caption, $name, $value = null, $delimeter = ""){
    •

  •         $this->setCaption($caption);
    •

  •         $this->setName($name);
    •

  •         if (isset($value)) {
    •

  •             $this->setValue($value);
    •

  •         }
    •

  •         $this->delimeter = $delimeter;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the "value"
    •

  •      *
    •

  •      * @return    array
    •

  •      */
    •

  •     function getValue(){
    •

  •         return $this->_value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Set the "value"
    •

  •      *
    •

  •      * @param    array
    •

  •      */
    •

  •     function setValue($value){
    •

  •         $this->_value = array();
    •

  •         if (is_array($value)) {
    •

  •             foreach ($value as $v) {
    •

  •                 $this->_value[] = $v;
    •

  •             }
    •

  •         } else {
    •

  •             $this->_value[] = $value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add an option
    •

  •      *
    •

  •      * @param    string  $value
    •

  •      * @param    string  $name
    •

  •      */
    •

  •     function addOption($value, $name=""){
    •

  •         if ($name != "") {
    •

  •             $this->_options[$value] = $name;
    •

  •         } else {
    •

  •             $this->_options[$value] = $value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add multiple Options at once
    •

  •      *
    •

  •      * @param    array   $options    Associative array of value->name pairs
    •

  •      */
    •

  •     function addOptionArray($options){
    •

  •         if ( is_array($options) ) {
    •

  •             foreach ( $options as $k=>$v ) {
    •

  •                 $this->addOption($k, $v);
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get an array with all the options
    •

  •      *
    •

  •      * @return    array   Associative array of value->name pairs
    •

  •      */
    •

  •     function getOptions(){
    •

  •         return $this->_options;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * prepare HTML for output
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function render(){
    •

  •         $ret = "";
    •

  •         if ( count($this->getOptions()) > 1 && substr($this->getName(), -2, 2) != "[]" ) {
    •

  •             $newname = $this->getName()."[]";
    •

  •             $this->setName($newname);
    •

  •         }
    •

  •         foreach ( $this->getOptions() as $value => $name ) {
    •

  •             $ret .= "<input type='checkbox' name='".$this->getName()."' value='".$value."'";
    •

  •             if (count($this->getValue()) > 0 && in_array($value, $this->getValue())) {
    •

  •                 $ret .= " checked='checked'";
    •

  •             }
    •

  •             $ret .= $this->getExtra()." />".$name.$this->delimeter."\n";
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:55 +0200 by phpDocumentor 1.4.0a2


File Source for formdatetime.php

Source for file formdatetime.php

Documentation is available at formdatetime.php

  • <?php
    •

  • // $Id: formdatetime.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Date and time selection field
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  */
    •

  • class XoopsFormDateTime extends XoopsFormElementTray
    •

  • {
    •

  •
    •

  •     function XoopsFormDateTime($caption, $name, $size = 15, $value=0)
    •

  •     {
    •

  •         $this->XoopsFormElementTray($caption, '&nbsp;');
    •

  •         $value = intval($value);
    •

  •         $value = ($value > 0) ? $value : time();
    •

  •         $datetime = getDate($value);
    •

  •         $this->addElement(new XoopsFormTextDateSelect('', $name.'[date]', $size, $value));
    •

  •         $timearray = array();
    •

  •         for ($i = 0; $i < 24; $i++) {
    •

  •             for ($j = 0; $j < 60; $j = $j + 10) {
    •

  •                 $key = ($i * 3600) + ($j * 60);
    •

  •                 $timearray[$key] = ($j != 0) ? $i.':'.$j : $i.':0'.$j;
    •

  •             }
    •

  •         }
    •

  •         ksort($timearray);
    •

  •         $timeselect = new XoopsFormSelect('', $name.'[time]', $datetime['hours'] * 3600 + 600 * ceil($datetime['minutes'] / 10));
    •

  •         $timeselect->addOptionArray($timearray);
    •

  •         $this->addElement($timeselect);
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:57 +0200 by phpDocumentor 1.4.0a2


File Source for formdhtmltextarea.php

Source for file formdhtmltextarea.php

Documentation is available at formdhtmltextarea.php

  • <?php
    •

  • // $Id: formdhtmltextarea.php 758 2006-09-24 21:41:09Z phppp $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * base class
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formtextarea.php";
    •

  •
    •

  • // Make sure you have included /include/xoopscodes.php, otherwise DHTML will not work properly!
    •

  •
    •

  • /**
    •

  •  * A textarea with xoopsish formatting and smilie buttons
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  */
    •

  • class XoopsFormDhtmlTextArea extends XoopsFormTextArea {
    •

  •     /**
    •

  •     * Extended HTML editor definition
    •

  •     *
    •

  •     * Set this property value if you want the editor to delegate rendering to an external class.
    •

  •     *
    •

  •     * Note: this functionality is experimental, but feedback is welcome.
    •

  •     * Note: the PM window doesn't use XoopsFormDhtmlTextArea, so no need to report it doesn't work here
    •

  •     *
    •

  •     * array( 'bundleId' ): For XOS components (2.3+)
    •

  •     * array( 'className', 'classPath' ):  To create an instance of "className", declared in the file XOOPS_ROOT_PATH . $classPath
    •

  •     *
    •

  •     * Example:
    •

  •     * $htmlEditor = array( 'XoopsFormTinyeditorTextArea', '/class/xoopseditor/tinyeditor/formtinyeditortextarea.php' );
    •

  •     */
    •

  •     var $htmlEditor = array();
    •

  •
    •

  •     /**
    •

  •      * Hidden text
    •

  •      * @var    string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_hiddenText;
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string  $caption    Caption
    •

  •      * @param    string  $name       "name" attribute
    •

  •      * @param    string  $value      Initial text
    •

  •      * @param    int     $rows       Number of rows
    •

  •      * @param    int     $cols       Number of columns
    •

  •      * @param    string  $hiddentext Hidden Text
    •

  •      */
    •

  •     function XoopsFormDhtmlTextArea($caption, $name, $value, $rows=5, $cols=50, $hiddentext="xoopsHiddenText", $options = array() )
    •

  •     {
    •

  •         $this->XoopsFormTextArea($caption, $name, $value, $rows, $cols);
    •

  •         $this->_hiddenText = $hiddentext;
    •

  •
    •

  •         if ( !empty( $this->htmlEditor ) ) {
    •

  •             $options['name'] = $this->_name;
    •

  •             $options['value'] = $this->_value;
    •

  •
    •

  •             if ( count( $this->htmlEditor ) == 1 ) {
    •

  •                 $this->htmlEditor = XOS::create( $this->htmlEditor[0] );
    •

  •             } else {
    •

  •                 list( $class, $path ) = $this->htmlEditor;
    •

  •                 include_once XOOPS_ROOT_PATH . $path;
    •

  •                 if ( class_exists( $class ) ) {
    •

  •                     $this->htmlEditor = new $class( $options );
    •

  •                 } else {
    •

  •                     $this->htmlEditor = false;
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Prepare HTML for output
    •

  •      *
    •

  •      * @return    string  HTML
    •

  •      */
    •

  •     function render()
    •

  •     {
    •

  •         $editor = false;
    •

  •         if ( $this->htmlEditor && is_object( $this->htmlEditor ) ) {
    •

  •             if ( !isset( $this->htmlEditor->isEnabled ) || $this->htmlEditor->isEnabled ) {
    •

  •                 $editor = true;
    •

  •             }
    •

  •         }
    •

  •         if ( $editor ) {
    •

  •             return $this->htmlEditor->render();
    •

  •         }
    •

  •
    •

  •         $ret = "<a name='moresmiley'></a><img onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/url.gif' alt='url' onclick='xoopsCodeUrl(\"".$this->getName()."\", \"".htmlspecialchars(_ENTERURL, ENT_QUOTES)."\", \"".htmlspecialchars(_ENTERWEBTITLE, ENT_QUOTES)."\");' />&nbsp;<img onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/email.gif' alt='email' onclick='javascript:xoopsCodeEmail(\"".$this->getName()."\", \"".htmlspecialchars(_ENTEREMAIL, ENT_QUOTES)."\");' />&nbsp;<img onclick='javascript:xoopsCodeImg(\"".$this->getName()."\", \"".htmlspecialchars(_ENTERIMGURL, ENT_QUOTES)."\", \"".htmlspecialchars(_ENTERIMGPOS, ENT_QUOTES)."\", \"".htmlspecialchars(_IMGPOSRORL, ENT_QUOTES)."\", \"".htmlspecialchars(_ERRORIMGPOS, ENT_QUOTES)."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/imgsrc.gif' alt='imgsrc' />&nbsp;<img onmouseover='style.cursor=\"hand\"' onclick='javascript:openWithSelfMain(\"".XOOPS_URL."/imagemanager.php?target=".$this->getName()."\",\"imgmanager\",400,430);' src='".XOOPS_URL."/images/image.gif' alt='image' />&nbsp;<img src='".XOOPS_URL."/images/code.gif' onmouseover='style.cursor=\"hand\"' alt='code' onclick='javascript:xoopsCodeCode(\"".$this->getName()."\", \"".htmlspecialchars(_ENTERCODE, ENT_QUOTES)."\");' />&nbsp;<img onclick='javascript:xoopsCodeQuote(\"".$this->getName()."\", \"".htmlspecialchars(_ENTERQUOTE, ENT_QUOTES)."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/quote.gif' alt='quote' /><br />\n";
    •

  •
    •

  •         $sizearray = array("xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large");
    •

  •         $ret .= "<select id='".$this->getName()."Size' onchange='setVisible(\"".$this->_hiddenText."\");setElementSize(\"".$this->_hiddenText."\",this.options[this.selectedIndex].value);'>\n";
    •

  •         $ret .= "<option value='SIZE'>"._SIZE."</option>\n";
    •

  •         foreach ( $sizearray as $size ) {
    •

  •             $ret .=  "<option value='$size'>$size</option>\n";
    •

  •         }
    •

  •         $ret .= "</select>\n";
    •

  •         $fontarray = array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana");
    •

  •         $ret .= "<select id='".$this->getName()."Font' onchange='setVisible(\"".$this->_hiddenText."\");setElementFont(\"".$this->_hiddenText."\",this.options[this.selectedIndex].value);'>\n";
    •

  •         $ret .= "<option value='FONT'>"._FONT."</option>\n";
    •

  •         foreach ( $fontarray as $font ) {
    •

  •             $ret .= "<option value='$font'>$font</option>\n";
    •

  •         }
    •

  •         $ret .= "</select>\n";
    •

  •         $colorarray = array("00", "33", "66", "99", "CC", "FF");
    •

  •         $ret .= "<select id='".$this->getName()."Color' onchange='setVisible(\"".$this->_hiddenText."\");setElementColor(\"".$this->_hiddenText."\",this.options[this.selectedIndex].value);'>\n";
    •

  •         $ret .= "<option value='COLOR'>"._COLOR."</option>\n";
    •

  •         foreach ( $colorarray as $color1 ) {
    •

  •             foreach ( $colorarray as $color2 ) {
    •

  •                 foreach ( $colorarray as $color3 ) {
    •

  •                     $ret .= "<option value='".$color1.$color2.$color3."' style='background-color:#".$color1.$color2.$color3.";color:#".$color1.$color2.$color3.";'>#".$color1.$color2.$color3."</option>\n";
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         $ret .= "</select><span id='".$this->_hiddenText."'>"._EXAMPLE."</span>\n";
    •

  •         $ret .= "<br />\n";
    •

  •         $ret .= "<img onclick='javascript:setVisible(\"".$this->_hiddenText."\");makeBold(\"".$this->_hiddenText."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/bold.gif' alt='bold' />&nbsp;<img onclick='javascript:setVisible(\"".$this->_hiddenText."\");makeItalic(\"".$this->_hiddenText."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/italic.gif' alt='italic' />&nbsp;<img onclick='javascript:setVisible(\"".$this->_hiddenText."\");makeUnderline(\"".$this->_hiddenText."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/underline.gif' alt='underline' />&nbsp;<img onclick='javascript:setVisible(\"".$this->_hiddenText."\");makeLineThrough(\"".$this->_hiddenText."\");' src='".XOOPS_URL."/images/linethrough.gif' alt='linethrough' onmouseover='style.cursor=\"hand\"' />&nbsp;&nbsp;<input type='text' id='".$this->getName()."Addtext' size='20' />&nbsp;<input type='button' onclick='xoopsCodeText(\"".$this->getName()."\", \"".$this->_hiddenText."\", \"".htmlspecialchars(_ENTERTEXTBOX, ENT_QUOTES)."\")' class='formButton' value='"._ADD."' /><br /><br /><textarea id='".$this->getName()."' name='".$this->getName()."' onselect=\"xoopsSavePosition('".$this->getName()."');\" onclick=\"xoopsSavePosition('".$this->getName()."');\" onkeyup=\"xoopsSavePosition('".$this->getName()."');\" cols='".$this->getCols()."' rows='".$this->getRows()."'".$this->getExtra().">".$this->getValue()."</textarea><br />\n";
    •

  •         $ret .= $this->_renderSmileys();
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function renderValidationJS() {
    •

  •         if ( $this->htmlEditor && is_object( $this->htmlEditor ) && method_exists( $this->htmlEditor, "renderValidationJS" ) ) {
    •

  •             if ( !isset( $this->htmlEditor->isEnabled ) || $this->htmlEditor->isEnabled ) {
    •

  •                 return $this->htmlEditor->renderValidationJS();
    •

  •             }
    •

  •         }
    •

  •         return '';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * prepare HTML for output of the smiley list.
    •

  •      *
    •

  •      * @return    string HTML
    •

  •      */
    •

  •     function _renderSmileys()
    •

  •     {
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         $smiles =& $myts->getSmileys();
    •

  •         $ret = '';
    •

  •         if (empty($smiles)) {
    •

  •             $db =& Database::getInstance();
    •

  •             if ($result = $db->query('SELECT * FROM '.$db->prefix('smiles').' WHERE display=1')) {
    •

  •                 while ($smiles = $db->fetchArray($result)) {
    •

  •                     $ret .= "<img onclick='xoopsCodeSmilie(\"".$this->getName()."\", \" ".$smiles['code']." \");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_UPLOAD_URL."/".htmlspecialchars($smiles['smile_url'], ENT_QUOTES)."' alt='' />";
    •

  •                 }
    •

  •             }
    •

  •         } else {
    •

  •             $count = count($smiles);
    •

  •             for ($i = 0; $i < $count; $i++) {
    •

  •                 if ($smiles[$i]['display'] == 1) {
    •

  •                     $ret .= "<img onclick='xoopsCodeSmilie(\"".$this->getName()."\", \" ".$smiles[$i]['code']." \");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_UPLOAD_URL."/".$myts->oopsHtmlSpecialChars($smiles[$i]['smile_url'])."' border='0' alt='' />";
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         $ret .= "&nbsp;[<a href='#moresmiley' onclick='javascript:openWithSelfMain(\"".XOOPS_URL."/misc.php?action=showpopups&amp;type=smilies&amp;target=".$this->getName()."\",\"smilies\",300,475);'>"._MORE."</a>]";
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:00 +0200 by phpDocumentor 1.4.0a2


File Source for formelement.php

Source for file formelement.php

Documentation is available at formelement.php

  • <?php
    •

  • // $Id: formelement.php 984 2007-08-11 16:31:54Z phppp $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Abstract base class for form elements
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  */
    •

  • class XoopsFormElement {
    •

  •
    •

  •     /**
    •

  •      * Javascript performing additional validation of this element data
    •

  •      *
    •

  •      * This property contains a list of Javascript snippets that will be sent to
    •

  •      * XoopsForm::renderValidationJS().
    •

  •      * NB: All elements are added to the output one after the other, so don't forget
    •

  •      * to add a ";" after each to ensure no Javascript syntax error is generated.
    •

  •      *
    •

  •      * @var array()
    •

  •      */
    •

  •     var $customValidationCode = array();
    •

  •
    •

  •     /**#@+
    •

  •      * @access private
    •

  •      */
    •

  •     /**
    •

  •      * "name" attribute of the element
    •

  •      * @var string
    •

  •      */
    •

  •     var $_name;
    •

  •
    •

  •     /**
    •

  •      * caption of the element
    •

  •      * @var    string
    •

  •      */
    •

  •     var $_caption;
    •

  •
    •

  •     /**
    •

  •      * Accesskey for this element
    •

  •      * @var    string
    •

  •      */
    •

  •     var $_accesskey = '';
    •

  •
    •

  •     /**
    •

  •      * HTML class for this element
    •

  •      * @var    string
    •

  •      */
    •

  •     var $_class = '';
    •

  •
    •

  •     /**
    •

  •      * hidden?
    •

  •      * @var    bool
    •

  •      */
    •

  •     var $_hidden = false;
    •

  •
    •

  •     /**
    •

  •      * extra attributes to go in the tag
    •

  •      * @var    string
    •

  •      */
    •

  •     var $_extra = "";
    •

  •
    •

  •     /**
    •

  •      * required field?
    •

  •      * @var    bool
    •

  •      */
    •

  •     var $_required = false;
    •

  •
    •

  •     /**
    •

  •      * description of the field
    •

  •      * @var    string
    •

  •      */
    •

  •     var $_description = "";
    •

  •     /**#@-*/
    •

  •
    •

  •
    •

  •     /**
    •

  •      * constructor
    •

  •      *
    •

  •      */
    •

  •     function XoopsFormElement(){
    •

  •         exit("This class cannot be instantiated!");
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Is this element a container of other elements?
    •

  •      *
    •

  •      * @return    bool false
    •

  •      */
    •

  •     function isContainer()
    •

  •     {
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * set the "name" attribute for the element
    •

  •      *
    •

  •      * @param    string  $name   "name" attribute for the element
    •

  •      */
    •

  •     function setName($name) {
    •

  •         $this->_name = trim($name);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get the "name" attribute for the element
    •

  •      *
    •

  •      * @param    bool    encode?
    •

  •      * @return    string  "name" attribute
    •

  •      */
    •

  •     function getName($encode=true) {
    •

  •         if (false != $encode) {
    •

  •             return str_replace("&amp;", "&", str_replace("'","&#039;",htmlspecialchars($this->_name)));
    •

  •         }
    •

  •         return $this->_name;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * set the "accesskey" attribute for the element
    •

  •      *
    •

  •      * @param    string  $key   "accesskey" attribute for the element
    •

  •      */
    •

  •     function setAccessKey($key) {
    •

  •         $this->_accesskey = trim($key);
    •

  •     }
    •

  •     /**
    •

  •      * get the "accesskey" attribute for the element
    •

  •      *
    •

  •      * @return     string  "accesskey" attribute value
    •

  •      */
    •

  •     function getAccessKey() {
    •

  •         return $this->_accesskey;
    •

  •     }
    •

  •     /**
    •

  •      * If the accesskey is found in the specified string, underlines it
    •

  •      *
    •

  •      * @param    string  $str   String where to search the accesskey occurence
    •

  •      * @return     string  Enhanced string with the 1st occurence of accesskey underlined
    •

  •      */
    •

  •     function getAccessString( $str ) {
    •

  •         $access = $this->getAccessKey();
    •

  •         if ( !empty($access) && ( false !== ($pos = strpos($str, $access)) ) ) {
    •

  •             return substr($str, 0, $pos) . '<span style="text-decoration:underline">' . substr($str, $pos, 1) . '</span>' . substr($str, $pos+1);
    •

  •         }
    •

  •         return $str;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * set the "class" attribute for the element
    •

  •      *
    •

  •      * @param    string  $key   "class" attribute for the element
    •

  •      */
    •

  •     function setClass($class) {
    •

  •         $class = trim($class);
    •

  •         if ( empty($class) ) {
    •

  •             $this->_class = '';
    •

  •         } else {
    •

  •             $this->_class .= (empty($this->_class) ? '' : ' ') . $class;
    •

  •         }
    •

  •     }
    •

  •     /**
    •

  •      * get the "class" attribute for the element
    •

  •      *
    •

  •      * @return     string  "class" attribute value
    •

  •      */
    •

  •     function getClass() {
    •

  •         return $this->_class;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * set the caption for the element
    •

  •      *
    •

  •      * @param    string  $caption
    •

  •      */
    •

  •     function setCaption($caption) {
    •

  •         $this->_caption = trim($caption);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get the caption for the element
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getCaption() {
    •

  •         return $this->_caption;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * set the element's description
    •

  •      *
    •

  •      * @param    string  $description
    •

  •      */
    •

  •     function setDescription($description) {
    •

  •         $this->_description = trim($description);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get the element's description
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getDescription() {
    •

  •         return $this->_description;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * flag the element as "hidden"
    •

  •      *
    •

  •      */
    •

  •     function setHidden() {
    •

  •         $this->_hidden = true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Find out if an element is "hidden".
    •

  •      *
    •

  •      * @return    bool
    •

  •      */
    •

  •     function isHidden() {
    •

  •         return $this->_hidden;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Find out if an element is required.
    •

  •      *
    •

  •      * @return    bool
    •

  •      */
    •

  •     function isRequired() {
    •

  •         return $this->_required;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add extra attributes to the element.
    •

  •      *
    •

  •      * This string will be inserted verbatim and unvalidated in the
    •

  •      * element's tag. Know what you are doing!
    •

  •      *
    •

  •      * @param    string  $extra
    •

  •      * @param   string  $replace If true, passed string will replace current content otherwise it will be appended to it
    •

  •      * @return    string New content of the extra string
    •

  •      */
    •

  •     function setExtra($extra, $replace = false){
    •

  •         if ( $replace) {
    •

  •             $this->_extra = " " . trim($extra);
    •

  •         } else {
    •

  •             $this->_extra .= " " . trim($extra);
    •

  •         }
    •

  •         return $this->_extra;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the extra attributes for the element
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getExtra(){
    •

  •         if (isset($this->_extra)) {
    •

  •             return $this->_extra;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Render custom javascript validation code
    •

  •      *
    •

  •      * @seealso XoopsForm::renderValidationJS
    •

  •     */
    •

  •     function renderValidationJS() {
    •

  •         // render custom validation code if any
    •

  •         if ( !empty( $this->customValidationCode ) ) {
    •

  •             return implode( "\n", $this->customValidationCode );
    •

  •         // generate validation code if required
    •

  •         } elseif ($this->isRequired()) {
    •

  •             $eltname    = $this->getName();
    •

  •             $eltcaption = trim( $this->getCaption() );
    •

  •             $eltmsg = empty($eltcaption) ? sprintf( _FORM_ENTER, $eltname ) : sprintf( _FORM_ENTER, $eltcaption );
    •

  •             $eltmsg = str_replace('"', '\"', stripslashes( $eltmsg ) );
    •

  •             return "if ( myform.{$eltname}.value == \"\" ) { window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }";
    •

  •         }
    •

  •         return '';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Generates output for the element.
    •

  •      *
    •

  •      * This method is abstract and must be overwritten by the child classes.
    •

  •      * @abstract
    •

  •      */
    •

  •     function render(){
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:02 +0200 by phpDocumentor 1.4.0a2


File Source for formelementtray.php

Source for file formelementtray.php

Documentation is available at formelementtray.php

  • <?php
    •

  • // $Id: formelementtray.php 982 2007-08-11 15:13:43Z phppp $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * A group of form elements
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  */
    •

  • class XoopsFormElementTray extends XoopsFormElement {
    •

  •
    •

  •     /**
    •

  •      * array of form element objects
    •

  •      * @var array
    •

  •      * @access  private
    •

  •      */
    •

  •     var $_elements = array();
    •

  •
    •

  •     /**
    •

  •      * required elements
    •

  •      * @var array
    •

  •      */
    •

  •     var $_required = array();
    •

  •
    •

  •     /**
    •

  •      * HTML to seperate the elements
    •

  •      * @var    string
    •

  •      * @access  private
    •

  •      */
    •

  •     var $_delimeter;
    •

  •
    •

  •     /**
    •

  •      * constructor
    •

  •      *
    •

  •      * @param    string  $caption    Caption for the group.
    •

  •      * @param    string  $delimiter  HTML to separate the elements
    •

  •      */
    •

  •     function XoopsFormElementTray($caption, $delimeter="&nbsp;", $name=""){
    •

  •         $this->setName($name);
    •

  •         $this->setCaption($caption);
    •

  •         $this->_delimeter = $delimeter;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Is this element a container of other elements?
    •

  •      *
    •

  •      * @return    bool true
    •

  •      */
    •

  •     function isContainer()
    •

  •     {
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Find out if there are required elements.
    •

  •      *
    •

  •      * @return    bool
    •

  •      */
    •

  •     function isRequired() {
    •

  •         return !empty($this->_required);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add an element to the group
    •

  •      *
    •

  •      * @param    object  &$element    {@link XoopsFormElement} to add
    •

  •      */
    •

  •     function addElement(&$formElement, $required = false){
    •

  •         $this->_elements[] =& $formElement;
    •

  •         if (!$formElement->isContainer()) {
    •

  •             if ($required) {
    •

  •                 $formElement->_required = true;
    •

  •                 $this->_required[] =& $formElement;
    •

  •             }
    •

  •         } else {
    •

  •             $required_elements =& $formElement->getRequired();
    •

  •             $count = count($required_elements);
    •

  •             for ($i = 0 ; $i < $count; $i++) {
    •

  •                 $this->_required[] =& $required_elements[$i];
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get an array of "required" form elements
    •

  •      *
    •

  •      * @return    array   array of {@link XoopsFormElement}s
    •

  •      */
    •

  •     function &getRequired()
    •

  •     {
    •

  •         return $this->_required;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get an array of the elements in this group
    •

  •      *
    •

  •      * @param    bool    $recurse    get elements recursively?
    •

  •      * @return  array   Array of {@link XoopsFormElement} objects.
    •

  •      */
    •

  •     function &getElements($recurse = false){
    •

  •         if (!$recurse) {
    •

  •             return $this->_elements;
    •

  •         } else {
    •

  •             $ret = array();
    •

  •             $count = count($this->_elements);
    •

  •             for ($i = 0; $i < $count; $i++) {
    •

  •                 if (!$this->_elements[$i]->isContainer()) {
    •

  •                     $ret[] =& $this->_elements[$i];
    •

  •                 } else {
    •

  •                     $elements =& $this->_elements[$i]->getElements(true);
    •

  •                     $count2 = count($elements);
    •

  •                     for ($j = 0; $j < $count2; $j++) {
    •

  •                         $ret[] =& $elements[$j];
    •

  •                     }
    •

  •                     unset($elements);
    •

  •                 }
    •

  •             }
    •

  •             return $ret;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the delimiter of this group
    •

  •      *
    •

  •      * @return    string  The delimiter
    •

  •      */
    •

  •     function getDelimeter(){
    •

  •         return $this->_delimeter;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * prepare HTML to output this group
    •

  •      *
    •

  •      * @return    string  HTML output
    •

  •      */
    •

  •     function render(){
    •

  •         $count = 0;
    •

  •         $ret = "";
    •

  •         foreach ( $this->getElements() as $ele ) {
    •

  •             if ($count > 0) {
    •

  •                 $ret .= $this->getDelimeter();
    •

  •             }
    •

  •             if ($ele->getCaption() != '') {
    •

  •                 $ret .= $ele->getCaption()."&nbsp;";
    •

  •             }
    •

  •             $ret .= $ele->render()."\n";
    •

  •             if (!$ele->isHidden()) {
    •

  •                 $count++;
    •

  •             }
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:04 +0200 by phpDocumentor 1.4.0a2


File Source for formfile.php

Source for file formfile.php

Documentation is available at formfile.php

  • <?php
    •

  • // $Id: formfile.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * A file upload field
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package        kernel
    •

  •  * @subpackage    form
    •

  •  */
    •

  • class XoopsFormFile extends XoopsFormElement {
    •

  •
    •

  •     /**
    •

  •      * Maximum size for an uploaded file
    •

  •      * @var    int
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_maxFileSize;
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption        Caption
    •

  •      * @param    string    $name            "name" attribute
    •

  •      * @param    int        $maxfilesize    Maximum size for an uploaded file
    •

  •      */
    •

  •     function XoopsFormFile($caption, $name, $maxfilesize){
    •

  •         $this->setCaption($caption);
    •

  •         $this->setName($name);
    •

  •         $this->_maxFileSize = intval($maxfilesize);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the maximum filesize
    •

  •      *
    •

  •      * @return    int
    •

  •      */
    •

  •     function getMaxFileSize(){
    •

  •         return $this->_maxFileSize;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * prepare HTML for output
    •

  •      *
    •

  •      * @return    string    HTML
    •

  •      */
    •

  •     function render(){
    •

  •         return "<input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."' /><input type='file' name='".$this->getName()."' id='".$this->getName()."'".$this->getExtra()." /><input type='hidden' name='xoops_upload_file[]' id='xoops_upload_file[]' value='".$this->getName()."' />";
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:05 +0200 by phpDocumentor 1.4.0a2


File Source for formhidden.php

Source for file formhidden.php

Documentation is available at formhidden.php

  • <?php
    •

  • // $Id: formhidden.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * A hidden field
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsFormHidden extends XoopsFormElement {
    •

  •
    •

  •     /**
    •

  •      * Value
    •

  •      * @var    string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_value;
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $name    "name" attribute
    •

  •      * @param    string    $value    "value" attribute
    •

  •      */
    •

  •     function XoopsFormHidden($name, $value){
    •

  •         $this->setName($name);
    •

  •         $this->setHidden();
    •

  •         $this->setValue($value);
    •

  •         $this->setCaption("");
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the "value" attribute
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getValue(){
    •

  •         return $this->_value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sets the "value" attribute
    •

  •      *
    •

  •      * @patam  $value    string
    •

  •      */
    •

  •     function setValue($value){
    •

  •         $this->_value = $value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Prepare HTML for output
    •

  •      *
    •

  •      * @return    string    HTML
    •

  •      */
    •

  •     function render(){
    •

  •         return "<input type='hidden' name='".$this->getName()."' id='".$this->getName()."' value='".$this->getValue()."' />";
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:05 +0200 by phpDocumentor 1.4.0a2


File Source for formlabel.php

Source for file formlabel.php

Documentation is available at formlabel.php

  • <?php
    •

  • // $Id: formlabel.php 855 2007-07-04 14:18:51Z malanciault $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * A text label
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsFormLabel extends XoopsFormElement {
    •

  •
    •

  •     /**
    •

  •      * Text
    •

  •      * @var    string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_value;
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption    Caption
    •

  •      * @param    string    $value        Text
    •

  •      */
    •

  •     function XoopsFormLabel($caption="", $value="", $name=""){
    •

  •         $this->setCaption($caption);
    •

  •         $this->setName($name);
    •

  •         $this->_value = $value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the text
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getValue(){
    •

  •         return $this->_value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Prepare HTML for output
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function render(){
    •

  •         return $this->getValue();
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:07 +0200 by phpDocumentor 1.4.0a2


File Source for formpassword.php

Source for file formpassword.php

Documentation is available at formpassword.php

  • <?php
    •

  • // $Id: formpassword.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * A password field
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  */
    •

  • class XoopsFormPassword extends XoopsFormElement {
    •

  •
    •

  •     /**
    •

  •      * Size of the field.
    •

  •      * @var    int
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_size;
    •

  •
    •

  •     /**
    •

  •      * Maximum length of the text
    •

  •      * @var    int
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_maxlength;
    •

  •
    •

  •     /**
    •

  •      * Initial content of the field.
    •

  •      * @var    string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_value;
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption    Caption
    •

  •      * @param    string    $name        "name" attribute
    •

  •      * @param    int        $size        Size of the field
    •

  •      * @param    int        $maxlength    Maximum length of the text
    •

  •      * @param    int        $value        Initial value of the field.
    •

  •      *                                  <b>Warning:</b> this is readable in cleartext in the page's source!
    •

  •      */
    •

  •     function XoopsFormPassword($caption, $name, $size, $maxlength, $value=""){
    •

  •         $this->setCaption($caption);
    •

  •         $this->setName($name);
    •

  •         $this->_size = intval($size);
    •

  •         $this->_maxlength = intval($maxlength);
    •

  •         $this->setValue($value);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the field size
    •

  •      *
    •

  •      * @return    int
    •

  •      */
    •

  •     function getSize(){
    •

  •         return $this->_size;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the max length
    •

  •      *
    •

  •      * @return    int
    •

  •      */
    •

  •     function getMaxlength(){
    •

  •         return $this->_maxlength;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the initial value
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getValue(){
    •

  •         return $this->_value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Set the initial value
    •

  •      *
    •

  •      * @patam    $value    string
    •

  •      */
    •

  •     function setValue($value){
    •

  •         $this->_value = $value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Prepare HTML for output
    •

  •      *
    •

  •      * @return    string    HTML
    •

  •      */
    •

  •     function render(){
    •

  •         return "<input type='password' name='".$this->getName()."' id='".$this->getName()."' size='".$this->getSize()."' maxlength='".$this->getMaxlength()."' value='".$this->getValue()."'".$this->getExtra()." />";
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:08 +0200 by phpDocumentor 1.4.0a2


File Source for formradio.php

Source for file formradio.php

Documentation is available at formradio.php

  • <?php
    •

  • // $Id: formradio.php 966 2007-08-10 12:27:43Z phppp $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * A Group of radiobuttons
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package        kernel
    •

  •  * @subpackage    form
    •

  •  */
    •

  • class XoopsFormRadio extends XoopsFormElement {
    •

  •
    •

  •     /**
    •

  •      * Array of Options
    •

  •      * @var    array
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_options = array();
    •

  •
    •

  •     /**
    •

  •      * Pre-selected value
    •

  •      * @var    string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_value;
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption    Caption
    •

  •      * @param    string    $name        "name" attribute
    •

  •      * @param    string    $value        Pre-selected value
    •

  •      */
    •

  •     function XoopsFormRadio($caption, $name, $value = null, $delimeter = ""){
    •

  •         $this->setCaption($caption);
    •

  •         $this->setName($name);
    •

  •         if (isset($value)) {
    •

  •             $this->setValue($value);
    •

  •         }
    •

  •         $this->delimeter = $delimeter;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the pre-selected value
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getValue(){
    •

  •         return $this->_value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Set the pre-selected value
    •

  •      *
    •

  •      * @param    $value    string
    •

  •      */
    •

  •     function setValue($value){
    •

  •         $this->_value = $value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add an option
    •

  •      *
    •

  •      * @param    string    $value    "value" attribute - This gets submitted as form-data.
    •

  •      * @param    string    $name    "name" attribute - This is displayed. If empty, we use the "value" instead.
    •

  •      */
    •

  •     function addOption($value, $name=""){
    •

  •         if ( $name != "" ) {
    •

  •             $this->_options[$value] = $name;
    •

  •         } else {
    •

  •             $this->_options[$value] = $value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Adds multiple options
    •

  •      *
    •

  •      * @param    array    $options    Associative array of value->name pairs.
    •

  •      */
    •

  •     function addOptionArray($options){
    •

  •         if ( is_array($options) ) {
    •

  •             foreach ( $options as $k=>$v ) {
    •

  •                 $this->addOption($k, $v);
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Gets the options
    •

  •      *
    •

  •      * @return    array    Associative array of value->name pairs.
    •

  •      */
    •

  •     function getOptions(){
    •

  •         return $this->_options;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Prepare HTML for output
    •

  •      *
    •

  •      * @return    string    HTML
    •

  •      */
    •

  •     function render(){
    •

  •         $ret = "";
    •

  •         foreach ( $this->getOptions() as $value => $name ) {
    •

  •             $ret .= "<input type='radio' name='".$this->getName()."' value='".$value."'";
    •

  •             $selected = $this->getValue();
    •

  •             if ( isset($selected) && ($value == $selected) ) {
    •

  •                 $ret .= " checked='checked'";
    •

  •             }
    •

  •             $ret .= $this->getExtra()." />".$name.$this->delimeter."\n";
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:09 +0200 by phpDocumentor 1.4.0a2


File Source for formradioyn.php

Source for file formradioyn.php

Documentation is available at formradioyn.php

  • <?php
    •

  • // $Id: formradioyn.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * base class
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formradio.php";
    •

  •
    •

  • /**
    •

  •  * Yes/No radio buttons.
    •

  •  *
    •

  •  * A pair of radio buttons labelled _YES and _NO with values 1 and 0
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsFormRadioYN extends XoopsFormRadio
    •

  • {
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption
    •

  •      * @param    string    $name
    •

  •      * @param    string    $value        Pre-selected value, can be "0" (No) or "1" (Yes)
    •

  •      * @param    string    $yes        String for "Yes"
    •

  •      * @param    string    $no            String for "No"
    •

  •      */
    •

  •     function XoopsFormRadioYN($caption, $name, $value=null, $yes=_YES, $no=_NO)
    •

  •     {
    •

  •         $this->XoopsFormRadio($caption, $name, $value);
    •

  •         $this->addOption(1, $yes);
    •

  •         $this->addOption(0, $no);
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:10 +0200 by phpDocumentor 1.4.0a2


File Source for formselect.php

Source for file formselect.php

Documentation is available at formselect.php

  • <?php
    •

  • // $Id: formselect.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * A select field
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsFormSelect extends XoopsFormElement {
    •

  •
    •

  •     /**
    •

  •      * Options
    •

  •      * @var array
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_options = array();
    •

  •
    •

  •     /**
    •

  •      * Allow multiple selections?
    •

  •      * @var    bool
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_multiple = false;
    •

  •
    •

  •     /**
    •

  •      * Number of rows. "1" makes a dropdown list.
    •

  •      * @var    int
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_size;
    •

  •
    •

  •     /**
    •

  •      * Pre-selcted values
    •

  •      * @var    array
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_value = array();
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption    Caption
    •

  •      * @param    string    $name       "name" attribute
    •

  •      * @param    mixed    $value        Pre-selected value (or array of them).
    •

  •      * @param    int        $size        Number or rows. "1" makes a drop-down-list
    •

  •      * @param    bool    $multiple   Allow multiple selections?
    •

  •      */
    •

  •     function XoopsFormSelect($caption, $name, $value=null, $size=1, $multiple=false){
    •

  •         $this->setCaption($caption);
    •

  •         $this->setName($name);
    •

  •         $this->_multiple = $multiple;
    •

  •         $this->_size = intval($size);
    •

  •         if (isset($value)) {
    •

  •             $this->setValue($value);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Are multiple selections allowed?
    •

  •      *
    •

  •      * @return    bool
    •

  •      */
    •

  •     function isMultiple(){
    •

  •         return $this->_multiple;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the size
    •

  •      *
    •

  •      * @return    int
    •

  •      */
    •

  •     function getSize(){
    •

  •         return $this->_size;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get an array of pre-selected values
    •

  •      *
    •

  •      * @return    array
    •

  •      */
    •

  •     function getValue(){
    •

  •         return $this->_value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Set pre-selected values
    •

  •      *
    •

  •      * @param    $value    mixed
    •

  •      */
    •

  •     function setValue($value){
    •

  •         if (is_array($value)) {
    •

  •             foreach ($value as $v) {
    •

  •                 $this->_value[] = $v;
    •

  •             }
    •

  •         } else {
    •

  •             $this->_value[] = $value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add an option
    •

  •      *
    •

  •      * @param    string  $value  "value" attribute
    •

  •      * @param    string  $name   "name" attribute
    •

  •      */
    •

  •     function addOption($value, $name=""){
    •

  •         if ( $name != "" ) {
    •

  •             $this->_options[$value] = $name;
    •

  •         } else {
    •

  •             $this->_options[$value] = $value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add multiple options
    •

  •      *
    •

  •      * @param    array   $options    Associative array of value->name pairs
    •

  •      */
    •

  •     function addOptionArray($options){
    •

  •         if ( is_array($options) ) {
    •

  •             foreach ( $options as $k=>$v ) {
    •

  •                 $this->addOption($k, $v);
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get all options
    •

  •      *
    •

  •      * @return    array   Associative array of value->name pairs
    •

  •      */
    •

  •     function getOptions(){
    •

  •         return $this->_options;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Prepare HTML for output
    •

  •      *
    •

  •      * @return    string  HTML
    •

  •      */
    •

  •     function render(){
    •

  •         $ret = "<select  size='".$this->getSize()."'".$this->getExtra()."";
    •

  •         if ($this->isMultiple() != false) {
    •

  •             $ret .= " name='".$this->getName()."[]' id='".$this->getName()."[]' multiple='multiple'>\n";
    •

  •         } else {
    •

  •             $ret .= " name='".$this->getName()."' id='".$this->getName()."'>\n";
    •

  •         }
    •

  •         foreach ( $this->getOptions() as $value => $name ) {
    •

  •             $ret .= "<option value='".htmlspecialchars($value, ENT_QUOTES)."'";
    •

  •             if (count($this->getValue()) > 0 && in_array($value, $this->getValue())) {
    •

  •                     $ret .= " selected='selected'";
    •

  •             }
    •

  •             $ret .= ">".$name."</option>\n";
    •

  •         }
    •

  •         $ret .= "</select>";
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:11 +0200 by phpDocumentor 1.4.0a2


File Source for formselectcountry.php

Source for file formselectcountry.php

Documentation is available at formselectcountry.php

  • <?php
    •

  • // $Id: formselectcountry.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * lists of values
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
    •

  •
    •

  • /**
    •

  •  * Parent
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
    •

  •
    •

  • /**
    •

  •  * A select field with countries
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsFormSelectCountry extends XoopsFormSelect
    •

  • {
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption    Caption
    •

  •      * @param    string    $name       "name" attribute
    •

  •      * @param    mixed    $value        Pre-selected value (or array of them).
    •

  •      *                               Legal are all 2-letter country codes (in capitals).
    •

  •      * @param    int        $size        Number or rows. "1" makes a drop-down-list
    •

  •      */
    •

  •     function XoopsFormSelectCountry($caption, $name, $value=null, $size=1)
    •

  •     {
    •

  •         $this->XoopsFormSelect($caption, $name, $value, $size);
    •

  •         $this->addOptionArray(XoopsLists::getCountryList());
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:12 +0200 by phpDocumentor 1.4.0a2


File Source for formselectgroup.php

Source for file formselectgroup.php

Documentation is available at formselectgroup.php

  • <?php
    •

  • // $Id: formselectgroup.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Parent
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
    •

  •
    •

  • /**
    •

  •  * A select field with a choice of available groups
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsFormSelectGroup extends XoopsFormSelect
    •

  • {
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption
    •

  •      * @param    string    $name
    •

  •      * @param    bool    $include_anon    Include group "anonymous"?
    •

  •      * @param    mixed    $value            Pre-selected value (or array of them).
    •

  •      * @param    int        $size            Number or rows. "1" makes a drop-down-list.
    •

  •      * @param    bool    $multiple       Allow multiple selections?
    •

  •      */
    •

  •     function XoopsFormSelectGroup($caption, $name, $include_anon=false, $value=null, $size=1, $multiple=false)
    •

  •     {
    •

  •         $this->XoopsFormSelect($caption, $name, $value, $size, $multiple);
    •

  •         $member_handler =& xoops_gethandler('member');
    •

  •         if (!$include_anon) {
    •

  •             $this->addOptionArray($member_handler->getGroupList(new Criteria('groupid', XOOPS_GROUP_ANONYMOUS, '!=')));
    •

  •         } else {
    •

  •             $this->addOptionArray($member_handler->getGroupList());
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:13 +0200 by phpDocumentor 1.4.0a2


File Source for formselectlang.php

Source for file formselectlang.php

Documentation is available at formselectlang.php

  • <?php
    •

  • // $Id: formselectlang.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * lists of values
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
    •

  • /**
    •

  •  * parent class
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
    •

  •
    •

  • /**
    •

  •  * A select field with available languages
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsFormSelectLang extends XoopsFormSelect
    •

  • {
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption
    •

  •      * @param    string    $name
    •

  •      * @param    mixed    $value    Pre-selected value (or array of them).
    •

  •      *                              Legal is any name of a XOOPS_ROOT_PATH."/language/" subdirectory.
    •

  •      * @param    int        $size    Number of rows. "1" makes a drop-down-list.
    •

  •      */
    •

  •     function XoopsFormSelectLang($caption, $name, $value=null, $size=1)
    •

  •     {
    •

  •         $this->XoopsFormSelect($caption, $name, $value, $size);
    •

  •         $this->addOptionArray(XoopsLists::getLangList());
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:14 +0200 by phpDocumentor 1.4.0a2


File Source for formselectmatchoption.php

Source for file formselectmatchoption.php

Documentation is available at formselectmatchoption.php

  • <?php
    •

  • // $Id: formselectmatchoption.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * base class
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
    •

  •
    •

  • /**
    •

  •  * A selection box with options for matching search terms.
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsFormSelectMatchOption extends XoopsFormSelect
    •

  • {
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption
    •

  •      * @param    string    $name
    •

  •      * @param    mixed    $value    Pre-selected value (or array of them).
    •

  •      *                              Legal values are {@link XOOPS_MATCH_START}, {@link XOOPS_MATCH_END},
    •

  •      *                              {@link XOOPS_MATCH_EQUAL}, and {@link XOOPS_MATCH_CONTAIN}
    •

  •      * @param    int        $size    Number of rows. "1" makes a drop-down-list
    •

  •      */
    •

  •     function XoopsFormSelectMatchOption($caption, $name, $value=null, $size=1)
    •

  •     {
    •

  •         $this->XoopsFormSelect($caption, $name, $value, $size, false);
    •

  •         $this->addOption(XOOPS_MATCH_START, _STARTSWITH);
    •

  •         $this->addOption(XOOPS_MATCH_END, _ENDSWITH);
    •

  •         $this->addOption(XOOPS_MATCH_EQUAL, _MATCHES);
    •

  •         $this->addOption(XOOPS_MATCH_CONTAIN, _CONTAINS);
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:15 +0200 by phpDocumentor 1.4.0a2


File Source for formselecttheme.php

Source for file formselecttheme.php

Documentation is available at formselecttheme.php

  • <?php
    •

  • // $Id: formselecttheme.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * lists of values
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
    •

  • /**
    •

  •  * base class
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
    •

  •
    •

  • /**
    •

  •  * A select box with available themes
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsFormSelectTheme extends XoopsFormSelect
    •

  • {
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption
    •

  •      * @param    string    $name
    •

  •      * @param    mixed    $value    Pre-selected value (or array of them).
    •

  •      * @param    int        $size    Number or rows. "1" makes a drop-down-list
    •

  •      */
    •

  •     function XoopsFormSelectTheme($caption, $name, $value=null, $size=1)
    •

  •     {
    •

  •         $this->XoopsFormSelect($caption, $name, $value, $size);
    •

  •         $this->addOptionArray(XoopsLists::getThemesList());
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:16 +0200 by phpDocumentor 1.4.0a2


File Source for formselecttimezone.php

Source for file formselecttimezone.php

Documentation is available at formselecttimezone.php

  • <?php
    •

  • // $Id: formselecttimezone.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * lists of values
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
    •

  • /**
    •

  •  * base class
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
    •

  •
    •

  • /**
    •

  •  * A select box with timezones
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsFormSelectTimezone extends XoopsFormSelect
    •

  • {
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption
    •

  •      * @param    string    $name
    •

  •      * @param    mixed    $value    Pre-selected value (or array of them).
    •

  •      *                              Legal values are "-12" to "12" with some ".5"s strewn in ;-)
    •

  •      * @param    int        $size    Number of rows. "1" makes a drop-down-box.
    •

  •      */
    •

  •     function XoopsFormSelectTimezone($caption, $name, $value=null, $size=1)
    •

  •     {
    •

  •         $this->XoopsFormSelect($caption, $name, $value, $size);
    •

  •         $this->addOptionArray(XoopsLists::getTimeZoneList());
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:17 +0200 by phpDocumentor 1.4.0a2


File Source for formtext.php

Source for file formtext.php

Documentation is available at formtext.php

  • <?php
    •

  • // $Id: formtext.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * A simple text field
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • class XoopsFormText extends XoopsFormElement {
    •

  •
    •

  •     /**
    •

  •      * Size
    •

  •      * @var    int
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_size;
    •

  •
    •

  •     /**
    •

  •      * Maximum length of the text
    •

  •      * @var    int
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_maxlength;
    •

  •
    •

  •     /**
    •

  •      * Initial text
    •

  •      * @var    string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $_value;
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption    Caption
    •

  •      * @param    string    $name       "name" attribute
    •

  •      * @param    int        $size        Size
    •

  •      * @param    int        $maxlength    Maximum length of text
    •

  •      * @param    string  $value      Initial text
    •

  •      */
    •

  •     function XoopsFormText($caption, $name, $size, $maxlength, $value=""){
    •

  •         $this->setCaption($caption);
    •

  •         $this->setName($name);
    •

  •         $this->_size = intval($size);
    •

  •         $this->_maxlength = intval($maxlength);
    •

  •         $this->setValue($value);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get size
    •

  •      *
    •

  •      * @return    int
    •

  •      */
    •

  •     function getSize(){
    •

  •         return $this->_size;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get maximum text length
    •

  •      *
    •

  •      * @return    int
    •

  •      */
    •

  •     function getMaxlength(){
    •

  •         return $this->_maxlength;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get initial text value
    •

  •      *
    •

  •      * @return  string
    •

  •      */
    •

  •     function getValue(){
    •

  •         return $this->_value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Set initial text value
    •

  •      *
    •

  •      * @param    $value  string
    •

  •      */
    •

  •     function setValue($value){
    •

  •         $this->_value = $value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Prepare HTML for output
    •

  •      *
    •

  •      * @return    string  HTML
    •

  •      */
    •

  •     function render(){
    •

  •         return "<input type='text' name='".$this->getName()."' id='".$this->getName()."' size='".$this->getSize()."' maxlength='".$this->getMaxlength()."' value='".$this->getValue()."'".$this->getExtra()." />";
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:20 +0200 by phpDocumentor 1.4.0a2


File Source for formtextarea.php

Source for file formtextarea.php

Documentation is available at formtextarea.php

  • <?php
    •

  • // $Id: formtextarea.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * A textarea
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  */
    •

  • class XoopsFormTextArea extends XoopsFormElement {
    •

  •     /**
    •

  •      * number of columns
    •

  •      * @var    int
    •

  •      * @access  private
    •

  •      */
    •

  •     var $_cols;
    •

  •
    •

  •     /**
    •

  •      * number of rows
    •

  •      * @var    int
    •

  •      * @access  private
    •

  •      */
    •

  •     var $_rows;
    •

  •
    •

  •     /**
    •

  •      * initial content
    •

  •      * @var    string
    •

  •      * @access  private
    •

  •      */
    •

  •     var $_value;
    •

  •
    •

  •     /**
    •

  •      * Constuctor
    •

  •      *
    •

  •      * @param    string  $caption    caption
    •

  •      * @param    string  $name       name
    •

  •      * @param    string  $value      initial content
    •

  •      * @param    int     $rows       number of rows
    •

  •      * @param    int     $cols       number of columns
    •

  •      */
    •

  •     function XoopsFormTextArea($caption, $name, $value="", $rows=5, $cols=50){
    •

  •         $this->setCaption($caption);
    •

  •         $this->setName($name);
    •

  •         $this->_rows = intval($rows);
    •

  •         $this->_cols = intval($cols);
    •

  •         $this->setValue($value);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get number of rows
    •

  •      *
    •

  •      * @return    int
    •

  •      */
    •

  •     function getRows(){
    •

  •         return $this->_rows;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get number of columns
    •

  •      *
    •

  •      * @return    int
    •

  •      */
    •

  •     function getCols(){
    •

  •         return $this->_cols;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get initial content
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function getValue(){
    •

  •         return $this->_value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Set initial content
    •

  •      *
    •

  •      * @param    $value    string
    •

  •      */
    •

  •     function setValue($value){
    •

  •         $this->_value = $value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * prepare HTML for output
    •

  •      *
    •

  •      * @return    sting HTML
    •

  •      */
    •

  •     function render(){
    •

  •         return "<textarea name='".$this->getName()."' id='".$this->getName()."' rows='".$this->getRows()."' cols='".$this->getCols()."'".$this->getExtra().">".$this->getValue()."</textarea>";
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:21 +0200 by phpDocumentor 1.4.0a2


File Source for formtextdateselect.php

Source for file formtextdateselect.php

Documentation is available at formtextdateselect.php

  • <?php
    •

  • // $Id: formtextdateselect.php 506 2006-05-26 23:10:37Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * A text field with calendar popup
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • class XoopsFormTextDateSelect extends XoopsFormText
    •

  • {
    •

  •
    •

  •     function XoopsFormTextDateSelect($caption, $name, $size = 15, $value= 0)
    •

  •     {
    •

  •         $value = !is_numeric($value) ? time() : intval($value);
    •

  •         $this->XoopsFormText($caption, $name, $size, 25, $value);
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •         $jstime = formatTimestamp( $this->getValue(), 'F j Y, H:i:s' );
    •

  •         include_once XOOPS_ROOT_PATH.'/include/calendarjs.php';
    •

  •         return "<input type='text' name='".$this->getName()."' id='".$this->getName()."' size='".$this->getSize()."' maxlength='".$this->getMaxlength()."' value='".date("Y-m-d", $this->getValue())."'".$this->getExtra()." /><input type='reset' value=' ... ' onclick='return showCalendar(\"".$this->getName()."\");'>";
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:22 +0200 by phpDocumentor 1.4.0a2


File Source for grouppermform.php

Source for file grouppermform.php

Documentation is available at grouppermform.php

  • <?php
    •

  • // $Id: grouppermform.php 981 2007-08-11 14:07:17Z phppp $
    •

  • // ------------------------------------------------------------------------ //
    •

  • // XOOPS - PHP Content Management System                      //
    •

  • // Copyright (c) 2000-2003 XOOPS.org                           //
    •

  • // <http://www.xoops.org/>                             //
    •

  • // ------------------------------------------------------------------------ //
    •

  • // 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.                                      //
    •

  • // //
    •

  • // You may not change or alter any portion of this comment or credits       //
    •

  • // of supporting developers from this source code or any supporting         //
    •

  • // source code which is considered copyrighted (c) material of the          //
    •

  • // original comment or credit authors.                                      //
    •

  • // //
    •

  • // 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 //
    •

  • // ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelement.php';
    •

  • require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhidden.php';
    •

  • require_once XOOPS_ROOT_PATH . '/class/xoopsform/formbutton.php';
    •

  • require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelementtray.php';
    •

  • require_once XOOPS_ROOT_PATH . '/class/xoopsform/form.php';
    •

  •
    •

  • /**
    •

  •  * Renders a form for setting module specific group permissions
    •

  •  *
    •

  •  * @author Kazumi Ono <onokazu@myweb.ne.jp>
    •

  •  * @copyright copyright (c) 2000-2003 XOOPS.org
    •

  •  * @package kernel
    •

  •  * @subpackage form
    •

  •  */
    •

  • class XoopsGroupPermForm extends XoopsForm
    •

  • {
    •

  •     /**
    •

  •      * Module ID
    •

  •      *
    •

  •      * @var int
    •

  •      */
    •

  •     var $_modid;
    •

  •     /**
    •

  •      * Tree structure of items
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $_itemTree;
    •

  •     /**
    •

  •      * Name of permission
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $_permName;
    •

  •     /**
    •

  •      * Description of permission
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $_permDesc;
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      */
    •

  •     function XoopsGroupPermForm($title, $modid, $permname, $permdesc, $url = "")
    •

  •     {
    •

  •         $this->XoopsForm($title, 'groupperm_form', XOOPS_URL . '/modules/system/admin/groupperm.php', 'post');
    •

  •         $this->_modid = intval($modid);
    •

  •         $this->_permName = $permname;
    •

  •         $this->_permDesc = $permdesc;
    •

  •         $this->addElement(new XoopsFormHidden('modid', $this->_modid));
    •

  •         if ($url != "") {
    •

  •             $this->addElement(new XoopsFormHidden('redirect_url', $url));
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Adds an item to which permission will be assigned
    •

  •      *
    •

  •      * @param string $itemName
    •

  •      * @param int $itemId
    •

  •      * @param int $itemParent
    •

  •      * @access public
    •

  •      */
    •

  •     function addItem($itemId, $itemName, $itemParent = 0)
    •

  •     {
    •

  •         $this->_itemTree[$itemParent]['children'][] = $itemId;
    •

  •         $this->_itemTree[$itemId]['parent'] = $itemParent;
    •

  •         $this->_itemTree[$itemId]['name'] = $itemName;
    •

  •         $this->_itemTree[$itemId]['id'] = $itemId;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Loads all child ids for an item to be used in javascript
    •

  •      *
    •

  •      * @param int $itemId
    •

  •      * @param array $childIds
    •

  •      * @access private
    •

  •      */
    •

  •     function _loadAllChildItemIds($itemId, &$childIds)
    •

  •     {
    •

  •         if (!empty($this->_itemTree[$itemId]['children'])) {
    •

  •             $first_child = $this->_itemTree[$itemId]['children'];
    •

  •             foreach ($first_child as $fcid) {
    •

  •                 array_push($childIds, $fcid);
    •

  •                 if (!empty($this->_itemTree[$fcid]['children'])) {
    •

  •                     foreach ($this->_itemTree[$fcid]['children'] as $_fcid) {
    •

  •                         array_push($childIds, $_fcid);
    •

  •                         $this->_loadAllChildItemIds($_fcid, $childIds);
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Renders the form
    •

  •      *
    •

  •      * @return string
    •

  •      * @access public
    •

  •      */
    •

  •     function render()
    •

  •     {
    •

  •         // load all child ids for javascript codes
    •

  •         foreach (array_keys($this->_itemTree)as $item_id) {
    •

  •             $this->_itemTree[$item_id]['allchild'] = array();
    •

  •             $this->_loadAllChildItemIds($item_id, $this->_itemTree[$item_id]['allchild']);
    •

  •         }
    •

  •         $gperm_handler =& xoops_gethandler('groupperm');
    •

  •         $member_handler =& xoops_gethandler('member');
    •

  •         $glist =& $member_handler->getGroupList();
    •

  •         foreach (array_keys($glist) as $i) {
    •

  •             // get selected item id(s) for each group
    •

  •             $selected = $gperm_handler->getItemIds($this->_permName, $i, $this->_modid);
    •

  •             $ele = new XoopsGroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected);
    •

  •             $ele->setOptionTree($this->_itemTree);
    •

  •             $this->addElement($ele);
    •

  •             unset($ele);
    •

  •         }
    •

  •         $tray = new XoopsFormElementTray('');
    •

  •         $tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
    •

  •         $tray->addElement(new XoopsFormButton('', 'reset', _CANCEL, 'reset'));
    •

  •         $this->addElement($tray);
    •

  •         $ret = '<h4>' . $this->getTitle() . '</h4>' . $this->_permDesc . '<br />';
    •

  •         $ret .= "<form name='" . $this->getName() . "' id='" . $this->getName() . "' action='" . $this->getAction() . "' method='" . $this->getMethod() . "'" . $this->getExtra() . ">\n<table width='100%' class='outer' cellspacing='1' valign='top'>\n";
    •

  •         $elements = $this->getElements();
    •

  •         $hidden = '';
    •

  •         foreach (array_keys($elements) as $i) {
    •

  •             if (!is_object($elements[$i])) {
    •

  •                 $ret .= $elements[$i];
    •

  •             } elseif (!$elements[$i]->isHidden()) {
    •

  •                 $ret .= "<tr valign='top' align='left'><td class='head'>" . $elements[$i]->getCaption();
    •

  •                 if ($elements[$i]->getDescription() != '') {
    •

  •                     $ret .= '<br /><br /><span style="font-weight: normal;">' . $elements[$i]->getDescription() . '</span>';
    •

  •                 }
    •

  •                 $ret .= "</td>\n<td class='even'>\n" . $elements[$i]->render() . "\n</td></tr>\n";
    •

  •             } else {
    •

  •                 $hidden .= $elements[$i]->render();
    •

  •             }
    •

  •         }
    •

  •         $ret .= "</table>$hidden</form>";
    •

  •         $ret .= $this->renderValidationJS( true );
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  •
    •

  • /**
    •

  •  * Renders checkbox options for a group permission form
    •

  •  *
    •

  •  * @author Kazumi Ono <onokazu@myweb.ne.jp>
    •

  •  * @copyright copyright (c) 2000-2003 XOOPS.org
    •

  •  * @package kernel
    •

  •  * @subpackage form
    •

  •  */
    •

  • class XoopsGroupFormCheckBox extends XoopsFormElement
    •

  • {
    •

  •     /**
    •

  •      * Pre-selected value(s)
    •

  •      *
    •

  •      * @var array;
    •

  •      */
    •

  •     var $_value = array();
    •

  •     /**
    •

  •      * Group ID
    •

  •      *
    •

  •      * @var int
    •

  •      */
    •

  •     var $_groupId;
    •

  •     /**
    •

  •      * Option tree
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $_optionTree;
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      */
    •

  •     function XoopsGroupFormCheckBox($caption, $name, $groupId, $values = null)
    •

  •     {
    •

  •         $this->setCaption($caption);
    •

  •         $this->setName($name);
    •

  •         if (isset($values)) {
    •

  •             $this->setValue($values);
    •

  •         }
    •

  •         $this->_groupId = $groupId;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sets pre-selected values
    •

  •      *
    •

  •      * @param mixed $value A group ID or an array of group IDs
    •

  •      * @access public
    •

  •      */
    •

  •     function setValue($value)
    •

  •     {
    •

  •         if (is_array($value)) {
    •

  •             foreach ($value as $v) {
    •

  •                 $this->setValue($v);
    •

  •             }
    •

  •         } else {
    •

  •             $this->_value[] = $value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sets the tree structure of items
    •

  •      *
    •

  •      * @param array $optionTree
    •

  •      * @access public
    •

  •      */
    •

  •     function setOptionTree(&$optionTree)
    •

  •     {
    •

  •         $this->_optionTree =& $optionTree;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Renders checkbox options for this group
    •

  •      *
    •

  •      * @return string
    •

  •      * @access public
    •

  •      */
    •

  •     function render()
    •

  •     {
    •

  •         $ret = '<table class="outer"><tr><td class="odd"><table><tr>';
    •

  •         $cols = 1;
    •

  •         foreach ($this->_optionTree[0]['children'] as $topitem) {
    •

  •             if ($cols > 4) {
    •

  •                 $ret .= '</tr><tr>';
    •

  •                 $cols = 1;
    •

  •             }
    •

  •             $tree = '<td valign="top">';
    •

  •             $prefix = '';
    •

  •             $this->_renderOptionTree($tree, $this->_optionTree[$topitem], $prefix);
    •

  •             $ret .= $tree.'</td>';
    •

  •             $cols++;
    •

  •         }
    •

  •         $ret .= '</tr></table></td><td class="even" valign="top">';
    •

  •         foreach (array_keys($this->_optionTree) as $id) {
    •

  •             if (!empty($id)) {
    •

  •                 $option_ids[] = "'".$this->getName().'[groups]['.$this->_groupId.']['.$id.']'."'";
    •

  •             }
    •

  •         }
    •

  •         $checkallbtn_id = $this->getName().'[checkallbtn]['.$this->_groupId.']';
    •

  •         $option_ids_str = implode(', ', $option_ids);
    •

  •         $ret .= _ALL." <input id=\"".$checkallbtn_id."\" type=\"checkbox\" value=\"\" onclick=\"var optionids = new Array(".$option_ids_str."); xoopsCheckAllElements(optionids, '".$checkallbtn_id."');\" />";
    •

  •         $ret .= '</td></tr></table>';
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Renders checkbox options for an item tree
    •

  •      *
    •

  •      * @param string $tree
    •

  •      * @param array $option
    •

  •      * @param string $prefix
    •

  •      * @param array $parentIds
    •

  •      * @access private
    •

  •      */
    •

  •     function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
    •

  •     {
    •

  •         $tree .= $prefix . "<input type=\"checkbox\" name=\"" . $this->getName() . "[groups][" . $this->_groupId . "][" . $option['id'] . "]\" id=\"" . $this->getName() . "[groups][" . $this->_groupId . "][" . $option['id'] . "]\" onclick=\"";
    •

  •         // If there are parent elements, add javascript that will
    •

  •         // make them selecteded when this element is checked to make
    •

  •         // sure permissions to parent items are added as well.
    •

  •         foreach ($parentIds as $pid) {
    •

  •             $parent_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $pid . ']';
    •

  •             $tree .= "var ele = xoopsGetElementById('" . $parent_ele . "'); if(ele.checked != true) {ele.checked = this.checked;}";
    •

  •         }
    •

  •         // If there are child elements, add javascript that will
    •

  •         // make them unchecked when this element is unchecked to make
    •

  •         // sure permissions to child items are not added when there
    •

  •         // is no permission to this item.
    •

  •         foreach ($option['allchild'] as $cid) {
    •

  •             $child_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $cid . ']';
    •

  •             $tree .= "var ele = xoopsGetElementById('" . $child_ele . "'); if(this.checked != true) {ele.checked = false;}";
    •

  •         }
    •

  •         $tree .= '" value="1"';
    •

  •         if (in_array($option['id'], $this->_value)) {
    •

  •             $tree .= ' checked="checked"';
    •

  •         }
    •

  •         $tree .= " />" . $option['name'] . "<input type=\"hidden\" name=\"" . $this->getName() . "[parents][" . $option['id'] . "]\" value=\"" . implode(':', $parentIds). "\" /><input type=\"hidden\" name=\"" . $this->getName() . "[itemname][" . $option['id'] . "]\" value=\"" . htmlspecialchars($option['name']). "\" /><br />\n";
    •

  •         if (isset($option['children'])) {
    •

  •             foreach ($option['children'] as $child) {
    •

  •                 array_push($parentIds, $option['id']);
    •

  •                 $this->_renderOptionTree($tree, $this->_optionTree[$child], $prefix . '&nbsp;-', $parentIds);
    •

  •             }
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:43 +0200 by phpDocumentor 1.4.0a2


File Source for simpleform.php

Source for file simpleform.php

Documentation is available at simpleform.php

  • <?php
    •

  • // $Id: simpleform.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * base class
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/form.php";
    •

  •
    •

  • /**
    •

  •  * Form that will output as a simple HTML form with minimum formatting
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  */
    •

  • class XoopsSimpleForm extends XoopsForm
    •

  • {
    •

  •     /**
    •

  •      * create HTML to output the form with minimal formatting
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function render()
    •

  •     {
    •

  •         $ret = $this->getTitle()."\n<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n";
    •

  •         foreach ( $this->getElements() as $ele ) {
    •

  •             if ( !$ele->isHidden() ) {
    •

  •                 $ret .= "<b>".$ele->getCaption()."</b><br />".$ele->render()."<br />\n";
    •

  •             } else {
    •

  •                 $ret .= $ele->render()."\n";
    •

  •             }
    •

  •         }
    •

  •         $ret .= "</form>\n";
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:22 +0200 by phpDocumentor 1.4.0a2


File Source for tableform.php

Source for file tableform.php

Documentation is available at tableform.php

  • <?php
    •

  • // $Id: tableform.php 506 2006-05-26 23:10:37Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * the base class
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/form.php";
    •

  •
    •

  • /**
    •

  •  * Form that will output formatted as a HTML table
    •

  •  *
    •

  •  * No styles and no JavaScript to check for required fields.
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  */
    •

  • class XoopsTableForm extends XoopsForm
    •

  • {
    •

  •
    •

  •     /**
    •

  •      * create HTML to output the form as a table
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function render()
    •

  •     {
    •

  •         $ret = $this->getTitle()."\n<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n<table border='0' width='100%'>\n";
    •

  •         $hidden = '';
    •

  •         foreach ( $this->getElements() as $ele ) {
    •

  •             if ( !$ele->isHidden() ) {
    •

  •                 $ret .= "<tr valign='top' align='left'><td>".$ele->getCaption();
    •

  •                 if ($ele->getDescription() != '') {
    •

  •                     $ret .= '<br /><br /><span style="font-weight: normal;">'.$ele->getDescription().'</span>';
    •

  •                 }
    •

  •                 $ret .= "</td><td>".$ele->render()."</td></tr>";
    •

  •             } else {
    •

  •                 $hidden .= $ele->render()."\n";
    •

  •             }
    •

  •         }
    •

  •         $ret .= "</table>\n$hidden</form>\n";
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:05 +0200 by phpDocumentor 1.4.0a2


File Source for themeform.php

Source for file themeform.php

Documentation is available at themeform.php

  • <?php
    •

  • // $Id: themeform.php 976 2007-08-11 05:12:30Z phppp $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * base class
    •

  •  */
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/form.php";
    •

  •
    •

  • /**
    •

  •  * Form that will output as a theme-enabled HTML table
    •

  •  *
    •

  •  * Also adds JavaScript to validate required fields
    •

  •  *
    •

  •  * @author    Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    copyright (c) 2000-2003 XOOPS.org
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  form
    •

  •  */
    •

  • class XoopsThemeForm extends XoopsForm
    •

  • {
    •

  •     /**
    •

  •      * Insert an empty row in the table to serve as a seperator.
    •

  •      *
    •

  •      * @param    string  $extra  HTML to be displayed in the empty row.
    •

  •      * @param    string    $class    CSS class name for <td> tag
    •

  •      */
    •

  •     function insertBreak($extra = '', $class= '')
    •

  •     {
    •

  •         $class = ($class != '') ? " class='$class'" : '';
    •

  •          //Fix for $extra tag not showing
    •

  •         if ($extra) {
    •

  •             $extra = "<tr><td colspan='2' $class>$extra</td></tr>";
    •

  •             $this->addElement($extra);
    •

  •         } else {
    •

  •             $extra = "<tr><td colspan='2' $class>&nbsp;</td></tr>";
    •

  •             $this->addElement($extra);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * create HTML to output the form as a theme-enabled table with validation.
    •

  •      *
    •

  •      * @return    string
    •

  •      */
    •

  •     function render()
    •

  •     {
    •

  •         $ret = "
    •

  •             <form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."' onsubmit='return xoopsFormValidate_".$this->getName()."();'".$this->getExtra().">
    •

  •             <table width='100%' class='outer' cellspacing='1'>
    •

  •             <tr><th colspan='2'>".$this->getTitle()."</th></tr>
    •

  •         ";
    •

  •         $hidden = '';
    •

  •         $class ='even';
    •

  •         foreach ( $this->getElements() as $ele ) {
    •

  •             if (!is_object($ele)) {
    •

  •                 $ret .= $ele;
    •

  •             } elseif ( !$ele->isHidden() ) {
    •

  •                 $ret .= "<tr valign='top' align='left'><td class='head'>";
    •

  •                 if ( ($caption = $ele->getCaption()) != '' ) {
    •

  •                     $ret .=
    •

  •                         "<div class='xoops-form-element-caption" . ($ele->isRequired() ? "-required" : "" ) . "'>".
    •

  •                         "<span class='caption-text'>{$caption}</span>".
    •

  •                         "<span class='caption-marker'>*</span>".
    •

  •                         "</div>";
    •

  •                 }
    •

  •                 if ( ($desc = $ele->getDescription()) != '' ) {
    •

  •                     $ret .= "<div class='xoops-form-element-help'>{$desc}</div>";
    •

  •                 }
    •

  •                 $ret .= "</td><td class='$class'>".$ele->render()."</td></tr>\n";
    •

  •             } else {
    •

  •                 $hidden .= $ele->render();
    •

  •             }
    •

  •         }
    •

  •         $ret .= "</table>\n$hidden\n</form>\n";
    •

  •         $ret .= $this->renderValidationJS( true );
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:15 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsForm

Class XoopsForm

[line 52]

Classes extended from XoopsForm:

XoopsGroupPermForm

Renders a form for setting module specific group permissions

XoopsSimpleForm

Form that will output as a simple HTML form with minimum formatting

XoopsTableForm

Form that will output formatted as a HTML table

XoopsThemeForm

Form that will output as a theme-enabled HTML table

Location: /xoopsform/form.php

Remarks

Abstract base class for forms

author

Kazumi Ono    <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_action =

        "action" attribute for the html form

  • $_elements = array()

        array of XoopsFormElement objects

  • $_extra =

        extra information for the <form> tag

  • $_method =

        "method" attribute for the form.

  • $_name =

        "name" attribute of the form

  • $_required = array()

        required elements

  • $_title =

        title for the form

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsForm::XoopsForm

XoopsForm(
string
$title, string
$name, string
$action, [string
$method = "post"], [bool
$addtoken = false] );

    Parameters

    $title

    title of the form

    $name

    "name" attribute for the <form> tag

    $action

    "action" attribute for the <form> tag

    $method

    "method" attribute for the <form> tag

    $addtoken

    whether to add a security token to the form

    Remarks

    constructor

    [ Top ]

    XoopsForm::addElement

addElement(
object
&$formElement, [bool
$required = false] );

    Parameters

    &$formElement

    reference to a XoopsFormElement

    $required

    is this a "required" element?

    Remarks

    Add an element to the form

    [ Top ]

    XoopsForm::assign

assign(
object
&$tpl );

    Parameters

    &$tpl

    reference to a Smarty object

    Remarks

    assign to smarty form template instead of displaying directly

    see

    Smarty

    [ Top ]

    XoopsForm::display

display(
 );

    Remarks

    displays rendered form

    [ Top ]

    XoopsForm::getAction

getAction(
 );

    Remarks

    get the "action" attribute for the <form> tag

    [ Top ]

    XoopsForm::getElementByName

&getElementByName(
string
$name );

    Parameters

    $name

    "name" attribute assigned to a XoopsFormElement

    Returns

    to a XoopsFormElement, false if not found

    Remarks

    get a reference to a XoopsFormElement object by its "name"

    [ Top ]

    XoopsForm::getElementNames

getElementNames(
 );

    Returns

    array of form element names

    Remarks

    get an array of "name" attributes of form elements

    [ Top ]

    XoopsForm::getElements

&getElements(
[bool
$recurse = false] );

    Parameters

    $recurse

    get elements recursively?

    Returns

    array of XoopsFormElements

    Remarks

    get an array of forms elements

    [ Top ]

    XoopsForm::getElementValue

getElementValue(
string
$name );

    Parameters

    $name

    the "name" attribute of a form element

    Returns

    the "value" attribute assigned to a form element, null if not set

    Remarks

    Gets the "value" attribute of a form element

    [ Top ]

    XoopsForm::getElementValues

getElementValues(
 );

    Returns

    array of name/value pairs assigned to form elements

    Remarks

    gets the "value" attribute of all form elements

    [ Top ]

    XoopsForm::getExtra

&getExtra(
 );

    Remarks

    get the extra attributes for the <form> tag

    [ Top ]

    XoopsForm::getMethod

getMethod(
 );

    Remarks

    get the "method" attribute for the <form> tag

    [ Top ]

    XoopsForm::getName

getName(
 );

    Remarks

    get the "name" attribute for the <form> tag

    [ Top ]

    XoopsForm::getRequired

&getRequired(
 );

    Returns

    array of XoopsFormElements

    Remarks

    get an array of "required" form elements

    [ Top ]

    XoopsForm::getTitle

getTitle(
 );

    Remarks

    return the title of the form

    [ Top ]

    XoopsForm::insertBreak

insertBreak(
[string
$extra = null] );

    Overridden in child classes as:

    XoopsThemeForm::insertBreak()

    Insert an empty row in the table to serve as a seperator.

    Parameters

    $extra

    extra information for the break

    Remarks

    insert a break in the form

    This method is abstract. It must be overwritten in the child classes.

    abstract

    [ Top ]

    XoopsForm::render

render(
 );

    Overridden in child classes as:

    XoopsGroupPermForm::render()

    Renders the form

    XoopsSimpleForm::render()

    create HTML to output the form with minimal formatting

    XoopsTableForm::render()

    create HTML to output the form as a table

    XoopsThemeForm::render()

    create HTML to output the form as a theme-enabled table with validation.

    Remarks

    returns renderered form

    This method is abstract. It must be overwritten in the child classes.

    abstract

    [ Top ]

    XoopsForm::renderValidationJS

renderValidationJS(
[boolean
$withtags = true] );

    Parameters

    $withtags

    Include the < javascript > tags in the returned string

    Remarks

    Renders the Javascript function needed for client-side for validation

    Form elements that have been declared "required" and not set will prevent the form from being  submitted. Additionally, each element class may provide its own "renderValidationJS" method  that is supposed to return custom validation code for the element.
    The element validation code can assume that the JS "myform" variable points to the form, and must  execute return false if validation fails.
    A basic element validation method may contain something like this:
  •  function renderValidationJS() {
    •

  •    $name = $this->getName();
    •

  •    return "if ( myform.{$name}.value != 'valid' ) { " .
    •

  •      "myform.{$name}.focus(); window.alert( '$name is invalid' ); return false;" .
    •

  •      " }";
    •

  •  }
    •

    [ Top ]

    XoopsForm::setElementValue

setElementValue(
string
$name, string
$value );

    Parameters

    $name

    the "name" attribute of a form element

    $value

    the "value" attribute of a form element

    Remarks

    Sets the "value" attribute of a form element

    [ Top ]

    XoopsForm::setElementValues

setElementValues(
array
$values );

    Parameters

    $values

    array of name/value pairs to be assigned to form elements

    Remarks

    Sets the "value" attribute of form elements in a batch

    [ Top ]

    XoopsForm::setExtra

setExtra(
string
$extra );

    Parameters

    $extra

    extra attributes for the <form> tag

    Remarks

    set the extra attributes for the <form> tag

    [ Top ]

    XoopsForm::setRequired

setRequired(
object
&$formElement );

    Parameters

    &$formElement

    reference to a XoopsFormElement

    Remarks

    make an element "required"

    [ Top ]

Variable Detail

  • $_action =  [line 60]
    •

  • Data type: string
    •

    Remarks

    "action" attribute for the html form

    access

    private

  • $_elements = array() [line 84]
    •

  • Data type: array
    •

    Remarks

    array of XoopsFormElement objects

    access

    private

  • $_extra =  [line 90]
    •

  • Data type: string
    •

    Remarks

    extra information for the <form> tag

    access

    private

  • $_method =  [line 66]
    •

  • Data type: string
    •

    Remarks

    "method" attribute for the form.

    access

    private

  • $_name =  [line 72]
    •

  • Data type: string
    •

    Remarks

    "name" attribute of the form

    access

    private

  • $_required = array() [line 96]
    •

  • Data type: array
    •

    Remarks

    required elements

    access

    private

  • $_title =  [line 78]
    •

  • Data type: string
    •

    Remarks

    title for the form

    access

    private

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:57:52 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormButton

Class XoopsFormButton

[line 52]
XoopsFormElement
   |
   --XoopsFormButton
Location: /xoopsform/formbutton.php

Remarks

A button

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_type =
    Type of the button. This could be either "button", "submit", or "reset"
  • $_value =
    Value

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormButton::XoopsFormButton

    XoopsFormButton( string $caption, string $name, [string $value = ""], [string $type = "button"] );

    Parameters

    $caption

    Caption

    $name

    $value

    $type

    Type of the button. This could be either "button", "submit", or "reset"

    Remarks

    Constructor

    [ Top ]

    XoopsFormButton::getType

    getType( );

    Remarks

    Get the type

    [ Top ]

    XoopsFormButton::getValue

    getValue( );

    Remarks

    Get the initial value

    [ Top ]

    XoopsFormButton::render

    render( );

    Overrides XoopsFormElement::render() (Generates output for the element.)

    Remarks

    prepare HTML for output

    [ Top ]

    XoopsFormButton::setValue

    setValue( $value );

    Parameters

    $value

    Remarks

    Set the initial value

    [ Top ]

Variable Detail

  • $_type = [line 66]
  • Data type: string

    • Remarks

    Type of the button. This could be either "button", "submit", or "reset"

    access

    private

  • $_value = [line 59]
  • Data type: string

    • Remarks

    Value

    access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:57:53 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormCheckBox

Class XoopsFormCheckBox

[line 50]
XoopsFormElement
   |
   --XoopsFormCheckBox
Location: /xoopsform/formcheckbox.php

Remarks

One or more Checkbox(es)

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_options = array()
    Availlable options
  • $_value = array()
    pre-selected values in array

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormCheckBox::XoopsFormCheckBox

    XoopsFormCheckBox( string $caption, string $name, [mixed $value = null], [ $delimeter = ""] );

    Parameters

    $caption

    $name

    $value

    Either one value as a string or an array of them.

    $delimeter

    Remarks

    Constructor

    [ Top ]

    XoopsFormCheckBox::addOption

    addOption( string $value, [string $name = ""] );

    Parameters

    $value

    $name

    Remarks

    Add an option

    [ Top ]

    XoopsFormCheckBox::addOptionArray

    addOptionArray( array $options );

    Parameters

    $options

    Associative array of value->name pairs

    Remarks

    Add multiple Options at once

    [ Top ]

    XoopsFormCheckBox::getOptions

    getOptions( );

    Returns

    Associative array of value->name pairs

    Remarks

    Get an array with all the options

    [ Top ]

    XoopsFormCheckBox::getValue

    getValue( );

    Remarks

    Get the "value"

    [ Top ]

    XoopsFormCheckBox::render

    render( );

    Overrides XoopsFormElement::render() (Generates output for the element.)

    Remarks

    prepare HTML for output

    [ Top ]

    XoopsFormCheckBox::setValue

    setValue( array $value );

    Parameters

    $value

    Remarks

    Set the "value"

    [ Top ]

Variable Detail

  • $_options = array() [line 57]
  • Data type: array

    • Remarks

    Availlable options

    access

    private

  • $_value = array() [line 64]
  • Data type: array

    • Remarks

    pre-selected values in array

    access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:57:55 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormDateTime

Class XoopsFormDateTime

[line 53]
XoopsFormElement
   |
   --XoopsFormElementTray
      |
      --XoopsFormDateTime
Location: /xoopsform/formdatetime.php

Remarks

Date and time selection field

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElementTray

  • XoopsFormElementTray::$_delimeter =
    HTML to seperate the elements
  • XoopsFormElementTray::$_elements = array()
    array of form element objects
  • XoopsFormElementTray::$_required = array()
    required elements

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElementTray

  • XoopsFormElementTray::XoopsFormElementTray()
    constructor
  • XoopsFormElementTray::addElement()
    Add an element to the group
  • XoopsFormElementTray::getDelimeter()
    Get the delimiter of this group
  • XoopsFormElementTray::getElements()
    Get an array of the elements in this group
  • XoopsFormElementTray::getRequired()
    get an array of "required" form elements
  • XoopsFormElementTray::isContainer()
    Is this element a container of other elements?
  • XoopsFormElementTray::isRequired()
    Find out if there are required elements.
  • XoopsFormElementTray::render()
    prepare HTML to output this group

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormDateTime::XoopsFormDateTime

    XoopsFormDateTime( $caption, $name, [ $size = 15], [ $value = 0] );

    Parameters

    $caption

    $name

    $size

    $value

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:57:57 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormDhtmlTextArea

Class XoopsFormDhtmlTextArea

[line 59]
XoopsFormElement
   |
   --XoopsFormTextArea
      |
      --XoopsFormDhtmlTextArea
Location: /xoopsform/formdhtmltextarea.php

Remarks

A textarea with xoopsish formatting and smilie buttons

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $htmlEditor = array()
    Extended HTML editor definition
  • $_hiddenText =
    Hidden text

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormTextArea

  • XoopsFormTextArea::$_cols =
    number of columns
  • XoopsFormTextArea::$_rows =
    number of rows
  • XoopsFormTextArea::$_value =
    initial content

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormTextArea

  • XoopsFormTextArea::XoopsFormTextArea()
    Constuctor
  • XoopsFormTextArea::getCols()
    Get number of columns
  • XoopsFormTextArea::getRows()
    get number of rows
  • XoopsFormTextArea::getValue()
    Get initial content
  • XoopsFormTextArea::render()
    prepare HTML for output
  • XoopsFormTextArea::setValue()
    Set initial content

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormDhtmlTextArea::XoopsFormDhtmlTextArea

    XoopsFormDhtmlTextArea( string $caption, string $name, string $value, [int $rows = 5], [int $cols = 50], [string $hiddentext = "xoopsHiddenText"], [ $options = array()] );

    Parameters

    $caption

    Caption

    $name

    "name" attribute

    $value

    Initial text

    $rows

    Number of rows

    $cols

    Number of columns

    $hiddentext

    Hidden Text

    $options

    Remarks

    Constructor

    [ Top ]

    XoopsFormDhtmlTextArea::render

    render( );

    Overrides XoopsFormTextArea::render() (prepare HTML for output)

    Returns

    HTML

    Remarks

    Prepare HTML for output

    [ Top ]

    XoopsFormDhtmlTextArea::renderValidationJS

    renderValidationJS( );

    Overrides XoopsFormElement::renderValidationJS() (Render custom javascript validation code)

    [ Top ]

    XoopsFormDhtmlTextArea::_renderSmileys

    _renderSmileys( );

    Returns

    HTML

    Remarks

    prepare HTML for output of the smiley list.

    [ Top ]

Variable Detail

  • $htmlEditor = array() [line 74]
  • Data type: mixed

    • Remarks

    Extended HTML editor definition

    Set this property value if you want the editor to delegate rendering to an external class.

    Note: this functionality is experimental, but feedback is welcome. Note: the PM window doesn't use XoopsFormDhtmlTextArea, so no need to report it doesn't work here

    array( 'bundleId' ): For XOS components (2.3+) array( 'className', 'classPath' ): To create an instance of "className", declared in the file XOOPS_ROOT_PATH . $classPath

    Example: $htmlEditor = array( 'XoopsFormTinyeditorTextArea', '/class/xoopseditor/tinyeditor/formtinyeditortextarea.php' );

  • $_hiddenText = [line 81]
  • Data type: string

    • Remarks

    Hidden text

    access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:00 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormElement

Class XoopsFormElement

[line 54]

Classes extended from XoopsFormElement:

XoopsFormButton

A button

XoopsFormCheckBox

One or more Checkbox(es)

XoopsFormElementTray

A group of form elements

XoopsFormFile

A file upload field

XoopsFormHidden

A hidden field

XoopsFormLabel

A text label

XoopsFormPassword

A password field

XoopsFormRadio

A Group of radiobuttons

XoopsFormSelect

A select field

XoopsFormText

A simple text field

XoopsFormTextArea

A textarea

XoopsGroupFormCheckBox

Renders checkbox options for a group permission form

Location: /xoopsform/formelement.php

Remarks

Abstract base class for form elements

author

Kazumi Ono    <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $customValidationCode = array()

        Javascript performing additional validation of this element data

  • $_accesskey =  ''

        Accesskey for this element

  • $_caption =

        caption of the element

  • $_class =  ''

        HTML class for this element

  • $_description =  ""

        description of the field

  • $_extra =  ""

        extra attributes to go in the tag

  • $_hidden =  false

        hidden?

  • $_name =

        "name" attribute of the element

  • $_required =  false

        required field?

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsFormElement::XoopsFormElement

XoopsFormElement(
 );

    Remarks

    constructor

    [ Top ]

    XoopsFormElement::getAccessKey

getAccessKey(
 );

    Returns

    "accesskey" attribute value

    Remarks

    get the "accesskey" attribute for the element

    [ Top ]

    XoopsFormElement::getAccessString

getAccessString(
string
$str );

    Parameters

    $str

    String where to search the accesskey occurence

    Returns

    Enhanced string with the 1st occurence of accesskey underlined

    Remarks

    If the accesskey is found in the specified string, underlines it

    [ Top ]

    XoopsFormElement::getCaption

getCaption(
 );

    Remarks

    get the caption for the element

    [ Top ]

    XoopsFormElement::getClass

getClass(
 );

    Returns

    "class" attribute value

    Remarks

    get the "class" attribute for the element

    [ Top ]

    XoopsFormElement::getDescription

getDescription(
 );

    Remarks

    get the element's description

    [ Top ]

    XoopsFormElement::getExtra

getExtra(
 );

    Remarks

    Get the extra attributes for the element

    [ Top ]

    XoopsFormElement::getName

getName(
[bool
$encode = true] );

    Parameters

    $encode

    encode?

    Returns

    "name" attribute

    Remarks

    get the "name" attribute for the element

    [ Top ]

    XoopsFormElement::isContainer

isContainer(
 );

    Overridden in child classes as:

    XoopsFormElementTray::isContainer()

    Is this element a container of other elements?

    Returns

    false

    Remarks

    Is this element a container of other elements?

    [ Top ]

    XoopsFormElement::isHidden

isHidden(
 );

    Remarks

    Find out if an element is "hidden".

    [ Top ]

    XoopsFormElement::isRequired

isRequired(
 );

    Overridden in child classes as:

    XoopsFormElementTray::isRequired()

    Find out if there are required elements.

    Remarks

    Find out if an element is required.

    [ Top ]

    XoopsFormElement::render

render(
 );

    Overridden in child classes as:

    XoopsFormButton::render()

    prepare HTML for output

    XoopsFormCheckBox::render()

    prepare HTML for output

    XoopsFormElementTray::render()

    prepare HTML to output this group

    XoopsFormFile::render()

    prepare HTML for output

    XoopsFormHidden::render()

    Prepare HTML for output

    XoopsFormLabel::render()

    Prepare HTML for output

    XoopsFormPassword::render()

    Prepare HTML for output

    XoopsFormRadio::render()

    Prepare HTML for output

    XoopsFormSelect::render()

    Prepare HTML for output

    XoopsFormText::render()

    Prepare HTML for output

    XoopsFormColorPicker::render()

    XoopsFormTextDateSelect::render()

    XoopsFormTextArea::render()

    prepare HTML for output

    XoopsFormDhtmlTextArea::render()

    Prepare HTML for output

    XoopsGroupFormCheckBox::render()

    Renders checkbox options for this group

    Remarks

    Generates output for the element.

    This method is abstract and must be overwritten by the child classes.

    abstract

    [ Top ]

    XoopsFormElement::renderValidationJS

renderValidationJS(
 );

    Overridden in child classes as:

    XoopsFormColorPicker::renderValidationJS()

    Returns custom validation Javascript

    XoopsFormDhtmlTextArea::renderValidationJS()

    Remarks

    Render custom javascript validation code

    [ Top ]

    XoopsFormElement::setAccessKey

setAccessKey(
string
$key );

    Parameters

    $key

    "accesskey" attribute for the element

    Remarks

    set the "accesskey" attribute for the element

    [ Top ]

    XoopsFormElement::setCaption

setCaption(
string
$caption );

    Parameters

    $caption

    Remarks

    set the caption for the element

    [ Top ]

    XoopsFormElement::setClass

setClass(

$class, string
$key );

    Parameters

    $key

    "class" attribute for the element

    $class

    Remarks

    set the "class" attribute for the element

    [ Top ]

    XoopsFormElement::setDescription

setDescription(
string
$description );

    Parameters

    $description

    Remarks

    set the element's description

    [ Top ]

    XoopsFormElement::setExtra

setExtra(
string
$extra, [string
$replace = false] );

    Parameters

    $extra

    $replace

    If true, passed string will replace current content otherwise it will be appended to it

    Returns

    New content of the extra string

    Remarks

    Add extra attributes to the element.

    This string will be inserted verbatim and unvalidated in the  element's tag. Know what you are doing!

    [ Top ]

    XoopsFormElement::setHidden

setHidden(
 );

    Remarks

    flag the element as "hidden"

    [ Top ]

    XoopsFormElement::setName

setName(
string
$name );

    Parameters

    $name

    "name" attribute for the element

    Remarks

    set the "name" attribute for the element

    [ Top ]

Variable Detail

  • $customValidationCode = array() [line 66]
    •

  • Data type: array()
    •

    Remarks

    Javascript performing additional validation of this element data

    This property contains a list of Javascript snippets that will be sent to  XoopsForm::renderValidationJS().  NB: All elements are added to the output one after the other, so don't forget  to add a ";" after each to ensure no Javascript syntax error is generated.

  • $_accesskey =  '' [line 87]
    •

  • Data type: string
    •

    Remarks

    Accesskey for this element

    access

    private

  • $_caption =  [line 81]
    •

  • Data type: string
    •

    Remarks

    caption of the element

    access

    private

  • $_class =  '' [line 93]
    •

  • Data type: string
    •

    Remarks

    HTML class for this element

    access

    private

  • $_description =  "" [line 117]
    •

  • Data type: string
    •

    Remarks

    description of the field

    access

    private

  • $_extra =  "" [line 105]
    •

  • Data type: string
    •

    Remarks

    extra attributes to go in the tag

    access

    private

  • $_hidden =  false [line 99]
    •

  • Data type: bool
    •

    Remarks

    hidden?

    access

    private

  • $_name =  [line 75]
    •

  • Data type: string
    •

    Remarks

    "name" attribute of the element

    access

    private

  • $_required =  false [line 111]
    •

  • Data type: bool
    •

    Remarks

    required field?

    access

    private

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:58:02 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormElementTray

Class XoopsFormElementTray

[line 53]
XoopsFormElement
   |
   --XoopsFormElementTray
Classes extended from XoopsFormElementTray:
XoopsFormDateTime
Date and time selection field
XoopsFormSelectUser
A group of form elements

Location: /xoopsform/formelementtray.php

Remarks

A group of form elements

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_delimeter =
    HTML to seperate the elements
  • $_elements = array()
    array of form element objects
  • $_required = array()
    required elements

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormElementTray::XoopsFormElementTray

    XoopsFormElementTray( string $caption, [ $delimeter = "&nbsp;"], [ $name = ""], string $delimiter );

    Parameters

    $caption

    Caption for the group.

    $delimiter

    HTML to separate the elements

    $delimeter

    $name

    Remarks

    constructor

    [ Top ]

    XoopsFormElementTray::addElement

    addElement( &$formElement, [ $required = false], object &$element );

    Parameters

    &$element

    XoopsFormElement to add

    &$formElement

    $required

    Remarks

    Add an element to the group

    [ Top ]

    XoopsFormElementTray::getDelimeter

    getDelimeter( );

    Returns

    The delimiter

    Remarks

    Get the delimiter of this group

    [ Top ]

    XoopsFormElementTray::getElements

    &getElements( [bool $recurse = false] );

    Parameters

    $recurse

    get elements recursively?

    Returns

    Array of XoopsFormElement objects.

    Remarks

    Get an array of the elements in this group

    [ Top ]

    XoopsFormElementTray::getRequired

    &getRequired( );

    Returns

    array of XoopsFormElements

    Remarks

    get an array of "required" form elements

    [ Top ]

    XoopsFormElementTray::isContainer

    isContainer( );

    Overrides XoopsFormElement::isContainer() (Is this element a container of other elements?)

    Returns

    true

    Remarks

    Is this element a container of other elements?

    [ Top ]

    XoopsFormElementTray::isRequired

    isRequired( );

    Overrides XoopsFormElement::isRequired() (Find out if an element is required.)

    Remarks

    Find out if there are required elements.

    [ Top ]

    XoopsFormElementTray::render

    render( );

    Overrides XoopsFormElement::render() (Generates output for the element.)

    Returns

    HTML output

    Remarks

    prepare HTML to output this group

    [ Top ]

Variable Detail

  • $_delimeter = [line 73]
  • Data type: string

    • Remarks

    HTML to seperate the elements

    access

    private

  • $_elements = array() [line 60]
  • Data type: array

    • Remarks

    array of form element objects

    access

    private

  • $_required = array() [line 66]
  • Data type: array Overrides: Array

    • Remarks

    required elements

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:04 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormFile

Class XoopsFormFile

[line 52]
XoopsFormElement
   |
   --XoopsFormFile
Location: /xoopsform/formfile.php

Remarks

A file upload field

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_maxFileSize =
    Maximum size for an uploaded file

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormFile::XoopsFormFile

    XoopsFormFile( string $caption, string $name, int $maxfilesize );

    Parameters

    $caption

    Caption

    $name

    "name" attribute

    $maxfilesize

    Maximum size for an uploaded file

    Remarks

    Constructor

    [ Top ]

    XoopsFormFile::getMaxFileSize

    getMaxFileSize( );

    Remarks

    Get the maximum filesize

    [ Top ]

    XoopsFormFile::render

    render( );

    Overrides XoopsFormElement::render() (Generates output for the element.)

    Returns

    HTML

    Remarks

    prepare HTML for output

    [ Top ]

Variable Detail

  • $_maxFileSize = [line 59]
  • Data type: int

    • Remarks

    Maximum size for an uploaded file

    access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:05 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormHidden

Class XoopsFormHidden

[line 50]
XoopsFormElement
   |
   --XoopsFormHidden
Classes extended from XoopsFormHidden:
XoopsFormHiddenToken
A hidden token field

Location: /xoopsform/formhidden.php

Remarks

A hidden field

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_value =
    Value

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormHidden::XoopsFormHidden

    XoopsFormHidden( string $name, string $value );

    Parameters

    $name

    "name" attribute

    $value

    "value" attribute

    Remarks

    Constructor

    [ Top ]

    XoopsFormHidden::getValue

    getValue( );

    Remarks

    Get the "value" attribute

    [ Top ]

    XoopsFormHidden::render

    render( );

    Overrides XoopsFormElement::render() (Generates output for the element.)

    Returns

    HTML

    Remarks

    Prepare HTML for output

    [ Top ]

    XoopsFormHidden::setValue

    setValue( $value );

    Parameters

    $value

    Remarks

    Sets the "value" attribute

    [ Top ]

Variable Detail

  • $_value = [line 57]
  • Data type: string

    • Remarks

    Value

    access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:06 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormHiddenToken

Class XoopsFormHiddenToken

[line 44]
XoopsFormElement
   |
   --XoopsFormHidden
      |
      --XoopsFormHiddenToken
Location: /xoopsform/formhiddentoken.php

Remarks

A hidden token field

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2005 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormHidden

  • XoopsFormHidden::$_value =
    Value

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormHidden

  • XoopsFormHidden::XoopsFormHidden()
    Constructor
  • XoopsFormHidden::getValue()
    Get the "value" attribute
  • XoopsFormHidden::render()
    Prepare HTML for output
  • XoopsFormHidden::setValue()
    Sets the "value" attribute

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormHiddenToken::XoopsFormHiddenToken

    XoopsFormHiddenToken( [string $name = 'XOOPS_TOKEN_REQUEST'], [ $timeout = 0] );

    Parameters

    $name

    "name" attribute

    $timeout

    Remarks

    Constructor

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:06 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormLabel

Class XoopsFormLabel

[line 50]
XoopsFormElement
   |
   --XoopsFormLabel
Location: /xoopsform/formlabel.php

Remarks

A text label

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_value =
    Text

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormLabel::XoopsFormLabel

    XoopsFormLabel(
[string
$caption = ""], [string
$value = ""], [
$name = ""] );

    Parameters

    $caption

    Caption

    $value

    Text

    $name

    Remarks

    Constructor

    [ Top ]

    XoopsFormLabel::getValue

    getValue( );

    Remarks

    Get the text

    [ Top ]

    XoopsFormLabel::render

    render( );

    Overrides XoopsFormElement::render() (Generates output for the element.)

    Remarks

    Prepare HTML for output

    [ Top ]

Variable Detail

  • $_value = [line 57]
  • Data type: string

    • Remarks

    Text

    access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:07 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormPassword

Class XoopsFormPassword

[line 52]
XoopsFormElement
   |
   --XoopsFormPassword
Location: /xoopsform/formpassword.php

Remarks

A password field

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_maxlength =
    Maximum length of the text
  • $_size =
    Size of the field.
  • $_value =
    Initial content of the field.

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormPassword::XoopsFormPassword

    XoopsFormPassword( string $caption, string $name, int $size, int $maxlength, [int $value = ""] );

    Parameters

    $caption

    Caption

    $name

    "name" attribute

    $size

    Size of the field

    $maxlength

    Maximum length of the text

    $value

    Initial value of the field. Warning: this is readable in cleartext in the page's source!

    Remarks

    Constructor

    [ Top ]

    XoopsFormPassword::getMaxlength

    getMaxlength( );

    Remarks

    Get the max length

    [ Top ]

    XoopsFormPassword::getSize

    getSize( );

    Remarks

    Get the field size

    [ Top ]

    XoopsFormPassword::getValue

    getValue( );

    Remarks

    Get the initial value

    [ Top ]

    XoopsFormPassword::render

    render( );

    Overrides XoopsFormElement::render() (Generates output for the element.)

    Returns

    HTML

    Remarks

    Prepare HTML for output

    [ Top ]

    XoopsFormPassword::setValue

    setValue( $value );

    Parameters

    $value

    Remarks

    Set the initial value

    [ Top ]

Variable Detail

  • $_maxlength = [line 66]
  • Data type: int

    • Remarks

    Maximum length of the text

    access

    private

  • $_size = [line 59]
  • Data type: int

    • Remarks

    Size of the field.

    access

    private

  • $_value = [line 73]
  • Data type: string

    • Remarks

    Initial content of the field.

    access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:08 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormRadio

Class XoopsFormRadio

[line 52]
XoopsFormElement
   |
   --XoopsFormRadio
Classes extended from XoopsFormRadio:
XoopsFormRadioYN
Yes/No radio buttons.

Location: /xoopsform/formradio.php

Remarks

A Group of radiobuttons

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_options = array()
    Array of Options
  • $_value =
    Pre-selected value

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormRadio::XoopsFormRadio

    XoopsFormRadio( string $caption, string $name, [string $value = null], [ $delimeter = ""] );

    Parameters

    $caption

    Caption

    $name

    "name" attribute

    $value

    Pre-selected value

    $delimeter

    Remarks

    Constructor

    [ Top ]

    XoopsFormRadio::addOption

    addOption( string $value, [string $name = ""] );

    Parameters

    $value

    "value" attribute - This gets submitted as form-data.

    $name

    "name" attribute - This is displayed. If empty, we use the "value" instead.

    Remarks

    Add an option

    [ Top ]

    XoopsFormRadio::addOptionArray

    addOptionArray( array $options );

    Parameters

    $options

    Associative array of value->name pairs.

    Remarks

    Adds multiple options

    [ Top ]

    XoopsFormRadio::getOptions

    getOptions( );

    Returns

    Associative array of value->name pairs.

    Remarks

    Gets the options

    [ Top ]

    XoopsFormRadio::getValue

    getValue( );

    Remarks

    Get the pre-selected value

    [ Top ]

    XoopsFormRadio::render

    render( );

    Overrides XoopsFormElement::render() (Generates output for the element.)

    Returns

    HTML

    Remarks

    Prepare HTML for output

    [ Top ]

    XoopsFormRadio::setValue

    setValue( $value $value );

    Parameters

    $value

    string

    Remarks

    Set the pre-selected value

    [ Top ]

Variable Detail

  • $_options = array() [line 59]
  • Data type: array

    • Remarks

    Array of Options

    access

    private

  • $_value = [line 66]
  • Data type: string

    • Remarks

    Pre-selected value

    access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:09 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormRadioYN

Class XoopsFormRadioYN

[line 58]
XoopsFormElement
   |
   --XoopsFormRadio
      |
      --XoopsFormRadioYN
Location: /xoopsform/formradioyn.php

Remarks

Yes/No radio buttons.

A pair of radio buttons labelled _YES and _NO with values 1 and 0

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormRadio

  • XoopsFormRadio::$_options = array()
    Array of Options
  • XoopsFormRadio::$_value =
    Pre-selected value

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormRadio

  • XoopsFormRadio::XoopsFormRadio()
    Constructor
  • XoopsFormRadio::addOption()
    Add an option
  • XoopsFormRadio::addOptionArray()
    Adds multiple options
  • XoopsFormRadio::getOptions()
    Gets the options
  • XoopsFormRadio::getValue()
    Get the pre-selected value
  • XoopsFormRadio::render()
    Prepare HTML for output
  • XoopsFormRadio::setValue()
    Set the pre-selected value

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormRadioYN::XoopsFormRadioYN

    XoopsFormRadioYN( string $caption, string $name, [string $value = null], [string $yes = _YES], [string $no = _NO] );

    Parameters

    $caption

    $name

    $value

    Pre-selected value, can be "0" (No) or "1" (Yes)

    $yes

    String for "Yes"

    $no

    String for "No"

    Remarks

    Constructor

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:10 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormSelect

Class XoopsFormSelect

[line 51]
XoopsFormElement
   |
   --XoopsFormSelect
Classes extended from XoopsFormSelect:
XoopsFormSelectCountry
A select field with countries
XoopsFormSelectGroup
A select field with a choice of available groups
XoopsFormSelectLang
A select field with available languages
XoopsFormSelectMatchOption
A selection box with options for matching search terms.
XoopsFormSelectTheme
A select box with available themes
XoopsFormSelectTimezone
A select box with timezones

Location: /xoopsform/formselect.php

Remarks

A select field

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_multiple =  false
    Allow multiple selections?
  • $_options = array()
    Options
  • $_size =
    Number of rows. "1" makes a dropdown list.
  • $_value = array()
    Pre-selcted values

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormSelect::XoopsFormSelect

    XoopsFormSelect( string $caption, string $name, [mixed $value = null], [int $size = 1], [bool $multiple = false] );

    Parameters

    $caption

    Caption

    $name

    "name" attribute

    $value

    Pre-selected value (or array of them).

    $size

    Number or rows. "1" makes a drop-down-list

    $multiple

    Allow multiple selections?

    Remarks

    Constructor

    [ Top ]

    XoopsFormSelect::addOption

    addOption( string $value, [string $name = ""] );

    Parameters

    $value

    "value" attribute

    $name

    "name" attribute

    Remarks

    Add an option

    [ Top ]

    XoopsFormSelect::addOptionArray

    addOptionArray( array $options );

    Parameters

    $options

    Associative array of value->name pairs

    Remarks

    Add multiple options

    [ Top ]

    XoopsFormSelect::getOptions

    getOptions( );

    Returns

    Associative array of value->name pairs

    Remarks

    Get all options

    [ Top ]

    XoopsFormSelect::getSize

    getSize( );

    Remarks

    Get the size

    [ Top ]

    XoopsFormSelect::getValue

    getValue( );

    Remarks

    Get an array of pre-selected values

    [ Top ]

    XoopsFormSelect::isMultiple

    isMultiple( );

    Remarks

    Are multiple selections allowed?

    [ Top ]

    XoopsFormSelect::render

    render( );

    Overrides XoopsFormElement::render() (Generates output for the element.)

    Returns

    HTML

    Remarks

    Prepare HTML for output

    [ Top ]

    XoopsFormSelect::setValue

    setValue( $value $value );

    Parameters

    $value

    mixed

    Remarks

    Set pre-selected values

    [ Top ]

Variable Detail

  • $_multiple =  false [line 65]
  • Data type: bool

    • Remarks

    Allow multiple selections?

    access

    private

  • $_options = array() [line 58]
  • Data type: array

    • Remarks

    Options

    access

    private

  • $_size = [line 72]
  • Data type: int

    • Remarks

    Number of rows. "1" makes a dropdown list.

    access

    private

  • $_value = array() [line 79]
  • Data type: array

    • Remarks

    Pre-selcted values

    access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:11 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormSelectCountry

Class XoopsFormSelectCountry

[line 61]
XoopsFormElement
   |
   --XoopsFormSelect
      |
      --XoopsFormSelectCountry
Location: /xoopsform/formselectcountry.php

Remarks

A select field with countries

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormSelect

  • XoopsFormSelect::$_multiple = false
    Allow multiple selections?
  • XoopsFormSelect::$_options = array()
    Options
  • XoopsFormSelect::$_size =
    Number of rows. "1" makes a dropdown list.
  • XoopsFormSelect::$_value = array()
    Pre-selcted values

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormSelect

  • XoopsFormSelect::XoopsFormSelect()
    Constructor
  • XoopsFormSelect::addOption()
    Add an option
  • XoopsFormSelect::addOptionArray()
    Add multiple options
  • XoopsFormSelect::getOptions()
    Get all options
  • XoopsFormSelect::getSize()
    Get the size
  • XoopsFormSelect::getValue()
    Get an array of pre-selected values
  • XoopsFormSelect::isMultiple()
    Are multiple selections allowed?
  • XoopsFormSelect::render()
    Prepare HTML for output
  • XoopsFormSelect::setValue()
    Set pre-selected values

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormSelectCountry::XoopsFormSelectCountry

    XoopsFormSelectCountry( string $caption, string $name, [mixed $value = null], [int $size = 1] );

    Parameters

    $caption

    Caption

    $name

    "name" attribute

    $value

    Pre-selected value (or array of them). Legal are all 2-letter country codes (in capitals).

    $size

    Number or rows. "1" makes a drop-down-list

    Remarks

    Constructor

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:12 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormSelectGroup

Class XoopsFormSelectGroup

[line 56]
XoopsFormElement
   |
   --XoopsFormSelect
      |
      --XoopsFormSelectGroup
Location: /xoopsform/formselectgroup.php

Remarks

A select field with a choice of available groups

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormSelect

  • XoopsFormSelect::$_multiple = false
    Allow multiple selections?
  • XoopsFormSelect::$_options = array()
    Options
  • XoopsFormSelect::$_size =
    Number of rows. "1" makes a dropdown list.
  • XoopsFormSelect::$_value = array()
    Pre-selcted values

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormSelect

  • XoopsFormSelect::XoopsFormSelect()
    Constructor
  • XoopsFormSelect::addOption()
    Add an option
  • XoopsFormSelect::addOptionArray()
    Add multiple options
  • XoopsFormSelect::getOptions()
    Get all options
  • XoopsFormSelect::getSize()
    Get the size
  • XoopsFormSelect::getValue()
    Get an array of pre-selected values
  • XoopsFormSelect::isMultiple()
    Are multiple selections allowed?
  • XoopsFormSelect::render()
    Prepare HTML for output
  • XoopsFormSelect::setValue()
    Set pre-selected values

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormSelectGroup::XoopsFormSelectGroup

    XoopsFormSelectGroup( string $caption, string $name, [bool $include_anon = false], [mixed $value = null], [int $size = 1], [bool $multiple = false] );

    Parameters

    $caption

    $name

    $include_anon

    Include group "anonymous"?

    $value

    Pre-selected value (or array of them).

    $size

    Number or rows. "1" makes a drop-down-list.

    $multiple

    Allow multiple selections?

    Remarks

    Constructor

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:13 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormSelectLang

Class XoopsFormSelectLang

[line 59]
XoopsFormElement
   |
   --XoopsFormSelect
      |
      --XoopsFormSelectLang
Location: /xoopsform/formselectlang.php

Remarks

A select field with available languages

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormSelect

  • XoopsFormSelect::$_multiple = false
    Allow multiple selections?
  • XoopsFormSelect::$_options = array()
    Options
  • XoopsFormSelect::$_size =
    Number of rows. "1" makes a dropdown list.
  • XoopsFormSelect::$_value = array()
    Pre-selcted values

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormSelect

  • XoopsFormSelect::XoopsFormSelect()
    Constructor
  • XoopsFormSelect::addOption()
    Add an option
  • XoopsFormSelect::addOptionArray()
    Add multiple options
  • XoopsFormSelect::getOptions()
    Get all options
  • XoopsFormSelect::getSize()
    Get the size
  • XoopsFormSelect::getValue()
    Get an array of pre-selected values
  • XoopsFormSelect::isMultiple()
    Are multiple selections allowed?
  • XoopsFormSelect::render()
    Prepare HTML for output
  • XoopsFormSelect::setValue()
    Set pre-selected values

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormSelectLang::XoopsFormSelectLang

    XoopsFormSelectLang( string $caption, string $name, [mixed $value = null], [int $size = 1] );

    Parameters

    $caption

    $name

    $value

    Pre-selected value (or array of them). Legal is any name of a XOOPS_ROOT_PATH."/language/" subdirectory.

    $size

    Number of rows. "1" makes a drop-down-list.

    Remarks

    Constructor

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:14 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormSelectMatchOption

Class XoopsFormSelectMatchOption

[line 55]
XoopsFormElement
   |
   --XoopsFormSelect
      |
      --XoopsFormSelectMatchOption
Location: /xoopsform/formselectmatchoption.php

Remarks

A selection box with options for matching search terms.

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormSelect

  • XoopsFormSelect::$_multiple = false
    Allow multiple selections?
  • XoopsFormSelect::$_options = array()
    Options
  • XoopsFormSelect::$_size =
    Number of rows. "1" makes a dropdown list.
  • XoopsFormSelect::$_value = array()
    Pre-selcted values

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormSelect

  • XoopsFormSelect::XoopsFormSelect()
    Constructor
  • XoopsFormSelect::addOption()
    Add an option
  • XoopsFormSelect::addOptionArray()
    Add multiple options
  • XoopsFormSelect::getOptions()
    Get all options
  • XoopsFormSelect::getSize()
    Get the size
  • XoopsFormSelect::getValue()
    Get an array of pre-selected values
  • XoopsFormSelect::isMultiple()
    Are multiple selections allowed?
  • XoopsFormSelect::render()
    Prepare HTML for output
  • XoopsFormSelect::setValue()
    Set pre-selected values

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormSelectMatchOption::XoopsFormSelectMatchOption

    XoopsFormSelectMatchOption( string $caption, string $name, [mixed $value = null], [int $size = 1] );

    Parameters

    $caption

    $name

    $value

    Pre-selected value (or array of them). Legal values are XOOPS_MATCH_START, XOOPS_MATCH_END, XOOPS_MATCH_EQUAL, and XOOPS_MATCH_CONTAIN

    $size

    Number of rows. "1" makes a drop-down-list

    Remarks

    Constructor

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:15 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormSelectTheme

Class XoopsFormSelectTheme

[line 59]
XoopsFormElement
   |
   --XoopsFormSelect
      |
      --XoopsFormSelectTheme
Location: /xoopsform/formselecttheme.php

Remarks

A select box with available themes

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormSelect

  • XoopsFormSelect::$_multiple = false
    Allow multiple selections?
  • XoopsFormSelect::$_options = array()
    Options
  • XoopsFormSelect::$_size =
    Number of rows. "1" makes a dropdown list.
  • XoopsFormSelect::$_value = array()
    Pre-selcted values

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormSelect

  • XoopsFormSelect::XoopsFormSelect()
    Constructor
  • XoopsFormSelect::addOption()
    Add an option
  • XoopsFormSelect::addOptionArray()
    Add multiple options
  • XoopsFormSelect::getOptions()
    Get all options
  • XoopsFormSelect::getSize()
    Get the size
  • XoopsFormSelect::getValue()
    Get an array of pre-selected values
  • XoopsFormSelect::isMultiple()
    Are multiple selections allowed?
  • XoopsFormSelect::render()
    Prepare HTML for output
  • XoopsFormSelect::setValue()
    Set pre-selected values

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormSelectTheme::XoopsFormSelectTheme

    XoopsFormSelectTheme( string $caption, string $name, [mixed $value = null], [int $size = 1] );

    Parameters

    $caption

    $name

    $value

    Pre-selected value (or array of them).

    $size

    Number or rows. "1" makes a drop-down-list

    Remarks

    Constructor

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:16 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormSelectTimezone

Class XoopsFormSelectTimezone

[line 60]
XoopsFormElement
   |
   --XoopsFormSelect
      |
      --XoopsFormSelectTimezone
Location: /xoopsform/formselecttimezone.php

Remarks

A select box with timezones

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormSelect

  • XoopsFormSelect::$_multiple = false
    Allow multiple selections?
  • XoopsFormSelect::$_options = array()
    Options
  • XoopsFormSelect::$_size =
    Number of rows. "1" makes a dropdown list.
  • XoopsFormSelect::$_value = array()
    Pre-selcted values

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormSelect

  • XoopsFormSelect::XoopsFormSelect()
    Constructor
  • XoopsFormSelect::addOption()
    Add an option
  • XoopsFormSelect::addOptionArray()
    Add multiple options
  • XoopsFormSelect::getOptions()
    Get all options
  • XoopsFormSelect::getSize()
    Get the size
  • XoopsFormSelect::getValue()
    Get an array of pre-selected values
  • XoopsFormSelect::isMultiple()
    Are multiple selections allowed?
  • XoopsFormSelect::render()
    Prepare HTML for output
  • XoopsFormSelect::setValue()
    Set pre-selected values

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormSelectTimezone::XoopsFormSelectTimezone

    XoopsFormSelectTimezone( string $caption, string $name, [mixed $value = null], [int $size = 1] );

    Parameters

    $caption

    $name

    $value

    Pre-selected value (or array of them). Legal values are "-12" to "12" with some ".5"s strewn in ;-)

    $size

    Number of rows. "1" makes a drop-down-box.

    Remarks

    Constructor

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:17 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormText

Class XoopsFormText

[line 51]
XoopsFormElement
   |
   --XoopsFormText
Classes extended from XoopsFormText:
XoopsFormColorPicker
XoopsFormColorPicker component class file
XoopsFormTextDateSelect
A text field with calendar popup

Location: /xoopsform/formtext.php

Remarks

A simple text field

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_maxlength =
    Maximum length of the text
  • $_size =
    Size
  • $_value =
    Initial text

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormText::XoopsFormText

    XoopsFormText( string $caption, string $name, int $size, int $maxlength, [string $value = ""] );

    Parameters

    $caption

    Caption

    $name

    "name" attribute

    $size

    Size

    $maxlength

    Maximum length of text

    $value

    Initial text

    Remarks

    Constructor

    [ Top ]

    XoopsFormText::getMaxlength

    getMaxlength( );

    Remarks

    Get maximum text length

    [ Top ]

    XoopsFormText::getSize

    getSize( );

    Remarks

    Get size

    [ Top ]

    XoopsFormText::getValue

    getValue( );

    Remarks

    Get initial text value

    [ Top ]

    XoopsFormText::render

    render( );

    Overridden in child classes as:

    XoopsFormColorPicker::render()
    XoopsFormTextDateSelect::render()

    Overrides XoopsFormElement::render() (Generates output for the element.)

    Returns

    HTML

    Remarks

    Prepare HTML for output

    [ Top ]

    XoopsFormText::setValue

    setValue( $value $value );

    Parameters

    $value

    string

    Remarks

    Set initial text value

    [ Top ]

Variable Detail

  • $_maxlength = [line 65]
  • Data type: int

    • Remarks

    Maximum length of the text

    access

    private

  • $_size = [line 58]
  • Data type: int

    • Remarks

    Size

    access

    private

  • $_value = [line 72]
  • Data type: string

    • Remarks

    Initial text

    access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:20 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormTextArea

Class XoopsFormTextArea

[line 52]
XoopsFormElement
   |
   --XoopsFormTextArea
Classes extended from XoopsFormTextArea:
XoopsFormDhtmlTextArea
A textarea with xoopsish formatting and smilie buttons

Location: /xoopsform/formtextarea.php

Remarks

A textarea

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_cols =
    number of columns
  • $_rows =
    number of rows
  • $_value =
    initial content

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormTextArea::XoopsFormTextArea

    XoopsFormTextArea( string $caption, string $name, [string $value = ""], [int $rows = 5], [int $cols = 50] );

    Parameters

    $caption

    caption

    $name

    name

    $value

    initial content

    $rows

    number of rows

    $cols

    number of columns

    Remarks

    Constuctor

    [ Top ]

    XoopsFormTextArea::getCols

    getCols( );

    Remarks

    Get number of columns

    [ Top ]

    XoopsFormTextArea::getRows

    getRows( );

    Remarks

    get number of rows

    [ Top ]

    XoopsFormTextArea::getValue

    getValue( );

    Remarks

    Get initial content

    [ Top ]

    XoopsFormTextArea::render

    render( );

    Overridden in child classes as:

    XoopsFormDhtmlTextArea::render()
    Prepare HTML for output

    Overrides XoopsFormElement::render() (Generates output for the element.)

    Returns

    HTML

    Remarks

    prepare HTML for output

    [ Top ]

    XoopsFormTextArea::setValue

    setValue( $value $value );

    Parameters

    $value

    string

    Remarks

    Set initial content

    [ Top ]

Variable Detail

  • $_cols = [line 58]
  • Data type: int

    • Remarks

    number of columns

    access

    private

  • $_rows = [line 65]
  • Data type: int

    • Remarks

    number of rows

    access

    private

  • $_value = [line 72]
  • Data type: string

    • Remarks

    initial content

    access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:21 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormTextDateSelect

Class XoopsFormTextDateSelect

[line 52]
XoopsFormElement
   |
   --XoopsFormText
      |
      --XoopsFormTextDateSelect
Location: /xoopsform/formtextdateselect.php

Remarks

A text field with calendar popup

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormText

  • XoopsFormText::$_maxlength =
    Maximum length of the text
  • XoopsFormText::$_size =
    Size
  • XoopsFormText::$_value =
    Initial text

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormText

  • XoopsFormText::XoopsFormText()
    Constructor
  • XoopsFormText::getMaxlength()
    Get maximum text length
  • XoopsFormText::getSize()
    Get size
  • XoopsFormText::getValue()
    Get initial text value
  • XoopsFormText::render()
    Prepare HTML for output
  • XoopsFormText::setValue()
    Set initial text value

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormTextDateSelect::XoopsFormTextDateSelect

    XoopsFormTextDateSelect( $caption, $name, [ $size = 15], [ $value = 0] );

    Parameters

    $caption

    $name

    $size

    $value

    [ Top ]

    XoopsFormTextDateSelect::render

    render( );

    Overrides XoopsFormText::render() (Prepare HTML for output)

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:22 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsGroupFormCheckBox

Class XoopsGroupFormCheckBox

[line 188]
XoopsFormElement
   |
   --XoopsGroupFormCheckBox
Location: /xoopsform/grouppermform.php

Remarks

Renders checkbox options for a group permission form

author

Kazumi Ono <onokazu@myweb.ne.jp>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_groupId =
    Group ID
  • $_optionTree =
    Option tree
  • $_value = array()
    Pre-selected value(s)

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsGroupFormCheckBox::XoopsGroupFormCheckBox

    XoopsGroupFormCheckBox( $caption, $name, $groupId, [ $values = null] );

    Parameters

    $caption

    $name

    $groupId

    $values

    Remarks

    Constructor

    [ Top ]

    XoopsGroupFormCheckBox::render

    render( );

    Overrides XoopsFormElement::render() (Generates output for the element.)

    Remarks

    Renders checkbox options for this group

    access

    public

    [ Top ]

    XoopsGroupFormCheckBox::setOptionTree

    setOptionTree( &$optionTree, array $optionTree );

    Parameters

    $optionTree

    &$optionTree

    Remarks

    Sets the tree structure of items

    access

    public

    [ Top ]

    XoopsGroupFormCheckBox::setValue

    setValue( mixed $value );

    Parameters

    $value

    A group ID or an array of group IDs

    Remarks

    Sets pre-selected values

    access

    public

    [ Top ]

    XoopsGroupFormCheckBox::_renderOptionTree

    _renderOptionTree( &$tree, array $option, string $prefix, [array $parentIds = array()], string $tree );

    Parameters

    $tree

    $option

    $prefix

    $parentIds

    &$tree

    Remarks

    Renders checkbox options for an item tree

    access

    private

    [ Top ]

Variable Detail

  • $_groupId = [line 201]
  • Data type: int

    • Remarks

    Group ID

  • $_optionTree = [line 207]
  • Data type: array

    • Remarks

    Option tree

  • $_value = array() [line 195]
  • Data type: array;

    • Remarks

    Pre-selected value(s)

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:43 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsGroupPermForm

Class XoopsGroupPermForm

[line 48]
XoopsForm
   |
   --XoopsGroupPermForm
Location: /xoopsform/grouppermform.php

Remarks

Renders a form for setting module specific group permissions

author

Kazumi Ono <onokazu@myweb.ne.jp>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

  • $_itemTree =
    Tree structure of items
  • $_modid =
    Module ID
  • $_permDesc =
    Description of permission
  • $_permName =
    Name of permission

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsForm

  • XoopsForm::$_action =
    "action" attribute for the html form
  • XoopsForm::$_elements = array()
    array of XoopsFormElement objects
  • XoopsForm::$_extra =
    extra information for the <form> tag
  • XoopsForm::$_method =
    "method" attribute for the form.
  • XoopsForm::$_name =
    "name" attribute of the form
  • XoopsForm::$_required = array()
    required elements
  • XoopsForm::$_title =
    title for the form

Method Summary

Inherited Method Summary

Inherited From Class XoopsForm

  • XoopsForm::XoopsForm()
    constructor
  • XoopsForm::addElement()
    Add an element to the form
  • XoopsForm::assign()
    assign to smarty form template instead of displaying directly
  • XoopsForm::display()
    displays rendered form
  • XoopsForm::getAction()
    get the "action" attribute for the <form> tag
  • XoopsForm::getElementByName()
    get a reference to a XoopsFormElement object by its "name"
  • XoopsForm::getElementNames()
    get an array of "name" attributes of form elements
  • XoopsForm::getElements()
    get an array of forms elements
  • XoopsForm::getElementValue()
    Gets the "value" attribute of a form element
  • XoopsForm::getElementValues()
    gets the "value" attribute of all form elements
  • XoopsForm::getExtra()
    get the extra attributes for the <form> tag
  • XoopsForm::getMethod()
    get the "method" attribute for the <form> tag
  • XoopsForm::getName()
    get the "name" attribute for the <form> tag
  • XoopsForm::getRequired()
    get an array of "required" form elements
  • XoopsForm::getTitle()
    return the title of the form
  • XoopsForm::insertBreak()
    insert a break in the form
  • XoopsForm::render()
    returns renderered form
  • XoopsForm::renderValidationJS()
    Renders the Javascript function needed for client-side for validation
  • XoopsForm::setElementValue()
    Sets the "value" attribute of a form element
  • XoopsForm::setElementValues()
    Sets the "value" attribute of form elements in a batch
  • XoopsForm::setExtra()
    set the extra attributes for the <form> tag
  • XoopsForm::setRequired()
    make an element "required"

Method Detail

    XoopsGroupPermForm::XoopsGroupPermForm

    XoopsGroupPermForm( $title, $modid, $permname, $permdesc, [ $url = ""] );

    Parameters

    $title

    $modid

    $permname

    $permdesc

    $url

    Remarks

    Constructor

    [ Top ]

    XoopsGroupPermForm::addItem

    addItem( int $itemId, string $itemName, [int $itemParent = 0] );

    Parameters

    $itemName

    $itemId

    $itemParent

    Remarks

    Adds an item to which permission will be assigned

    access

    public

    [ Top ]

    XoopsGroupPermForm::render

    render( );

    Overrides XoopsForm::render() (returns renderered form)

    Remarks

    Renders the form

    access

    public

    [ Top ]

    XoopsGroupPermForm::_loadAllChildItemIds

    _loadAllChildItemIds( int $itemId, &$childIds, array $childIds );

    Parameters

    $itemId

    $childIds

    &$childIds

    Remarks

    Loads all child ids for an item to be used in javascript

    access

    private

    [ Top ]

Variable Detail

  • $_itemTree = [line 61]
  • Data type: array

    • Remarks

    Tree structure of items

  • $_modid = [line 55]
  • Data type: int

    • Remarks

    Module ID

  • $_permDesc = [line 73]
  • Data type: string

    • Remarks

    Description of permission

  • $_permName = [line 67]
  • Data type: string

    • Remarks

    Name of permission

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:44 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsSimpleForm

Class XoopsSimpleForm

[line 58]
XoopsForm
   |
   --XoopsSimpleForm
Location: /xoopsform/simpleform.php

Remarks

Form that will output as a simple HTML form with minimum formatting

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsForm

  • XoopsForm::$_action =
    "action" attribute for the html form
  • XoopsForm::$_elements = array()
    array of XoopsFormElement objects
  • XoopsForm::$_extra =
    extra information for the <form> tag
  • XoopsForm::$_method =
    "method" attribute for the form.
  • XoopsForm::$_name =
    "name" attribute of the form
  • XoopsForm::$_required = array()
    required elements
  • XoopsForm::$_title =
    title for the form

Method Summary

Inherited Method Summary

Inherited From Class XoopsForm

  • XoopsForm::XoopsForm()
    constructor
  • XoopsForm::addElement()
    Add an element to the form
  • XoopsForm::assign()
    assign to smarty form template instead of displaying directly
  • XoopsForm::display()
    displays rendered form
  • XoopsForm::getAction()
    get the "action" attribute for the <form> tag
  • XoopsForm::getElementByName()
    get a reference to a XoopsFormElement object by its "name"
  • XoopsForm::getElementNames()
    get an array of "name" attributes of form elements
  • XoopsForm::getElements()
    get an array of forms elements
  • XoopsForm::getElementValue()
    Gets the "value" attribute of a form element
  • XoopsForm::getElementValues()
    gets the "value" attribute of all form elements
  • XoopsForm::getExtra()
    get the extra attributes for the <form> tag
  • XoopsForm::getMethod()
    get the "method" attribute for the <form> tag
  • XoopsForm::getName()
    get the "name" attribute for the <form> tag
  • XoopsForm::getRequired()
    get an array of "required" form elements
  • XoopsForm::getTitle()
    return the title of the form
  • XoopsForm::insertBreak()
    insert a break in the form
  • XoopsForm::render()
    returns renderered form
  • XoopsForm::renderValidationJS()
    Renders the Javascript function needed for client-side for validation
  • XoopsForm::setElementValue()
    Sets the "value" attribute of a form element
  • XoopsForm::setElementValues()
    Sets the "value" attribute of form elements in a batch
  • XoopsForm::setExtra()
    set the extra attributes for the <form> tag
  • XoopsForm::setRequired()
    make an element "required"

Method Detail

    XoopsSimpleForm::render

    render( );

    Overrides XoopsForm::render() (returns renderered form)

    Remarks

    create HTML to output the form with minimal formatting

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:59:22 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsTableForm

Class XoopsTableForm

[line 59]
XoopsForm
   |
   --XoopsTableForm
Location: /xoopsform/tableform.php

Remarks

Form that will output formatted as a HTML table

No styles and no JavaScript to check for required fields.

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsForm

  • XoopsForm::$_action =
    "action" attribute for the html form
  • XoopsForm::$_elements = array()
    array of XoopsFormElement objects
  • XoopsForm::$_extra =
    extra information for the <form> tag
  • XoopsForm::$_method =
    "method" attribute for the form.
  • XoopsForm::$_name =
    "name" attribute of the form
  • XoopsForm::$_required = array()
    required elements
  • XoopsForm::$_title =
    title for the form

Method Summary

Inherited Method Summary

Inherited From Class XoopsForm

  • XoopsForm::XoopsForm()
    constructor
  • XoopsForm::addElement()
    Add an element to the form
  • XoopsForm::assign()
    assign to smarty form template instead of displaying directly
  • XoopsForm::display()
    displays rendered form
  • XoopsForm::getAction()
    get the "action" attribute for the <form> tag
  • XoopsForm::getElementByName()
    get a reference to a XoopsFormElement object by its "name"
  • XoopsForm::getElementNames()
    get an array of "name" attributes of form elements
  • XoopsForm::getElements()
    get an array of forms elements
  • XoopsForm::getElementValue()
    Gets the "value" attribute of a form element
  • XoopsForm::getElementValues()
    gets the "value" attribute of all form elements
  • XoopsForm::getExtra()
    get the extra attributes for the <form> tag
  • XoopsForm::getMethod()
    get the "method" attribute for the <form> tag
  • XoopsForm::getName()
    get the "name" attribute for the <form> tag
  • XoopsForm::getRequired()
    get an array of "required" form elements
  • XoopsForm::getTitle()
    return the title of the form
  • XoopsForm::insertBreak()
    insert a break in the form
  • XoopsForm::render()
    returns renderered form
  • XoopsForm::renderValidationJS()
    Renders the Javascript function needed for client-side for validation
  • XoopsForm::setElementValue()
    Sets the "value" attribute of a form element
  • XoopsForm::setElementValues()
    Sets the "value" attribute of form elements in a batch
  • XoopsForm::setExtra()
    set the extra attributes for the <form> tag
  • XoopsForm::setRequired()
    make an element "required"

Method Detail

    XoopsTableForm::render

    render( );

    Overrides XoopsForm::render() (returns renderered form)

    Remarks

    create HTML to output the form as a table

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:05 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsThemeForm

Class XoopsThemeForm

[line 59]
XoopsForm
   |
   --XoopsThemeForm
Location: /xoopsform/themeform.php

Remarks

Form that will output as a theme-enabled HTML table

Also adds JavaScript to validate required fields

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsForm

  • XoopsForm::$_action =
    "action" attribute for the html form
  • XoopsForm::$_elements = array()
    array of XoopsFormElement objects
  • XoopsForm::$_extra =
    extra information for the <form> tag
  • XoopsForm::$_method =
    "method" attribute for the form.
  • XoopsForm::$_name =
    "name" attribute of the form
  • XoopsForm::$_required = array()
    required elements
  • XoopsForm::$_title =
    title for the form

Method Summary

Inherited Method Summary

Inherited From Class XoopsForm

  • XoopsForm::XoopsForm()
    constructor
  • XoopsForm::addElement()
    Add an element to the form
  • XoopsForm::assign()
    assign to smarty form template instead of displaying directly
  • XoopsForm::display()
    displays rendered form
  • XoopsForm::getAction()
    get the "action" attribute for the <form> tag
  • XoopsForm::getElementByName()
    get a reference to a XoopsFormElement object by its "name"
  • XoopsForm::getElementNames()
    get an array of "name" attributes of form elements
  • XoopsForm::getElements()
    get an array of forms elements
  • XoopsForm::getElementValue()
    Gets the "value" attribute of a form element
  • XoopsForm::getElementValues()
    gets the "value" attribute of all form elements
  • XoopsForm::getExtra()
    get the extra attributes for the <form> tag
  • XoopsForm::getMethod()
    get the "method" attribute for the <form> tag
  • XoopsForm::getName()
    get the "name" attribute for the <form> tag
  • XoopsForm::getRequired()
    get an array of "required" form elements
  • XoopsForm::getTitle()
    return the title of the form
  • XoopsForm::insertBreak()
    insert a break in the form
  • XoopsForm::render()
    returns renderered form
  • XoopsForm::renderValidationJS()
    Renders the Javascript function needed for client-side for validation
  • XoopsForm::setElementValue()
    Sets the "value" attribute of a form element
  • XoopsForm::setElementValues()
    Sets the "value" attribute of form elements in a batch
  • XoopsForm::setExtra()
    set the extra attributes for the <form> tag
  • XoopsForm::setRequired()
    make an element "required"

Method Detail

    XoopsThemeForm::insertBreak

    insertBreak( [string $extra = ''], [string $class = ''] );

    Overrides XoopsForm::insertBreak() (insert a break in the form)

    Parameters

    $extra

    HTML to be displayed in the empty row.

    $class

    CSS class name for <td> tag

    Remarks

    Insert an empty row in the table to serve as a seperator.

    [ Top ]

    XoopsThemeForm::render

    render( );

    Overrides XoopsForm::render() (returns renderered form)

    Remarks

    create HTML to output the form as a theme-enabled table with validation.

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:15 +0200 by phpDocumentor 1.4.0a2


Docs for page form.php

File: /xoopsform/form.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsForm
Abstract base class for forms

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:50 +0200 by phpDocumentor 1.4.0a2


Docs for page formbutton.php

File: /xoopsform/formbutton.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormButton
A button

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:53 +0200 by phpDocumentor 1.4.0a2


Docs for page formcheckbox.php

File: /xoopsform/formcheckbox.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormCheckBox
One or more Checkbox(es)

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:54 +0200 by phpDocumentor 1.4.0a2


Docs for page formdatetime.php

File: /xoopsform/formdatetime.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormDateTime
Date and time selection field

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:57 +0200 by phpDocumentor 1.4.0a2


Docs for page formdhtmltextarea.php

File: /xoopsform/formdhtmltextarea.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormDhtmlTextArea
A textarea with xoopsish formatting and smilie buttons

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formtextarea.php"
    base class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formtextarea.php" [line 46]

    Remarks

    base class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:58 +0200 by phpDocumentor 1.4.0a2


Docs for page formelement.php

File: /xoopsform/formelement.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormElement
Abstract base class for form elements

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:01 +0200 by phpDocumentor 1.4.0a2


Docs for page formelementtray.php

File: /xoopsform/formelementtray.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormElementTray
A group of form elements

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:03 +0200 by phpDocumentor 1.4.0a2


Docs for page formfile.php

File: /xoopsform/formfile.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormFile
A file upload field

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:04 +0200 by phpDocumentor 1.4.0a2


Docs for page formhidden.php

File: /xoopsform/formhidden.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormHidden
A hidden field

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:05 +0200 by phpDocumentor 1.4.0a2


Docs for page formlabel.php

File: /xoopsform/formlabel.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormLabel
A text label

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:07 +0200 by phpDocumentor 1.4.0a2


Docs for page formpassword.php

File: /xoopsform/formpassword.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormPassword
A password field

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:08 +0200 by phpDocumentor 1.4.0a2


Docs for page formradio.php

File: /xoopsform/formradio.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormRadio
A Group of radiobuttons

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:09 +0200 by phpDocumentor 1.4.0a2


Docs for page formradioyn.php

File: /xoopsform/formradioyn.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormRadioYN
Yes/No radio buttons.

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formradio.php"
    base class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formradio.php" [line 45]

    Remarks

    base class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:10 +0200 by phpDocumentor 1.4.0a2


Docs for page formselect.php

File: /xoopsform/formselect.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormSelect
A select field

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:11 +0200 by phpDocumentor 1.4.0a2


Docs for page formselectcountry.php

File: /xoopsform/formselectcountry.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormSelectCountry
A select field with countries

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopslists.php"
    lists of values
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php"
    Parent

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopslists.php" [line 45]

    Remarks

    lists of values

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php" [line 50]

    Remarks

    Parent

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:12 +0200 by phpDocumentor 1.4.0a2


Docs for page formselectgroup.php

File: /xoopsform/formselectgroup.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormSelectGroup
A select field with a choice of available groups

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php"
    Parent

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php" [line 45]

    Remarks

    Parent

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:13 +0200 by phpDocumentor 1.4.0a2


Docs for page formselectlang.php

File: /xoopsform/formselectlang.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormSelectLang
A select field with available languages

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopslists.php"
    lists of values
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php"
    parent class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopslists.php" [line 44]

    Remarks

    lists of values

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php" [line 48]

    Remarks

    parent class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:14 +0200 by phpDocumentor 1.4.0a2


Docs for page formselectmatchoption.php

File: /xoopsform/formselectmatchoption.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormSelectMatchOption
A selection box with options for matching search terms.

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php"
    base class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php" [line 44]

    Remarks

    base class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:15 +0200 by phpDocumentor 1.4.0a2


Docs for page formselecttheme.php

File: /xoopsform/formselecttheme.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormSelectTheme
A select box with available themes

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopslists.php"
    lists of values
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php"
    base class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopslists.php" [line 44]

    Remarks

    lists of values

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php" [line 48]

    Remarks

    base class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:16 +0200 by phpDocumentor 1.4.0a2


Docs for page formselecttimezone.php

File: /xoopsform/formselecttimezone.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormSelectTimezone
A select box with timezones

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopslists.php"
    lists of values
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php"
    base class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopslists.php" [line 45]

    Remarks

    lists of values

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php" [line 49]

    Remarks

    base class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:17 +0200 by phpDocumentor 1.4.0a2


Docs for page formtext.php

File: /xoopsform/formtext.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormText
A simple text field

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:20 +0200 by phpDocumentor 1.4.0a2


Docs for page formtextarea.php

File: /xoopsform/formtextarea.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormTextArea
A textarea

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:21 +0200 by phpDocumentor 1.4.0a2


Docs for page formtextdateselect.php

File: /xoopsform/formtextdateselect.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormTextDateSelect
A text field with calendar popup

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:22 +0200 by phpDocumentor 1.4.0a2


Docs for page grouppermform.php

File: /xoopsform/grouppermform.php

filesource

Source Code for this file

Classes in this file:
XoopsGroupPermForm
Renders a form for setting module specific group permissions
XoopsGroupFormCheckBox
Renders checkbox options for a group permission form

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php'
  • require_once = XOOPS_ROOT_PATH.'/class/xoopsform/formhidden.php'
  • require_once = XOOPS_ROOT_PATH.'/class/xoopsform/formbutton.php'
  • require_once = XOOPS_ROOT_PATH.'/class/xoopsform/formelementtray.php'
  • require_once = XOOPS_ROOT_PATH.'/class/xoopsform/form.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php' [line 34]

  • require_once file: = XOOPS_ROOT_PATH.'/class/xoopsform/formhidden.php' [line 35]

  • require_once file: = XOOPS_ROOT_PATH.'/class/xoopsform/formbutton.php' [line 36]

  • require_once file: = XOOPS_ROOT_PATH.'/class/xoopsform/formelementtray.php' [line 37]

  • require_once file: = XOOPS_ROOT_PATH.'/class/xoopsform/form.php' [line 38]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:41 +0200 by phpDocumentor 1.4.0a2


Docs for page simpleform.php

File: /xoopsform/simpleform.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsSimpleForm
Form that will output as a simple HTML form with minimum formatting

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/form.php"
    base class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/form.php" [line 47]

    Remarks

    base class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:59:22 +0200 by phpDocumentor 1.4.0a2


Docs for page tableform.php

File: /xoopsform/tableform.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsTableForm
Form that will output formatted as a HTML table

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/form.php"
    the base class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/form.php" [line 46]

    Remarks

    the base class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:04 +0200 by phpDocumentor 1.4.0a2


Docs for page themeform.php

File: /xoopsform/themeform.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsThemeForm
Form that will output as a theme-enabled HTML table

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/form.php"
    base class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/form.php" [line 46]

    Remarks

    base class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:14 +0200 by phpDocumentor 1.4.0a2


File Source for pagenav.php

Source for file pagenav.php

Documentation is available at pagenav.php

  • <?php
    •

  • // $Id: pagenav.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  •
    •

  • /**
    •

  •  * Class to facilitate navigation in a multi page document/list
    •

  •  *
    •

  •  * @package        kernel
    •

  •  * @subpackage    util
    •

  •  *
    •

  •  * @author        Kazumi Ono     <onokazu@xoops.org>
    •

  •  * @copyright    (c) 2000-2003 The Xoops Project - www.xoops.org
    •

  •  */
    •

  • class XoopsPageNav
    •

  • {
    •

  •     /**#@+
    •

  •      * @access    private
    •

  •      */
    •

  •     var $total;
    •

  •     var $perpage;
    •

  •     var $current;
    •

  •     var $url;
    •

  •     /**#@-*/
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param   int     $total_items    Total number of items
    •

  •      * @param   int     $items_perpage  Number of items per page
    •

  •      * @param   int     $current_start  First item on the current page
    •

  •      * @param   string  $start_name     Name for "start" or "offset"
    •

  •      * @param   string  $extra_arg      Additional arguments to pass in the URL
    •

  •      ***/
    •

  •     function XoopsPageNav($total_items, $items_perpage, $current_start, $start_name="start", $extra_arg="")
    •

  •     {
    •

  •         $this->total = intval($total_items);
    •

  •         $this->perpage = intval($items_perpage);
    •

  •         $this->current = intval($current_start);
    •

  •         if ( $extra_arg != '' && ( substr($extra_arg, -5) != '&amp;' || substr($extra_arg, -1) != '&' ) ) {
    •

  •             $extra_arg .= '&amp;';
    •

  •         }
    •

  •         $this->url = $_SERVER['PHP_SELF'].'?'.$extra_arg.trim($start_name).'=';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Create text navigation
    •

  •      *
    •

  •      * @param   integer $offset
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function renderNav($offset = 4)
    •

  •     {
    •

  •         $ret = '';
    •

  •         if ( $this->total <= $this->perpage ) {
    •

  •             return $ret;
    •

  •         }
    •

  •         $total_pages = ceil($this->total / $this->perpage);
    •

  •         if ( $total_pages > 1 ) {
    •

  •             $prev = $this->current - $this->perpage;
    •

  •             if ( $prev >= 0 ) {
    •

  •                 $ret .= '<a href="'.$this->url.$prev.'"><u>&laquo;</u></a> ';
    •

  •             }
    •

  •             $counter = 1;
    •

  •             $current_page = intval(floor(($this->current + $this->perpage) / $this->perpage));
    •

  •             while ( $counter <= $total_pages ) {
    •

  •                 if ( $counter == $current_page ) {
    •

  •                     $ret .= '<b>('.$counter.')</b> ';
    •

  •                 } elseif ( ($counter > $current_page-$offset && $counter < $current_page + $offset ) || $counter == 1 || $counter == $total_pages ) {
    •

  •                     if ( $counter == $total_pages && $current_page < $total_pages - $offset ) {
    •

  •                         $ret .= '... ';
    •

  •                     }
    •

  •                     $ret .= '<a href="'.$this->url.(($counter - 1) * $this->perpage).'">'.$counter.'</a> ';
    •

  •                     if ( $counter == 1 && $current_page > 1 + $offset ) {
    •

  •                         $ret .= '... ';
    •

  •                     }
    •

  •                 }
    •

  •                 $counter++;
    •

  •             }
    •

  •             $next = $this->current + $this->perpage;
    •

  •             if ( $this->total > $next ) {
    •

  •                 $ret .= '<a href="'.$this->url.$next.'"><u>&raquo;</u></a> ';
    •

  •             }
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Create a navigational dropdown list
    •

  •      *
    •

  •      * @param   boolean     $showbutton Show the "Go" button?
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function renderSelect($showbutton = false)
    •

  •     {
    •

  •         if ( $this->total < $this->perpage ) {
    •

  •             return;
    •

  •         }
    •

  •         $total_pages = ceil($this->total / $this->perpage);
    •

  •         $ret = '';
    •

  •         if ( $total_pages > 1 ) {
    •

  •                $ret = '<form name="pagenavform">';
    •

  •             $ret .= '<select name="pagenavselect" onchange="location=this.options[this.options.selectedIndex].value;">';
    •

  •             $counter = 1;
    •

  •             $current_page = intval(floor(($this->current + $this->perpage) / $this->perpage));
    •

  •             while ( $counter <= $total_pages ) {
    •

  •                 if ( $counter == $current_page ) {
    •

  •                     $ret .= '<option value="'.$this->url.(($counter - 1) * $this->perpage).'" selected="selected">'.$counter.'</option>';
    •

  •                 } else {
    •

  •                     $ret .= '<option value="'.$this->url.(($counter - 1) * $this->perpage).'">'.$counter.'</option>';
    •

  •                 }
    •

  •                 $counter++;
    •

  •             }
    •

  •             $ret .= '</select>';
    •

  •             if ($showbutton) {
    •

  •                 $ret .= '&nbsp;<input type="submit" value="'._GO.'" />';
    •

  •             }
    •

  •             $ret .= '</form>';
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Create navigation with images
    •

  •      *
    •

  •      * @param   integer     $offset
    •

  •      * @return  string
    •

  •      ***/
    •

  •     function renderImageNav($offset = 4)
    •

  •     {
    •

  •         if ( $this->total < $this->perpage ) {
    •

  •             return;
    •

  •         }
    •

  •         $total_pages = ceil($this->total / $this->perpage);
    •

  •         $ret = '';
    •

  •         if ( $total_pages > 1 ) {
    •

  •                $ret = '<table><tr>';
    •

  •             $prev = $this->current - $this->perpage;
    •

  •             if ( $prev >= 0 ) {
    •

  •                 $ret .= '<td class="pagneutral"><a href="'.$this->url.$prev.'">&lt;</a></td><td><img src="'.XOOPS_URL.'/images/blank.gif" width="6" alt="" /></td>';
    •

  •             }
    •

  •             $counter = 1;
    •

  •             $current_page = intval(floor(($this->current + $this->perpage) / $this->perpage));
    •

  •             while ( $counter <= $total_pages ) {
    •

  •                 if ( $counter == $current_page ) {
    •

  •                     $ret .= '<td class="pagact"><b>'.$counter.'</b></td>';
    •

  •                 } elseif ( ($counter > $current_page-$offset && $counter < $current_page + $offset ) || $counter == 1 || $counter == $total_pages ) {
    •

  •                     if ( $counter == $total_pages && $current_page < $total_pages - $offset ) {
    •

  •                         $ret .= '<td class="paginact">...</td>';
    •

  •                     }
    •

  •                     $ret .= '<td class="paginact"><a href="'.$this->url.(($counter - 1) * $this->perpage).'">'.$counter.'</a></td>';
    •

  •                     if ( $counter == 1 && $current_page > 1 + $offset ) {
    •

  •                         $ret .= '<td class="paginact">...</td>';
    •

  •                     }
    •

  •                 }
    •

  •                 $counter++;
    •

  •             }
    •

  •             $next = $this->current + $this->perpage;
    •

  •             if ( $this->total > $next ) {
    •

  •                 $ret .= '<td><img src="'.XOOPS_URL.'/images/blank.gif" width="6" alt="" /></td><td class="pagneutral"><a href="'.$this->url.$next.'">&gt;</a></td>';
    •

  •             }
    •

  •             $ret .= '</tr></table>';
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:13 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsPageNav

Class XoopsPageNav

[line 41]

Location: /pagenav.php

Remarks

Class to facilitate navigation in a multi page document/list

author

Kazumi Ono     <onokazu@xoops.org>

copyright

(c) 2000-2003 The Xoops Project - www.xoops.org

Class Variable Summary

  • $current =

  • $perpage =

  • $total =

  • $url =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsPageNav::XoopsPageNav

XoopsPageNav(
int
$total_items, int
$items_perpage, int
$current_start, [string
$start_name = "start"], [string
$extra_arg = ""] );

    Parameters

    $total_items

    Total number of items

    $items_perpage

    Number of items per page

    $current_start

    First item on the current page

    $start_name

    Name for "start" or "offset"

    $extra_arg

    Additional arguments to pass in the URL

    Remarks

    Constructor

    [ Top ]

    XoopsPageNav::renderImageNav

renderImageNav(
[integer
$offset = 4] );

    Parameters

    $offset

    Remarks

    Create navigation with images

    [ Top ]

    XoopsPageNav::renderNav

renderNav(
[integer
$offset = 4] );

    Parameters

    $offset

    Remarks

    Create text navigation

    [ Top ]

    XoopsPageNav::renderSelect

renderSelect(
[boolean
$showbutton = false] );

    Parameters

    $showbutton

    Show the "Go" button?

    Remarks

    Create a navigational dropdown list

    [ Top ]

Variable Detail

  • $current =  [line 48]
    •

  • Data type: mixed
    •

    access

    private

  • $perpage =  [line 47]
    •

  • Data type: mixed
    •

    access

    private

  • $total =  [line 46]
    •

  • Data type: mixed
    •

    access

    private

  • $url =  [line 49]
    •

  • Data type: mixed
    •

    access

    private

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:59:13 +0200 by phpDocumentor 1.4.0a2


Docs for page pagenav.php

File: /pagenav.php

filesource

Source Code for this file

Classes in this file:
XoopsPageNav
Class to facilitate navigation in a multi page document/list

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:59:12 +0200 by phpDocumentor 1.4.0a2


Package kernel Element Index

Element index for package kernel

Indexes by package:
default
xos_kernel
PHPMailer
class
Smarty
xos_opal
xos_logos
XOOPS
xoops20
kernal

Index of all elements
a c d e f g h i l m n o p q r s t u v x _
top
_
$_auth_instance | in file auth_provisionning.php, variable XoopsAuthProvisionning::$_auth_instance
$_dao | in file auth.php, variable XoopsAuth::$_dao
$_ds | in file auth_ldap.php, variable XoopsAuthLdap::$_ds
$_errors | in file auth.php, variable XoopsAuth::$_errors
$_comments | in file commentrenderer.php, variable XoopsCommentRenderer::$_comments
$_doIconCheck | in file commentrenderer.php, variable XoopsCommentRenderer::$_doIconCheck
$_memberHandler | in file commentrenderer.php, variable XoopsCommentRenderer::$_memberHandler
$_statusText | in file commentrenderer.php, variable XoopsCommentRenderer::$_statusText
$_tpl | in file commentrenderer.php, variable XoopsCommentRenderer::$_tpl
$_useIcons | in file commentrenderer.php, variable XoopsCommentRenderer::$_useIcons
_getPosterArray in file commentrenderer.php, method XoopsCommentRenderer::_getPosterArray()
Get an array with info about the poster
_getPosterName in file commentrenderer.php, method XoopsCommentRenderer::_getPosterName()
Get the name of the poster
_getTitleIcon in file commentrenderer.php, method XoopsCommentRenderer::_getTitleIcon()
Get the IMG tag for the title icon
_renderNestReplies in file commentrenderer.php, method XoopsCommentRenderer::_renderNestReplies()
Render replies in nested view
_renderThreadReplies in file commentrenderer.php, method XoopsCommentRenderer::_renderThreadReplies()
Render replies to a thread
$_myId | in file tree.php, variable XoopsObjectTree::$_myId
$_objects | in file tree.php, variable XoopsObjectTree::$_objects
$_parentId | in file tree.php, variable XoopsObjectTree::$_parentId
$_rootId | in file tree.php, variable XoopsObjectTree::$_rootId
$_tree | in file tree.php, variable XoopsObjectTree::$_tree
_copyFile in file uploader.php, method XoopsMediaUploader::_copyFile()
Copy the file to its destination
_header in file downloader.php, method XoopsDownloader::_header()
Send the HTTP header
_initialize in file tree.php, method XoopsObjectTree::_initialize()
Initialize the object
_makeSelBoxOptions in file tree.php, method XoopsObjectTree::_makeSelBoxOptions()
Make options for a select box from
__computeUnsignedChecksum in file class.tar.php, method tar::__computeUnsignedChecksum()
Computes the unsigned Checksum of a file's header to try to ensure valid file
__generateTAR in file class.tar.php, method tar::__generateTAR()
Generates a TAR file from the processed data
__parseNullPaddedString in file class.tar.php, method tar::__parseNullPaddedString()
Converts a NULL padded string to a non-NULL padded string
__parseTar in file class.tar.php, method tar::__parseTar()
This function parses the current TAR file
__readTar in file class.tar.php, method tar::__readTar()
Read a non gzipped tar file in for processing.
$_accesskey in file formelement.php, variable XoopsFormElement::$_accesskey
Accesskey for this element
$_action in file form.php, variable XoopsForm::$_action
"action" attribute for the html form
$_caption in file formelement.php, variable XoopsFormElement::$_caption
caption of the element
$_class in file formelement.php, variable XoopsFormElement::$_class
HTML class for this element
$_cols in file formtextarea.php, variable XoopsFormTextArea::$_cols
number of columns
$_delimeter in file formelementtray.php, variable XoopsFormElementTray::$_delimeter
HTML to seperate the elements
$_description in file formelement.php, variable XoopsFormElement::$_description
description of the field
$_elements in file form.php, variable XoopsForm::$_elements
array of XoopsFormElement objects
$_elements in file formelementtray.php, variable XoopsFormElementTray::$_elements
array of form element objects
$_extra in file form.php, variable XoopsForm::$_extra
extra information for the <form> tag
$_extra in file formelement.php, variable XoopsFormElement::$_extra
extra attributes to go in the tag
$_groupId in file grouppermform.php, variable XoopsGroupFormCheckBox::$_groupId
Group ID
$_hidden in file formelement.php, variable XoopsFormElement::$_hidden
hidden?
$_hiddenText in file formdhtmltextarea.php, variable XoopsFormDhtmlTextArea::$_hiddenText
Hidden text
$_itemTree in file grouppermform.php, variable XoopsGroupPermForm::$_itemTree
Tree structure of items
$_maxFileSize in file formfile.php, variable XoopsFormFile::$_maxFileSize
Maximum size for an uploaded file
$_maxlength in file formtext.php, variable XoopsFormText::$_maxlength
Maximum length of the text
$_maxlength in file formpassword.php, variable XoopsFormPassword::$_maxlength
Maximum length of the text
$_method in file form.php, variable XoopsForm::$_method
"method" attribute for the form.
$_modid in file grouppermform.php, variable XoopsGroupPermForm::$_modid
Module ID
$_multiple in file formselect.php, variable XoopsFormSelect::$_multiple
Allow multiple selections?
$_name in file formelement.php, variable XoopsFormElement::$_name
"name" attribute of the element
$_name in file form.php, variable XoopsForm::$_name
"name" attribute of the form
$_options in file formselect.php, variable XoopsFormSelect::$_options
Options
$_options in file formcheckbox.php, variable XoopsFormCheckBox::$_options
Availlable options
$_options in file formradio.php, variable XoopsFormRadio::$_options
Array of Options
$_optionTree in file grouppermform.php, variable XoopsGroupFormCheckBox::$_optionTree
Option tree
$_permDesc in file grouppermform.php, variable XoopsGroupPermForm::$_permDesc
Description of permission
$_permName in file grouppermform.php, variable XoopsGroupPermForm::$_permName
Name of permission
$_required in file formelement.php, variable XoopsFormElement::$_required
required field?
$_required in file form.php, variable XoopsForm::$_required
required elements
$_required in file formelementtray.php, variable XoopsFormElementTray::$_required
required elements
$_rows in file formtextarea.php, variable XoopsFormTextArea::$_rows
number of rows
$_size in file formselect.php, variable XoopsFormSelect::$_size
Number of rows. "1" makes a dropdown list.
$_size in file formtext.php, variable XoopsFormText::$_size
Size
$_size in file formpassword.php, variable XoopsFormPassword::$_size
Size of the field.
$_title in file form.php, variable XoopsForm::$_title
title for the form
$_type in file formbutton.php, variable XoopsFormButton::$_type
Type of the button. This could be either "button", "submit", or "reset"
$_value in file grouppermform.php, variable XoopsGroupFormCheckBox::$_value
Pre-selected value(s)
$_value in file formtextarea.php, variable XoopsFormTextArea::$_value
initial content
$_value in file formhidden.php, variable XoopsFormHidden::$_value
Value
$_value in file formlabel.php, variable XoopsFormLabel::$_value
Text
$_value in file formcheckbox.php, variable XoopsFormCheckBox::$_value
pre-selected values in array
$_value in file formtext.php, variable XoopsFormText::$_value
Initial text
$_value in file formpassword.php, variable XoopsFormPassword::$_value
Initial content of the field.
$_value in file formselect.php, variable XoopsFormSelect::$_value
Pre-selcted values
$_value in file formradio.php, variable XoopsFormRadio::$_value
Pre-selected value
$_value in file formbutton.php, variable XoopsFormButton::$_value
Value
_loadAllChildItemIds in file grouppermform.php, method XoopsGroupPermForm::_loadAllChildItemIds()
Loads all child ids for an item to be used in javascript
_renderOptionTree in file grouppermform.php, method XoopsGroupFormCheckBox::_renderOptionTree()
Renders checkbox options for an item tree
_renderSmileys in file formdhtmltextarea.php, method XoopsFormDhtmlTextArea::_renderSmileys()
prepare HTML for output of the smiley list.
top
a
add in file auth_provisionning.php, method XoopsAuthProvisionning::add()
Add a new user to the system
auth.php | procedural page auth.php
authfactory.php | procedural page authfactory.php
auth_ads.php | procedural page auth_ads.php
auth_ldap.php | procedural page auth_ldap.php
auth_provisionning.php | procedural page auth_provisionning.php
auth_xoops.php | procedural page auth_xoops.php
authenticate in file auth_xoops.php, method XoopsAuthXoops::authenticate()
Authenticate user
authenticate | in file auth.php, method XoopsAuth::authenticate()
authenticate in file auth_ads.php, method XoopsAuthAds::authenticate()
Authenticate user again LDAP directory (Bind)
authenticate in file auth_ldap.php, method XoopsAuthLdap::authenticate()
Authenticate user again LDAP directory (Bind)
$allowedMimeTypes | in file uploader.php, variable XoopsMediaUploader::$allowedMimeTypes
$allowUnknownTypes in file uploader.php, variable XoopsMediaUploader::$allowUnknownTypes
Flag indicating if unrecognized mimetypes should be allowed (use with precaution ! may lead to security issues )
$archiver in file downloader.php, variable XoopsDownloader::$archiver
file information
addBinaryFile | in file zipdownloader.php, method XoopsZipDownloader::addBinaryFile()
addBinaryFile in file tardownloader.php, method XoopsTarDownloader::addBinaryFile()
Add a binary file to the archive
addBinaryFile in file downloader.php, method XoopsDownloader::addBinaryFile()
XoopsDownloader::addBinaryFile()
addBinaryFileData in file tardownloader.php, method XoopsTarDownloader::addBinaryFileData()
Add a binary dummy file to the archive
addBinaryFileData | in file zipdownloader.php, method XoopsZipDownloader::addBinaryFileData()
addBinaryFileData in file downloader.php, method XoopsDownloader::addBinaryFileData()
XoopsDownloader::addBinaryFileData()
addDirectory in file class.tar.php, method tar::addDirectory()
Add a directory to this tar archive
addFile in file class.tar.php, method tar::addFile()
Add a file to the tar archive
addFile | in file zipdownloader.php, method XoopsZipDownloader::addFile()
addFile in file tardownloader.php, method XoopsTarDownloader::addFile()
Add a file to the archive
addFile in file downloader.php, method XoopsDownloader::addFile()
XoopsDownloader::addFile()
addFileData in file downloader.php, method XoopsDownloader::addFileData()
XoopsDownloader::addFileData()
addFileData | in file zipdownloader.php, method XoopsZipDownloader::addFileData()
addFileData in file tardownloader.php, method XoopsTarDownloader::addFileData()
Add a dummy file to the archive
addSlashes in file module.textsanitizer.php, method MyTextSanitizer::addSlashes()
Add slashes to the text if magic_quotes_gpc is turned off.
appendTar in file class.tar.php, method tar::appendTar()
Appends a tar file to the end of the currently opened tar file.
add in file criteria.php, method CriteriaCompo::add()
Add an element
addElement in file form.php, method XoopsForm::addElement()
Add an element to the form
addElement in file formelementtray.php, method XoopsFormElementTray::addElement()
Add an element to the group
addItem in file grouppermform.php, method XoopsGroupPermForm::addItem()
Adds an item to which permission will be assigned
addOption in file formselect.php, method XoopsFormSelect::addOption()
Add an option
addOption in file formcheckbox.php, method XoopsFormCheckBox::addOption()
Add an option
addOption in file formradio.php, method XoopsFormRadio::addOption()
Add an option
addOptionArray in file formselect.php, method XoopsFormSelect::addOptionArray()
Add multiple options
addOptionArray in file formradio.php, method XoopsFormRadio::addOptionArray()
Adds multiple options
addOptionArray in file formcheckbox.php, method XoopsFormCheckBox::addOptionArray()
Add multiple Options at once
assign in file form.php, method XoopsForm::assign()
assign to smarty form template instead of displaying directly
top
c
$cp1252_map | in file auth_ldap.php, variable XoopsAuthLdap::$cp1252_map
change in file auth_provisionning.php, method XoopsAuthProvisionning::change()
Modify user information
cp1252_to_utf8 | in file auth_ldap.php, method XoopsAuthLdap::cp1252_to_utf8()
commentrenderer.php | procedural page commentrenderer.php
$cache_dir | in file template.php, variable XoopsTpl::$cache_dir
$censorConf | in file module.textsanitizer.php, variable MyTextSanitizer::$censorConf
$checkImageType | in file uploader.php, variable XoopsMediaUploader::$checkImageType
$compile_dir | in file template.php, variable XoopsTpl::$compile_dir
censorString in file module.textsanitizer.php, method MyTextSanitizer::censorString()
Replaces banned words in a string with their replacements
checkImageType in file uploader.php, method XoopsMediaUploader::checkImageType()
Check whether or not the uploaded image type is valid
checkMaxFileSize in file uploader.php, method XoopsMediaUploader::checkMaxFileSize()
Is the file the right size?
checkMaxHeight in file uploader.php, method XoopsMediaUploader::checkMaxHeight()
Is the picture the right height?
checkMaxWidth in file uploader.php, method XoopsMediaUploader::checkMaxWidth()
Is the picture the right width?
checkMimeType in file uploader.php, method XoopsMediaUploader::checkMimeType()
Check whether or not the uploaded file type is allowed
class.tar.php | procedural page class.tar.php
codeConv in file module.textsanitizer.php, method MyTextSanitizer::codeConv()
Sanitizing of [code] tag
codePreConv in file module.textsanitizer.php, method MyTextSanitizer::codePreConv()
Sanitizing of [code] tag
codeSanitizer in file module.textsanitizer.php, method MyTextSanitizer::codeSanitizer()
Sanitizing of [code] tag
containsDirectory in file class.tar.php, method tar::containsDirectory()
Check if this tar archive contains a specific directory
containsFile in file class.tar.php, method tar::containsFile()
Check if this tar archive contains a specific file
$column | in file criteria.php, variable Criteria::$column
$conditions in file criteria.php, variable CriteriaCompo::$conditions
Conditions
$conn in file mysqldatabase.php, variable XoopsMySQLDatabase::$conn
Database connection
$criteriaElements in file criteria.php, variable CriteriaCompo::$criteriaElements
The elements of the collection
close in file mysqldatabase.php, method XoopsMySQLDatabase::close()
Close MySQL connection
connect in file mysqldatabase.php, method XoopsMySQLDatabase::connect()
connect to the database
Criteria in file criteria.php, method Criteria::Criteria()
Constructor
Criteria in file criteria.php, class Criteria
A single criteria
criteria.php | procedural page criteria.php
CriteriaCompo in file criteria.php, method CriteriaCompo::CriteriaCompo()
Constructor
CriteriaCompo in file criteria.php, class CriteriaCompo
Collection of multiple CriteriaElements
CriteriaElement in file criteria.php, class CriteriaElement
A criteria (grammar?) for a database query.
CriteriaElement in file criteria.php, method CriteriaElement::CriteriaElement()
Constructor
$customValidationCode in file formelement.php, variable XoopsFormElement::$customValidationCode
Javascript performing additional validation of this element data
$current | in file pagenav.php, variable XoopsPageNav::$current
top
d
delete in file auth_provisionning.php, method XoopsAuthProvisionning::delete()
Modify a user
$directories in file class.tar.php, variable tar::$directories
Processed Archive Information
displayTarea in file module.textsanitizer.php, method MyTextSanitizer::displayTarea()
Filters textarea form data in DB for display
download | in file zipdownloader.php, method XoopsZipDownloader::download()
download in file tardownloader.php, method XoopsTarDownloader::download()
Send the file to the client
download in file downloader.php, method XoopsDownloader::download()
XoopsDownloader::download()
downloader.php | procedural page downloader.php
Database in file database.php, class Database
Only for backward compatibility
database.php | procedural page database.php
display in file form.php, method XoopsForm::display()
displays rendered form
top
e
$errors | in file uploader.php, variable XoopsMediaUploader::$errors
$ext in file downloader.php, variable XoopsDownloader::$ext
file information
$extensionsToBeSanitized | in file uploader.php, variable XoopsMediaUploader::$extensionsToBeSanitized
$extensionToMime | in file uploader.php, variable XoopsMediaUploader::$extensionToMime
ErrorHandler in file module.errorhandler.php, class ErrorHandler
Error Handler class
errno in file mysqldatabase.php, method XoopsMySQLDatabase::errno()
Returns the numerical value of the error message from previous MySQL operation
error in file mysqldatabase.php, method XoopsMySQLDatabase::error()
Returns the text of the error message from previous MySQL operation
top
f
$filename in file class.tar.php, variable tar::$filename
Unprocessed Archive Information
$files in file class.tar.php, variable tar::$files
Processed Archive Information
fetchFromData in file template.php, method XoopsTpl::fetchFromData()
Renders output from template data
fetchMedia in file uploader.php, method XoopsMediaUploader::fetchMedia()
Fetch the uploaded file
$function | in file criteria.php, variable Criteria::$function
fetchArray in file mysqldatabase.php, method XoopsMySQLDatabase::fetchArray()
Fetch a result row as an associative array
fetchBoth in file mysqldatabase.php, method XoopsMySQLDatabase::fetchBoth()
Fetch a result row as an associative array
fetchRow in file mysqldatabase.php, method XoopsMySQLDatabase::fetchRow()
Get a result row as an enumerated array
freeRecordSet in file mysqldatabase.php, method XoopsMySQLDatabase::freeRecordSet()
will free all memory associated with the result identifier result.
form.php | procedural page form.php
formbutton.php | procedural page formbutton.php
formcheckbox.php | procedural page formcheckbox.php
formdatetime.php | procedural page formdatetime.php
formdhtmltextarea.php | procedural page formdhtmltextarea.php
formelement.php | procedural page formelement.php
formelementtray.php | procedural page formelementtray.php
formfile.php | procedural page formfile.php
formhidden.php | procedural page formhidden.php
formlabel.php | procedural page formlabel.php
formpassword.php | procedural page formpassword.php
formradio.php | procedural page formradio.php
formradioyn.php | procedural page formradioyn.php
formselect.php | procedural page formselect.php
formselectcountry.php | procedural page formselectcountry.php
formselectgroup.php | procedural page formselectgroup.php
formselectlang.php | procedural page formselectlang.php
formselectmatchoption.php | procedural page formselectmatchoption.php
formselecttheme.php | procedural page formselecttheme.php
formselecttimezone.php | procedural page formselecttimezone.php
formtext.php | procedural page formtext.php
formtextarea.php | procedural page formtextarea.php
formtextdateselect.php | procedural page formtextdateselect.php
top
g
getAuthConnection in file authfactory.php, method XoopsAuthFactory::getAuthConnection()
Get a reference to the only instance of authentication class
getErrors in file auth.php, method XoopsAuth::getErrors()
return the errors for this object as an array
getFilter in file auth_ldap.php, method XoopsAuthLdap::getFilter()
Load user from XOOPS Database
getHtmlErrors in file auth.php, method XoopsAuth::getHtmlErrors()
return the errors for this object as html
getInstance | in file auth_provisionning.php, method XoopsAuthProvisionning::getInstance()
getUPN in file auth_ads.php, method XoopsAuthAds::getUPN()
Return the UPN = userPrincipalName (Active Directory) userPrincipalName = guyt@CP.com Often abbreviated to UPN, and looks like an email address. Very useful for logging on especially in a large Forest. Note UPN must be unique in the forest.
getUserDN in file auth_ldap.php, method XoopsAuthLdap::getUserDN()
Compose the user DN with the configuration.
getXoopsUser in file auth_provisionning.php, method XoopsAuthProvisionning::getXoopsUser()
Return a Xoops User Object
getAllChild in file tree.php, method XoopsObjectTree::getAllChild()
returns an array of all child objects of an object specified by its id
getAllParent in file tree.php, method XoopsObjectTree::getAllParent()
returns an array of all parent objects.
getByKey in file tree.php, method XoopsObjectTree::getByKey()
returns an object from the tree specified by its id
getDirectory in file class.tar.php, method tar::getDirectory()
Retrieves information about a directory in the current tar archive
getErrors in file uploader.php, method XoopsMediaUploader::getErrors()
Get generated errors
getFile in file class.tar.php, method tar::getFile()
Retrieves information about a file in the current tar archive
getFirstChild in file tree.php, method XoopsObjectTree::getFirstChild()
returns an array of all the first child object of an object specified by its id
getInstance in file module.textsanitizer.php, method MyTextSanitizer::getInstance()
Access the only instance of this class
getMediaName in file uploader.php, method XoopsMediaUploader::getMediaName()
Get the uploaded filename
getMediaSize in file uploader.php, method XoopsMediaUploader::getMediaSize()
Get the size of the uploaded file
getMediaTmpName in file uploader.php, method XoopsMediaUploader::getMediaTmpName()
Get the temporary name that the uploaded file was stored under
getMediaType in file uploader.php, method XoopsMediaUploader::getMediaType()
Get the type of the uploaded file
getSavedDestination in file uploader.php, method XoopsMediaUploader::getSavedDestination()
Get the destination the file is saved to
getSavedFileName in file uploader.php, method XoopsMediaUploader::getSavedFileName()
Get the saved filename
getSmileys in file module.textsanitizer.php, method MyTextSanitizer::getSmileys()
Get the smileys
getTree in file tree.php, method XoopsObjectTree::getTree()
Get the tree
$groupby | in file criteria.php, variable CriteriaElement::$groupby
genId in file mysqldatabase.php, method XoopsMySQLDatabase::genId()
generate an ID for a new row
getAffectedRows in file mysqldatabase.php, method XoopsMySQLDatabase::getAffectedRows()
Get number of affected rows
getFieldName in file mysqldatabase.php, method XoopsMySQLDatabase::getFieldName()
Get field name
getFieldsNum in file mysqldatabase.php, method XoopsMySQLDatabase::getFieldsNum()
Get number of fields in result
getFieldType in file mysqldatabase.php, method XoopsMySQLDatabase::getFieldType()
Get field type
getGroupby | in file criteria.php, method CriteriaElement::getGroupby()
getInsertId in file mysqldatabase.php, method XoopsMySQLDatabase::getInsertId()
Get the ID generated from the previous INSERT operation
getInstance | in file database.php, method Database::getInstance()
getLimit | in file criteria.php, method CriteriaElement::getLimit()
getOrder | in file criteria.php, method CriteriaElement::getOrder()
getRowsNum in file mysqldatabase.php, method XoopsMySQLDatabase::getRowsNum()
Get number of rows in result
getSort | in file criteria.php, method CriteriaElement::getSort()
getStart | in file criteria.php, method CriteriaElement::getStart()
getAccessKey in file formelement.php, method XoopsFormElement::getAccessKey()
get the "accesskey" attribute for the element
getAccessString in file formelement.php, method XoopsFormElement::getAccessString()
If the accesskey is found in the specified string, underlines it
getAction in file form.php, method XoopsForm::getAction()
get the "action" attribute for the <form> tag
getCaption in file formelement.php, method XoopsFormElement::getCaption()
get the caption for the element
getClass in file formelement.php, method XoopsFormElement::getClass()
get the "class" attribute for the element
getCols in file formtextarea.php, method XoopsFormTextArea::getCols()
Get number of columns
getDelimeter in file formelementtray.php, method XoopsFormElementTray::getDelimeter()
Get the delimiter of this group
getDescription in file formelement.php, method XoopsFormElement::getDescription()
get the element's description
getElementByName in file form.php, method XoopsForm::getElementByName()
get a reference to a XoopsFormElement object by its "name"
getElementNames in file form.php, method XoopsForm::getElementNames()
get an array of "name" attributes of form elements
getElements in file formelementtray.php, method XoopsFormElementTray::getElements()
Get an array of the elements in this group
getElements in file form.php, method XoopsForm::getElements()
get an array of forms elements
getElementValue in file form.php, method XoopsForm::getElementValue()
Gets the "value" attribute of a form element
getElementValues in file form.php, method XoopsForm::getElementValues()
gets the "value" attribute of all form elements
getExtra in file formelement.php, method XoopsFormElement::getExtra()
Get the extra attributes for the element
getExtra in file form.php, method XoopsForm::getExtra()
get the extra attributes for the <form> tag
getMaxFileSize in file formfile.php, method XoopsFormFile::getMaxFileSize()
Get the maximum filesize
getMaxlength in file formtext.php, method XoopsFormText::getMaxlength()
Get maximum text length
getMaxlength in file formpassword.php, method XoopsFormPassword::getMaxlength()
Get the max length
getMethod in file form.php, method XoopsForm::getMethod()
get the "method" attribute for the <form> tag
getName in file formelement.php, method XoopsFormElement::getName()
get the "name" attribute for the element
getName in file form.php, method XoopsForm::getName()
get the "name" attribute for the <form> tag
getOptions in file formselect.php, method XoopsFormSelect::getOptions()
Get all options
getOptions in file formradio.php, method XoopsFormRadio::getOptions()
Gets the options
getOptions in file formcheckbox.php, method XoopsFormCheckBox::getOptions()
Get an array with all the options
getRequired in file form.php, method XoopsForm::getRequired()
get an array of "required" form elements
getRequired in file formelementtray.php, method XoopsFormElementTray::getRequired()
get an array of "required" form elements
getRows in file formtextarea.php, method XoopsFormTextArea::getRows()
get number of rows
getSize in file formselect.php, method XoopsFormSelect::getSize()
Get the size
getSize in file formtext.php, method XoopsFormText::getSize()
Get size
getSize in file formpassword.php, method XoopsFormPassword::getSize()
Get the field size
getTitle in file form.php, method XoopsForm::getTitle()
return the title of the form
getType in file formbutton.php, method XoopsFormButton::getType()
Get the type
getValue in file formtextarea.php, method XoopsFormTextArea::getValue()
Get initial content
getValue in file formtext.php, method XoopsFormText::getValue()
Get initial text value
getValue in file formbutton.php, method XoopsFormButton::getValue()
Get the initial value
getValue in file formlabel.php, method XoopsFormLabel::getValue()
Get the text
getValue in file formhidden.php, method XoopsFormHidden::getValue()
Get the "value" attribute
getValue in file formselect.php, method XoopsFormSelect::getValue()
Get an array of pre-selected values
getValue in file formpassword.php, method XoopsFormPassword::getValue()
Get the initial value
getValue in file formcheckbox.php, method XoopsFormCheckBox::getValue()
Get the "value"
getValue in file formradio.php, method XoopsFormRadio::getValue()
Get the pre-selected value
grouppermform.php | procedural page grouppermform.php
top
h
htmlSpecialChars | in file module.textsanitizer.php, method MyTextSanitizer::htmlSpecialChars()
$htmlEditor in file formdhtmltextarea.php, variable XoopsFormDhtmlTextArea::$htmlEditor
Extended HTML editor definition
top
i
instance in file commentrenderer.php, method XoopsCommentRenderer::instance()
Access the only instance of this class
$imageExtensions | in file uploader.php, variable XoopsMediaUploader::$imageExtensions
$isGzipped in file class.tar.php, variable tar::$isGzipped
Unprocessed Archive Information
insertBreak in file themeform.php, method XoopsThemeForm::insertBreak()
Insert an empty row in the table to serve as a seperator.
insertBreak in file form.php, method XoopsForm::insertBreak()
insert a break in the form
isContainer in file formelement.php, method XoopsFormElement::isContainer()
Is this element a container of other elements?
isContainer in file formelementtray.php, method XoopsFormElementTray::isContainer()
Is this element a container of other elements?
isHidden in file formelement.php, method XoopsFormElement::isHidden()
Find out if an element is "hidden".
isMultiple in file formselect.php, method XoopsFormSelect::isMultiple()
Are multiple selections allowed?
isRequired in file formelementtray.php, method XoopsFormElementTray::isRequired()
Find out if there are required elements.
isRequired in file formelement.php, method XoopsFormElement::isRequired()
Find out if an element is required.
top
l
$ldap_base_dn | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_base_dn
$ldap_givenname_attr | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_givenname_attr
$ldap_loginldap_attr | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_loginldap_attr
$ldap_loginname_asdn | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_loginname_asdn
$ldap_mail_attr | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_mail_attr
$ldap_manager_dn | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_manager_dn
$ldap_manager_pass | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_manager_pass
$ldap_name_attr | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_name_attr
$ldap_port | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_port
$ldap_server | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_server
$ldap_surname_attr | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_surname_attr
$ldap_version | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_version
loadXoopsUser | in file auth_ldap.php, method XoopsAuthLdap::loadXoopsUser()
$left_delimiter | in file template.php, variable XoopsTpl::$left_delimiter
$limit in file criteria.php, variable CriteriaElement::$limit
Number of records to retrieve
$logger in file database.php, variable XoopsDatabase::$logger
reference to a XoopsLogger object
top
m
$maxFileSize | in file uploader.php, variable XoopsMediaUploader::$maxFileSize
$maxHeight | in file uploader.php, variable XoopsMediaUploader::$maxHeight
$maxWidth | in file uploader.php, variable XoopsMediaUploader::$maxWidth
$mediaError | in file uploader.php, variable XoopsMediaUploader::$mediaError
$mediaName | in file uploader.php, variable XoopsMediaUploader::$mediaName
$mediaRealType | in file uploader.php, variable XoopsMediaUploader::$mediaRealType
$mediaSize | in file uploader.php, variable XoopsMediaUploader::$mediaSize
$mediaTmpName | in file uploader.php, variable XoopsMediaUploader::$mediaTmpName
$mediaType | in file uploader.php, variable XoopsMediaUploader::$mediaType
$mimetype in file downloader.php, variable XoopsDownloader::$mimetype
file information
makeClickable in file module.textsanitizer.php, method MyTextSanitizer::makeClickable()
Make links in the text clickable
makeSelBox in file tree.php, method XoopsObjectTree::makeSelBox()
Make a select box with options from the tree
makeTareaData4Edit | in file module.textsanitizer.php, method MyTextSanitizer::makeTareaData4Edit()
makeTareaData4InsideQuotes | in file module.textsanitizer.php, method MyTextSanitizer::makeTareaData4InsideQuotes()
makeTareaData4Preview | in file module.textsanitizer.php, method MyTextSanitizer::makeTareaData4Preview()
makeTareaData4PreviewInForm | in file module.textsanitizer.php, method MyTextSanitizer::makeTareaData4PreviewInForm()
makeTareaData4Save | in file module.textsanitizer.php, method MyTextSanitizer::makeTareaData4Save()
makeTareaData4Show | in file module.textsanitizer.php, method MyTextSanitizer::makeTareaData4Show()
makeTboxData4Edit | in file module.textsanitizer.php, method MyTextSanitizer::makeTboxData4Edit()
makeTboxData4Preview | in file module.textsanitizer.php, method MyTextSanitizer::makeTboxData4Preview()
makeTboxData4PreviewInForm | in file module.textsanitizer.php, method MyTextSanitizer::makeTboxData4PreviewInForm()
makeTboxData4Save | in file module.textsanitizer.php, method MyTextSanitizer::makeTboxData4Save()
makeTboxData4Show | in file module.textsanitizer.php, method MyTextSanitizer::makeTboxData4Show()
module.errorhandler.php | procedural page module.errorhandler.php
module.textsanitizer.php | procedural page module.textsanitizer.php
MyTextSanitizer | in file module.textsanitizer.php, method MyTextSanitizer::MyTextSanitizer()
MyTextSanitizer in file module.textsanitizer.php, class MyTextSanitizer
Class to "clean up" text for various uses
mysqldatabase.php | procedural page mysqldatabase.php
top
n
$numDirectories in file class.tar.php, variable tar::$numDirectories
Processed Archive Information
$numFiles in file class.tar.php, variable tar::$numFiles
Processed Archive Information
nl2Br in file module.textsanitizer.php, method MyTextSanitizer::nl2Br()
Convert linebreaks to
tags
top
o
oopsAddSlashes | in file module.textsanitizer.php, method MyTextSanitizer::oopsAddSlashes()
oopsHtmlSpecialChars | in file module.textsanitizer.php, method MyTextSanitizer::oopsHtmlSpecialChars()
oopsNl2Br | in file module.textsanitizer.php, method MyTextSanitizer::oopsNl2Br()
oopsStripSlashesGPC | in file module.textsanitizer.php, method MyTextSanitizer::oopsStripSlashesGPC()
oopsStripSlashesRT | in file module.textsanitizer.php, method MyTextSanitizer::oopsStripSlashesRT()
openTAR in file class.tar.php, method tar::openTAR()
Open a TAR file
$operator | in file criteria.php, variable Criteria::$operator
$order in file criteria.php, variable CriteriaElement::$order
Sort order
top
p
$prefix | in file uploader.php, variable XoopsMediaUploader::$prefix
previewTarea in file module.textsanitizer.php, method MyTextSanitizer::previewTarea()
Filters textarea form data submitted for preview
$prefix | in file criteria.php, variable Criteria::$prefix
$prefix in file database.php, variable XoopsDatabase::$prefix
Prefix for tables in the database
prefix in file database.php, method XoopsDatabase::prefix()
attach the prefix.'_' to a given tablename
prefixQuery in file sqlutility.php, method SqlUtility::prefixQuery()
add a prefix.'_' to all tablenames in a query
$perpage | in file pagenav.php, variable XoopsPageNav::$perpage
pagenav.php | procedural page pagenav.php
top
q
query in file mysqldatabase.php, method XoopsMySQLDatabase::query()
perform a query
query in file mysqldatabase.php, method XoopsMySQLDatabaseProxy::query()
perform a query on the database
query in file mysqldatabase.php, method XoopsMySQLDatabaseSafe::query()
perform a query on the database
queryF in file mysqldatabase.php, method XoopsMySQLDatabase::queryF()
perform a query on the database
queryFromFile in file mysqldatabase.php, method XoopsMySQLDatabase::queryFromFile()
perform queries from SQL dump file in a batch
quoteString in file mysqldatabase.php, method XoopsMySQLDatabase::quoteString()
Returns escaped string text with single quotes around it to be safely stored in database
top
r
resetpwd in file auth_provisionning.php, method XoopsAuthProvisionning::resetpwd()
Add a new user to the system
restore in file auth_provisionning.php, method XoopsAuthProvisionning::restore()
Restore a user
renderFlatView in file commentrenderer.php, method XoopsCommentRenderer::renderFlatView()
Render the comments in flat view
renderNestView in file commentrenderer.php, method XoopsCommentRenderer::renderNestView()
Render comments in nested view
renderThreadView in file commentrenderer.php, method XoopsCommentRenderer::renderThreadView()
Render the comments in thread view
$right_delimiter | in file template.php, variable XoopsTpl::$right_delimiter
removeDirectory in file class.tar.php, method tar::removeDirectory()
Remove a directory from the tar archive
removeFile in file class.tar.php, method tar::removeFile()
Remove a file from the tar archive
render in file criteria.php, method CriteriaElement::render()
Render the criteria element
render in file criteria.php, method Criteria::render()
Make a sql condition string
render in file criteria.php, method CriteriaCompo::render()
Make the criteria into a query string
renderLdap in file criteria.php, method Criteria::renderLdap()
Generate an LDAP filter from criteria
renderLdap in file criteria.php, method CriteriaCompo::renderLdap()
Generate an LDAP filter from criteria
renderWhere in file criteria.php, method Criteria::renderWhere()
Make a SQL "WHERE" clause
renderWhere in file criteria.php, method CriteriaCompo::renderWhere()
Make the criteria into a SQL "WHERE" clause
render in file formtextarea.php, method XoopsFormTextArea::render()
prepare HTML for output
render in file formtext.php, method XoopsFormText::render()
Prepare HTML for output
render in file formselect.php, method XoopsFormSelect::render()
Prepare HTML for output
render in file form.php, method XoopsForm::render()
returns renderered form
render | in file formtextdateselect.php, method XoopsFormTextDateSelect::render()
render in file grouppermform.php, method XoopsGroupFormCheckBox::render()
Renders checkbox options for this group
render in file themeform.php, method XoopsThemeForm::render()
create HTML to output the form as a theme-enabled table with validation.
render in file tableform.php, method XoopsTableForm::render()
create HTML to output the form as a table
render in file simpleform.php, method XoopsSimpleForm::render()
create HTML to output the form with minimal formatting
render in file grouppermform.php, method XoopsGroupPermForm::render()
Renders the form
render in file formpassword.php, method XoopsFormPassword::render()
Prepare HTML for output
render in file formradio.php, method XoopsFormRadio::render()
Prepare HTML for output
render in file formbutton.php, method XoopsFormButton::render()
prepare HTML for output
render in file formcheckbox.php, method XoopsFormCheckBox::render()
prepare HTML for output
render in file formdhtmltextarea.php, method XoopsFormDhtmlTextArea::render()
Prepare HTML for output
render in file formlabel.php, method XoopsFormLabel::render()
Prepare HTML for output
render in file formelement.php, method XoopsFormElement::render()
Generates output for the element.
render in file formfile.php, method XoopsFormFile::render()
prepare HTML for output
render in file formhidden.php, method XoopsFormHidden::render()
Prepare HTML for output
render in file formelementtray.php, method XoopsFormElementTray::render()
prepare HTML to output this group
renderValidationJS in file formelement.php, method XoopsFormElement::renderValidationJS()
Render custom javascript validation code
renderValidationJS in file form.php, method XoopsForm::renderValidationJS()
Renders the Javascript function needed for client-side for validation
renderValidationJS | in file formdhtmltextarea.php, method XoopsFormDhtmlTextArea::renderValidationJS()
renderImageNav in file pagenav.php, method XoopsPageNav::renderImageNav()
Create navigation with images
renderNav in file pagenav.php, method XoopsPageNav::renderNav()
Create text navigation
renderSelect in file pagenav.php, method XoopsPageNav::renderSelect()
Create a navigational dropdown list
top
s
setErrors in file auth.php, method XoopsAuth::setErrors()
add an error
suspend in file auth_provisionning.php, method XoopsAuthProvisionning::suspend()
Suspend a user
sync in file auth_provisionning.php, method XoopsAuthProvisionning::sync()
Launch the synchronisation process
setComments in file commentrenderer.php, method XoopsCommentRenderer::setComments()
Accessor
$savedDestination | in file uploader.php, variable XoopsMediaUploader::$savedDestination
$savedFileName | in file uploader.php, variable XoopsMediaUploader::$savedFileName
$smileys | in file module.textsanitizer.php, variable MyTextSanitizer::$smileys
sanitizeForDisplay | in file module.textsanitizer.php, method MyTextSanitizer::sanitizeForDisplay()
sanitizeForPreview | in file module.textsanitizer.php, method MyTextSanitizer::sanitizeForPreview()
sanitizeMultipleExtensions in file uploader.php, method XoopsMediaUploader::sanitizeMultipleExtensions()
Sanitize executable filename with multiple extensions
saveTar in file class.tar.php, method tar::saveTar()
Write the currently loaded tar archive to disk
setErrors in file uploader.php, method XoopsMediaUploader::setErrors()
Add an error
setPrefix in file uploader.php, method XoopsMediaUploader::setPrefix()
Set the prefix
setTargetFileName in file uploader.php, method XoopsMediaUploader::setTargetFileName()
Set the target filename
show in file module.errorhandler.php, method ErrorHandler::show()
Show an error message
smiley in file module.textsanitizer.php, method MyTextSanitizer::smiley()
Replace emoticons in the message with smiley images
stripSlashesGPC | in file module.textsanitizer.php, method MyTextSanitizer::stripSlashesGPC()
$sort | in file criteria.php, variable CriteriaElement::$sort
$start in file criteria.php, variable CriteriaElement::$start
Offset of first record
sqlutility.php | procedural page sqlutility.php
setGroupby | in file criteria.php, method CriteriaElement::setGroupby()
setLimit | in file criteria.php, method CriteriaElement::setLimit()
setLogger in file database.php, method XoopsDatabase::setLogger()
assign a XoopsLogger object to the database
setOrder | in file criteria.php, method CriteriaElement::setOrder()
setPrefix in file database.php, method XoopsDatabase::setPrefix()
set the prefix for tables in the database
setSort | in file criteria.php, method CriteriaElement::setSort()
setStart | in file criteria.php, method CriteriaElement::setStart()
splitMySqlFile in file sqlutility.php, method SqlUtility::splitMySqlFile()
Function from phpMyAdmin (http://phpwizard.net/projects/phpMyAdmin/)
SqlUtility in file sqlutility.php, class SqlUtility
provide some utility methods for databases
setAccessKey in file formelement.php, method XoopsFormElement::setAccessKey()
set the "accesskey" attribute for the element
setCaption in file formelement.php, method XoopsFormElement::setCaption()
set the caption for the element
setClass in file formelement.php, method XoopsFormElement::setClass()
set the "class" attribute for the element
setDescription in file formelement.php, method XoopsFormElement::setDescription()
set the element's description
setElementValue in file form.php, method XoopsForm::setElementValue()
Sets the "value" attribute of a form element
setElementValues in file form.php, method XoopsForm::setElementValues()
Sets the "value" attribute of form elements in a batch
setExtra in file formelement.php, method XoopsFormElement::setExtra()
Add extra attributes to the element.
setExtra in file form.php, method XoopsForm::setExtra()
set the extra attributes for the <form> tag
setHidden in file formelement.php, method XoopsFormElement::setHidden()
flag the element as "hidden"
setName in file formelement.php, method XoopsFormElement::setName()
set the "name" attribute for the element
setOptionTree in file grouppermform.php, method XoopsGroupFormCheckBox::setOptionTree()
Sets the tree structure of items
setRequired in file form.php, method XoopsForm::setRequired()
make an element "required"
setValue in file formtext.php, method XoopsFormText::setValue()
Set initial text value
setValue in file formtextarea.php, method XoopsFormTextArea::setValue()
Set initial content
setValue in file formselect.php, method XoopsFormSelect::setValue()
Set pre-selected values
setValue in file grouppermform.php, method XoopsGroupFormCheckBox::setValue()
Sets pre-selected values
setValue in file formpassword.php, method XoopsFormPassword::setValue()
Set the initial value
setValue in file formbutton.php, method XoopsFormButton::setValue()
Set the initial value
setValue in file formradio.php, method XoopsFormRadio::setValue()
Set the pre-selected value
setValue in file formhidden.php, method XoopsFormHidden::setValue()
Sets the "value" attribute
setValue in file formcheckbox.php, method XoopsFormCheckBox::setValue()
Set the "value"
simpleform.php | procedural page simpleform.php
top
t
$targetFileName | in file uploader.php, variable XoopsMediaUploader::$targetFileName
$tar_file in file class.tar.php, variable tar::$tar_file
Unprocessed Archive Information
$template_dir | in file template.php, variable XoopsTpl::$template_dir
tar in file class.tar.php, method tar::tar()
Class Constructor -- Does nothing...
tar in file class.tar.php, class tar
tar Class
tardownloader.php | procedural page tardownloader.php
template.php | procedural page template.php
toTar in file class.tar.php, method tar::toTar()
Saves tar archive to a different file than the current file
toTarOutput in file class.tar.php, method tar::toTarOutput()
Sends tar archive to stdout
touch | in file template.php, method XoopsTpl::touch()
tree.php | procedural page tree.php
tableform.php | procedural page tableform.php
themeform.php | procedural page themeform.php
$total | in file pagenav.php, variable XoopsPageNav::$total
top
u
$uploadDir | in file uploader.php, variable XoopsMediaUploader::$uploadDir
undoHtmlSpecialChars in file module.textsanitizer.php, method MyTextSanitizer::undoHtmlSpecialChars()
Reverses htmlSpecialChars()
upload in file uploader.php, method XoopsMediaUploader::upload()
Check the file and copy it to the destination
uploader.php | procedural page uploader.php
$url | in file pagenav.php, variable XoopsPageNav::$url
top
v
$value | in file criteria.php, variable Criteria::$value
top
x
xoopsobject.php | procedural page xoopsobject.php
XoopsAuth | in file auth.php, class XoopsAuth
XoopsAuth in file auth.php, method XoopsAuth::XoopsAuth()
Authentication Service constructor
XoopsAuthAds | in file auth_ads.php, class XoopsAuthAds
XoopsAuthAds in file auth_ads.php, method XoopsAuthAds::XoopsAuthAds()
Authentication Service constructor
XoopsAuthFactory | in file authfactory.php, class XoopsAuthFactory
XoopsAuthLdap in file auth_ldap.php, method XoopsAuthLdap::XoopsAuthLdap()
Authentication Service constructor
XoopsAuthLdap | in file auth_ldap.php, class XoopsAuthLdap
XoopsAuthProvisionning | in file auth_provisionning.php, class XoopsAuthProvisionning
XoopsAuthProvisionning in file auth_provisionning.php, method XoopsAuthProvisionning::XoopsAuthProvisionning()
Authentication Service constructor
XoopsAuthXoops in file auth_xoops.php, method XoopsAuthXoops::XoopsAuthXoops()
Authentication Service constructor
XoopsAuthXoops | in file auth_xoops.php, class XoopsAuthXoops
XoopsCommentRenderer in file commentrenderer.php, method XoopsCommentRenderer::XoopsCommentRenderer()
Constructor
XoopsCommentRenderer in file commentrenderer.php, class XoopsCommentRenderer
Display comments
xoopsCodeDecode in file module.textsanitizer.php, method MyTextSanitizer::xoopsCodeDecode()
Replace XoopsCodes with their equivalent HTML formatting
XoopsDownloader in file downloader.php, method XoopsDownloader::XoopsDownloader()
Constructor
XoopsDownloader in file downloader.php, class XoopsDownloader
Sends non HTML files through a http socket
XoopsMediaUploader in file uploader.php, method XoopsMediaUploader::XoopsMediaUploader()
Constructor
XoopsMediaUploader in file uploader.php, class XoopsMediaUploader
Upload Media files
XoopsObjectTree in file tree.php, class XoopsObjectTree
A tree structures with XoopsObjects as nodes
XoopsObjectTree in file tree.php, method XoopsObjectTree::XoopsObjectTree()
Constructor
XoopsTarDownloader in file tardownloader.php, method XoopsTarDownloader::XoopsTarDownloader()
Constructor
XoopsTarDownloader in file tardownloader.php, class XoopsTarDownloader
Send tar files through a http socket
XoopsTpl | in file template.php, method XoopsTpl::XoopsTpl()
XoopsTpl in file template.php, class XoopsTpl
Template engine
XoopsZipDownloader in file zipdownloader.php, class XoopsZipDownloader
Sends non HTML files through a http socket
XoopsZipDownloader | in file zipdownloader.php, method XoopsZipDownloader::XoopsZipDownloader()
xoops_canUpdateFromFile | in file template.php, method XoopsTpl::xoops_canUpdateFromFile()
XOOPS_C_ERRORHANDLER_INCLUDED | in file module.errorhandler.php, constant XOOPS_C_ERRORHANDLER_INCLUDED
xoops_fetchFromData | in file template.php, method XoopsTpl::xoops_fetchFromData()
xoops_getTemplateDir | in file template.php, method XoopsTpl::xoops_getTemplateDir()
xoops_setCacheDir | in file template.php, method XoopsTpl::xoops_setCacheDir()
xoops_setCacheTime | in file template.php, method XoopsTpl::xoops_setCacheTime()
xoops_setCaching | in file template.php, method XoopsTpl::xoops_setCaching()
xoops_setCompileDir | in file template.php, method XoopsTpl::xoops_setCompileDir()
xoops_setDebugging | in file template.php, method XoopsTpl::xoops_setDebugging()
xoops_setTemplateDir | in file template.php, method XoopsTpl::xoops_setTemplateDir()
xoops_template_clear_module_cache in file template.php, function xoops_template_clear_module_cache()
Clear the module cache
xoops_template_touch in file template.php, function xoops_template_touch()
function to update compiled template file in templates_c folder
XoopsDatabase in file database.php, class XoopsDatabase
Abstract base class for Database access classes
XoopsDatabase in file database.php, method XoopsDatabase::XoopsDatabase()
constructor
XoopsMySQLDatabase in file mysqldatabase.php, class XoopsMySQLDatabase
connection to a mysql database
XoopsMySQLDatabaseProxy in file mysqldatabase.php, class XoopsMySQLDatabaseProxy
Read-Only connection to a MySQL database.
XoopsMySQLDatabaseSafe in file mysqldatabase.php, class XoopsMySQLDatabaseSafe
Safe Connection to a MySQL database.
XOOPS_C_DATABASE_INCLUDED in file database.php, constant XOOPS_C_DATABASE_INCLUDED
make sure this is only included once!
XoopsForm in file form.php, method XoopsForm::XoopsForm()
constructor
XoopsForm in file form.php, class XoopsForm
Abstract base class for forms
XoopsFormButton in file formbutton.php, method XoopsFormButton::XoopsFormButton()
Constructor
XoopsFormButton in file formbutton.php, class XoopsFormButton
A button
XoopsFormCheckBox in file formcheckbox.php, method XoopsFormCheckBox::XoopsFormCheckBox()
Constructor
XoopsFormCheckBox in file formcheckbox.php, class XoopsFormCheckBox
One or more Checkbox(es)
XoopsFormDateTime | in file formdatetime.php, method XoopsFormDateTime::XoopsFormDateTime()
XoopsFormDateTime in file formdatetime.php, class XoopsFormDateTime
Date and time selection field
XoopsFormDhtmlTextArea in file formdhtmltextarea.php, class XoopsFormDhtmlTextArea
A textarea with xoopsish formatting and smilie buttons
XoopsFormDhtmlTextArea in file formdhtmltextarea.php, method XoopsFormDhtmlTextArea::XoopsFormDhtmlTextArea()
Constructor
XoopsFormElement in file formelement.php, method XoopsFormElement::XoopsFormElement()
constructor
XoopsFormElement in file formelement.php, class XoopsFormElement
Abstract base class for form elements
XoopsFormElementTray in file formelementtray.php, method XoopsFormElementTray::XoopsFormElementTray()
constructor
XoopsFormElementTray in file formelementtray.php, class XoopsFormElementTray
A group of form elements
XoopsFormFile in file formfile.php, class XoopsFormFile
A file upload field
XoopsFormFile in file formfile.php, method XoopsFormFile::XoopsFormFile()
Constructor
XoopsFormHidden in file formhidden.php, method XoopsFormHidden::XoopsFormHidden()
Constructor
XoopsFormHidden in file formhidden.php, class XoopsFormHidden
A hidden field
XoopsFormHiddenToken in file formhiddentoken.php, method XoopsFormHiddenToken::XoopsFormHiddenToken()
Constructor
XoopsFormHiddenToken in file formhiddentoken.php, class XoopsFormHiddenToken
A hidden token field
XoopsFormLabel in file formlabel.php, method XoopsFormLabel::XoopsFormLabel()
Constructor
XoopsFormLabel in file formlabel.php, class XoopsFormLabel
A text label
XoopsFormPassword in file formpassword.php, method XoopsFormPassword::XoopsFormPassword()
Constructor
XoopsFormPassword in file formpassword.php, class XoopsFormPassword
A password field
XoopsFormRadio in file formradio.php, method XoopsFormRadio::XoopsFormRadio()
Constructor
XoopsFormRadio in file formradio.php, class XoopsFormRadio
A Group of radiobuttons
XoopsFormRadioYN in file formradioyn.php, method XoopsFormRadioYN::XoopsFormRadioYN()
Constructor
XoopsFormRadioYN in file formradioyn.php, class XoopsFormRadioYN
Yes/No radio buttons.
XoopsFormSelect in file formselect.php, method XoopsFormSelect::XoopsFormSelect()
Constructor
XoopsFormSelect in file formselect.php, class XoopsFormSelect
A select field
XoopsFormSelectCountry in file formselectcountry.php, method XoopsFormSelectCountry::XoopsFormSelectCountry()
Constructor
XoopsFormSelectCountry in file formselectcountry.php, class XoopsFormSelectCountry
A select field with countries
XoopsFormSelectGroup in file formselectgroup.php, method XoopsFormSelectGroup::XoopsFormSelectGroup()
Constructor
XoopsFormSelectGroup in file formselectgroup.php, class XoopsFormSelectGroup
A select field with a choice of available groups
XoopsFormSelectLang in file formselectlang.php, method XoopsFormSelectLang::XoopsFormSelectLang()
Constructor
XoopsFormSelectLang in file formselectlang.php, class XoopsFormSelectLang
A select field with available languages
XoopsFormSelectMatchOption in file formselectmatchoption.php, method XoopsFormSelectMatchOption::XoopsFormSelectMatchOption()
Constructor
XoopsFormSelectMatchOption in file formselectmatchoption.php, class XoopsFormSelectMatchOption
A selection box with options for matching search terms.
XoopsFormSelectTheme in file formselecttheme.php, class XoopsFormSelectTheme
A select box with available themes
XoopsFormSelectTheme in file formselecttheme.php, method XoopsFormSelectTheme::XoopsFormSelectTheme()
Constructor
XoopsFormSelectTimezone in file formselecttimezone.php, method XoopsFormSelectTimezone::XoopsFormSelectTimezone()
Constructor
XoopsFormSelectTimezone in file formselecttimezone.php, class XoopsFormSelectTimezone
A select box with timezones
XoopsFormText in file formtext.php, method XoopsFormText::XoopsFormText()
Constructor
XoopsFormText in file formtext.php, class XoopsFormText
A simple text field
XoopsFormTextArea in file formtextarea.php, method XoopsFormTextArea::XoopsFormTextArea()
Constuctor
XoopsFormTextArea in file formtextarea.php, class XoopsFormTextArea
A textarea
XoopsFormTextDateSelect | in file formtextdateselect.php, method XoopsFormTextDateSelect::XoopsFormTextDateSelect()
XoopsFormTextDateSelect in file formtextdateselect.php, class XoopsFormTextDateSelect
A text field with calendar popup
XoopsGroupFormCheckBox in file grouppermform.php, method XoopsGroupFormCheckBox::XoopsGroupFormCheckBox()
Constructor
XoopsGroupFormCheckBox in file grouppermform.php, class XoopsGroupFormCheckBox
Renders checkbox options for a group permission form
XoopsGroupPermForm in file grouppermform.php, method XoopsGroupPermForm::XoopsGroupPermForm()
Constructor
XoopsGroupPermForm in file grouppermform.php, class XoopsGroupPermForm
Renders a form for setting module specific group permissions
XoopsSimpleForm in file simpleform.php, class XoopsSimpleForm
Form that will output as a simple HTML form with minimum formatting
XoopsTableForm in file tableform.php, class XoopsTableForm
Form that will output formatted as a HTML table
XoopsThemeForm in file themeform.php, class XoopsThemeForm
Form that will output as a theme-enabled HTML table
XoopsPageNav in file pagenav.php, method XoopsPageNav::XoopsPageNav()
Constructor
XoopsPageNav in file pagenav.php, class XoopsPageNav
Class to facilitate navigation in a multi page document/list


Class Trees for Package kernel

Documentation generated on Tue, 28 Aug 2007 22:56:21 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopsobject.php

File: /xoopsobject.php

Remarks

this file is for backward compatibility only

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH.'/kernel/object.php'
    Load the new object class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH.'/kernel/object.php' [line 13]

    Remarks

    Load the new object class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:01:20 +0200 by phpDocumentor 1.4.0a2


File Source for xoopsobject.php

Source for file xoopsobject.php

Documentation is available at xoopsobject.php

  • <?php
    •

  • // $Id: xoopsobject.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     exit();
    •

  • }
    •

  • /**
    •

  •  * this file is for backward compatibility only
    •

  •  * @package kernel
    •

  •  ***/
    •

  • /**
    •

  •  * Load the new object class
    •

  •  **/
    •

  •
    •

  • require_once XOOPS_ROOT_PATH.'/kernel/object.php';
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:20 +0200 by phpDocumentor 1.4.0a2


File Source for block.textformat.php

Source for file block.textformat.php

Documentation is available at block.textformat.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Smarty {textformat}{/textformat} block plugin
    •

  •  *
    •

  •  * Type:     block function<br>
    •

  •  * Name:     textformat<br>
    •

  •  * Purpose:  format text a certain way with preset styles
    •

  •  *           or custom wrap/indent settings<br>
    •

  •  * @link http://smarty.php.net/manual/en/language.function.textformat.php {textformat}
    •

  •  *        (Smarty online manual)
    •

  •  * @param array
    •

  •  *  <pre>
    •

  •  *  Params:   style: string (email)
    •

  •  *            indent: integer (0)
    •

  •  *            wrap: integer (80)
    •

  •  *            wrap_char string ("\n")
    •

  •  *            indent_char: string (" ")
    •

  •  *            wrap_boundary: boolean (true)
    •

  •  *  </pre>
    •

  •  * @author Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string contents of the block
    •

  •  * @param Smarty clever simulation of a method
    •

  •  * @return string string $content re-formatted
    •

  •  */
    •

  • function smarty_block_textformat($params, $content, &$smarty)
    •

  • {
    •

  •     if (is_null($content)) {
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     $style = null;
    •

  •     $indent = 0;
    •

  •     $indent_first = 0;
    •

  •     $indent_char = ' ';
    •

  •     $wrap = 80;
    •

  •     $wrap_char = "\n";
    •

  •     $wrap_cut = false;
    •

  •     $assign = null;
    •

  •
    •

  •     foreach ($params as $_key => $_val) {
    •

  •         switch ($_key) {
    •

  •             case 'style':
    •

  •             case 'indent_char':
    •

  •             case 'wrap_char':
    •

  •             case 'assign':
    •

  •                 $$_key = (string)$_val;
    •

  •                 break;
    •

  •
    •

  •             case 'indent':
    •

  •             case 'indent_first':
    •

  •             case 'wrap':
    •

  •                 $$_key = (int)$_val;
    •

  •                 break;
    •

  •
    •

  •             case 'wrap_cut':
    •

  •                 $$_key = (bool)$_val;
    •

  •                 break;
    •

  •
    •

  •             default:
    •

  •                 $smarty->trigger_error("textformat: unknown attribute '$_key'");
    •

  •         }
    •

  •     }
    •

  •
    •

  •     if ($style == 'email') {
    •

  •         $wrap = 72;
    •

  •     }
    •

  •
    •

  •     // split into paragraphs
    •

  •     $_paragraphs = preg_split('![\r\n][\r\n]!',$content);
    •

  •     $_output = '';
    •

  •
    •

  •     for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) {
    •

  •         if ($_paragraphs[$_x] == '') {
    •

  •             continue;
    •

  •         }
    •

  •         // convert mult. spaces & special chars to single space
    •

  •         $_paragraphs[$_x] = preg_replace(array('!\s+!','!(^\s+)|(\s+$)!'), array(' ',''), $_paragraphs[$_x]);
    •

  •         // indent first line
    •

  •         if($indent_first > 0) {
    •

  •             $_paragraphs[$_x] = str_repeat($indent_char, $indent_first) . $_paragraphs[$_x];
    •

  •         }
    •

  •         // wordwrap sentences
    •

  •         $_paragraphs[$_x] = wordwrap($_paragraphs[$_x], $wrap - $indent, $wrap_char, $wrap_cut);
    •

  •         // indent lines
    •

  •         if($indent > 0) {
    •

  •             $_paragraphs[$_x] = preg_replace('!^!m', str_repeat($indent_char, $indent), $_paragraphs[$_x]);
    •

  •         }
    •

  •     }
    •

  •     $_output = implode($wrap_char . $wrap_char, $_paragraphs);
    •

  •
    •

  •     return $assign ? $smarty->assign($assign, $_output) : $_output;
    •

  •
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:56:39 +0200 by phpDocumentor 1.4.0a2


File Source for compiler.assign.php

Source for file compiler.assign.php

Documentation is available at compiler.assign.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Smarty {assign} compiler function plugin
    •

  •  *
    •

  •  * Type:     compiler function<br>
    •

  •  * Name:     assign<br>
    •

  •  * Purpose:  assign a value to a template variable
    •

  •  * @link http://smarty.php.net/manual/en/language.custom.functions.php#LANGUAGE.FUNCTION.ASSIGN {assign}
    •

  •  *        (Smarty online manual)
    •

  •  * @author Monte Ohrt <monte at ohrt dot com> (initial author)
    •

  •  * @auther messju mohr <messju at lammfellpuschen dot de> (conversion to compiler function)
    •

  •  * @param string containing var-attribute and value-attribute
    •

  •  * @param Smarty_Compiler
    •

  •  */
    •

  • function smarty_compiler_assign($tag_attrs, &$compiler)
    •

  • {
    •

  •     $_params = $compiler->_parse_attrs($tag_attrs);
    •

  •
    •

  •     if (!isset($_params['var'])) {
    •

  •         $compiler->_syntax_error("assign: missing 'var' parameter", E_USER_WARNING);
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     if (!isset($_params['value'])) {
    •

  •         $compiler->_syntax_error("assign: missing 'value' parameter", E_USER_WARNING);
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     return "\$this->assign({$_params['var']}, {$_params['value']});";
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:22 +0200 by phpDocumentor 1.4.0a2


File Source for core.assemble_plugin_filepath.php

Source for file core.assemble_plugin_filepath.php

Documentation is available at core.assemble_plugin_filepath.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * assemble filepath of requested plugin
    •

  •  *
    •

  •  * @param string $type
    •

  •  * @param string $name
    •

  •  * @return string|false
    •

  •  */
    •

  • function smarty_core_assemble_plugin_filepath($params, &$smarty)
    •

  • {
    •

  •     static $_filepaths_cache = array();
    •

  •
    •

  •     $_plugin_filename = $params['type'] . '.' . $params['name'] . '.php';
    •

  •     if (isset($_filepaths_cache[$_plugin_filename])) {
    •

  •         return $_filepaths_cache[$_plugin_filename];
    •

  •     }
    •

  •     $_return = false;
    •

  •
    •

  •     foreach ((array)$smarty->plugins_dir as $_plugin_dir) {
    •

  •
    •

  •         $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename;
    •

  •
    •

  •         // see if path is relative
    •

  •         if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)) {
    •

  •             $_relative_paths[] = $_plugin_dir;
    •

  •             // relative path, see if it is in the SMARTY_DIR
    •

  •             if (@is_readable(SMARTY_DIR . $_plugin_filepath)) {
    •

  •                 $_return = SMARTY_DIR . $_plugin_filepath;
    •

  •                 break;
    •

  •             }
    •

  •         }
    •

  •         // try relative to cwd (or absolute)
    •

  •         if (@is_readable($_plugin_filepath)) {
    •

  •             $_return = $_plugin_filepath;
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     if($_return === false) {
    •

  •         // still not found, try PHP include_path
    •

  •         if(isset($_relative_paths)) {
    •

  •             foreach ((array)$_relative_paths as $_plugin_dir) {
    •

  •
    •

  •                 $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename;
    •

  •
    •

  •                 $_params = array('file_path' => $_plugin_filepath);
    •

  •                 require_once(SMARTY_CORE_DIR . 'core.get_include_path.php');
    •

  •                 if(smarty_core_get_include_path($_params, $smarty)) {
    •

  •                     $_return = $_params['new_file_path'];
    •

  •                     break;
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •     $_filepaths_cache[$_plugin_filename] = $_return;
    •

  •     return $_return;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:29 +0200 by phpDocumentor 1.4.0a2


File Source for core.assign_smarty_interface.php

Source for file core.assign_smarty_interface.php

Documentation is available at core.assign_smarty_interface.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Smarty assign_smarty_interface core plugin
    •

  •  *
    •

  •  * Type:     core<br>
    •

  •  * Name:     assign_smarty_interface<br>
    •

  •  * Purpose:  assign the $smarty interface variable
    •

  •  * @param array Format: null
    •

  •  * @param Smarty
    •

  •  */
    •

  • function smarty_core_assign_smarty_interface($params, &$smarty)
    •

  • {
    •

  •         if (isset($smarty->_smarty_vars) && isset($smarty->_smarty_vars['request'])) {
    •

  •             return;
    •

  •         }
    •

  •
    •

  •         $_globals_map = array('g'  => 'HTTP_GET_VARS',
    •

  •                              'p'  => 'HTTP_POST_VARS',
    •

  •                              'c'  => 'HTTP_COOKIE_VARS',
    •

  •                              's'  => 'HTTP_SERVER_VARS',
    •

  •                              'e'  => 'HTTP_ENV_VARS');
    •

  •
    •

  •         $_smarty_vars_request  = array();
    •

  •
    •

  •         foreach (preg_split('!!', strtolower($smarty->request_vars_order)) as $_c) {
    •

  •             if (isset($_globals_map[$_c])) {
    •

  •                 $_smarty_vars_request = array_merge($_smarty_vars_request, $GLOBALS[$_globals_map[$_c]]);
    •

  •             }
    •

  •         }
    •

  •         $_smarty_vars_request = @array_merge($_smarty_vars_request, $GLOBALS['HTTP_SESSION_VARS']);
    •

  •
    •

  •         $smarty->_smarty_vars['request'] = $_smarty_vars_request;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:29 +0200 by phpDocumentor 1.4.0a2


File Source for core.create_dir_structure.php

Source for file core.create_dir_structure.php

Documentation is available at core.create_dir_structure.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * create full directory structure
    •

  •  *
    •

  •  * @param string $dir
    •

  •  */
    •

  •
    •

  • // $dir
    •

  •
    •

  • function smarty_core_create_dir_structure($params, &$smarty)
    •

  • {
    •

  •     if (!file_exists($params['dir'])) {
    •

  •         $_open_basedir_ini = ini_get('open_basedir');
    •

  •
    •

  •         if (DIRECTORY_SEPARATOR=='/') {
    •

  •             /* unix-style paths */
    •

  •             $_dir = $params['dir'];
    •

  •             $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);
    •

  •             $_new_dir = (substr($_dir, 0, 1)=='/') ? '/' : getcwd().'/';
    •

  •             if($_use_open_basedir = !empty($_open_basedir_ini)) {
    •

  •                 $_open_basedirs = explode(':', $_open_basedir_ini);
    •

  •             }
    •

  •
    •

  •         } else {
    •

  •             /* other-style paths */
    •

  •             $_dir = str_replace('\\','/', $params['dir']);
    •

  •             $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);
    •

  •             if (preg_match('!^((//)|([a-zA-Z]:/))!', $_dir, $_root_dir)) {
    •

  •                 /* leading "//" for network volume, or "[letter]:/" for full path */
    •

  •                 $_new_dir = $_root_dir[1];
    •

  •                 /* remove drive-letter from _dir_parts */
    •

  •                 if (isset($_root_dir[3])) array_shift($_dir_parts);
    •

  •
    •

  •             } else {
    •

  •                 $_new_dir = str_replace('\\', '/', getcwd()).'/';
    •

  •
    •

  •             }
    •

  •
    •

  •             if($_use_open_basedir = !empty($_open_basedir_ini)) {
    •

  •                 $_open_basedirs = explode(';', str_replace('\\', '/', $_open_basedir_ini));
    •

  •             }
    •

  •
    •

  •         }
    •

  •
    •

  •         /* all paths use "/" only from here */
    •

  •         foreach ($_dir_parts as $_dir_part) {
    •

  •             $_new_dir .= $_dir_part;
    •

  •
    •

  •             if ($_use_open_basedir) {
    •

  •                 // do not attempt to test or make directories outside of open_basedir
    •

  •                 $_make_new_dir = false;
    •

  •                 foreach ($_open_basedirs as $_open_basedir) {
    •

  •                     if (substr($_new_dir, 0, strlen($_open_basedir)) == $_open_basedir) {
    •

  •                         $_make_new_dir = true;
    •

  •                         break;
    •

  •                     }
    •

  •                 }
    •

  •             } else {
    •

  •                 $_make_new_dir = true;
    •

  •             }
    •

  •
    •

  •             if ($_make_new_dir && !file_exists($_new_dir) && !@mkdir($_new_dir, $smarty->_dir_perms) && !is_dir($_new_dir)) {
    •

  •                 $smarty->trigger_error("problem creating directory '" . $_new_dir . "'");
    •

  •                 return false;
    •

  •             }
    •

  •             $_new_dir .= '/';
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:30 +0200 by phpDocumentor 1.4.0a2


File Source for core.display_debug_console.php

Source for file core.display_debug_console.php

Documentation is available at core.display_debug_console.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Smarty debug_console function plugin
    •

  •  *
    •

  •  * Type:     core<br>
    •

  •  * Name:     display_debug_console<br>
    •

  •  * Purpose:  display the javascript debug console window
    •

  •  * @param array Format: null
    •

  •  * @param Smarty
    •

  •  */
    •

  • function smarty_core_display_debug_console($params, &$smarty)
    •

  • {
    •

  •     // we must force compile the debug template in case the environment
    •

  •     // changed between separate applications.
    •

  •
    •

  •     if(empty($smarty->debug_tpl)) {
    •

  •         // set path to debug template from SMARTY_DIR
    •

  •         $smarty->debug_tpl = SMARTY_DIR . 'debug.tpl';
    •

  •         if($smarty->security && is_file($smarty->debug_tpl)) {
    •

  •             $smarty->secure_dir[] = realpath($smarty->debug_tpl);
    •

  •         }
    •

  •         $smarty->debug_tpl = 'file:' . SMARTY_DIR . 'debug.tpl';
    •

  •     }
    •

  •
    •

  •     $_ldelim_orig = $smarty->left_delimiter;
    •

  •     $_rdelim_orig = $smarty->right_delimiter;
    •

  •
    •

  •     $smarty->left_delimiter = '{';
    •

  •     $smarty->right_delimiter = '}';
    •

  •
    •

  •     $_compile_id_orig = $smarty->_compile_id;
    •

  •     $smarty->_compile_id = null;
    •

  •
    •

  •     $_compile_path = $smarty->_get_compile_path($smarty->debug_tpl);
    •

  •     if ($smarty->_compile_resource($smarty->debug_tpl, $_compile_path))
    •

  •     {
    •

  •         ob_start();
    •

  •         $smarty->_include($_compile_path);
    •

  •         $_results = ob_get_contents();
    •

  •         ob_end_clean();
    •

  •     } else {
    •

  •         $_results = '';
    •

  •     }
    •

  •
    •

  •     $smarty->_compile_id = $_compile_id_orig;
    •

  •
    •

  •     $smarty->left_delimiter = $_ldelim_orig;
    •

  •     $smarty->right_delimiter = $_rdelim_orig;
    •

  •
    •

  •     return $_results;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:31 +0200 by phpDocumentor 1.4.0a2


File Source for core.get_include_path.php

Source for file core.get_include_path.php

Documentation is available at core.get_include_path.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Get path to file from include_path
    •

  •  *
    •

  •  * @param string $file_path
    •

  •  * @param string $new_file_path
    •

  •  * @return boolean
    •

  •  * @staticvar array|null
    •

  •  */
    •

  •
    •

  • //  $file_path, &$new_file_path
    •

  •
    •

  • function smarty_core_get_include_path(&$params, &$smarty)
    •

  • {
    •

  •     static $_path_array = null;
    •

  •
    •

  •     if(!isset($_path_array)) {
    •

  •         $_ini_include_path = ini_get('include_path');
    •

  •
    •

  •         if(strstr($_ini_include_path,';')) {
    •

  •             // windows pathnames
    •

  •             $_path_array = explode(';',$_ini_include_path);
    •

  •         } else {
    •

  •             $_path_array = explode(':',$_ini_include_path);
    •

  •         }
    •

  •     }
    •

  •     foreach ($_path_array as $_include_path) {
    •

  •         if (@is_readable($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) {
    •

  •                $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR . $params['file_path'];
    •

  •             return true;
    •

  •         }
    •

  •     }
    •

  •     return false;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:32 +0200 by phpDocumentor 1.4.0a2


File Source for core.get_microtime.php

Source for file core.get_microtime.php

Documentation is available at core.get_microtime.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Get seconds and microseconds
    •

  •  * @return double
    •

  •  */
    •

  • function smarty_core_get_microtime($params, &$smarty)
    •

  • {
    •

  •     $mtime = microtime();
    •

  •     $mtime = explode(" ", $mtime);
    •

  •     $mtime = (double)($mtime[1]) + (double)($mtime[0]);
    •

  •     return ($mtime);
    •

  • }
    •

  •
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:32 +0200 by phpDocumentor 1.4.0a2


File Source for core.get_php_resource.php

Source for file core.get_php_resource.php

Documentation is available at core.get_php_resource.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Retrieves PHP script resource
    •

  •  *
    •

  •  * sets $php_resource to the returned resource
    •

  •  * @param string $resource
    •

  •  * @param string $resource_type
    •

  •  * @param  $php_resource
    •

  •  * @return boolean
    •

  •  */
    •

  •
    •

  • function smarty_core_get_php_resource(&$params, &$smarty)
    •

  • {
    •

  •
    •

  •     $params['resource_base_path'] = $smarty->trusted_dir;
    •

  •     $smarty->_parse_resource_name($params, $smarty);
    •

  •
    •

  •     /*
    •

  •      * Find out if the resource exists.
    •

  •      */
    •

  •
    •

  •     if ($params['resource_type'] == 'file') {
    •

  •         $_readable = false;
    •

  •         if(file_exists($params['resource_name']) && is_readable($params['resource_name'])) {
    •

  •             $_readable = true;
    •

  •         } else {
    •

  •             // test for file in include_path
    •

  •             $_params = array('file_path' => $params['resource_name']);
    •

  •             require_once(SMARTY_CORE_DIR . 'core.get_include_path.php');
    •

  •             if(smarty_core_get_include_path($_params, $smarty)) {
    •

  •                 $_include_path = $_params['new_file_path'];
    •

  •                 $_readable = true;
    •

  •             }
    •

  •         }
    •

  •     } else if ($params['resource_type'] != 'file') {
    •

  •         $_template_source = null;
    •

  •         $_readable = is_callable($smarty->_plugins['resource'][$params['resource_type']][0][0])
    •

  •             && call_user_func_array($smarty->_plugins['resource'][$params['resource_type']][0][0],
    •

  •                                     array($params['resource_name'], &$_template_source, &$smarty));
    •

  •     }
    •

  •
    •

  •     /*
    •

  •      * Set the error function, depending on which class calls us.
    •

  •      */
    •

  •     if (method_exists($smarty, '_syntax_error')) {
    •

  •         $_error_funcc = '_syntax_error';
    •

  •     } else {
    •

  •         $_error_funcc = 'trigger_error';
    •

  •     }
    •

  •
    •

  •     if ($_readable) {
    •

  •         if ($smarty->security) {
    •

  •             require_once(SMARTY_CORE_DIR . 'core.is_trusted.php');
    •

  •             if (!smarty_core_is_trusted($params, $smarty)) {
    •

  •                 $smarty->$_error_funcc('(secure mode) ' . $params['resource_type'] . ':' . $params['resource_name'] . ' is not trusted');
    •

  •                 return false;
    •

  •             }
    •

  •         }
    •

  •     } else {
    •

  •         $smarty->$_error_funcc($params['resource_type'] . ':' . $params['resource_name'] . ' is not readable');
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     if ($params['resource_type'] == 'file') {
    •

  •         $params['php_resource'] = $params['resource_name'];
    •

  •     } else {
    •

  •         $params['php_resource'] = $_template_source;
    •

  •     }
    •

  •     return true;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:33 +0200 by phpDocumentor 1.4.0a2


File Source for core.is_secure.php

Source for file core.is_secure.php

Documentation is available at core.is_secure.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * determines if a resource is secure or not.
    •

  •  *
    •

  •  * @param string $resource_type
    •

  •  * @param string $resource_name
    •

  •  * @return boolean
    •

  •  */
    •

  •
    •

  • //  $resource_type, $resource_name
    •

  •
    •

  • function smarty_core_is_secure($params, &$smarty)
    •

  • {
    •

  •     if (!$smarty->security || $smarty->security_settings['INCLUDE_ANY']) {
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     if ($params['resource_type'] == 'file') {
    •

  •         $_rp = realpath($params['resource_name']);
    •

  •         if (isset($params['resource_base_path'])) {
    •

  •             foreach ((array)$params['resource_base_path'] as $curr_dir) {
    •

  •                 if ( ($_cd = realpath($curr_dir)) !== false &&
    •

  •                      strncmp($_rp, $_cd, strlen($_cd)) == 0 &&
    •

  •                      substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) {
    •

  •                     return true;
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         if (!empty($smarty->secure_dir)) {
    •

  •             foreach ((array)$smarty->secure_dir as $curr_dir) {
    •

  •                 if ( ($_cd = realpath($curr_dir)) !== false) {
    •

  •                     if($_cd == $_rp) {
    •

  •                         return true;
    •

  •                     } elseif (strncmp($_rp, $_cd, strlen($_cd)) == 0 &&
    •

  •                         substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR) {
    •

  •                         return true;
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     } else {
    •

  •         // resource is not on local file system
    •

  •         return call_user_func_array(
    •

  •             $smarty->_plugins['resource'][$params['resource_type']][0][2],
    •

  •             array($params['resource_name'], &$smarty));
    •

  •     }
    •

  •
    •

  •     return false;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:34 +0200 by phpDocumentor 1.4.0a2


File Source for core.is_trusted.php

Source for file core.is_trusted.php

Documentation is available at core.is_trusted.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * determines if a resource is trusted or not
    •

  •  *
    •

  •  * @param string $resource_type
    •

  •  * @param string $resource_name
    •

  •  * @return boolean
    •

  •  */
    •

  •
    •

  •  // $resource_type, $resource_name
    •

  •
    •

  • function smarty_core_is_trusted($params, &$smarty)
    •

  • {
    •

  •     $_smarty_trusted = false;
    •

  •     if ($params['resource_type'] == 'file') {
    •

  •         if (!empty($smarty->trusted_dir)) {
    •

  •             $_rp = realpath($params['resource_name']);
    •

  •             foreach ((array)$smarty->trusted_dir as $curr_dir) {
    •

  •                 if (!empty($curr_dir) && is_readable ($curr_dir)) {
    •

  •                     $_cd = realpath($curr_dir);
    •

  •                     if (strncmp($_rp, $_cd, strlen($_cd)) == 0
    •

  •                         && substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) {
    •

  •                         $_smarty_trusted = true;
    •

  •                         break;
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •
    •

  •     } else {
    •

  •         // resource is not on local file system
    •

  •         $_smarty_trusted = call_user_func_array($smarty->_plugins['resource'][$params['resource_type']][0][3],
    •

  •                                                 array($params['resource_name'], $smarty));
    •

  •     }
    •

  •
    •

  •     return $_smarty_trusted;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:34 +0200 by phpDocumentor 1.4.0a2


File Source for core.load_plugins.php

Source for file core.load_plugins.php

Documentation is available at core.load_plugins.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Load requested plugins
    •

  •  *
    •

  •  * @param array $plugins
    •

  •  */
    •

  •
    •

  • // $plugins
    •

  •
    •

  • function smarty_core_load_plugins($params, &$smarty)
    •

  • {
    •

  •
    •

  •     foreach ($params['plugins'] as $_plugin_info) {
    •

  •         list($_type, $_name, $_tpl_file, $_tpl_line, $_delayed_loading) = $_plugin_info;
    •

  •         $_plugin = &$smarty->_plugins[$_type][$_name];
    •

  •
    •

  •         /*
    •

  •          * We do not load plugin more than once for each instance of Smarty.
    •

  •          * The following code checks for that. The plugin can also be
    •

  •          * registered dynamically at runtime, in which case template file
    •

  •          * and line number will be unknown, so we fill them in.
    •

  •          *
    •

  •          * The final element of the info array is a flag that indicates
    •

  •          * whether the dynamically registered plugin function has been
    •

  •          * checked for existence yet or not.
    •

  •          */
    •

  •         if (isset($_plugin)) {
    •

  •             if (empty($_plugin[3])) {
    •

  •                 if (!is_callable($_plugin[0])) {
    •

  •                     $smarty->_trigger_fatal_error("[plugin] $_type '$_name' is not implemented", $_tpl_file, $_tpl_line, __FILE__, __LINE__);
    •

  •                 } else {
    •

  •                     $_plugin[1] = $_tpl_file;
    •

  •                     $_plugin[2] = $_tpl_line;
    •

  •                     $_plugin[3] = true;
    •

  •                     if (!isset($_plugin[4])) $_plugin[4] = true; /* cacheable */
    •

  •                 }
    •

  •             }
    •

  •             continue;
    •

  •         } else if ($_type == 'insert') {
    •

  •             /*
    •

  •              * For backwards compatibility, we check for insert functions in
    •

  •              * the symbol table before trying to load them as a plugin.
    •

  •              */
    •

  •             $_plugin_func = 'insert_' . $_name;
    •

  •             if (function_exists($_plugin_func)) {
    •

  •                 $_plugin = array($_plugin_func, $_tpl_file, $_tpl_line, true, false);
    •

  •                 continue;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         $_plugin_file = $smarty->_get_plugin_filepath($_type, $_name);
    •

  •
    •

  •         if (! $_found = ($_plugin_file != false)) {
    •

  •             $_message = "could not load plugin file '$_type.$_name.php'\n";
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          * If plugin file is found, it -must- provide the properly named
    •

  •          * plugin function. In case it doesn't, simply output the error and
    •

  •          * do not fall back on any other method.
    •

  •          */
    •

  •         if ($_found) {
    •

  •             include_once $_plugin_file;
    •

  •
    •

  •             $_plugin_func = 'smarty_' . $_type . '_' . $_name;
    •

  •             if (!function_exists($_plugin_func)) {
    •

  •                 $smarty->_trigger_fatal_error("[plugin] function $_plugin_func() not found in $_plugin_file", $_tpl_file, $_tpl_line, __FILE__, __LINE__);
    •

  •                 continue;
    •

  •             }
    •

  •         }
    •

  •         /*
    •

  •          * In case of insert plugins, their code may be loaded later via
    •

  •          * 'script' attribute.
    •

  •          */
    •

  •         else if ($_type == 'insert' && $_delayed_loading) {
    •

  •             $_plugin_func = 'smarty_' . $_type . '_' . $_name;
    •

  •             $_found = true;
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          * Plugin specific processing and error checking.
    •

  •          */
    •

  •         if (!$_found) {
    •

  •             if ($_type == 'modifier') {
    •

  •                 /*
    •

  •                  * In case modifier falls back on using PHP functions
    •

  •                  * directly, we only allow those specified in the security
    •

  •                  * context.
    •

  •                  */
    •

  •                 if ($smarty->security && !in_array($_name, $smarty->security_settings['MODIFIER_FUNCS'])) {
    •

  •                     $_message = "(secure mode) modifier '$_name' is not allowed";
    •

  •                 } else {
    •

  •                     if (!function_exists($_name)) {
    •

  •                         $_message = "modifier '$_name' is not implemented";
    •

  •                     } else {
    •

  •                         $_plugin_func = $_name;
    •

  •                         $_found = true;
    •

  •                     }
    •

  •                 }
    •

  •             } else if ($_type == 'function') {
    •

  •                 /*
    •

  •                  * This is a catch-all situation.
    •

  •                  */
    •

  •                 $_message = "unknown tag - '$_name'";
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if ($_found) {
    •

  •             $smarty->_plugins[$_type][$_name] = array($_plugin_func, $_tpl_file, $_tpl_line, true, true);
    •

  •         } else {
    •

  •             // output error
    •

  •             $smarty->_trigger_fatal_error('[plugin] ' . $_message, $_tpl_file, $_tpl_line, __FILE__, __LINE__);
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:35 +0200 by phpDocumentor 1.4.0a2


File Source for core.load_resource_plugin.php

Source for file core.load_resource_plugin.php

Documentation is available at core.load_resource_plugin.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * load a resource plugin
    •

  •  *
    •

  •  * @param string $type
    •

  •  */
    •

  •
    •

  • // $type
    •

  •
    •

  • function smarty_core_load_resource_plugin($params, &$smarty)
    •

  • {
    •

  •     /*
    •

  •      * Resource plugins are not quite like the other ones, so they are
    •

  •      * handled differently. The first element of plugin info is the array of
    •

  •      * functions provided by the plugin, the second one indicates whether
    •

  •      * all of them exist or not.
    •

  •      */
    •

  •
    •

  •     $_plugin = &$smarty->_plugins['resource'][$params['type']];
    •

  •     if (isset($_plugin)) {
    •

  •         if (!$_plugin[1] && count($_plugin[0])) {
    •

  •             $_plugin[1] = true;
    •

  •             foreach ($_plugin[0] as $_plugin_func) {
    •

  •                 if (!is_callable($_plugin_func)) {
    •

  •                     $_plugin[1] = false;
    •

  •                     break;
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if (!$_plugin[1]) {
    •

  •             $smarty->_trigger_fatal_error("[plugin] resource '" . $params['type'] . "' is not implemented", null, null, __FILE__, __LINE__);
    •

  •         }
    •

  •
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     $_plugin_file = $smarty->_get_plugin_filepath('resource', $params['type']);
    •

  •     $_found = ($_plugin_file != false);
    •

  •
    •

  •     if ($_found) {            /*
    •

  •          * If the plugin file is found, it -must- provide the properly named
    •

  •          * plugin functions.
    •

  •          */
    •

  •         include_once($_plugin_file);
    •

  •
    •

  •         /*
    •

  •          * Locate functions that we require the plugin to provide.
    •

  •          */
    •

  •         $_resource_ops = array('source', 'timestamp', 'secure', 'trusted');
    •

  •         $_resource_funcs = array();
    •

  •         foreach ($_resource_ops as $_op) {
    •

  •             $_plugin_func = 'smarty_resource_' . $params['type'] . '_' . $_op;
    •

  •             if (!function_exists($_plugin_func)) {
    •

  •                 $smarty->_trigger_fatal_error("[plugin] function $_plugin_func() not found in $_plugin_file", null, null, __FILE__, __LINE__);
    •

  •                 return;
    •

  •             } else {
    •

  •                 $_resource_funcs[] = $_plugin_func;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         $smarty->_plugins['resource'][$params['type']] = array($_resource_funcs, true);
    •

  •     }
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:36 +0200 by phpDocumentor 1.4.0a2


File Source for core.process_cached_inserts.php

Source for file core.process_cached_inserts.php

Documentation is available at core.process_cached_inserts.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Replace cached inserts with the actual results
    •

  •  *
    •

  •  * @param string $results
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_core_process_cached_inserts($params, &$smarty)
    •

  • {
    •

  •     preg_match_all('!'.$smarty->_smarty_md5.'{insert_cache (.*)}'.$smarty->_smarty_md5.'!Uis',
    •

  •                    $params['results'], $match);
    •

  •     list($cached_inserts, $insert_args) = $match;
    •

  •
    •

  •     for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; $i++) {
    •

  •         if ($smarty->debugging) {
    •

  •             $_params = array();
    •

  •             require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
    •

  •             $debug_start_time = smarty_core_get_microtime($_params, $smarty);
    •

  •         }
    •

  •
    •

  •         $args = unserialize($insert_args[$i]);
    •

  •         $name = $args['name'];
    •

  •
    •

  •         if (isset($args['script'])) {
    •

  •             $_params = array('resource_name' => $smarty->_dequote($args['script']));
    •

  •             require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php');
    •

  •             if(!smarty_core_get_php_resource($_params, $smarty)) {
    •

  •                 return false;
    •

  •             }
    •

  •             $resource_type = $_params['resource_type'];
    •

  •             $php_resource = $_params['php_resource'];
    •

  •
    •

  •
    •

  •             if ($resource_type == 'file') {
    •

  •                 $smarty->_include($php_resource, true);
    •

  •             } else {
    •

  •                 $smarty->_eval($php_resource);
    •

  •             }
    •

  •         }
    •

  •
    •

  •         $function_name = $smarty->_plugins['insert'][$name][0];
    •

  •         if (empty($args['assign'])) {
    •

  •             $replace = $function_name($args, $smarty);
    •

  •         } else {
    •

  •             $smarty->assign($args['assign'], $function_name($args, $smarty));
    •

  •             $replace = '';
    •

  •         }
    •

  •
    •

  •         $params['results'] = substr_replace($params['results'], $replace, strpos($params['results'], $cached_inserts[$i]), strlen($cached_inserts[$i]));
    •

  •         if ($smarty->debugging) {
    •

  •             $_params = array();
    •

  •             require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
    •

  •             $smarty->_smarty_debug_info[] = array('type'      => 'insert',
    •

  •                                                 'filename'  => 'insert_'.$name,
    •

  •                                                 'depth'     => $smarty->_inclusion_depth,
    •

  •                                                 'exec_time' => smarty_core_get_microtime($_params, $smarty) - $debug_start_time);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     return $params['results'];
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:36 +0200 by phpDocumentor 1.4.0a2


File Source for core.process_compiled_include.php

Source for file core.process_compiled_include.php

Documentation is available at core.process_compiled_include.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Replace nocache-tags by results of the corresponding non-cacheable
    •

  •  * functions and return it
    •

  •  *
    •

  •  * @param string $compiled_tpl
    •

  •  * @param string $cached_source
    •

  •  * @return string
    •

  •  */
    •

  •
    •

  • function smarty_core_process_compiled_include($params, &$smarty)
    •

  • {
    •

  •     $_cache_including = $smarty->_cache_including;
    •

  •     $smarty->_cache_including = true;
    •

  •
    •

  •     $_return = $params['results'];
    •

  •
    •

  •     foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
    •

  •         $smarty->_include($_include_file_path, true);
    •

  •     }
    •

  •
    •

  •     foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) {
    •

  •         $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s',
    •

  •                                          array(&$smarty, '_process_compiled_include_callback'),
    •

  •                                          $_return);
    •

  •     }
    •

  •     $smarty->_cache_including = $_cache_including;
    •

  •     return $_return;
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:37 +0200 by phpDocumentor 1.4.0a2


File Source for core.read_cache_file.php

Source for file core.read_cache_file.php

Documentation is available at core.read_cache_file.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * read a cache file, determine if it needs to be
    •

  •  * regenerated or not
    •

  •  *
    •

  •  * @param string $tpl_file
    •

  •  * @param string $cache_id
    •

  •  * @param string $compile_id
    •

  •  * @param string $results
    •

  •  * @return boolean
    •

  •  */
    •

  •
    •

  • //  $tpl_file, $cache_id, $compile_id, &$results
    •

  •
    •

  • function smarty_core_read_cache_file(&$params, &$smarty)
    •

  • {
    •

  •     static  $content_cache = array();
    •

  •
    •

  •     if ($smarty->force_compile) {
    •

  •         // force compile enabled, always regenerate
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     if (isset($content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']])) {
    •

  •         list($params['results'], $smarty->_cache_info) = $content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']];
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     if (!empty($smarty->cache_handler_func)) {
    •

  •         // use cache_handler function
    •

  •         call_user_func_array($smarty->cache_handler_func,
    •

  •                              array('read', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null));
    •

  •     } else {
    •

  •         // use local cache file
    •

  •         $_auto_id = $smarty->_get_auto_id($params['cache_id'], $params['compile_id']);
    •

  •         $_cache_file = $smarty->_get_auto_filename($smarty->cache_dir, $params['tpl_file'], $_auto_id);
    •

  •         $params['results'] = $smarty->_read_file($_cache_file);
    •

  •     }
    •

  •
    •

  •     if (empty($params['results'])) {
    •

  •         // nothing to parse (error?), regenerate cache
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     $_contents = $params['results'];
    •

  •     $_info_start = strpos($_contents, "\n") + 1;
    •

  •     $_info_len = (int)substr($_contents, 0, $_info_start - 1);
    •

  •     $_cache_info = unserialize(substr($_contents, $_info_start, $_info_len));
    •

  •     $params['results'] = substr($_contents, $_info_start + $_info_len);
    •

  •
    •

  •     if ($smarty->caching == 2 && isset ($_cache_info['expires'])){
    •

  •         // caching by expiration time
    •

  •         if ($_cache_info['expires'] > -1 && (time() > $_cache_info['expires'])) {
    •

  •             // cache expired, regenerate
    •

  •             return false;
    •

  •         }
    •

  •     } else {
    •

  •         // caching by lifetime
    •

  •         if ($smarty->cache_lifetime > -1 && (time() - $_cache_info['timestamp'] > $smarty->cache_lifetime)) {
    •

  •             // cache expired, regenerate
    •

  •             return false;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     if ($smarty->compile_check) {
    •

  •         $_params = array('get_source' => false, 'quiet'=>true);
    •

  •         foreach (array_keys($_cache_info['template']) as $_template_dep) {
    •

  •             $_params['resource_name'] = $_template_dep;
    •

  •             if (!$smarty->_fetch_resource_info($_params) || $_cache_info['timestamp'] < $_params['resource_timestamp']) {
    •

  •                 // template file has changed, regenerate cache
    •

  •                 return false;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if (isset($_cache_info['config'])) {
    •

  •             $_params = array('resource_base_path' => $smarty->config_dir, 'get_source' => false, 'quiet'=>true);
    •

  •             foreach (array_keys($_cache_info['config']) as $_config_dep) {
    •

  •                 $_params['resource_name'] = $_config_dep;
    •

  •                 if (!$smarty->_fetch_resource_info($_params) || $_cache_info['timestamp'] < $_params['resource_timestamp']) {
    •

  •                     // config file has changed, regenerate cache
    •

  •                     return false;
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     $content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']] = array($params['results'], $_cache_info);
    •

  •
    •

  •     $smarty->_cache_info = $_cache_info;
    •

  •     return true;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:38 +0200 by phpDocumentor 1.4.0a2


File Source for core.rmdir.php

Source for file core.rmdir.php

Documentation is available at core.rmdir.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * delete a dir recursively (level=0 -> keep root)
    •

  •  * WARNING: no tests, it will try to remove what you tell it!
    •

  •  *
    •

  •  * @param string $dirname
    •

  •  * @param integer $level
    •

  •  * @param integer $exp_time
    •

  •  * @return boolean
    •

  •  */
    •

  •
    •

  • //  $dirname, $level = 1, $exp_time = null
    •

  •
    •

  • function smarty_core_rmdir($params, &$smarty)
    •

  • {
    •

  •    if(!isset($params['level'])) { $params['level'] = 1; }
    •

  •    if(!isset($params['exp_time'])) { $params['exp_time'] = null; }
    •

  •
    •

  •    if($_handle = @opendir($params['dirname'])) {
    •

  •
    •

  •         while (false !== ($_entry = readdir($_handle))) {
    •

  •             if ($_entry != '.' && $_entry != '..') {
    •

  •                 if (@is_dir($params['dirname'] . DIRECTORY_SEPARATOR . $_entry)) {
    •

  •                     $_params = array(
    •

  •                         'dirname' => $params['dirname'] . DIRECTORY_SEPARATOR . $_entry,
    •

  •                         'level' => $params['level'] + 1,
    •

  •                         'exp_time' => $params['exp_time']
    •

  •                     );
    •

  •                     smarty_core_rmdir($_params, $smarty);
    •

  •                 }
    •

  •                 else {
    •

  •                     $smarty->_unlink($params['dirname'] . DIRECTORY_SEPARATOR . $_entry, $params['exp_time']);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         closedir($_handle);
    •

  •    }
    •

  •
    •

  •    if ($params['level']) {
    •

  •        return @rmdir($params['dirname']);
    •

  •    }
    •

  •    return (bool)$_handle;
    •

  •
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:39 +0200 by phpDocumentor 1.4.0a2


File Source for core.rm_auto.php

Source for file core.rm_auto.php

Documentation is available at core.rm_auto.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * delete an automagically created file by name and id
    •

  •  *
    •

  •  * @param string $auto_base
    •

  •  * @param string $auto_source
    •

  •  * @param string $auto_id
    •

  •  * @param integer $exp_time
    •

  •  * @return boolean
    •

  •  */
    •

  •
    •

  • // $auto_base, $auto_source = null, $auto_id = null, $exp_time = null
    •

  •
    •

  • function smarty_core_rm_auto($params, &$smarty)
    •

  • {
    •

  •     if (!@is_dir($params['auto_base']))
    •

  •       return false;
    •

  •
    •

  •     if(!isset($params['auto_id']) && !isset($params['auto_source'])) {
    •

  •         $_params = array(
    •

  •             'dirname' => $params['auto_base'],
    •

  •             'level' => 0,
    •

  •             'exp_time' => $params['exp_time']
    •

  •         );
    •

  •         require_once(SMARTY_CORE_DIR . 'core.rmdir.php');
    •

  •         $_res = smarty_core_rmdir($_params, $smarty);
    •

  •     } else {
    •

  •         $_tname = $smarty->_get_auto_filename($params['auto_base'], $params['auto_source'], $params['auto_id']);
    •

  •
    •

  •         if(isset($params['auto_source'])) {
    •

  •             if (isset($params['extensions'])) {
    •

  •                 $_res = false;
    •

  •                 foreach ((array)$params['extensions'] as $_extension)
    •

  •                     $_res |= $smarty->_unlink($_tname.$_extension, $params['exp_time']);
    •

  •             } else {
    •

  •                 $_res = $smarty->_unlink($_tname, $params['exp_time']);
    •

  •             }
    •

  •         } elseif ($smarty->use_sub_dirs) {
    •

  •             $_params = array(
    •

  •                 'dirname' => $_tname,
    •

  •                 'level' => 1,
    •

  •                 'exp_time' => $params['exp_time']
    •

  •             );
    •

  •             require_once(SMARTY_CORE_DIR . 'core.rmdir.php');
    •

  •             $_res = smarty_core_rmdir($_params, $smarty);
    •

  •         } else {
    •

  •             // remove matching file names
    •

  •             $_handle = opendir($params['auto_base']);
    •

  •             $_res = true;
    •

  •             while (false !== ($_filename = readdir($_handle))) {
    •

  •                 if($_filename == '.' || $_filename == '..') {
    •

  •                     continue;
    •

  •                 } elseif (substr($params['auto_base'] . DIRECTORY_SEPARATOR . $_filename, 0, strlen($_tname)) == $_tname) {
    •

  •                     $_res &= (bool)$smarty->_unlink($params['auto_base'] . DIRECTORY_SEPARATOR . $_filename, $params['exp_time']);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     return $_res;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:39 +0200 by phpDocumentor 1.4.0a2


File Source for core.run_insert_handler.php

Source for file core.run_insert_handler.php

Documentation is available at core.run_insert_handler.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Handle insert tags
    •

  •  *
    •

  •  * @param array $args
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_core_run_insert_handler($params, &$smarty)
    •

  • {
    •

  •
    •

  •     require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
    •

  •     if ($smarty->debugging) {
    •

  •         $_params = array();
    •

  •         $_debug_start_time = smarty_core_get_microtime($_params, $smarty);
    •

  •     }
    •

  •
    •

  •     if ($smarty->caching) {
    •

  •         $_arg_string = serialize($params['args']);
    •

  •         $_name = $params['args']['name'];
    •

  •         if (!isset($smarty->_cache_info['insert_tags'][$_name])) {
    •

  •             $smarty->_cache_info['insert_tags'][$_name] = array('insert',
    •

  •                                                              $_name,
    •

  •                                                              $smarty->_plugins['insert'][$_name][1],
    •

  •                                                              $smarty->_plugins['insert'][$_name][2],
    •

  •                                                              !empty($params['args']['script']) ? true : false);
    •

  •         }
    •

  •         return $smarty->_smarty_md5."{insert_cache $_arg_string}".$smarty->_smarty_md5;
    •

  •     } else {
    •

  •         if (isset($params['args']['script'])) {
    •

  •             $_params = array('resource_name' => $smarty->_dequote($params['args']['script']));
    •

  •             require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php');
    •

  •             if(!smarty_core_get_php_resource($_params, $smarty)) {
    •

  •                 return false;
    •

  •             }
    •

  •
    •

  •             if ($_params['resource_type'] == 'file') {
    •

  •                 $smarty->_include($_params['php_resource'], true);
    •

  •             } else {
    •

  •                 $smarty->_eval($_params['php_resource']);
    •

  •             }
    •

  •             unset($params['args']['script']);
    •

  •         }
    •

  •
    •

  •         $_funcname = $smarty->_plugins['insert'][$params['args']['name']][0];
    •

  •         $_content = $_funcname($params['args'], $smarty);
    •

  •         if ($smarty->debugging) {
    •

  •             $_params = array();
    •

  •             require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
    •

  •             $smarty->_smarty_debug_info[] = array('type'      => 'insert',
    •

  •                                                 'filename'  => 'insert_'.$params['args']['name'],
    •

  •                                                 'depth'     => $smarty->_inclusion_depth,
    •

  •                                                 'exec_time' => smarty_core_get_microtime($_params, $smarty) - $_debug_start_time);
    •

  •         }
    •

  •
    •

  •         if (!empty($params['args']["assign"])) {
    •

  •             $smarty->assign($params['args']["assign"], $_content);
    •

  •         } else {
    •

  •             return $_content;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:40 +0200 by phpDocumentor 1.4.0a2


File Source for core.smarty_include_php.php

Source for file core.smarty_include_php.php

Documentation is available at core.smarty_include_php.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * called for included php files within templates
    •

  •  *
    •

  •  * @param string $smarty_file
    •

  •  * @param string $smarty_assign variable to assign the included template's
    •

  •  *                output into
    •

  •  * @param boolean $smarty_once uses include_once if this is true
    •

  •  * @param array $smarty_include_vars associative array of vars from
    •

  •  *               {include file="blah" var=$var}
    •

  •  */
    •

  •
    •

  • //  $file, $assign, $once, $_smarty_include_vars
    •

  •
    •

  • function smarty_core_smarty_include_php($params, &$smarty)
    •

  • {
    •

  •     $_params = array('resource_name' => $params['smarty_file']);
    •

  •     require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php');
    •

  •     smarty_core_get_php_resource($_params, $smarty);
    •

  •     $_smarty_resource_type = $_params['resource_type'];
    •

  •     $_smarty_php_resource = $_params['php_resource'];
    •

  •
    •

  •     if (!empty($params['smarty_assign'])) {
    •

  •         ob_start();
    •

  •         if ($_smarty_resource_type == 'file') {
    •

  •             $smarty->_include($_smarty_php_resource, $params['smarty_once'], $params['smarty_include_vars']);
    •

  •         } else {
    •

  •             $smarty->_eval($_smarty_php_resource, $params['smarty_include_vars']);
    •

  •         }
    •

  •         $smarty->assign($params['smarty_assign'], ob_get_contents());
    •

  •         ob_end_clean();
    •

  •     } else {
    •

  •         if ($_smarty_resource_type == 'file') {
    •

  •             $smarty->_include($_smarty_php_resource, $params['smarty_once'], $params['smarty_include_vars']);
    •

  •         } else {
    •

  •             $smarty->_eval($_smarty_php_resource, $params['smarty_include_vars']);
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:41 +0200 by phpDocumentor 1.4.0a2


File Source for core.write_cache_file.php

Source for file core.write_cache_file.php

Documentation is available at core.write_cache_file.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Prepend the cache information to the cache file
    •

  •  * and write it
    •

  •  *
    •

  •  * @param string $tpl_file
    •

  •  * @param string $cache_id
    •

  •  * @param string $compile_id
    •

  •  * @param string $results
    •

  •  * @return true|null
    •

  •  */
    •

  •
    •

  •  // $tpl_file, $cache_id, $compile_id, $results
    •

  •
    •

  • function smarty_core_write_cache_file($params, &$smarty)
    •

  • {
    •

  •
    •

  •     // put timestamp in cache header
    •

  •     $smarty->_cache_info['timestamp'] = time();
    •

  •     if ($smarty->cache_lifetime > -1){
    •

  •         // expiration set
    •

  •         $smarty->_cache_info['expires'] = $smarty->_cache_info['timestamp'] + $smarty->cache_lifetime;
    •

  •     } else {
    •

  •         // cache will never expire
    •

  •         $smarty->_cache_info['expires'] = -1;
    •

  •     }
    •

  •
    •

  •     // collapse nocache.../nocache-tags
    •

  •     if (preg_match_all('!\{(/?)nocache\:[0-9a-f]{32}#\d+\}!', $params['results'], $match, PREG_PATTERN_ORDER)) {
    •

  •         // remove everything between every pair of outermost noache.../nocache-tags
    •

  •         // and replace it by a single nocache-tag
    •

  •         // this new nocache-tag will be replaced by dynamic contents in
    •

  •         // smarty_core_process_compiled_includes() on a cache-read
    •

  •
    •

  •         $match_count = count($match[0]);
    •

  •         $results = preg_split('!(\{/?nocache\:[0-9a-f]{32}#\d+\})!', $params['results'], -1, PREG_SPLIT_DELIM_CAPTURE);
    •

  •
    •

  •         $level = 0;
    •

  •         $j = 0;
    •

  •         for ($i=0, $results_count = count($results); $i < $results_count && $j < $match_count; $i++) {
    •

  •             if ($results[$i] == $match[0][$j]) {
    •

  •                 // nocache tag
    •

  •                 if ($match[1][$j]) { // closing tag
    •

  •                     $level--;
    •

  •                     unset($results[$i]);
    •

  •                 } else { // opening tag
    •

  •                     if ($level++ > 0) unset($results[$i]);
    •

  •                 }
    •

  •                 $j++;
    •

  •             } elseif ($level > 0) {
    •

  •                 unset($results[$i]);
    •

  •             }
    •

  •         }
    •

  •         $params['results'] = implode('', $results);
    •

  •     }
    •

  •     $smarty->_cache_info['cache_serials'] = $smarty->_cache_serials;
    •

  •
    •

  •     // prepend the cache header info into cache file
    •

  •     $_cache_info = serialize($smarty->_cache_info);
    •

  •     $params['results'] = strlen($_cache_info) . "\n" . $_cache_info . $params['results'];
    •

  •
    •

  •     if (!empty($smarty->cache_handler_func)) {
    •

  •         // use cache_handler function
    •

  •         call_user_func_array($smarty->cache_handler_func,
    •

  •                              array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null));
    •

  •     } else {
    •

  •         // use local cache file
    •

  •
    •

  •         if(!@is_writable($smarty->cache_dir)) {
    •

  •             // cache_dir not writable, see if it exists
    •

  •             if(!@is_dir($smarty->cache_dir)) {
    •

  •                 $smarty->trigger_error('the $cache_dir \'' . $smarty->cache_dir . '\' does not exist, or is not a directory.', E_USER_ERROR);
    •

  •                 return false;
    •

  •             }
    •

  •             $smarty->trigger_error('unable to write to $cache_dir \'' . realpath($smarty->cache_dir) . '\'. Be sure $cache_dir is writable by the web server user.', E_USER_ERROR);
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         $_auto_id = $smarty->_get_auto_id($params['cache_id'], $params['compile_id']);
    •

  •         $_cache_file = $smarty->_get_auto_filename($smarty->cache_dir, $params['tpl_file'], $_auto_id);
    •

  •         $_params = array('filename' => $_cache_file, 'contents' => $params['results'], 'create_dirs' => true);
    •

  •         require_once(SMARTY_CORE_DIR . 'core.write_file.php');
    •

  •         smarty_core_write_file($_params, $smarty);
    •

  •         return true;
    •

  •     }
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:42 +0200 by phpDocumentor 1.4.0a2


File Source for core.write_compiled_include.php

Source for file core.write_compiled_include.php

Documentation is available at core.write_compiled_include.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Extract non-cacheable parts out of compiled template and write it
    •

  •  *
    •

  •  * @param string $compile_path
    •

  •  * @param string $template_compiled
    •

  •  * @return boolean
    •

  •  */
    •

  •
    •

  • function smarty_core_write_compiled_include($params, &$smarty)
    •

  • {
    •

  •     $_tag_start = 'if \(\$this->caching && \!\$this->_cache_including\)\: echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\'; endif;';
    •

  •     $_tag_end   = 'if \(\$this->caching && \!\$this->_cache_including\)\: echo \'\{/nocache\:(\\2)#(\\3)\}\'; endif;';
    •

  •
    •

  •     preg_match_all('!('.$_tag_start.'(.*)'.$_tag_end.')!Us',
    •

  •                    $params['compiled_content'], $_match_source, PREG_SET_ORDER);
    •

  •
    •

  •     // no nocache-parts found: done
    •

  •     if (count($_match_source)==0) return;
    •

  •
    •

  •     // convert the matched php-code to functions
    •

  •     $_include_compiled =  "<?php /* Smarty version ".$smarty->_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n";
    •

  •     $_include_compiled .= "         compiled from " . strtr(urlencode($params['resource_name']), array('%2F'=>'/', '%3A'=>':')) . " */\n\n";
    •

  •
    •

  •     $_compile_path = $params['include_file_path'];
    •

  •
    •

  •     $smarty->_cache_serials[$_compile_path] = $params['cache_serial'];
    •

  •     $_include_compiled .= "\$this->_cache_serials['".$_compile_path."'] = '".$params['cache_serial']."';\n\n?>";
    •

  •
    •

  •     $_include_compiled .= $params['plugins_code'];
    •

  •     $_include_compiled .= "<?php";
    •

  •
    •

  •     $this_varname = ((double)phpversion() >= 5.0) ? '_smarty' : 'this';
    •

  •     for ($_i = 0, $_for_max = count($_match_source); $_i < $_for_max; $_i++) {
    •

  •         $_match =& $_match_source[$_i];
    •

  •         $source = $_match[4];
    •

  •         if ($this_varname == '_smarty') {
    •

  •             /* rename $this to $_smarty in the sourcecode */
    •

  •             $tokens = token_get_all('<?php ' . $_match[4]);
    •

  •
    •

  •             /* remove trailing <?php */
    •

  •             $open_tag = '';
    •

  •             while ($tokens) {
    •

  •                 $token = array_shift($tokens);
    •

  •                 if (is_array($token)) {
    •

  •                     $open_tag .= $token[1];
    •

  •                 } else {
    •

  •                     $open_tag .= $token;
    •

  •                 }
    •

  •                 if ($open_tag == '<?php ') break;
    •

  •             }
    •

  •
    •

  •             for ($i=0, $count = count($tokens); $i < $count; $i++) {
    •

  •                 if (is_array($tokens[$i])) {
    •

  •                     if ($tokens[$i][0] == T_VARIABLE && $tokens[$i][1] == '$this') {
    •

  •                         $tokens[$i] = '$' . $this_varname;
    •

  •                     } else {
    •

  •                         $tokens[$i] = $tokens[$i][1];
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •             $source = implode('', $tokens);
    •

  •         }
    •

  •
    •

  •         /* add function to compiled include */
    •

  •         $_include_compiled .= "
    •

  • function _smarty_tplfunc_$_match[2]_$_match[3](&\$$this_varname)
    •

  • {
    •

  • $source
    •

  • }
    •

  •
    •

  • ";
    •

  •     }
    •

  •     $_include_compiled .= "\n\n?>\n";
    •

  •
    •

  •     $_params = array('filename' => $_compile_path,
    •

  •                      'contents' => $_include_compiled, 'create_dirs' => true);
    •

  •
    •

  •     require_once(SMARTY_CORE_DIR . 'core.write_file.php');
    •

  •     smarty_core_write_file($_params, $smarty);
    •

  •     return true;
    •

  • }
    •

  •
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:43 +0200 by phpDocumentor 1.4.0a2


File Source for core.write_compiled_resource.php

Source for file core.write_compiled_resource.php

Documentation is available at core.write_compiled_resource.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * write the compiled resource
    •

  •  *
    •

  •  * @param string $compile_path
    •

  •  * @param string $compiled_content
    •

  •  * @return true
    •

  •  */
    •

  • function smarty_core_write_compiled_resource($params, &$smarty)
    •

  • {
    •

  •     if(!@is_writable($smarty->compile_dir)) {
    •

  •         // compile_dir not writable, see if it exists
    •

  •         if(!@is_dir($smarty->compile_dir)) {
    •

  •             $smarty->trigger_error('the $compile_dir \'' . $smarty->compile_dir . '\' does not exist, or is not a directory.', E_USER_ERROR);
    •

  •             return false;
    •

  •         }
    •

  •         $smarty->trigger_error('unable to write to $compile_dir \'' . realpath($smarty->compile_dir) . '\'. Be sure $compile_dir is writable by the web server user.', E_USER_ERROR);
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     $_params = array('filename' => $params['compile_path'], 'contents' => $params['compiled_content'], 'create_dirs' => true);
    •

  •     require_once(SMARTY_CORE_DIR . 'core.write_file.php');
    •

  •     smarty_core_write_file($_params, $smarty);
    •

  •     return true;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:43 +0200 by phpDocumentor 1.4.0a2


File Source for core.write_file.php

Source for file core.write_file.php

Documentation is available at core.write_file.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * write out a file to disk
    •

  •  *
    •

  •  * @param string $filename
    •

  •  * @param string $contents
    •

  •  * @param boolean $create_dirs
    •

  •  * @return boolean
    •

  •  */
    •

  • function smarty_core_write_file($params, &$smarty)
    •

  • {
    •

  •     $_dirname = dirname($params['filename']);
    •

  •
    •

  •     if ($params['create_dirs']) {
    •

  •         $_params = array('dir' => $_dirname);
    •

  •         require_once(SMARTY_CORE_DIR . 'core.create_dir_structure.php');
    •

  •         smarty_core_create_dir_structure($_params, $smarty);
    •

  •     }
    •

  •
    •

  •     // write to tmp file, then rename it to avoid file locking race condition
    •

  •     $_tmp_file = tempnam($_dirname, 'wrt');
    •

  •
    •

  •     if (!($fd = @fopen($_tmp_file, 'wb'))) {
    •

  •         $_tmp_file = $_dirname . DIRECTORY_SEPARATOR . uniqid('wrt');
    •

  •         if (!($fd = @fopen($_tmp_file, 'wb'))) {
    •

  •             $smarty->trigger_error("problem writing temporary file '$_tmp_file'");
    •

  •             return false;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     fwrite($fd, $params['contents']);
    •

  •     fclose($fd);
    •

  •
    •

  •     if (DIRECTORY_SEPARATOR == '\\' || !@rename($_tmp_file, $params['filename'])) {
    •

  •         // On platforms and filesystems that cannot overwrite with rename()
    •

  •         // delete the file before renaming it -- because windows always suffers
    •

  •         // this, it is short-circuited to avoid the initial rename() attempt
    •

  •         @unlink($params['filename']);
    •

  •         @rename($_tmp_file, $params['filename']);
    •

  •     }
    •

  •     @chmod($params['filename'], $smarty->_file_perms);
    •

  •
    •

  •     return true;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:44 +0200 by phpDocumentor 1.4.0a2


File Source for function.assign_debug_info.php

Source for file function.assign_debug_info.php

Documentation is available at function.assign_debug_info.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Smarty {assign_debug_info} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     assign_debug_info<br>
    •

  •  * Purpose:  assign debug info to the template<br>
    •

  •  * @author Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param array unused in this plugin, this plugin uses {@link Smarty::$_config},
    •

  •  *               {@link Smarty::$_tpl_vars} and {@link Smarty::$_smarty_debug_info}
    •

  •  * @param Smarty
    •

  •  */
    •

  • function smarty_function_assign_debug_info($params, &$smarty)
    •

  • {
    •

  •     $assigned_vars = $smarty->_tpl_vars;
    •

  •     ksort($assigned_vars);
    •

  •     if (@is_array($smarty->_config[0])) {
    •

  •         $config_vars = $smarty->_config[0];
    •

  •         ksort($config_vars);
    •

  •         $smarty->assign("_debug_config_keys", array_keys($config_vars));
    •

  •         $smarty->assign("_debug_config_vals", array_values($config_vars));
    •

  •     }
    •

  •
    •

  •     $included_templates = $smarty->_smarty_debug_info;
    •

  •
    •

  •     $smarty->assign("_debug_keys", array_keys($assigned_vars));
    •

  •     $smarty->assign("_debug_vals", array_values($assigned_vars));
    •

  •
    •

  •     $smarty->assign("_debug_tpls", $included_templates);
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:23 +0200 by phpDocumentor 1.4.0a2


File Source for function.config_load.php

Source for file function.config_load.php

Documentation is available at function.config_load.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Smarty {config_load} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     config_load<br>
    •

  •  * Purpose:  load config file vars
    •

  •  * @link http://smarty.php.net/manual/en/language.function.config.load.php {config_load}
    •

  •  *        (Smarty online manual)
    •

  •  * @author Monte Ohrt <monte at ohrt dot com>
    •

  •  * @author messju mohr <messju at lammfellpuschen dot de> (added use of resources)
    •

  •  * @param array Format:
    •

  •  *  <pre>
    •

  •  *  array('file' => required config file name,
    •

  •  *        'section' => optional config file section to load
    •

  •  *        'scope' => local/parent/global
    •

  •  *        'global' => overrides scope, setting to parent if true)
    •

  •  *  </pre>
    •

  •  * @param Smarty
    •

  •  */
    •

  • function smarty_function_config_load($params, &$smarty)
    •

  • {
    •

  •         if ($smarty->debugging) {
    •

  •             $_params = array();
    •

  •             require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
    •

  •             $_debug_start_time = smarty_core_get_microtime($_params, $smarty);
    •

  •         }
    •

  •
    •

  •         $_file = isset($params['file']) ? $smarty->_dequote($params['file']) : null;
    •

  •         $_section = isset($params['section']) ? $smarty->_dequote($params['section']) : null;
    •

  •         $_scope = isset($params['scope']) ? $smarty->_dequote($params['scope']) : 'global';
    •

  •         $_global = isset($params['global']) ? $smarty->_dequote($params['global']) : false;
    •

  •
    •

  •         if (!isset($_file) || strlen($_file) == 0) {
    •

  •             $smarty->trigger_error("missing 'file' attribute in config_load tag", E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •
    •

  •         if (isset($_scope)) {
    •

  •             if ($_scope != 'local' &&
    •

  •                 $_scope != 'parent' &&
    •

  •                 $_scope != 'global') {
    •

  •                 $smarty->trigger_error("invalid 'scope' attribute value", E_USER_ERROR, __FILE__, __LINE__);
    •

  •             }
    •

  •         } else {
    •

  •             if ($_global) {
    •

  •                 $_scope = 'parent';
    •

  •             } else {
    •

  •                 $_scope = 'local';
    •

  •             }
    •

  •         }
    •

  •
    •

  •         $_params = array('resource_name' => $_file,
    •

  •                          'resource_base_path' => $smarty->config_dir,
    •

  •                          'get_source' => false);
    •

  •         $smarty->_parse_resource_name($_params);
    •

  •         $_file_path = $_params['resource_type'] . ':' . $_params['resource_name'];
    •

  •         if (isset($_section))
    •

  •             $_compile_file = $smarty->_get_compile_path($_file_path.'|'.$_section);
    •

  •         else
    •

  •             $_compile_file = $smarty->_get_compile_path($_file_path);
    •

  •
    •

  •         if($smarty->force_compile || !file_exists($_compile_file)) {
    •

  •             $_compile = true;
    •

  •         } elseif ($smarty->compile_check) {
    •

  •             $_params = array('resource_name' => $_file,
    •

  •                              'resource_base_path' => $smarty->config_dir,
    •

  •                              'get_source' => false);
    •

  •             $_compile = $smarty->_fetch_resource_info($_params) &&
    •

  •                 $_params['resource_timestamp'] > filemtime($_compile_file);
    •

  •         } else {
    •

  •             $_compile = false;
    •

  •         }
    •

  •
    •

  •         if($_compile) {
    •

  •             // compile config file
    •

  •             if(!is_object($smarty->_conf_obj)) {
    •

  •                 require_once SMARTY_DIR . $smarty->config_class . '.class.php';
    •

  •                 $smarty->_conf_obj = new $smarty->config_class();
    •

  •                 $smarty->_conf_obj->overwrite = $smarty->config_overwrite;
    •

  •                 $smarty->_conf_obj->booleanize = $smarty->config_booleanize;
    •

  •                 $smarty->_conf_obj->read_hidden = $smarty->config_read_hidden;
    •

  •                 $smarty->_conf_obj->fix_newlines = $smarty->config_fix_newlines;
    •

  •             }
    •

  •
    •

  •             $_params = array('resource_name' => $_file,
    •

  •                              'resource_base_path' => $smarty->config_dir,
    •

  •                              $_params['get_source'] = true);
    •

  •             if (!$smarty->_fetch_resource_info($_params)) {
    •

  •                 return;
    •

  •             }
    •

  •             $smarty->_conf_obj->set_file_contents($_file, $_params['source_content']);
    •

  •             $_config_vars = array_merge($smarty->_conf_obj->get($_file),
    •

  •                     $smarty->_conf_obj->get($_file, $_section));
    •

  •             if(function_exists('var_export')) {
    •

  •                 $_output = '<?php $_config_vars = ' . var_export($_config_vars, true) . '; ?>';
    •

  •             } else {
    •

  •                 $_output = '<?php $_config_vars = unserialize(\'' . strtr(serialize($_config_vars),array('\''=>'\\\'', '\\'=>'\\\\')) . '\'); ?>';
    •

  •             }
    •

  •             $_params = (array('compile_path' => $_compile_file, 'compiled_content' => $_output, 'resource_timestamp' => $_params['resource_timestamp']));
    •

  •             require_once(SMARTY_CORE_DIR . 'core.write_compiled_resource.php');
    •

  •             smarty_core_write_compiled_resource($_params, $smarty);
    •

  •         } else {
    •

  •             include($_compile_file);
    •

  •         }
    •

  •
    •

  •         if ($smarty->caching) {
    •

  •             $smarty->_cache_info['config'][$_file] = true;
    •

  •         }
    •

  •
    •

  •         $smarty->_config[0]['vars'] = @array_merge($smarty->_config[0]['vars'], $_config_vars);
    •

  •         $smarty->_config[0]['files'][$_file] = true;
    •

  •
    •

  •         if ($_scope == 'parent') {
    •

  •                 $smarty->_config[1]['vars'] = @array_merge($smarty->_config[1]['vars'], $_config_vars);
    •

  •                 $smarty->_config[1]['files'][$_file] = true;
    •

  •         } else if ($_scope == 'global') {
    •

  •             for ($i = 1, $for_max = count($smarty->_config); $i < $for_max; $i++) {
    •

  •                 $smarty->_config[$i]['vars'] = @array_merge($smarty->_config[$i]['vars'], $_config_vars);
    •

  •                 $smarty->_config[$i]['files'][$_file] = true;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if ($smarty->debugging) {
    •

  •             $_params = array();
    •

  •             require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
    •

  •             $smarty->_smarty_debug_info[] = array('type'      => 'config',
    •

  •                                                 'filename'  => $_file.' ['.$_section.'] '.$_scope,
    •

  •                                                 'depth'     => $smarty->_inclusion_depth,
    •

  •                                                 'exec_time' => smarty_core_get_microtime($_params, $smarty) - $_debug_start_time);
    •

  •         }
    •

  •
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:26 +0200 by phpDocumentor 1.4.0a2


File Source for function.counter.php

Source for file function.counter.php

Documentation is available at function.counter.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {counter} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     counter<br>
    •

  •  * Purpose:  print out a counter value
    •

  •  * @author Monte Ohrt <monte at ohrt dot com>
    •

  •  * @link http://smarty.php.net/manual/en/language.function.counter.php {counter}
    •

  •  *        (Smarty online manual)
    •

  •  * @param array parameters
    •

  •  * @param Smarty
    •

  •  * @return string|null
    •

  •  */
    •

  • function smarty_function_counter($params, &$smarty)
    •

  • {
    •

  •     static $counters = array();
    •

  •
    •

  •     $name = (isset($params['name'])) ? $params['name'] : 'default';
    •

  •     if (!isset($counters[$name])) {
    •

  •         $counters[$name] = array(
    •

  •             'start'=>1,
    •

  •             'skip'=>1,
    •

  •             'direction'=>'up',
    •

  •             'count'=>1
    •

  •             );
    •

  •     }
    •

  •     $counter =& $counters[$name];
    •

  •
    •

  •     if (isset($params['start'])) {
    •

  •         $counter['start'] = $counter['count'] = (int)$params['start'];
    •

  •     }
    •

  •
    •

  •     if (!empty($params['assign'])) {
    •

  •         $counter['assign'] = $params['assign'];
    •

  •     }
    •

  •
    •

  •     if (isset($counter['assign'])) {
    •

  •         $smarty->assign($counter['assign'], $counter['count']);
    •

  •     }
    •

  •
    •

  •     if (isset($params['print'])) {
    •

  •         $print = (bool)$params['print'];
    •

  •     } else {
    •

  •         $print = empty($counter['assign']);
    •

  •     }
    •

  •
    •

  •     if ($print) {
    •

  •         $retval = $counter['count'];
    •

  •     } else {
    •

  •         $retval = null;
    •

  •     }
    •

  •
    •

  •     if (isset($params['skip'])) {
    •

  •         $counter['skip'] = $params['skip'];
    •

  •     }
    •

  •
    •

  •     if (isset($params['direction'])) {
    •

  •         $counter['direction'] = $params['direction'];
    •

  •     }
    •

  •
    •

  •     if ($counter['direction'] == "down")
    •

  •         $counter['count'] -= $counter['skip'];
    •

  •     else
    •

  •         $counter['count'] += $counter['skip'];
    •

  •
    •

  •     return $retval;
    •

  •
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:26 +0200 by phpDocumentor 1.4.0a2


File Source for function.cycle.php

Source for file function.cycle.php

Documentation is available at function.cycle.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Smarty {cycle} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     cycle<br>
    •

  •  * Date:     May 3, 2002<br>
    •

  •  * Purpose:  cycle through given values<br>
    •

  •  * Input:
    •

  •  *         - name = name of cycle (optional)
    •

  •  *         - values = comma separated list of values to cycle,
    •

  •  *                    or an array of values to cycle
    •

  •  *                    (this can be left out for subsequent calls)
    •

  •  *         - reset = boolean - resets given var to true
    •

  •  *         - print = boolean - print var or not. default is true
    •

  •  *         - advance = boolean - whether or not to advance the cycle
    •

  •  *         - delimiter = the value delimiter, default is ","
    •

  •  *         - assign = boolean, assigns to template var instead of
    •

  •  *                    printed.
    •

  •  *
    •

  •  * Examples:<br>
    •

  •  * <pre>
    •

  •  * {cycle values="#eeeeee,#d0d0d0d"}
    •

  •  * {cycle name=row values="one,two,three" reset=true}
    •

  •  * {cycle name=row}
    •

  •  * </pre>
    •

  •  * @link http://smarty.php.net/manual/en/language.function.cycle.php {cycle}
    •

  •  *        (Smarty online manual)
    •

  •  * @author Monte Ohrt <monte at ohrt dot com>
    •

  •  * @author credit to Mark Priatel <mpriatel@rogers.com>
    •

  •  * @author credit to Gerard <gerard@interfold.com>
    •

  •  * @author credit to Jason Sweat <jsweat_php@yahoo.com>
    •

  •  * @version  1.3
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string|null
    •

  •  */
    •

  • function smarty_function_cycle($params, &$smarty)
    •

  • {
    •

  •     static $cycle_vars;
    •

  •
    •

  •     $name = (empty($params['name'])) ? 'default' : $params['name'];
    •

  •     $print = (isset($params['print'])) ? (bool)$params['print'] : true;
    •

  •     $advance = (isset($params['advance'])) ? (bool)$params['advance'] : true;
    •

  •     $reset = (isset($params['reset'])) ? (bool)$params['reset'] : false;
    •

  •
    •

  •     if (!in_array('values', array_keys($params))) {
    •

  •         if(!isset($cycle_vars[$name]['values'])) {
    •

  •             $smarty->trigger_error("cycle: missing 'values' parameter");
    •

  •             return;
    •

  •         }
    •

  •     } else {
    •

  •         if(isset($cycle_vars[$name]['values'])
    •

  •             && $cycle_vars[$name]['values'] != $params['values'] ) {
    •

  •             $cycle_vars[$name]['index'] = 0;
    •

  •         }
    •

  •         $cycle_vars[$name]['values'] = $params['values'];
    •

  •     }
    •

  •
    •

  •     $cycle_vars[$name]['delimiter'] = (isset($params['delimiter'])) ? $params['delimiter'] : ',';
    •

  •
    •

  •     if(is_array($cycle_vars[$name]['values'])) {
    •

  •         $cycle_array = $cycle_vars[$name]['values'];
    •

  •     } else {
    •

  •         $cycle_array = explode($cycle_vars[$name]['delimiter'],$cycle_vars[$name]['values']);
    •

  •     }
    •

  •
    •

  •     if(!isset($cycle_vars[$name]['index']) || $reset ) {
    •

  •         $cycle_vars[$name]['index'] = 0;
    •

  •     }
    •

  •
    •

  •     if (isset($params['assign'])) {
    •

  •         $print = false;
    •

  •         $smarty->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]);
    •

  •     }
    •

  •
    •

  •     if($print) {
    •

  •         $retval = $cycle_array[$cycle_vars[$name]['index']];
    •

  •     } else {
    •

  •         $retval = null;
    •

  •     }
    •

  •
    •

  •     if($advance) {
    •

  •         if ( $cycle_vars[$name]['index'] >= count($cycle_array) -1 ) {
    •

  •             $cycle_vars[$name]['index'] = 0;
    •

  •         } else {
    •

  •             $cycle_vars[$name]['index']++;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     return $retval;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:27 +0200 by phpDocumentor 1.4.0a2


File Source for function.debug.php

Source for file function.debug.php

Documentation is available at function.debug.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {debug} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     debug<br>
    •

  •  * Date:     July 1, 2002<br>
    •

  •  * Purpose:  popup debug window
    •

  •  * @link http://smarty.php.net/manual/en/language.function.debug.php {debug}
    •

  •  *        (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @version  1.0
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string output from {@link Smarty::_generate_debug_output()}
    •

  •  */
    •

  • function smarty_function_debug($params, &$smarty)
    •

  • {
    •

  •     if (isset($params['output'])) {
    •

  •         $smarty->assign('_smarty_debug_output', $params['output']);
    •

  •     }
    •

  •     require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');
    •

  •     return smarty_core_display_debug_console(null, $smarty);
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:27 +0200 by phpDocumentor 1.4.0a2


File Source for function.eval.php

Source for file function.eval.php

Documentation is available at function.eval.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {eval} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     eval<br>
    •

  •  * Purpose:  evaluate a template variable as a template<br>
    •

  •  * @link http://smarty.php.net/manual/en/language.function.eval.php {eval}
    •

  •  *        (Smarty online manual)
    •

  •  * @author Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  */
    •

  • function smarty_function_eval($params, &$smarty)
    •

  • {
    •

  •
    •

  •     if (!isset($params['var'])) {
    •

  •         $smarty->trigger_error("eval: missing 'var' parameter");
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     if($params['var'] == '') {
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     $smarty->_compile_source('evaluated template', $params['var'], $_var_compiled);
    •

  •
    •

  •     ob_start();
    •

  •     $smarty->_eval('?>' . $_var_compiled);
    •

  •     $_contents = ob_get_contents();
    •

  •     ob_end_clean();
    •

  •
    •

  •     if (!empty($params['assign'])) {
    •

  •         $smarty->assign($params['assign'], $_contents);
    •

  •     } else {
    •

  •         return $_contents;
    •

  •     }
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:28 +0200 by phpDocumentor 1.4.0a2


File Source for function.fetch.php

Source for file function.fetch.php

Documentation is available at function.fetch.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {fetch} plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     fetch<br>
    •

  •  * Purpose:  fetch file, web or ftp data and display results
    •

  •  * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}
    •

  •  *        (Smarty online manual)
    •

  •  * @author Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string|nullif the assign parameter is passed, Smarty assigns the
    •

  •  *                      result to a template variable
    •

  •  */
    •

  • function smarty_function_fetch($params, &$smarty)
    •

  • {
    •

  •     if (empty($params['file'])) {
    •

  •         $smarty->_trigger_fatal_error("[plugin] parameter 'file' cannot be empty");
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     $content = '';
    •

  •     if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {
    •

  •         $_params = array('resource_type' => 'file', 'resource_name' => $params['file']);
    •

  •         require_once(SMARTY_CORE_DIR . 'core.is_secure.php');
    •

  •         if(!smarty_core_is_secure($_params, $smarty)) {
    •

  •             $smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed');
    •

  •             return;
    •

  •         }
    •

  •
    •

  •         // fetch the file
    •

  •         if($fp = @fopen($params['file'],'r')) {
    •

  •             while(!feof($fp)) {
    •

  •                 $content .= fgets ($fp,4096);
    •

  •             }
    •

  •             fclose($fp);
    •

  •         } else {
    •

  •             $smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] . '\'');
    •

  •             return;
    •

  •         }
    •

  •     } else {
    •

  •         // not a local file
    •

  •         if(preg_match('!^http://!i',$params['file'])) {
    •

  •             // http fetch
    •

  •             if($uri_parts = parse_url($params['file'])) {
    •

  •                 // set defaults
    •

  •                 $host = $server_name = $uri_parts['host'];
    •

  •                 $timeout = 30;
    •

  •                 $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
    •

  •                 $agent = "Smarty Template Engine ".$smarty->_version;
    •

  •                 $referer = "";
    •

  •                 $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/';
    •

  •                 $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : '';
    •

  •                 $_is_proxy = false;
    •

  •                 if(empty($uri_parts['port'])) {
    •

  •                     $port = 80;
    •

  •                 } else {
    •

  •                     $port = $uri_parts['port'];
    •

  •                 }
    •

  •                 if(!empty($uri_parts['user'])) {
    •

  •                     $user = $uri_parts['user'];
    •

  •                 }
    •

  •                 if(!empty($uri_parts['pass'])) {
    •

  •                     $pass = $uri_parts['pass'];
    •

  •                 }
    •

  •                 // loop through parameters, setup headers
    •

  •                 foreach($params as $param_key => $param_value) {
    •

  •                     switch($param_key) {
    •

  •                         case "file":
    •

  •                         case "assign":
    •

  •                         case "assign_headers":
    •

  •                             break;
    •

  •                         case "user":
    •

  •                             if(!empty($param_value)) {
    •

  •                                 $user = $param_value;
    •

  •                             }
    •

  •                             break;
    •

  •                         case "pass":
    •

  •                             if(!empty($param_value)) {
    •

  •                                 $pass = $param_value;
    •

  •                             }
    •

  •                             break;
    •

  •                         case "accept":
    •

  •                             if(!empty($param_value)) {
    •

  •                                 $accept = $param_value;
    •

  •                             }
    •

  •                             break;
    •

  •                         case "header":
    •

  •                             if(!empty($param_value)) {
    •

  •                                 if(!preg_match('![\w\d-]+: .+!',$param_value)) {
    •

  •                                     $smarty->_trigger_fatal_error("[plugin] invalid header format '".$param_value."'");
    •

  •                                     return;
    •

  •                                 } else {
    •

  •                                     $extra_headers[] = $param_value;
    •

  •                                 }
    •

  •                             }
    •

  •                             break;
    •

  •                         case "proxy_host":
    •

  •                             if(!empty($param_value)) {
    •

  •                                 $proxy_host = $param_value;
    •

  •                             }
    •

  •                             break;
    •

  •                         case "proxy_port":
    •

  •                             if(!preg_match('!\D!', $param_value)) {
    •

  •                                 $proxy_port = (int) $param_value;
    •

  •                             } else {
    •

  •                                 $smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'");
    •

  •                                 return;
    •

  •                             }
    •

  •                             break;
    •

  •                         case "agent":
    •

  •                             if(!empty($param_value)) {
    •

  •                                 $agent = $param_value;
    •

  •                             }
    •

  •                             break;
    •

  •                         case "referer":
    •

  •                             if(!empty($param_value)) {
    •

  •                                 $referer = $param_value;
    •

  •                             }
    •

  •                             break;
    •

  •                         case "timeout":
    •

  •                             if(!preg_match('!\D!', $param_value)) {
    •

  •                                 $timeout = (int) $param_value;
    •

  •                             } else {
    •

  •                                 $smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'");
    •

  •                                 return;
    •

  •                             }
    •

  •                             break;
    •

  •                         default:
    •

  •                             $smarty->_trigger_fatal_error("[plugin] unrecognized attribute '".$param_key."'");
    •

  •                             return;
    •

  •                     }
    •

  •                 }
    •

  •                 if(!empty($proxy_host) && !empty($proxy_port)) {
    •

  •                     $_is_proxy = true;
    •

  •                     $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout);
    •

  •                 } else {
    •

  •                     $fp = fsockopen($server_name,$port,$errno,$errstr,$timeout);
    •

  •                 }
    •

  •
    •

  •                 if(!$fp) {
    •

  •                     $smarty->_trigger_fatal_error("[plugin] unable to fetch: $errstr ($errno)");
    •

  •                     return;
    •

  •                 } else {
    •

  •                     if($_is_proxy) {
    •

  •                         fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");
    •

  •                     } else {
    •

  •                         fputs($fp, "GET $uri HTTP/1.0\r\n");
    •

  •                     }
    •

  •                     if(!empty($host)) {
    •

  •                         fputs($fp, "Host: $host\r\n");
    •

  •                     }
    •

  •                     if(!empty($accept)) {
    •

  •                         fputs($fp, "Accept: $accept\r\n");
    •

  •                     }
    •

  •                     if(!empty($agent)) {
    •

  •                         fputs($fp, "User-Agent: $agent\r\n");
    •

  •                     }
    •

  •                     if(!empty($referer)) {
    •

  •                         fputs($fp, "Referer: $referer\r\n");
    •

  •                     }
    •

  •                     if(isset($extra_headers) && is_array($extra_headers)) {
    •

  •                         foreach($extra_headers as $curr_header) {
    •

  •                             fputs($fp, $curr_header."\r\n");
    •

  •                         }
    •

  •                     }
    •

  •                     if(!empty($user) && !empty($pass)) {
    •

  •                         fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n");
    •

  •                     }
    •

  •
    •

  •                     fputs($fp, "\r\n");
    •

  •                     while(!feof($fp)) {
    •

  •                         $content .= fgets($fp,4096);
    •

  •                     }
    •

  •                     fclose($fp);
    •

  •                     $csplit = split("\r\n\r\n",$content,2);
    •

  •
    •

  •                     $content = $csplit[1];
    •

  •
    •

  •                     if(!empty($params['assign_headers'])) {
    •

  •                         $smarty->assign($params['assign_headers'],split("\r\n",$csplit[0]));
    •

  •                     }
    •

  •                 }
    •

  •             } else {
    •

  •                 $smarty->_trigger_fatal_error("[plugin] unable to parse URL, check syntax");
    •

  •                 return;
    •

  •             }
    •

  •         } else {
    •

  •             // ftp fetch
    •

  •             if($fp = @fopen($params['file'],'r')) {
    •

  •                 while(!feof($fp)) {
    •

  •                     $content .= fgets ($fp,4096);
    •

  •                 }
    •

  •                 fclose($fp);
    •

  •             } else {
    •

  •                 $smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] .'\'');
    •

  •                 return;
    •

  •             }
    •

  •         }
    •

  •
    •

  •     }
    •

  •
    •

  •
    •

  •     if (!empty($params['assign'])) {
    •

  •         $smarty->assign($params['assign'],$content);
    •

  •     } else {
    •

  •         return $content;
    •

  •     }
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:29 +0200 by phpDocumentor 1.4.0a2


File Source for function.html_checkboxes.php

Source for file function.html_checkboxes.php

Documentation is available at function.html_checkboxes.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {html_checkboxes} function plugin
    •

  •  *
    •

  •  * File:       function.html_checkboxes.php<br>
    •

  •  * Type:       function<br>
    •

  •  * Name:       html_checkboxes<br>
    •

  •  * Date:       24.Feb.2003<br>
    •

  •  * Purpose:    Prints out a list of checkbox input types<br>
    •

  •  * Input:<br>
    •

  •  *           - name       (optional) - string default "checkbox"
    •

  •  *           - values     (required) - array
    •

  •  *           - options    (optional) - associative array
    •

  •  *           - checked    (optional) - array default not set
    •

  •  *           - separator  (optional) - ie <br> or &nbsp;
    •

  •  *           - output     (optional) - the output next to each checkbox
    •

  •  *           - assign     (optional) - assign the output as an array to this variable
    •

  •  * Examples:
    •

  •  * <pre>
    •

  •  * {html_checkboxes values=$ids output=$names}
    •

  •  * {html_checkboxes values=$ids name='box' separator='<br>' output=$names}
    •

  •  * {html_checkboxes values=$ids checked=$checked separator='<br>' output=$names}
    •

  •  * </pre>
    •

  •  * @link http://smarty.php.net/manual/en/language.function.html.checkboxes.php {html_checkboxes}
    •

  •  *       (Smarty online manual)
    •

  •  * @author     Christopher Kvarme <christopher.kvarme@flashjab.com>
    •

  •  * @author credits to Monte Ohrt <monte at ohrt dot com>
    •

  •  * @version    1.0
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string
    •

  •  * @uses smarty_function_escape_special_chars()
    •

  •  */
    •

  • function smarty_function_html_checkboxes($params, &$smarty)
    •

  • {
    •

  •     require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
    •

  •
    •

  •     $name = 'checkbox';
    •

  •     $values = null;
    •

  •     $options = null;
    •

  •     $selected = null;
    •

  •     $separator = '';
    •

  •     $labels = true;
    •

  •     $output = null;
    •

  •
    •

  •     $extra = '';
    •

  •
    •

  •     foreach($params as $_key => $_val) {
    •

  •         switch($_key) {
    •

  •             case 'name':
    •

  •             case 'separator':
    •

  •                 $$_key = $_val;
    •

  •                 break;
    •

  •
    •

  •             case 'labels':
    •

  •                 $$_key = (bool)$_val;
    •

  •                 break;
    •

  •
    •

  •             case 'options':
    •

  •                 $$_key = (array)$_val;
    •

  •                 break;
    •

  •
    •

  •             case 'values':
    •

  •             case 'output':
    •

  •                 $$_key = array_values((array)$_val);
    •

  •                 break;
    •

  •
    •

  •             case 'checked':
    •

  •             case 'selected':
    •

  •                 $selected = array_map('strval', array_values((array)$_val));
    •

  •                 break;
    •

  •
    •

  •             case 'checkboxes':
    •

  •                 $smarty->trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING);
    •

  •                 $options = (array)$_val;
    •

  •                 break;
    •

  •
    •

  •             case 'assign':
    •

  •                 break;
    •

  •
    •

  •             default:
    •

  •                 if(!is_array($_val)) {
    •

  •                     $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
    •

  •                 } else {
    •

  •                     $smarty->trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
    •

  •                 }
    •

  •                 break;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     if (!isset($options) && !isset($values))
    •

  •         return ''; /* raise error here? */
    •

  •
    •

  •     settype($selected, 'array');
    •

  •     $_html_result = array();
    •

  •
    •

  •     if (isset($options)) {
    •

  •
    •

  •         foreach ($options as $_key=>$_val)
    •

  •             $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
    •

  •
    •

  •
    •

  •     } else {
    •

  •         foreach ($values as $_i=>$_key) {
    •

  •             $_val = isset($output[$_i]) ? $output[$_i] : '';
    •

  •             $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
    •

  •         }
    •

  •
    •

  •     }
    •

  •
    •

  •     if(!empty($params['assign'])) {
    •

  •         $smarty->assign($params['assign'], $_html_result);
    •

  •     } else {
    •

  •         return implode("\n",$_html_result);
    •

  •     }
    •

  •
    •

  • }
    •

  •
    •

  • function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels) {
    •

  •     $_output = '';
    •

  •     if ($labels) $_output .= '<label>';
    •

  •     $_output .= '<input type="checkbox" name="'
    •

  •         . smarty_function_escape_special_chars($name) . '[]" value="'
    •

  •         . smarty_function_escape_special_chars($value) . '"';
    •

  •
    •

  •     if (in_array((string)$value, $selected)) {
    •

  •         $_output .= ' checked="checked"';
    •

  •     }
    •

  •     $_output .= $extra . ' />' . $output;
    •

  •     if ($labels) $_output .= '</label>';
    •

  •     $_output .=  $separator;
    •

  •
    •

  •     return $_output;
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:30 +0200 by phpDocumentor 1.4.0a2


File Source for function.html_image.php

Source for file function.html_image.php

Documentation is available at function.html_image.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {html_image} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     html_image<br>
    •

  •  * Date:     Feb 24, 2003<br>
    •

  •  * Purpose:  format HTML tags for the image<br>
    •

  •  * Input:<br>
    •

  •  *         - file = file (and path) of image (required)
    •

  •  *         - height = image height (optional, default actual height)
    •

  •  *         - width = image width (optional, default actual width)
    •

  •  *         - basedir = base directory for absolute paths, default
    •

  •  *                     is environment variable DOCUMENT_ROOT
    •

  •  *         - path_prefix = prefix for path output (optional, default empty)
    •

  •  *
    •

  •  * Examples: {html_image file="/images/masthead.gif"}
    •

  •  * Output:   <img src="/images/masthead.gif" width=400 height=23>
    •

  •  * @link http://smarty.php.net/manual/en/language.function.html.image.php {html_image}
    •

  •  *       (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @author credits to Duda <duda@big.hu> - wrote first image function
    •

  •  *            in repository, helped with lots of functionality
    •

  •  * @version  1.0
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string
    •

  •  * @uses smarty_function_escape_special_chars()
    •

  •  */
    •

  • function smarty_function_html_image($params, &$smarty)
    •

  • {
    •

  •     require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
    •

  •
    •

  •     $alt = '';
    •

  •     $file = '';
    •

  •     $height = '';
    •

  •     $width = '';
    •

  •     $extra = '';
    •

  •     $prefix = '';
    •

  •     $suffix = '';
    •

  •     $path_prefix = '';
    •

  •     $server_vars = ($smarty->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
    •

  •     $basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : '';
    •

  •     foreach($params as $_key => $_val) {
    •

  •         switch($_key) {
    •

  •             case 'file':
    •

  •             case 'height':
    •

  •             case 'width':
    •

  •             case 'dpi':
    •

  •             case 'path_prefix':
    •

  •             case 'basedir':
    •

  •                 $$_key = $_val;
    •

  •                 break;
    •

  •
    •

  •             case 'alt':
    •

  •                 if(!is_array($_val)) {
    •

  •                     $$_key = smarty_function_escape_special_chars($_val);
    •

  •                 } else {
    •

  •                     $smarty->trigger_error("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
    •

  •                 }
    •

  •                 break;
    •

  •
    •

  •             case 'link':
    •

  •             case 'href':
    •

  •                 $prefix = '<a href="' . $_val . '">';
    •

  •                 $suffix = '</a>';
    •

  •                 break;
    •

  •
    •

  •             default:
    •

  •                 if(!is_array($_val)) {
    •

  •                     $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
    •

  •                 } else {
    •

  •                     $smarty->trigger_error("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
    •

  •                 }
    •

  •                 break;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     if (empty($file)) {
    •

  •         $smarty->trigger_error("html_image: missing 'file' parameter", E_USER_NOTICE);
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     if (substr($file,0,1) == '/') {
    •

  •         $_image_path = $basedir . $file;
    •

  •     } else {
    •

  •         $_image_path = $file;
    •

  •     }
    •

  •
    •

  •     if(!isset($params['width']) || !isset($params['height'])) {
    •

  •         if(!$_image_data = @getimagesize($_image_path)) {
    •

  •             if(!file_exists($_image_path)) {
    •

  •                 $smarty->trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE);
    •

  •                 return;
    •

  •             } else if(!is_readable($_image_path)) {
    •

  •                 $smarty->trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE);
    •

  •                 return;
    •

  •             } else {
    •

  •                 $smarty->trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_NOTICE);
    •

  •                 return;
    •

  •             }
    •

  •         }
    •

  •         if ($smarty->security &&
    •

  •             ($_params = array('resource_type' => 'file', 'resource_name' => $_image_path)) &&
    •

  •             (require_once(SMARTY_CORE_DIR . 'core.is_secure.php')) &&
    •

  •             (!smarty_core_is_secure($_params, $smarty)) ) {
    •

  •             $smarty->trigger_error("html_image: (secure) '$_image_path' not in secure directory", E_USER_NOTICE);
    •

  •         }
    •

  •
    •

  •         if(!isset($params['width'])) {
    •

  •             $width = $_image_data[0];
    •

  •         }
    •

  •         if(!isset($params['height'])) {
    •

  •             $height = $_image_data[1];
    •

  •         }
    •

  •
    •

  •     }
    •

  •
    •

  •     if(isset($params['dpi'])) {
    •

  •         if(strstr($server_vars['HTTP_USER_AGENT'], 'Mac')) {
    •

  •             $dpi_default = 72;
    •

  •         } else {
    •

  •             $dpi_default = 96;
    •

  •         }
    •

  •         $_resize = $dpi_default/$params['dpi'];
    •

  •         $width = round($width * $_resize);
    •

  •         $height = round($height * $_resize);
    •

  •     }
    •

  •
    •

  •     return $prefix . '<img src="'.$path_prefix.$file.'" alt="'.$alt.'" width="'.$width.'" height="'.$height.'"'.$extra.' />' . $suffix;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:31 +0200 by phpDocumentor 1.4.0a2


File Source for function.html_options.php

Source for file function.html_options.php

Documentation is available at function.html_options.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {html_options} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     html_options<br>
    •

  •  * Input:<br>
    •

  •  *           - name       (optional) - string default "select"
    •

  •  *           - values     (required if no options supplied) - array
    •

  •  *           - options    (required if no values supplied) - associative array
    •

  •  *           - selected   (optional) - string default not set
    •

  •  *           - output     (required if not options supplied) - array
    •

  •  * Purpose:  Prints the list of <option> tags generated from
    •

  •  *           the passed parameters
    •

  •  * @link http://smarty.php.net/manual/en/language.function.html.options.php {html_image}
    •

  •  *       (Smarty online manual)
    •

  •  * @author Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string
    •

  •  * @uses smarty_function_escape_special_chars()
    •

  •  */
    •

  • function smarty_function_html_options($params, &$smarty)
    •

  • {
    •

  •     require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
    •

  •
    •

  •     $name = null;
    •

  •     $values = null;
    •

  •     $options = null;
    •

  •     $selected = array();
    •

  •     $output = null;
    •

  •
    •

  •     $extra = '';
    •

  •
    •

  •     foreach($params as $_key => $_val) {
    •

  •         switch($_key) {
    •

  •             case 'name':
    •

  •                 $$_key = (string)$_val;
    •

  •                 break;
    •

  •
    •

  •             case 'options':
    •

  •                 $$_key = (array)$_val;
    •

  •                 break;
    •

  •
    •

  •             case 'values':
    •

  •             case 'output':
    •

  •                 $$_key = array_values((array)$_val);
    •

  •                 break;
    •

  •
    •

  •             case 'selected':
    •

  •                 $$_key = array_map('strval', array_values((array)$_val));
    •

  •                 break;
    •

  •
    •

  •             default:
    •

  •                 if(!is_array($_val)) {
    •

  •                     $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
    •

  •                 } else {
    •

  •                     $smarty->trigger_error("html_options: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
    •

  •                 }
    •

  •                 break;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     if (!isset($options) && !isset($values))
    •

  •         return ''; /* raise error here? */
    •

  •
    •

  •     $_html_result = '';
    •

  •
    •

  •     if (isset($options)) {
    •

  •
    •

  •         foreach ($options as $_key=>$_val)
    •

  •             $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected);
    •

  •
    •

  •     } else {
    •

  •
    •

  •         foreach ($values as $_i=>$_key) {
    •

  •             $_val = isset($output[$_i]) ? $output[$_i] : '';
    •

  •             $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected);
    •

  •         }
    •

  •
    •

  •     }
    •

  •
    •

  •     if(!empty($name)) {
    •

  •         $_html_result = '<select name="' . $name . '"' . $extra . '>' . "\n" . $_html_result . '</select>' . "\n";
    •

  •     }
    •

  •
    •

  •     return $_html_result;
    •

  •
    •

  • }
    •

  •
    •

  • function smarty_function_html_options_optoutput($key, $value, $selected) {
    •

  •     if(!is_array($value)) {
    •

  •         $_html_result = '<option label="' . smarty_function_escape_special_chars($value) . '" value="' .
    •

  •             smarty_function_escape_special_chars($key) . '"';
    •

  •         if (in_array((string)$key, $selected))
    •

  •             $_html_result .= ' selected="selected"';
    •

  •         $_html_result .= '>' . smarty_function_escape_special_chars($value) . '</option>' . "\n";
    •

  •     } else {
    •

  •         $_html_result = smarty_function_html_options_optgroup($key, $value, $selected);
    •

  •     }
    •

  •     return $_html_result;
    •

  • }
    •

  •
    •

  • function smarty_function_html_options_optgroup($key, $values, $selected) {
    •

  •     $optgroup_html = '<optgroup label="' . smarty_function_escape_special_chars($key) . '">' . "\n";
    •

  •     foreach ($values as $key => $value) {
    •

  •         $optgroup_html .= smarty_function_html_options_optoutput($key, $value, $selected);
    •

  •     }
    •

  •     $optgroup_html .= "</optgroup>\n";
    •

  •     return $optgroup_html;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:32 +0200 by phpDocumentor 1.4.0a2


File Source for function.html_radios.php

Source for file function.html_radios.php

Documentation is available at function.html_radios.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {html_radios} function plugin
    •

  •  *
    •

  •  * File:       function.html_radios.php<br>
    •

  •  * Type:       function<br>
    •

  •  * Name:       html_radios<br>
    •

  •  * Date:       24.Feb.2003<br>
    •

  •  * Purpose:    Prints out a list of radio input types<br>
    •

  •  * Input:<br>
    •

  •  *           - name       (optional) - string default "radio"
    •

  •  *           - values     (required) - array
    •

  •  *           - options    (optional) - associative array
    •

  •  *           - checked    (optional) - array default not set
    •

  •  *           - separator  (optional) - ie <br> or &nbsp;
    •

  •  *           - output     (optional) - the output next to each radio button
    •

  •  *           - assign     (optional) - assign the output as an array to this variable
    •

  •  * Examples:
    •

  •  * <pre>
    •

  •  * {html_radios values=$ids output=$names}
    •

  •  * {html_radios values=$ids name='box' separator='<br>' output=$names}
    •

  •  * {html_radios values=$ids checked=$checked separator='<br>' output=$names}
    •

  •  * </pre>
    •

  •  * @link http://smarty.php.net/manual/en/language.function.html.radios.php {html_radios}
    •

  •  *       (Smarty online manual)
    •

  •  * @author     Christopher Kvarme <christopher.kvarme@flashjab.com>
    •

  •  * @author credits to Monte Ohrt <monte at ohrt dot com>
    •

  •  * @version    1.0
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string
    •

  •  * @uses smarty_function_escape_special_chars()
    •

  •  */
    •

  • function smarty_function_html_radios($params, &$smarty)
    •

  • {
    •

  •     require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
    •

  •
    •

  •     $name = 'radio';
    •

  •     $values = null;
    •

  •     $options = null;
    •

  •     $selected = null;
    •

  •     $separator = '';
    •

  •     $labels = true;
    •

  •     $label_ids = false;
    •

  •     $output = null;
    •

  •     $extra = '';
    •

  •
    •

  •     foreach($params as $_key => $_val) {
    •

  •         switch($_key) {
    •

  •             case 'name':
    •

  •             case 'separator':
    •

  •                 $$_key = (string)$_val;
    •

  •                 break;
    •

  •
    •

  •             case 'checked':
    •

  •             case 'selected':
    •

  •                 if(is_array($_val)) {
    •

  •                     $smarty->trigger_error('html_radios: the "' . $_key . '" attribute cannot be an array', E_USER_WARNING);
    •

  •                 } else {
    •

  •                     $selected = (string)$_val;
    •

  •                 }
    •

  •                 break;
    •

  •
    •

  •             case 'labels':
    •

  •             case 'label_ids':
    •

  •                 $$_key = (bool)$_val;
    •

  •                 break;
    •

  •
    •

  •             case 'options':
    •

  •                 $$_key = (array)$_val;
    •

  •                 break;
    •

  •
    •

  •             case 'values':
    •

  •             case 'output':
    •

  •                 $$_key = array_values((array)$_val);
    •

  •                 break;
    •

  •
    •

  •             case 'radios':
    •

  •                 $smarty->trigger_error('html_radios: the use of the "radios" attribute is deprecated, use "options" instead', E_USER_WARNING);
    •

  •                 $options = (array)$_val;
    •

  •                 break;
    •

  •
    •

  •             case 'assign':
    •

  •                 break;
    •

  •
    •

  •             default:
    •

  •                 if(!is_array($_val)) {
    •

  •                     $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
    •

  •                 } else {
    •

  •                     $smarty->trigger_error("html_radios: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
    •

  •                 }
    •

  •                 break;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     if (!isset($options) && !isset($values))
    •

  •         return ''; /* raise error here? */
    •

  •
    •

  •     $_html_result = array();
    •

  •
    •

  •     if (isset($options)) {
    •

  •
    •

  •         foreach ($options as $_key=>$_val)
    •

  •             $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids);
    •

  •
    •

  •     } else {
    •

  •
    •

  •         foreach ($values as $_i=>$_key) {
    •

  •             $_val = isset($output[$_i]) ? $output[$_i] : '';
    •

  •             $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids);
    •

  •         }
    •

  •
    •

  •     }
    •

  •
    •

  •     if(!empty($params['assign'])) {
    •

  •         $smarty->assign($params['assign'], $_html_result);
    •

  •     } else {
    •

  •         return implode("\n",$_html_result);
    •

  •     }
    •

  •
    •

  • }
    •

  •
    •

  • function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids) {
    •

  •     $_output = '';
    •

  •     if ($labels) {
    •

  •       if($label_ids) {
    •

  •           $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!', '_', $name . '_' . $value));
    •

  •           $_output .= '<label for="' . $_id . '">';
    •

  •       } else {
    •

  •           $_output .= '<label>';
    •

  •       }
    •

  •    }
    •

  •    $_output .= '<input type="radio" name="'
    •

  •         . smarty_function_escape_special_chars($name) . '" value="'
    •

  •         . smarty_function_escape_special_chars($value) . '"';
    •

  •
    •

  •    if ($labels && $label_ids) $_output .= ' id="' . $_id . '"';
    •

  •
    •

  •     if ((string)$value==$selected) {
    •

  •         $_output .= ' checked="checked"';
    •

  •     }
    •

  •     $_output .= $extra . ' />' . $output;
    •

  •     if ($labels) $_output .= '</label>';
    •

  •     $_output .=  $separator;
    •

  •
    •

  •     return $_output;
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:32 +0200 by phpDocumentor 1.4.0a2


File Source for function.html_select_date.php

Source for file function.html_select_date.php

Documentation is available at function.html_select_date.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Smarty {html_select_date} plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     html_select_date<br>
    •

  •  * Purpose:  Prints the dropdowns for date selection.
    •

  •  *
    •

  •  * ChangeLog:<br>
    •

  •  *           - 1.0 initial release
    •

  •  *           - 1.1 added support for +/- N syntax for begin
    •

  •  *                and end year values. (Monte)
    •

  •  *           - 1.2 added support for yyyy-mm-dd syntax for
    •

  •  *                time value. (Jan Rosier)
    •

  •  *           - 1.3 added support for choosing format for
    •

  •  *                month values (Gary Loescher)
    •

  •  *           - 1.3.1 added support for choosing format for
    •

  •  *                day values (Marcus Bointon)
    •

  •  *           - 1.3.2 support negative timestamps, force year
    •

  •  *             dropdown to include given date unless explicitly set (Monte)
    •

  •  *           - 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that
    •

  •  *             of 0000-00-00 dates (cybot, boots)
    •

  •  * @link http://smarty.php.net/manual/en/language.function.html.select.date.php {html_select_date}
    •

  •  *       (Smarty online manual)
    •

  •  * @version 1.3.4
    •

  •  * @author Andrei Zmievski
    •

  •  * @author Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_function_html_select_date($params, &$smarty)
    •

  • {
    •

  •     require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
    •

  •     require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
    •

  •     require_once $smarty->_get_plugin_filepath('function','html_options');
    •

  •     /* Default values. */
    •

  •     $prefix          = "Date_";
    •

  •     $start_year      = strftime("%Y");
    •

  •     $end_year        = $start_year;
    •

  •     $display_days    = true;
    •

  •     $display_months  = true;
    •

  •     $display_years   = true;
    •

  •     $month_format    = "%B";
    •

  •     /* Write months as numbers by default  GL */
    •

  •     $month_value_format = "%m";
    •

  •     $day_format      = "%02d";
    •

  •     /* Write day values using this format MB */
    •

  •     $day_value_format = "%d";
    •

  •     $year_as_text    = false;
    •

  •     /* Display years in reverse order? Ie. 2000,1999,.... */
    •

  •     $reverse_years   = false;
    •

  •     /* Should the select boxes be part of an array when returned from PHP?
    •

  •        e.g. setting it to "birthday", would create "birthday[Day]",
    •

  •        "birthday[Month]" & "birthday[Year]". Can be combined with prefix */
    •

  •     $field_array     = null;
    •

  •     /* <select size>'s of the different <select> tags.
    •

  •        If not set, uses default dropdown. */
    •

  •     $day_size        = null;
    •

  •     $month_size      = null;
    •

  •     $year_size       = null;
    •

  •     /* Unparsed attributes common to *ALL* the <select>/<input> tags.
    •

  •        An example might be in the template: all_extra ='class ="foo"'. */
    •

  •     $all_extra       = null;
    •

  •     /* Separate attributes for the tags. */
    •

  •     $day_extra       = null;
    •

  •     $month_extra     = null;
    •

  •     $year_extra      = null;
    •

  •     /* Order in which to display the fields.
    •

  •        "D" -> day, "M" -> month, "Y" -> year. */
    •

  •     $field_order     = 'MDY';
    •

  •     /* String printed between the different fields. */
    •

  •     $field_separator = "\n";
    •

  •     $time = time();
    •

  •     $all_empty       = null;
    •

  •     $day_empty       = null;
    •

  •     $month_empty     = null;
    •

  •     $year_empty      = null;
    •

  •     $extra_attrs     = '';
    •

  •
    •

  •     foreach ($params as $_key=>$_value) {
    •

  •         switch ($_key) {
    •

  •             case 'prefix':
    •

  •             case 'time':
    •

  •             case 'start_year':
    •

  •             case 'end_year':
    •

  •             case 'month_format':
    •

  •             case 'day_format':
    •

  •             case 'day_value_format':
    •

  •             case 'field_array':
    •

  •             case 'day_size':
    •

  •             case 'month_size':
    •

  •             case 'year_size':
    •

  •             case 'all_extra':
    •

  •             case 'day_extra':
    •

  •             case 'month_extra':
    •

  •             case 'year_extra':
    •

  •             case 'field_order':
    •

  •             case 'field_separator':
    •

  •             case 'month_value_format':
    •

  •             case 'month_empty':
    •

  •             case 'day_empty':
    •

  •             case 'year_empty':
    •

  •                 $$_key = (string)$_value;
    •

  •                 break;
    •

  •
    •

  •             case 'all_empty':
    •

  •                 $$_key = (string)$_value;
    •

  •                 $day_empty = $month_empty = $year_empty = $all_empty;
    •

  •                 break;
    •

  •
    •

  •             case 'display_days':
    •

  •             case 'display_months':
    •

  •             case 'display_years':
    •

  •             case 'year_as_text':
    •

  •             case 'reverse_years':
    •

  •                 $$_key = (bool)$_value;
    •

  •                 break;
    •

  •
    •

  •             default:
    •

  •                 if(!is_array($_value)) {
    •

  •                     $extra_attrs .= ' '.$_key.'="'.smarty_function_escape_special_chars($_value).'"';
    •

  •                 } else {
    •

  •                     $smarty->trigger_error("html_select_date: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
    •

  •                 }
    •

  •                 break;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     if (preg_match('!^-\d+$!', $time)) {
    •

  •         // negative timestamp, use date()
    •

  •         $time = date('Y-m-d', $time);
    •

  •     }
    •

  •     // If $time is not in format yyyy-mm-dd
    •

  •     if (preg_match('/^(\d{0,4}-\d{0,2}-\d{0,2})/', $time, $found)) {
    •

  •         $time = $found[1];
    •

  •     } else {
    •

  •         // use smarty_make_timestamp to get an unix timestamp and
    •

  •         // strftime to make yyyy-mm-dd
    •

  •         $time = strftime('%Y-%m-%d', smarty_make_timestamp($time));
    •

  •     }
    •

  •     // Now split this in pieces, which later can be used to set the select
    •

  •     $time = explode("-", $time);
    •

  •
    •

  •     // make syntax "+N" or "-N" work with start_year and end_year
    •

  •     if (preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match)) {
    •

  •         if ($match[1] == '+') {
    •

  •             $end_year = strftime('%Y') + $match[2];
    •

  •         } else {
    •

  •             $end_year = strftime('%Y') - $match[2];
    •

  •         }
    •

  •     }
    •

  •     if (preg_match('!^(\+|\-)\s*(\d+)$!', $start_year, $match)) {
    •

  •         if ($match[1] == '+') {
    •

  •             $start_year = strftime('%Y') + $match[2];
    •

  •         } else {
    •

  •             $start_year = strftime('%Y') - $match[2];
    •

  •         }
    •

  •     }
    •

  •     if (strlen($time[0]) > 0) {
    •

  •         if ($start_year > $time[0] && !isset($params['start_year'])) {
    •

  •             // force start year to include given date if not explicitly set
    •

  •             $start_year = $time[0];
    •

  •         }
    •

  •         if($end_year < $time[0] && !isset($params['end_year'])) {
    •

  •             // force end year to include given date if not explicitly set
    •

  •             $end_year = $time[0];
    •

  •         }
    •

  •     }
    •

  •
    •

  •     $field_order = strtoupper($field_order);
    •

  •
    •

  •     $html_result = $month_result = $day_result = $year_result = "";
    •

  •
    •

  •     $field_separator_count = -1;
    •

  •     if ($display_months) {
    •

  •         $field_separator_count++;
    •

  •         $month_names = array();
    •

  •         $month_values = array();
    •

  •         if(isset($month_empty)) {
    •

  •             $month_names[''] = $month_empty;
    •

  •             $month_values[''] = '';
    •

  •         }
    •

  •         for ($i = 1; $i <= 12; $i++) {
    •

  •             $month_names[$i] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000));
    •

  •             $month_values[$i] = strftime($month_value_format, mktime(0, 0, 0, $i, 1, 2000));
    •

  •         }
    •

  •
    •

  •         $month_result .= '<select name=';
    •

  •         if (null !== $field_array){
    •

  •             $month_result .= '"' . $field_array . '[' . $prefix . 'Month]"';
    •

  •         } else {
    •

  •             $month_result .= '"' . $prefix . 'Month"';
    •

  •         }
    •

  •         if (null !== $month_size){
    •

  •             $month_result .= ' size="' . $month_size . '"';
    •

  •         }
    •

  •         if (null !== $month_extra){
    •

  •             $month_result .= ' ' . $month_extra;
    •

  •         }
    •

  •         if (null !== $all_extra){
    •

  •             $month_result .= ' ' . $all_extra;
    •

  •         }
    •

  •         $month_result .= $extra_attrs . '>'."\n";
    •

  •
    •

  •         $month_result .= smarty_function_html_options(array('output'     => $month_names,
    •

  •                                                             'values'     => $month_values,
    •

  •                                                             'selected'   => (int)$time[1] ? strftime($month_value_format, mktime(0, 0, 0, (int)$time[1], 1, 2000)) : '',
    •

  •                                                             'print_result' => false),
    •

  •                                                       $smarty);
    •

  •         $month_result .= '</select>';
    •

  •     }
    •

  •
    •

  •     if ($display_days) {
    •

  •         $field_separator_count++;
    •

  •         $days = array();
    •

  •         if (isset($day_empty)) {
    •

  •             $days[''] = $day_empty;
    •

  •             $day_values[''] = '';
    •

  •         }
    •

  •         for ($i = 1; $i <= 31; $i++) {
    •

  •             $days[] = sprintf($day_format, $i);
    •

  •             $day_values[] = sprintf($day_value_format, $i);
    •

  •         }
    •

  •
    •

  •         $day_result .= '<select name=';
    •

  •         if (null !== $field_array){
    •

  •             $day_result .= '"' . $field_array . '[' . $prefix . 'Day]"';
    •

  •         } else {
    •

  •             $day_result .= '"' . $prefix . 'Day"';
    •

  •         }
    •

  •         if (null !== $day_size){
    •

  •             $day_result .= ' size="' . $day_size . '"';
    •

  •         }
    •

  •         if (null !== $all_extra){
    •

  •             $day_result .= ' ' . $all_extra;
    •

  •         }
    •

  •         if (null !== $day_extra){
    •

  •             $day_result .= ' ' . $day_extra;
    •

  •         }
    •

  •         $day_result .= $extra_attrs . '>'."\n";
    •

  •         $day_result .= smarty_function_html_options(array('output'     => $days,
    •

  •                                                           'values'     => $day_values,
    •

  •                                                           'selected'   => $time[2],
    •

  •                                                           'print_result' => false),
    •

  •                                                     $smarty);
    •

  •         $day_result .= '</select>';
    •

  •     }
    •

  •
    •

  •     if ($display_years) {
    •

  •         $field_separator_count++;
    •

  •         if (null !== $field_array){
    •

  •             $year_name = $field_array . '[' . $prefix . 'Year]';
    •

  •         } else {
    •

  •             $year_name = $prefix . 'Year';
    •

  •         }
    •

  •         if ($year_as_text) {
    •

  •             $year_result .= '<input type="text" name="' . $year_name . '" value="' . $time[0] . '" size="4" maxlength="4"';
    •

  •             if (null !== $all_extra){
    •

  •                 $year_result .= ' ' . $all_extra;
    •

  •             }
    •

  •             if (null !== $year_extra){
    •

  •                 $year_result .= ' ' . $year_extra;
    •

  •             }
    •

  •             $year_result .= ' />';
    •

  •         } else {
    •

  •             $years = range((int)$start_year, (int)$end_year);
    •

  •             if ($reverse_years) {
    •

  •                 rsort($years, SORT_NUMERIC);
    •

  •             } else {
    •

  •                 sort($years, SORT_NUMERIC);
    •

  •             }
    •

  •             $yearvals = $years;
    •

  •             if(isset($year_empty)) {
    •

  •                 array_unshift($years, $year_empty);
    •

  •                 array_unshift($yearvals, '');
    •

  •             }
    •

  •             $year_result .= '<select name="' . $year_name . '"';
    •

  •             if (null !== $year_size){
    •

  •                 $year_result .= ' size="' . $year_size . '"';
    •

  •             }
    •

  •             if (null !== $all_extra){
    •

  •                 $year_result .= ' ' . $all_extra;
    •

  •             }
    •

  •             if (null !== $year_extra){
    •

  •                 $year_result .= ' ' . $year_extra;
    •

  •             }
    •

  •             $year_result .= $extra_attrs . '>'."\n";
    •

  •             $year_result .= smarty_function_html_options(array('output' => $years,
    •

  •                                                                'values' => $yearvals,
    •

  •                                                                'selected'   => $time[0],
    •

  •                                                                'print_result' => false),
    •

  •                                                          $smarty);
    •

  •             $year_result .= '</select>';
    •

  •         }
    •

  •     }
    •

  •
    •

  •     // Loop thru the field_order field
    •

  •     for ($i = 0; $i <= 2; $i++){
    •

  •         $c = substr($field_order, $i, 1);
    •

  •         switch ($c){
    •

  •             case 'D':
    •

  •                 $html_result .= $day_result;
    •

  •                 break;
    •

  •
    •

  •             case 'M':
    •

  •                 $html_result .= $month_result;
    •

  •                 break;
    •

  •
    •

  •             case 'Y':
    •

  •                 $html_result .= $year_result;
    •

  •                 break;
    •

  •         }
    •

  •         // Add the field seperator
    •

  •         if($i < $field_separator_count) {
    •

  •             $html_result .= $field_separator;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     return $html_result;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:35 +0200 by phpDocumentor 1.4.0a2


File Source for function.html_select_time.php

Source for file function.html_select_time.php

Documentation is available at function.html_select_time.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {html_select_time} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     html_select_time<br>
    •

  •  * Purpose:  Prints the dropdowns for time selection
    •

  •  * @link http://smarty.php.net/manual/en/language.function.html.select.time.php {html_select_time}
    •

  •  *           (Smarty online manual)
    •

  •  * @author Roberto Berto <roberto@berto.net>
    •

  •  * @credits Monte Ohrt <monte AT ohrt DOT com>
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string
    •

  •  * @uses smarty_make_timestamp()
    •

  •  */
    •

  • function smarty_function_html_select_time($params, &$smarty)
    •

  • {
    •

  •     require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
    •

  •     require_once $smarty->_get_plugin_filepath('function','html_options');
    •

  •     /* Default values. */
    •

  •     $prefix             = "Time_";
    •

  •     $time               = time();
    •

  •     $display_hours      = true;
    •

  •     $display_minutes    = true;
    •

  •     $display_seconds    = true;
    •

  •     $display_meridian   = true;
    •

  •     $use_24_hours       = true;
    •

  •     $minute_interval    = 1;
    •

  •     $second_interval    = 1;
    •

  •     /* Should the select boxes be part of an array when returned from PHP?
    •

  •        e.g. setting it to "birthday", would create "birthday[Hour]",
    •

  •        "birthday[Minute]", "birthday[Seconds]" & "birthday[Meridian]".
    •

  •        Can be combined with prefix. */
    •

  •     $field_array        = null;
    •

  •     $all_extra          = null;
    •

  •     $hour_extra         = null;
    •

  •     $minute_extra       = null;
    •

  •     $second_extra       = null;
    •

  •     $meridian_extra     = null;
    •

  •
    •

  •     foreach ($params as $_key=>$_value) {
    •

  •         switch ($_key) {
    •

  •             case 'prefix':
    •

  •             case 'time':
    •

  •             case 'field_array':
    •

  •             case 'all_extra':
    •

  •             case 'hour_extra':
    •

  •             case 'minute_extra':
    •

  •             case 'second_extra':
    •

  •             case 'meridian_extra':
    •

  •                 $$_key = (string)$_value;
    •

  •                 break;
    •

  •
    •

  •             case 'display_hours':
    •

  •             case 'display_minutes':
    •

  •             case 'display_seconds':
    •

  •             case 'display_meridian':
    •

  •             case 'use_24_hours':
    •

  •                 $$_key = (bool)$_value;
    •

  •                 break;
    •

  •
    •

  •             case 'minute_interval':
    •

  •             case 'second_interval':
    •

  •                 $$_key = (int)$_value;
    •

  •                 break;
    •

  •
    •

  •             default:
    •

  •                 $smarty->trigger_error("[html_select_time] unknown parameter $_key", E_USER_WARNING);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     $time = smarty_make_timestamp($time);
    •

  •
    •

  •     $html_result = '';
    •

  •
    •

  •     if ($display_hours) {
    •

  •         $hours       = $use_24_hours ? range(0, 23) : range(1, 12);
    •

  •         $hour_fmt = $use_24_hours ? '%H' : '%I';
    •

  •         for ($i = 0, $for_max = count($hours); $i < $for_max; $i++)
    •

  •             $hours[$i] = sprintf('%02d', $hours[$i]);
    •

  •         $html_result .= '<select name=';
    •

  •         if (null !== $field_array) {
    •

  •             $html_result .= '"' . $field_array . '[' . $prefix . 'Hour]"';
    •

  •         } else {
    •

  •             $html_result .= '"' . $prefix . 'Hour"';
    •

  •         }
    •

  •         if (null !== $hour_extra){
    •

  •             $html_result .= ' ' . $hour_extra;
    •

  •         }
    •

  •         if (null !== $all_extra){
    •

  •             $html_result .= ' ' . $all_extra;
    •

  •         }
    •

  •         $html_result .= '>'."\n";
    •

  •         $html_result .= smarty_function_html_options(array('output'          => $hours,
    •

  •                                                            'values'          => $hours,
    •

  •                                                            'selected'      => strftime($hour_fmt, $time),
    •

  •                                                            'print_result' => false),
    •

  •                                                      $smarty);
    •

  •         $html_result .= "</select>\n";
    •

  •     }
    •

  •
    •

  •     if ($display_minutes) {
    •

  •         $all_minutes = range(0, 59);
    •

  •         for ($i = 0, $for_max = count($all_minutes); $i < $for_max; $i+= $minute_interval)
    •

  •             $minutes[] = sprintf('%02d', $all_minutes[$i]);
    •

  •         $selected = intval(floor(strftime('%M', $time) / $minute_interval) * $minute_interval);
    •

  •         $html_result .= '<select name=';
    •

  •         if (null !== $field_array) {
    •

  •             $html_result .= '"' . $field_array . '[' . $prefix . 'Minute]"';
    •

  •         } else {
    •

  •             $html_result .= '"' . $prefix . 'Minute"';
    •

  •         }
    •

  •         if (null !== $minute_extra){
    •

  •             $html_result .= ' ' . $minute_extra;
    •

  •         }
    •

  •         if (null !== $all_extra){
    •

  •             $html_result .= ' ' . $all_extra;
    •

  •         }
    •

  •         $html_result .= '>'."\n";
    •

  •
    •

  •         $html_result .= smarty_function_html_options(array('output'          => $minutes,
    •

  •                                                            'values'          => $minutes,
    •

  •                                                            'selected'      => $selected,
    •

  •                                                            'print_result' => false),
    •

  •                                                      $smarty);
    •

  •         $html_result .= "</select>\n";
    •

  •     }
    •

  •
    •

  •     if ($display_seconds) {
    •

  •         $all_seconds = range(0, 59);
    •

  •         for ($i = 0, $for_max = count($all_seconds); $i < $for_max; $i+= $second_interval)
    •

  •             $seconds[] = sprintf('%02d', $all_seconds[$i]);
    •

  •         $selected = intval(floor(strftime('%S', $time) / $second_interval) * $second_interval);
    •

  •         $html_result .= '<select name=';
    •

  •         if (null !== $field_array) {
    •

  •             $html_result .= '"' . $field_array . '[' . $prefix . 'Second]"';
    •

  •         } else {
    •

  •             $html_result .= '"' . $prefix . 'Second"';
    •

  •         }
    •

  •
    •

  •         if (null !== $second_extra){
    •

  •             $html_result .= ' ' . $second_extra;
    •

  •         }
    •

  •         if (null !== $all_extra){
    •

  •             $html_result .= ' ' . $all_extra;
    •

  •         }
    •

  •         $html_result .= '>'."\n";
    •

  •
    •

  •         $html_result .= smarty_function_html_options(array('output'          => $seconds,
    •

  •                                                            'values'          => $seconds,
    •

  •                                                            'selected'      => $selected,
    •

  •                                                            'print_result' => false),
    •

  •                                                      $smarty);
    •

  •         $html_result .= "</select>\n";
    •

  •     }
    •

  •
    •

  •     if ($display_meridian && !$use_24_hours) {
    •

  •         $html_result .= '<select name=';
    •

  •         if (null !== $field_array) {
    •

  •             $html_result .= '"' . $field_array . '[' . $prefix . 'Meridian]"';
    •

  •         } else {
    •

  •             $html_result .= '"' . $prefix . 'Meridian"';
    •

  •         }
    •

  •
    •

  •         if (null !== $meridian_extra){
    •

  •             $html_result .= ' ' . $meridian_extra;
    •

  •         }
    •

  •         if (null !== $all_extra){
    •

  •             $html_result .= ' ' . $all_extra;
    •

  •         }
    •

  •         $html_result .= '>'."\n";
    •

  •
    •

  •         $html_result .= smarty_function_html_options(array('output'          => array('AM', 'PM'),
    •

  •                                                            'values'          => array('am', 'pm'),
    •

  •                                                            'selected'      => strtolower(strftime('%p', $time)),
    •

  •                                                            'print_result' => false),
    •

  •                                                      $smarty);
    •

  •         $html_result .= "</select>\n";
    •

  •     }
    •

  •
    •

  •     return $html_result;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:37 +0200 by phpDocumentor 1.4.0a2


File Source for function.html_table.php

Source for file function.html_table.php

Documentation is available at function.html_table.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {html_table} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     html_table<br>
    •

  •  * Date:     Feb 17, 2003<br>
    •

  •  * Purpose:  make an html table from an array of data<br>
    •

  •  * Input:<br>
    •

  •  *         - loop = array to loop through
    •

  •  *         - cols = number of columns, comma separated list of column names
    •

  •  *                  or array of column names
    •

  •  *         - rows = number of rows
    •

  •  *         - table_attr = table attributes
    •

  •  *         - th_attr = table heading attributes (arrays are cycled)
    •

  •  *         - tr_attr = table row attributes (arrays are cycled)
    •

  •  *         - td_attr = table cell attributes (arrays are cycled)
    •

  •  *         - trailpad = value to pad trailing cells with
    •

  •  *         - caption = text for caption element
    •

  •  *         - vdir = vertical direction (default: "down", means top-to-bottom)
    •

  •  *         - hdir = horizontal direction (default: "right", means left-to-right)
    •

  •  *         - inner = inner loop (default "cols": print $loop line by line,
    •

  •  *                   $loop will be printed column by column otherwise)
    •

  •  *
    •

  •  *
    •

  •  * Examples:
    •

  •  * <pre>
    •

  •  * {table loop=$data}
    •

  •  * {table loop=$data cols=4 tr_attr='"bgcolor=red"'}
    •

  •  * {table loop=$data cols="first,second,third" tr_attr=$colors}
    •

  •  * </pre>
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @author credit to Messju Mohr <messju at lammfellpuschen dot de>
    •

  •  * @author credit to boots <boots dot smarty at yahoo dot com>
    •

  •  * @version  1.1
    •

  •  * @link http://smarty.php.net/manual/en/language.function.html.table.php {html_table}
    •

  •  *           (Smarty online manual)
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_function_html_table($params, &$smarty)
    •

  • {
    •

  •     $table_attr = 'border="1"';
    •

  •     $tr_attr = '';
    •

  •     $th_attr = '';
    •

  •     $td_attr = '';
    •

  •     $cols = $cols_count = 3;
    •

  •     $rows = 3;
    •

  •     $trailpad = '&nbsp;';
    •

  •     $vdir = 'down';
    •

  •     $hdir = 'right';
    •

  •     $inner = 'cols';
    •

  •     $caption = '';
    •

  •
    •

  •     if (!isset($params['loop'])) {
    •

  •         $smarty->trigger_error("html_table: missing 'loop' parameter");
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     foreach ($params as $_key=>$_value) {
    •

  •         switch ($_key) {
    •

  •             case 'loop':
    •

  •                 $$_key = (array)$_value;
    •

  •                 break;
    •

  •
    •

  •             case 'cols':
    •

  •                 if (is_array($_value) && !empty($_value)) {
    •

  •                     $cols = $_value;
    •

  •                     $cols_count = count($_value);
    •

  •                 } elseif (!is_numeric($_value) && is_string($_value) && !empty($_value)) {
    •

  •                     $cols = explode(',', $_value);
    •

  •                     $cols_count = count($cols);
    •

  •                 } elseif (!empty($_value)) {
    •

  •                     $cols_count = (int)$_value;
    •

  •                 } else {
    •

  •                     $cols_count = $cols;
    •

  •                 }
    •

  •                 break;
    •

  •
    •

  •             case 'rows':
    •

  •                 $$_key = (int)$_value;
    •

  •                 break;
    •

  •
    •

  •             case 'table_attr':
    •

  •             case 'trailpad':
    •

  •             case 'hdir':
    •

  •             case 'vdir':
    •

  •             case 'inner':
    •

  •             case 'caption':
    •

  •                 $$_key = (string)$_value;
    •

  •                 break;
    •

  •
    •

  •             case 'tr_attr':
    •

  •             case 'td_attr':
    •

  •             case 'th_attr':
    •

  •                 $$_key = $_value;
    •

  •                 break;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     $loop_count = count($loop);
    •

  •     if (empty($params['rows'])) {
    •

  •         /* no rows specified */
    •

  •         $rows = ceil($loop_count/$cols_count);
    •

  •     } elseif (empty($params['cols'])) {
    •

  •         if (!empty($params['rows'])) {
    •

  •             /* no cols specified, but rows */
    •

  •             $cols_count = ceil($loop_count/$rows);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     $output = "<table $table_attr>\n";
    •

  •
    •

  •     if (!empty($caption)) {
    •

  •         $output .= '<caption>' . $caption . "</caption>\n";
    •

  •     }
    •

  •
    •

  •     if (is_array($cols)) {
    •

  •         $cols = ($hdir == 'right') ? $cols : array_reverse($cols);
    •

  •         $output .= "<thead><tr>\n";
    •

  •
    •

  •         for ($r=0; $r<$cols_count; $r++) {
    •

  •             $output .= '<th' . smarty_function_html_table_cycle('th', $th_attr, $r) . '>';
    •

  •             $output .= $cols[$r];
    •

  •             $output .= "</th>\n";
    •

  •         }
    •

  •         $output .= "</tr></thead>\n";
    •

  •     }
    •

  •
    •

  •     $output .= "<tbody>\n";
    •

  •     for ($r=0; $r<$rows; $r++) {
    •

  •         $output .= "<tr" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . ">\n";
    •

  •         $rx =  ($vdir == 'down') ? $r*$cols_count : ($rows-1-$r)*$cols_count;
    •

  •
    •

  •         for ($c=0; $c<$cols_count; $c++) {
    •

  •             $x =  ($hdir == 'right') ? $rx+$c : $rx+$cols_count-1-$c;
    •

  •             if ($inner!='cols') {
    •

  •                 /* shuffle x to loop over rows*/
    •

  •                 $x = floor($x/$cols_count) + ($x%$cols_count)*$rows;
    •

  •             }
    •

  •
    •

  •             if ($x<$loop_count) {
    •

  •                 $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">" . $loop[$x] . "</td>\n";
    •

  •             } else {
    •

  •                 $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">$trailpad</td>\n";
    •

  •             }
    •

  •         }
    •

  •         $output .= "</tr>\n";
    •

  •     }
    •

  •     $output .= "</tbody>\n";
    •

  •     $output .= "</table>\n";
    •

  •
    •

  •     return $output;
    •

  • }
    •

  •
    •

  • function smarty_function_html_table_cycle($name, $var, $no) {
    •

  •     if(!is_array($var)) {
    •

  •         $ret = $var;
    •

  •     } else {
    •

  •         $ret = $var[$no % count($var)];
    •

  •     }
    •

  •
    •

  •     return ($ret) ? ' '.$ret : '';
    •

  • }
    •

  •
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:38 +0200 by phpDocumentor 1.4.0a2


File Source for function.mailto.php

Source for file function.mailto.php

Documentation is available at function.mailto.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {mailto} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     mailto<br>
    •

  •  * Date:     May 21, 2002
    •

  •  * Purpose:  automate mailto address link creation, and optionally
    •

  •  *           encode them.<br>
    •

  •  * Input:<br>
    •

  •  *         - address = e-mail address
    •

  •  *         - text = (optional) text to display, default is address
    •

  •  *         - encode = (optional) can be one of:
    •

  •  *                * none : no encoding (default)
    •

  •  *                * javascript : encode with javascript
    •

  •  *                * javascript_charcode : encode with javascript charcode
    •

  •  *                * hex : encode with hexidecimal (no javascript)
    •

  •  *         - cc = (optional) address(es) to carbon copy
    •

  •  *         - bcc = (optional) address(es) to blind carbon copy
    •

  •  *         - subject = (optional) e-mail subject
    •

  •  *         - newsgroups = (optional) newsgroup(s) to post to
    •

  •  *         - followupto = (optional) address(es) to follow up to
    •

  •  *         - extra = (optional) extra tags for the href link
    •

  •  *
    •

  •  * Examples:
    •

  •  * <pre>
    •

  •  * {mailto address="me@domain.com"}
    •

  •  * {mailto address="me@domain.com" encode="javascript"}
    •

  •  * {mailto address="me@domain.com" encode="hex"}
    •

  •  * {mailto address="me@domain.com" subject="Hello to you!"}
    •

  •  * {mailto address="me@domain.com" cc="you@domain.com,they@domain.com"}
    •

  •  * {mailto address="me@domain.com" extra='class="mailto"'}
    •

  •  * </pre>
    •

  •  * @link http://smarty.php.net/manual/en/language.function.mailto.php {mailto}
    •

  •  *           (Smarty online manual)
    •

  •  * @version  1.2
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @author   credits to Jason Sweat (added cc, bcc and subject functionality)
    •

  •  * @param    array
    •

  •  * @param    Smarty
    •

  •  * @return   string
    •

  •  */
    •

  • function smarty_function_mailto($params, &$smarty)
    •

  • {
    •

  •     $extra = '';
    •

  •
    •

  •     if (empty($params['address'])) {
    •

  •         $smarty->trigger_error("mailto: missing 'address' parameter");
    •

  •         return;
    •

  •     } else {
    •

  •         $address = $params['address'];
    •

  •     }
    •

  •
    •

  •     $text = $address;
    •

  •
    •

  •     // netscape and mozilla do not decode %40 (@) in BCC field (bug?)
    •

  •     // so, don't encode it.
    •

  •     $search = array('%40', '%2C');
    •

  •     $replace  = array('@', ',');
    •

  •     $mail_parms = array();
    •

  •     foreach ($params as $var=>$value) {
    •

  •         switch ($var) {
    •

  •             case 'cc':
    •

  •             case 'bcc':
    •

  •             case 'followupto':
    •

  •                 if (!empty($value))
    •

  •                     $mail_parms[] = $var.'='.str_replace($search,$replace,rawurlencode($value));
    •

  •                 break;
    •

  •
    •

  •             case 'subject':
    •

  •             case 'newsgroups':
    •

  •                 $mail_parms[] = $var.'='.rawurlencode($value);
    •

  •                 break;
    •

  •
    •

  •             case 'extra':
    •

  •             case 'text':
    •

  •                 $$var = $value;
    •

  •
    •

  •             default:
    •

  •         }
    •

  •     }
    •

  •
    •

  •     $mail_parm_vals = '';
    •

  •     for ($i=0; $i<count($mail_parms); $i++) {
    •

  •         $mail_parm_vals .= (0==$i) ? '?' : '&';
    •

  •         $mail_parm_vals .= $mail_parms[$i];
    •

  •     }
    •

  •     $address .= $mail_parm_vals;
    •

  •
    •

  •     $encode = (empty($params['encode'])) ? 'none' : $params['encode'];
    •

  •     if (!in_array($encode,array('javascript','javascript_charcode','hex','none')) ) {
    •

  •         $smarty->trigger_error("mailto: 'encode' parameter must be none, javascript or hex");
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     if ($encode == 'javascript' ) {
    •

  •         $string = 'document.write(\'<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>\');';
    •

  •
    •

  •         $js_encode = '';
    •

  •         for ($x=0; $x < strlen($string); $x++) {
    •

  •             $js_encode .= '%' . bin2hex($string[$x]);
    •

  •         }
    •

  •
    •

  •         return '<script type="text/javascript">eval(unescape(\''.$js_encode.'\'))</script>';
    •

  •
    •

  •     } elseif ($encode == 'javascript_charcode' ) {
    •

  •         $string = '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
    •

  •
    •

  •         for($x = 0, $y = strlen($string); $x < $y; $x++ ) {
    •

  •             $ord[] = ord($string[$x]);
    •

  •         }
    •

  •
    •

  •         $_ret = "<script type=\"text/javascript\" language=\"javascript\">\n";
    •

  •         $_ret .= "<!--\n";
    •

  •         $_ret .= "{document.write(String.fromCharCode(";
    •

  •         $_ret .= implode(',',$ord);
    •

  •         $_ret .= "))";
    •

  •         $_ret .= "}\n";
    •

  •         $_ret .= "//-->\n";
    •

  •         $_ret .= "</script>\n";
    •

  •
    •

  •         return $_ret;
    •

  •
    •

  •
    •

  •     } elseif ($encode == 'hex') {
    •

  •
    •

  •         preg_match('!^(.*)(\?.*)$!',$address,$match);
    •

  •         if(!empty($match[2])) {
    •

  •             $smarty->trigger_error("mailto: hex encoding does not work with extra attributes. Try javascript.");
    •

  •             return;
    •

  •         }
    •

  •         $address_encode = '';
    •

  •         for ($x=0; $x < strlen($address); $x++) {
    •

  •             if(preg_match('!\w!',$address[$x])) {
    •

  •                 $address_encode .= '%' . bin2hex($address[$x]);
    •

  •             } else {
    •

  •                 $address_encode .= $address[$x];
    •

  •             }
    •

  •         }
    •

  •         $text_encode = '';
    •

  •         for ($x=0; $x < strlen($text); $x++) {
    •

  •             $text_encode .= '&#x' . bin2hex($text[$x]).';';
    •

  •         }
    •

  •
    •

  •         $mailto = "&#109;&#97;&#105;&#108;&#116;&#111;&#58;";
    •

  •         return '<a href="'.$mailto.$address_encode.'" '.$extra.'>'.$text_encode.'</a>';
    •

  •
    •

  •     } else {
    •

  •         // no encoding
    •

  •         return '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
    •

  •
    •

  •     }
    •

  •
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:38 +0200 by phpDocumentor 1.4.0a2


File Source for function.math.php

Source for file function.math.php

Documentation is available at function.math.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {math} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     math<br>
    •

  •  * Purpose:  handle math computations in template<br>
    •

  •  * @link http://smarty.php.net/manual/en/language.function.math.php {math}
    •

  •  *           (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_function_math($params, &$smarty)
    •

  • {
    •

  •     // be sure equation parameter is present
    •

  •     if (empty($params['equation'])) {
    •

  •         $smarty->trigger_error("math: missing equation parameter");
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     $equation = $params['equation'];
    •

  •
    •

  •     // make sure parenthesis are balanced
    •

  •     if (substr_count($equation,"(") != substr_count($equation,")")) {
    •

  •         $smarty->trigger_error("math: unbalanced parenthesis");
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     // match all vars in equation, make sure all are passed
    •

  •     preg_match_all("!(?:0x[a-fA-F0-9]+)|([a-zA-Z][a-zA-Z0-9_]+)!",$equation, $match);
    •

  •     $allowed_funcs = array('int','abs','ceil','cos','exp','floor','log','log10',
    •

  •                            'max','min','pi','pow','rand','round','sin','sqrt','srand','tan');
    •

  •
    •

  •     foreach($match[1] as $curr_var) {
    •

  •         if ($curr_var && !in_array($curr_var, array_keys($params)) && !in_array($curr_var, $allowed_funcs)) {
    •

  •             $smarty->trigger_error("math: function call $curr_var not allowed");
    •

  •             return;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     foreach($params as $key => $val) {
    •

  •         if ($key != "equation" && $key != "format" && $key != "assign") {
    •

  •             // make sure value is not empty
    •

  •             if (strlen($val)==0) {
    •

  •                 $smarty->trigger_error("math: parameter $key is empty");
    •

  •                 return;
    •

  •             }
    •

  •             if (!is_numeric($val)) {
    •

  •                 $smarty->trigger_error("math: parameter $key: is not numeric");
    •

  •                 return;
    •

  •             }
    •

  •             $equation = preg_replace("/\b$key\b/", " \$params['$key'] ", $equation);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     eval("\$smarty_math_result = ".$equation.";");
    •

  •
    •

  •     if (empty($params['format'])) {
    •

  •         if (empty($params['assign'])) {
    •

  •             return $smarty_math_result;
    •

  •         } else {
    •

  •             $smarty->assign($params['assign'],$smarty_math_result);
    •

  •         }
    •

  •     } else {
    •

  •         if (empty($params['assign'])){
    •

  •             printf($params['format'],$smarty_math_result);
    •

  •         } else {
    •

  •             $smarty->assign($params['assign'],sprintf($params['format'],$smarty_math_result));
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:39 +0200 by phpDocumentor 1.4.0a2


File Source for function.popup.php

Source for file function.popup.php

Documentation is available at function.popup.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {popup} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     popup<br>
    •

  •  * Purpose:  make text pop up in windows via overlib
    •

  •  * @link http://smarty.php.net/manual/en/language.function.popup.php {popup}
    •

  •  *           (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_function_popup($params, &$smarty)
    •

  • {
    •

  •     $append = '';
    •

  •     foreach ($params as $_key=>$_value) {
    •

  •         switch ($_key) {
    •

  •             case 'text':
    •

  •             case 'trigger':
    •

  •             case 'function':
    •

  •             case 'inarray':
    •

  •                 $$_key = (string)$_value;
    •

  •                 if ($_key == 'function' || $_key == 'inarray')
    •

  •                     $append .= ',' . strtoupper($_key) . ",'$_value'";
    •

  •                 break;
    •

  •
    •

  •             case 'caption':
    •

  •             case 'closetext':
    •

  •             case 'status':
    •

  •                 $append .= ',' . strtoupper($_key) . ",'" . str_replace("'","\'",$_value) . "'";
    •

  •                 break;
    •

  •
    •

  •             case 'fgcolor':
    •

  •             case 'bgcolor':
    •

  •             case 'textcolor':
    •

  •             case 'capcolor':
    •

  •             case 'closecolor':
    •

  •             case 'textfont':
    •

  •             case 'captionfont':
    •

  •             case 'closefont':
    •

  •             case 'fgbackground':
    •

  •             case 'bgbackground':
    •

  •             case 'caparray':
    •

  •             case 'capicon':
    •

  •             case 'background':
    •

  •             case 'frame':
    •

  •                 $append .= ',' . strtoupper($_key) . ",'$_value'";
    •

  •                 break;
    •

  •
    •

  •             case 'textsize':
    •

  •             case 'captionsize':
    •

  •             case 'closesize':
    •

  •             case 'width':
    •

  •             case 'height':
    •

  •             case 'border':
    •

  •             case 'offsetx':
    •

  •             case 'offsety':
    •

  •             case 'snapx':
    •

  •             case 'snapy':
    •

  •             case 'fixx':
    •

  •             case 'fixy':
    •

  •             case 'padx':
    •

  •             case 'pady':
    •

  •             case 'timeout':
    •

  •             case 'delay':
    •

  •                 $append .= ',' . strtoupper($_key) . ",$_value";
    •

  •                 break;
    •

  •
    •

  •             case 'sticky':
    •

  •             case 'left':
    •

  •             case 'right':
    •

  •             case 'center':
    •

  •             case 'above':
    •

  •             case 'below':
    •

  •             case 'noclose':
    •

  •             case 'autostatus':
    •

  •             case 'autostatuscap':
    •

  •             case 'fullhtml':
    •

  •             case 'hauto':
    •

  •             case 'vauto':
    •

  •             case 'mouseoff':
    •

  •             case 'followmouse':
    •

  •             case 'closeclick':
    •

  •                 if ($_value) $append .= ',' . strtoupper($_key);
    •

  •                 break;
    •

  •
    •

  •             default:
    •

  •                 $smarty->trigger_error("[popup] unknown parameter $_key", E_USER_WARNING);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     if (empty($text) && !isset($inarray) && empty($function)) {
    •

  •         $smarty->trigger_error("overlib: attribute 'text' or 'inarray' or 'function' required");
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     if (empty($trigger)) { $trigger = "onmouseover"; }
    •

  •
    •

  •     $retval = $trigger . '="return overlib(\''.preg_replace(array("!'!","![\r\n]!"),array("\'",'\r'),$text).'\'';
    •

  •     $retval .= $append . ');"';
    •

  •     if ($trigger == 'onmouseover')
    •

  •        $retval .= ' onmouseout="nd();"';
    •

  •
    •

  •
    •

  •     return $retval;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:40 +0200 by phpDocumentor 1.4.0a2


File Source for function.popup_init.php

Source for file function.popup_init.php

Documentation is available at function.popup_init.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty {popup_init} function plugin
    •

  •  *
    •

  •  * Type:     function<br>
    •

  •  * Name:     popup_init<br>
    •

  •  * Purpose:  initialize overlib
    •

  •  * @link http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init}
    •

  •  *           (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param array
    •

  •  * @param Smarty
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_function_popup_init($params, &$smarty)
    •

  • {
    •

  •     $zindex = 1000;
    •

  •
    •

  •     if (!empty($params['zindex'])) {
    •

  •         $zindex = $params['zindex'];
    •

  •     }
    •

  •
    •

  •     if (!empty($params['src'])) {
    •

  •         return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n"
    •

  •          . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
    •

  •     } else {
    •

  •         $smarty->trigger_error("popup_init: missing src parameter");
    •

  •     }
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:40 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.capitalize.php

Source for file modifier.capitalize.php

Documentation is available at modifier.capitalize.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty capitalize modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     capitalize<br>
    •

  •  * Purpose:  capitalize words in the string
    •

  •  * @link http://smarty.php.net/manual/en/language.modifiers.php#LANGUAGE.MODIFIER.CAPITALIZE
    •

  •  *       capitalize (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_capitalize($string, $uc_digits = false)
    •

  • {
    •

  •     smarty_modifier_capitalize_ucfirst(null, $uc_digits);
    •

  •     return preg_replace_callback('!\'?\b\w(\w|\')*\b!', 'smarty_modifier_capitalize_ucfirst', $string);
    •

  • }
    •

  •
    •

  • function smarty_modifier_capitalize_ucfirst($string, $uc_digits = null)
    •

  • {
    •

  •     static $_uc_digits = false;
    •

  •
    •

  •     if(isset($uc_digits)) {
    •

  •         $_uc_digits = $uc_digits;
    •

  •         return;
    •

  •     }
    •

  •
    •

  •     if(substr($string[0],0,1) != "'" && !preg_match("!\d!",$string[0]) || $_uc_digits)
    •

  •         return ucfirst($string[0]);
    •

  •     else
    •

  •         return $string[0];
    •

  • }
    •

  •
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:53 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.cat.php

Source for file modifier.cat.php

Documentation is available at modifier.cat.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty cat modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     cat<br>
    •

  •  * Date:     Feb 24, 2003
    •

  •  * Purpose:  catenate a value to a variable
    •

  •  * Input:    string to catenate
    •

  •  * Example:  {$var|cat:"foo"}
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat
    •

  •  *           (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @version 1.0
    •

  •  * @param string
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_cat($string, $cat)
    •

  • {
    •

  •     return $string . $cat;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:54 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.count_characters.php

Source for file modifier.count_characters.php

Documentation is available at modifier.count_characters.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty count_characters modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     count_characteres<br>
    •

  •  * Purpose:  count the number of characters in a text
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.count.characters.php
    •

  •  *           count_characters (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @param boolean include whitespace in the character count
    •

  •  * @return integer
    •

  •  */
    •

  • function smarty_modifier_count_characters($string, $include_spaces = false)
    •

  • {
    •

  •     if ($include_spaces)
    •

  •        return(strlen($string));
    •

  •
    •

  •     return preg_match_all("/[^\s]/",$string, $match);
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:54 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.count_paragraphs.php

Source for file modifier.count_paragraphs.php

Documentation is available at modifier.count_paragraphs.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty count_paragraphs modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     count_paragraphs<br>
    •

  •  * Purpose:  count the number of paragraphs in a text
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php
    •

  •  *           count_paragraphs (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @return integer
    •

  •  */
    •

  • function smarty_modifier_count_paragraphs($string)
    •

  • {
    •

  •     // count \r or \n characters
    •

  •     return count(preg_split('/[\r\n]+/', $string));
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:54 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.count_sentences.php

Source for file modifier.count_sentences.php

Documentation is available at modifier.count_sentences.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty count_sentences modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     count_sentences
    •

  •  * Purpose:  count the number of sentences in a text
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php
    •

  •  *           count_sentences (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @return integer
    •

  •  */
    •

  • function smarty_modifier_count_sentences($string)
    •

  • {
    •

  •     // find periods with a word before but not after.
    •

  •     return preg_match_all('/[^\s]\.(?!\w)/', $string, $match);
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:55 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.count_words.php

Source for file modifier.count_words.php

Documentation is available at modifier.count_words.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty count_words modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     count_words<br>
    •

  •  * Purpose:  count the number of words in a text
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.count.words.php
    •

  •  *           count_words (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @return integer
    •

  •  */
    •

  • function smarty_modifier_count_words($string)
    •

  • {
    •

  •     // split text by ' ',\r,\n,\f,\t
    •

  •     $split_array = preg_split('/\s+/',$string);
    •

  •     // count matches that contain alphanumerics
    •

  •     $word_count = preg_grep('/[a-zA-Z0-9\\x80-\\xff]/', $split_array);
    •

  •
    •

  •     return count($word_count);
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:55 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.date_format.php

Source for file modifier.date_format.php

Documentation is available at modifier.date_format.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Include the {@link shared.make_timestamp.php} plugin
    •

  •  */
    •

  • require_once $smarty->_get_plugin_filepath('shared', 'make_timestamp');
    •

  • /**
    •

  •  * Smarty date_format modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     date_format<br>
    •

  •  * Purpose:  format datestamps via strftime<br>
    •

  •  * Input:<br>
    •

  •  *         - string: input date string
    •

  •  *         - format: strftime format for output
    •

  •  *         - default_date: default date if $string is empty
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.date.format.php
    •

  •  *           date_format (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @param string
    •

  •  * @param string
    •

  •  * @return string|void
    •

  •  * @uses smarty_make_timestamp()
    •

  •  */
    •

  • function smarty_modifier_date_format($string, $format = '%b %e, %Y', $default_date = '')
    •

  • {
    •

  •     if ($string != '') {
    •

  •         $timestamp = smarty_make_timestamp($string);
    •

  •     } elseif ($default_date != '') {
    •

  •         $timestamp = smarty_make_timestamp($default_date);
    •

  •     } else {
    •

  •         return;
    •

  •     }
    •

  •     if (DIRECTORY_SEPARATOR == '\\') {
    •

  •         $_win_from = array('%D',       '%h', '%n', '%r',          '%R',    '%t', '%T');
    •

  •         $_win_to   = array('%m/%d/%y', '%b', "\n", '%I:%M:%S %p', '%H:%M', "\t", '%H:%M:%S');
    •

  •         if (strpos($format, '%e') !== false) {
    •

  •             $_win_from[] = '%e';
    •

  •             $_win_to[]   = sprintf('%\' 2d', date('j', $timestamp));
    •

  •         }
    •

  •         if (strpos($format, '%l') !== false) {
    •

  •             $_win_from[] = '%l';
    •

  •             $_win_to[]   = sprintf('%\' 2d', date('h', $timestamp));
    •

  •         }
    •

  •         $format = str_replace($_win_from, $_win_to, $format);
    •

  •     }
    •

  •     return strftime($format, $timestamp);
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:55 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.debug_print_var.php

Source for file modifier.debug_print_var.php

Documentation is available at modifier.debug_print_var.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty debug_print_var modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     debug_print_var<br>
    •

  •  * Purpose:  formats variable contents for display in the console
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.debug.print.var.php
    •

  •  *           debug_print_var (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param array|object
    •

  •  * @param integer
    •

  •  * @param integer
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
    •

  • {
    •

  •     $_replace = array(
    •

  •         "\n" => '<i>\n</i>',
    •

  •         "\r" => '<i>\r</i>',
    •

  •         "\t" => '<i>\t</i>'
    •

  •     );
    •

  •
    •

  •     switch (gettype($var)) {
    •

  •         case 'array' :
    •

  •             $results = '<b>Array (' . count($var) . ')</b>';
    •

  •             foreach ($var as $curr_key => $curr_val) {
    •

  •                 $results .= '<br>' . str_repeat('&nbsp;', $depth * 2)
    •

  •                     . '<b>' . strtr($curr_key, $_replace) . '</b> =&gt; '
    •

  •                     . smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
    •

  •                     $depth--;
    •

  •             }
    •

  •             break;
    •

  •         case 'object' :
    •

  •             $object_vars = get_object_vars($var);
    •

  •             $results = '<b>' . get_class($var) . ' Object (' . count($object_vars) . ')</b>';
    •

  •             foreach ($object_vars as $curr_key => $curr_val) {
    •

  •                 $results .= '<br>' . str_repeat('&nbsp;', $depth * 2)
    •

  •                     . '<b> -&gt;' . strtr($curr_key, $_replace) . '</b> = '
    •

  •                     . smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
    •

  •                     $depth--;
    •

  •             }
    •

  •             break;
    •

  •         case 'boolean' :
    •

  •         case 'NULL' :
    •

  •         case 'resource' :
    •

  •             if (true === $var) {
    •

  •                 $results = 'true';
    •

  •             } elseif (false === $var) {
    •

  •                 $results = 'false';
    •

  •             } elseif (null === $var) {
    •

  •                 $results = 'null';
    •

  •             } else {
    •

  •                 $results = htmlspecialchars((string) $var);
    •

  •             }
    •

  •             $results = '<i>' . $results . '</i>';
    •

  •             break;
    •

  •         case 'integer' :
    •

  •         case 'float' :
    •

  •             $results = htmlspecialchars((string) $var);
    •

  •             break;
    •

  •         case 'string' :
    •

  •             $results = strtr($var, $_replace);
    •

  •             if (strlen($var) > $length ) {
    •

  •                 $results = substr($var, 0, $length - 3) . '...';
    •

  •             }
    •

  •             $results = htmlspecialchars('"' . $results . '"');
    •

  •             break;
    •

  •         case 'unknown type' :
    •

  •         default :
    •

  •             $results = strtr((string) $var, $_replace);
    •

  •             if (strlen($results) > $length ) {
    •

  •                 $results = substr($results, 0, $length - 3) . '...';
    •

  •             }
    •

  •             $results = htmlspecialchars($results);
    •

  •     }
    •

  •
    •

  •     return $results;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:56 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.debug_print_var.php

Source for file modifier.debug_print_var.php

Documentation is available at modifier.debug_print_var.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Smarty debug_print_var modifier plugin
    •

  •  *
    •

  •  * Modified version of the default smarty plug-in that prevents endless looping when dealing with assigned
    •

  •  * objects
    •

  •  *
    •

  •  *
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     debug_print_var<br>
    •

  •  * Purpose:  formats variable contents for display in the console
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.debug.print.var.php
    •

  •  *           debug_print_var (Smarty online manual)
    •

  •  * @param array|object
    •

  •  * @param integer
    •

  •  * @param integer
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
    •

  • {
    •

  •     $_replace = array("\n"=>'<i>&#92;n</i>', "\r"=>'<i>&#92;r</i>', "\t"=>'<i>&#92;t</i>');
    •

  •     if (is_array($var)) {
    •

  •         $results = "<b>Array (".count($var).")</b>";
    •

  •         foreach ($var as $curr_key => $curr_val) {
    •

  •             $return = smarty_modifier_debug_print_var($curr_val, $depth+1, $length);
    •

  •             $results .= "<br>".str_repeat('&nbsp;', $depth*2)."<b>".strtr($curr_key, $_replace)."</b> =&gt; $return";
    •

  •         }
    •

  •     } else if (is_object($var)) {
    •

  •         $object_vars = get_object_vars($var);
    •

  •         $results = "<b>".get_class($var)." Object (".count($object_vars).")</b>";
    •

  •         foreach ($object_vars as $curr_key => $curr_val) {
    •

  •             if ( is_object( $curr_val ) ) {
    •

  •                 $return ='[object ' . get_class( $curr_val ) . ']';
    •

  •             } else {
    •

  •                 $return = smarty_modifier_debug_print_var($curr_val, $depth+1, $length);
    •

  •             }
    •

  •             $results .= "<br>".str_repeat('&nbsp;', $depth*2)."<b>$curr_key</b> =&gt; $return";
    •

  •         }
    •

  •     } else if (is_resource($var)) {
    •

  •         $results = '<i>'.(string)$var.'</i>';
    •

  •     } else if (empty($var) && $var != "0") {
    •

  •         $results = '<i>empty</i>';
    •

  •     } else {
    •

  •         if (strlen($var) > $length ) {
    •

  •             $results = substr($var, 0, $length-3).'...';
    •

  •         } else {
    •

  •             $results = $var;
    •

  •         }
    •

  •         $results = htmlspecialchars($results);
    •

  •         $results = strtr($results, $_replace);
    •

  •     }
    •

  •     return $results;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:57 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.default.php

Source for file modifier.default.php

Documentation is available at modifier.default.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty default modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     default<br>
    •

  •  * Purpose:  designate default value for empty variables
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.default.php
    •

  •  *           default (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_default($string, $default = '')
    •

  • {
    •

  •     if (!isset($string) || $string === '')
    •

  •         return $default;
    •

  •     else
    •

  •         return $string;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:57 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.escape.php

Source for file modifier.escape.php

Documentation is available at modifier.escape.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty escape modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     escape<br>
    •

  •  * Purpose:  Escape the string according to escapement type
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.escape.php
    •

  •  *           escape (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @param html|htmlall|url|quotes|hex|hexentity|javascript
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_escape($string, $esc_type = 'html', $char_set = 'ISO-8859-1')
    •

  • {
    •

  •     switch ($esc_type) {
    •

  •         case 'html':
    •

  •             return htmlspecialchars($string, ENT_QUOTES, $char_set);
    •

  •
    •

  •         case 'htmlall':
    •

  •             return htmlentities($string, ENT_QUOTES, $char_set);
    •

  •
    •

  •         case 'url':
    •

  •             return rawurlencode($string);
    •

  •
    •

  •         case 'urlpathinfo':
    •

  •             return str_replace('%2F','/',rawurlencode($string));
    •

  •
    •

  •         case 'quotes':
    •

  •             // escape unescaped single quotes
    •

  •             return preg_replace("%(?<!\\\\)'%", "\\'", $string);
    •

  •
    •

  •         case 'hex':
    •

  •             // escape every character into hex
    •

  •             $return = '';
    •

  •             for ($x=0; $x < strlen($string); $x++) {
    •

  •                 $return .= '%' . bin2hex($string[$x]);
    •

  •             }
    •

  •             return $return;
    •

  •
    •

  •         case 'hexentity':
    •

  •             $return = '';
    •

  •             for ($x=0; $x < strlen($string); $x++) {
    •

  •                 $return .= '&#x' . bin2hex($string[$x]) . ';';
    •

  •             }
    •

  •             return $return;
    •

  •
    •

  •         case 'decentity':
    •

  •             $return = '';
    •

  •             for ($x=0; $x < strlen($string); $x++) {
    •

  •                 $return .= '&#' . ord($string[$x]) . ';';
    •

  •             }
    •

  •             return $return;
    •

  •
    •

  •         case 'javascript':
    •

  •             // escape quotes and backslashes, newlines, etc.
    •

  •             return strtr($string, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n','</'=>'<\/'));
    •

  •
    •

  •         case 'mail':
    •

  •             // safe way to display e-mail address on a web page
    •

  •             return str_replace(array('@', '.'),array(' [AT] ', ' [DOT] '), $string);
    •

  •
    •

  •         case 'nonstd':
    •

  •            // escape non-standard chars, such as ms document quotes
    •

  •            $_res = '';
    •

  •            for($_i = 0, $_len = strlen($string); $_i < $_len; $_i++) {
    •

  •                $_ord = ord(substr($string, $_i, 1));
    •

  •                // non-standard char, escape it
    •

  •                if($_ord >= 126){
    •

  •                    $_res .= '&#' . $_ord . ';';
    •

  •                }
    •

  •                else {
    •

  •                    $_res .= substr($string, $_i, 1);
    •

  •                }
    •

  •            }
    •

  •            return $_res;
    •

  •
    •

  •         default:
    •

  •             return $string;
    •

  •     }
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:57 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.indent.php

Source for file modifier.indent.php

Documentation is available at modifier.indent.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty indent modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     indent<br>
    •

  •  * Purpose:  indent lines of text
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.indent.php
    •

  •  *           indent (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @param integer
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_indent($string,$chars=4,$char=" ")
    •

  • {
    •

  •     return preg_replace('!^!m',str_repeat($char,$chars),$string);
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:58 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.lower.php

Source for file modifier.lower.php

Documentation is available at modifier.lower.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty lower modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     lower<br>
    •

  •  * Purpose:  convert string to lowercase
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.lower.php
    •

  •  *           lower (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_lower($string)
    •

  • {
    •

  •     return strtolower($string);
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:58 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.nl2br.php

Source for file modifier.nl2br.php

Documentation is available at modifier.nl2br.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     nl2br<br>
    •

  •  * Date:     Feb 26, 2003
    •

  •  * Purpose:  convert \r\n, \r or \n to <<br>>
    •

  •  * Input:<br>
    •

  •  *         - contents = contents to replace
    •

  •  *         - preceed_test = if true, includes preceeding break tags
    •

  •  *           in replacement
    •

  •  * Example:  {$text|nl2br}
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.nl2br.php
    •

  •  *           nl2br (Smarty online manual)
    •

  •  * @version  1.0
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_nl2br($string)
    •

  • {
    •

  •     return nl2br($string);
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:58 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.regex_replace.php

Source for file modifier.regex_replace.php

Documentation is available at modifier.regex_replace.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty regex_replace modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     regex_replace<br>
    •

  •  * Purpose:  regular expression search/replace
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
    •

  •  *           regex_replace (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @param string|array
    •

  •  * @param string|array
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_regex_replace($string, $search, $replace)
    •

  • {
    •

  •     if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
    •

  •         /* remove eval-modifier from $search */
    •

  •         $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
    •

  •     }
    •

  •
    •

  •     return preg_replace($search, $replace, $string);
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:59 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.replace.php

Source for file modifier.replace.php

Documentation is available at modifier.replace.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty replace modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     replace<br>
    •

  •  * Purpose:  simple search/replace
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.replace.php
    •

  •  *           replace (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @param string
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_replace($string, $search, $replace)
    •

  • {
    •

  •     return str_replace($search, $replace, $string);
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:59 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.spacify.php

Source for file modifier.spacify.php

Documentation is available at modifier.spacify.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty spacify modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     spacify<br>
    •

  •  * Purpose:  add spaces between characters in a string
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.spacify.php
    •

  •  *           spacify (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_spacify($string, $spacify_char = ' ')
    •

  • {
    •

  •     return implode($spacify_char,
    •

  •                    preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY));
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:00 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.string_format.php

Source for file modifier.string_format.php

Documentation is available at modifier.string_format.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty string_format modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     string_format<br>
    •

  •  * Purpose:  format strings via sprintf
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.string.format.php
    •

  •  *           string_format (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_string_format($string, $format)
    •

  • {
    •

  •     return sprintf($format, $string);
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:00 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.strip.php

Source for file modifier.strip.php

Documentation is available at modifier.strip.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty strip modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     strip<br>
    •

  •  * Purpose:  Replace all repeated spaces, newlines, tabs
    •

  •  *           with a single space or supplied replacement string.<br>
    •

  •  * Example:  {$var|strip} {$var|strip:"&nbsp;"}
    •

  •  * Date:     September 25th, 2002
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.strip.php
    •

  •  *           strip (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @version  1.0
    •

  •  * @param string
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_strip($text, $replace = ' ')
    •

  • {
    •

  •     return preg_replace('!\s+!', $replace, $text);
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:00 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.strip_tags.php

Source for file modifier.strip_tags.php

Documentation is available at modifier.strip_tags.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty strip_tags modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     strip_tags<br>
    •

  •  * Purpose:  strip html tags from text
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.strip.tags.php
    •

  •  *           strip_tags (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @param boolean
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_strip_tags($string, $replace_with_space = true)
    •

  • {
    •

  •     if ($replace_with_space)
    •

  •         return preg_replace('!<[^>]*?>!', ' ', $string);
    •

  •     else
    •

  •         return strip_tags($string);
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:01 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.truncate.php

Source for file modifier.truncate.php

Documentation is available at modifier.truncate.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty truncate modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     truncate<br>
    •

  •  * Purpose:  Truncate a string to a certain length if necessary,
    •

  •  *           optionally splitting in the middle of a word, and
    •

  •  *           appending the $etc string or inserting $etc into the middle.
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.truncate.php
    •

  •  *           truncate (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @param integer
    •

  •  * @param string
    •

  •  * @param boolean
    •

  •  * @param boolean
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_truncate($string, $length = 80, $etc = '...',
    •

  •                                   $break_words = false, $middle = false)
    •

  • {
    •

  •     if ($length == 0)
    •

  •         return '';
    •

  •
    •

  •     if (strlen($string) > $length) {
    •

  •         $length -= min($length, strlen($etc));
    •

  •         if (!$break_words && !$middle) {
    •

  •             $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length+1));
    •

  •         }
    •

  •         if(!$middle) {
    •

  •             return substr($string, 0, $length) . $etc;
    •

  •         } else {
    •

  •             return substr($string, 0, $length/2) . $etc . substr($string, -$length/2);
    •

  •         }
    •

  •     } else {
    •

  •         return $string;
    •

  •     }
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:01 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.upper.php

Source for file modifier.upper.php

Documentation is available at modifier.upper.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty upper modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     upper<br>
    •

  •  * Purpose:  convert string to uppercase
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.upper.php
    •

  •  *           upper (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_upper($string)
    •

  • {
    •

  •     return strtoupper($string);
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:01 +0200 by phpDocumentor 1.4.0a2


File Source for modifier.wordwrap.php

Source for file modifier.wordwrap.php

Documentation is available at modifier.wordwrap.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Smarty wordwrap modifier plugin
    •

  •  *
    •

  •  * Type:     modifier<br>
    •

  •  * Name:     wordwrap<br>
    •

  •  * Purpose:  wrap a string of text at a given length
    •

  •  * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php
    •

  •  *           wordwrap (Smarty online manual)
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @param integer
    •

  •  * @param string
    •

  •  * @param boolean
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_modifier_wordwrap($string,$length=80,$break="\n",$cut=false)
    •

  • {
    •

  •     return wordwrap($string,$length,$break,$cut);
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:02 +0200 by phpDocumentor 1.4.0a2


File Source for outputfilter.trimwhitespace.php

Source for file outputfilter.trimwhitespace.php

Documentation is available at outputfilter.trimwhitespace.php

  • <?php
    •

  • /**
    •

  •  * Smarty plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Smarty trimwhitespace outputfilter plugin
    •

  •  *
    •

  •  * File:     outputfilter.trimwhitespace.php<br>
    •

  •  * Type:     outputfilter<br>
    •

  •  * Name:     trimwhitespace<br>
    •

  •  * Date:     Jan 25, 2003<br>
    •

  •  * Purpose:  trim leading white space and blank lines from
    •

  •  *           template source after it gets interpreted, cleaning
    •

  •  *           up code and saving bandwidth. Does not affect
    •

  •  *           <<PRE>></PRE> and <SCRIPT></SCRIPT> blocks.<br>
    •

  •  * Install:  Drop into the plugin directory, call
    •

  •  *           <code>$smarty->load_filter('output','trimwhitespace');</code>
    •

  •  *           from application.
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @author Contributions from Lars Noschinski <lars@usenet.noschinski.de>
    •

  •  * @version  1.3
    •

  •  * @param string
    •

  •  * @param Smarty
    •

  •  */
    •

  • function smarty_outputfilter_trimwhitespace($source, &$smarty)
    •

  • {
    •

  •     // Pull out the script blocks
    •

  •     preg_match_all("!<script[^>]+>.*?</script>!is", $source, $match);
    •

  •     $_script_blocks = $match[0];
    •

  •     $source = preg_replace("!<script[^>]+>.*?</script>!is",
    •

  •                            '@@@SMARTY:TRIM:SCRIPT@@@', $source);
    •

  •
    •

  •     // Pull out the pre blocks
    •

  •     preg_match_all("!<pre>.*?</pre>!is", $source, $match);
    •

  •     $_pre_blocks = $match[0];
    •

  •     $source = preg_replace("!<pre>.*?</pre>!is",
    •

  •                            '@@@SMARTY:TRIM:PRE@@@', $source);
    •

  •
    •

  •     // Pull out the textarea blocks
    •

  •     preg_match_all("!<textarea[^>]+>.*?</textarea>!is", $source, $match);
    •

  •     $_textarea_blocks = $match[0];
    •

  •     $source = preg_replace("!<textarea[^>]+>.*?</textarea>!is",
    •

  •                            '@@@SMARTY:TRIM:TEXTAREA@@@', $source);
    •

  •
    •

  •     // remove all leading spaces, tabs and carriage returns NOT
    •

  •     // preceeded by a php close tag.
    •

  •     $source = trim(preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $source));
    •

  •
    •

  •     // replace textarea blocks
    •

  •     smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_blocks, $source);
    •

  •
    •

  •     // replace pre blocks
    •

  •     smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@",$_pre_blocks, $source);
    •

  •
    •

  •     // replace script blocks
    •

  •     smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source);
    •

  •
    •

  •     return $source;
    •

  • }
    •

  •
    •

  • function smarty_outputfilter_trimwhitespace_replace($search_str, $replace, &$subject) {
    •

  •     $_len = strlen($search_str);
    •

  •     $_pos = 0;
    •

  •     for ($_i=0, $_count=count($replace); $_i<$_count; $_i++)
    •

  •         if (($_pos=strpos($subject, $search_str, $_pos))!==false)
    •

  •             $subject = substr_replace($subject, $replace[$_i], $_pos, $_len);
    •

  •         else
    •

  •             break;
    •

  •
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:12 +0200 by phpDocumentor 1.4.0a2


File Source for shared.escape_special_chars.php

Source for file shared.escape_special_chars.php

Documentation is available at shared.escape_special_chars.php

  • <?php
    •

  • /**
    •

  •  * Smarty shared plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * escape_special_chars common function
    •

  •  *
    •

  •  * Function: smarty_function_escape_special_chars<br>
    •

  •  * Purpose:  used by other smarty functions to escape
    •

  •  *           special chars except for already escaped ones
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_function_escape_special_chars($string)
    •

  • {
    •

  •     if(!is_array($string)) {
    •

  •         $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
    •

  •         $string = htmlspecialchars($string);
    •

  •         $string = str_replace(array('%%%SMARTY_START%%%','%%%SMARTY_END%%%'), array('&',';'), $string);
    •

  •     }
    •

  •     return $string;
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:21 +0200 by phpDocumentor 1.4.0a2


File Source for shared.make_timestamp.php

Source for file shared.make_timestamp.php

Documentation is available at shared.make_timestamp.php

  • <?php
    •

  • /**
    •

  •  * Smarty shared plugin
    •

  •  * @package Smarty
    •

  •  * @subpackage plugins
    •

  •  */
    •

  •
    •

  •
    •

  • /**
    •

  •  * Function: smarty_make_timestamp<br>
    •

  •  * Purpose:  used by other smarty functions to make a timestamp
    •

  •  *           from a string.
    •

  •  * @author   Monte Ohrt <monte at ohrt dot com>
    •

  •  * @param string
    •

  •  * @return string
    •

  •  */
    •

  • function smarty_make_timestamp($string)
    •

  • {
    •

  •     if(empty($string)) {
    •

  •         // use "now":
    •

  •         $time = time();
    •

  •
    •

  •     } elseif (preg_match('/^\d{14}$/', $string)) {
    •

  •         // it is mysql timestamp format of YYYYMMDDHHMMSS?
    •

  •         $time = mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2),
    •

  •                        substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4));
    •

  •
    •

  •     } elseif (is_numeric($string)) {
    •

  •         // it is a numeric string, we handle it as timestamp
    •

  •         $time = (int)$string;
    •

  •
    •

  •     } else {
    •

  •         // strtotime should handle it
    •

  •         $time = strtotime($string);
    •

  •         if ($time == -1 || $time === false) {
    •

  •             // strtotime() was not able to parse $string, use "now":
    •

  •             $time = time();
    •

  •         }
    •

  •     }
    •

  •     return $time;
    •

  •
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:21 +0200 by phpDocumentor 1.4.0a2


Docs for page block.textformat.php

File: /smarty/plugins/block.textformat.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_block_textformat()
    Smarty {textformat}{/textformat} block plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_block_textformat() [line 31]

    Usage: smarty_block_textformat( array $params, string $content, Smarty &$smarty)

    Parameters

    $params

     Params:   style: string (email)
           indent: integer (0)
           wrap: integer (80)
           wrap_char string ("\n")
           indent_char: string (" ")
           wrap_boundary: boolean (true)

    $content

    contents of the block

    &$smarty

    clever simulation of a method

    Returns

    string $content re-formatted

    Remarks

    Smarty {textformat}{/textformat} block plugin

    Type: block function
    Name: textformat
    Purpose: format text a certain way with preset styles or custom wrap/indent settings

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.function.textformat.php {textformat} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:56:39 +0200 by phpDocumentor 1.4.0a2


Docs for page compiler.assign.php

File: /smarty/plugins/compiler.assign.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_compiler_assign()
    Smarty {assign} compiler function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_compiler_assign() [line 21]

    Usage: smarty_compiler_assign( string $tag_attrs, Smarty_Compiler &$compiler)

    Parameters

    $tag_attrs

    containing var-attribute and value-attribute

    &$compiler

    Remarks

    Smarty {assign} compiler function plugin

    Type: compiler function
    Name: assign
    Purpose: assign a value to a template variable

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com> (initial author)

    link

    http://smarty.php.net/manual/en/language.custom.functions.php#LANGUAGE.FUNCTION.ASSIGN {assign} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:22 +0200 by phpDocumentor 1.4.0a2


Docs for page core.assemble_plugin_filepath.php

File: /smarty/internals/core.assemble_plugin_filepath.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string|false smarty_core_assemble_plugin_filepath()
    assemble filepath of requested plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string|false smarty_core_assemble_plugin_filepath() [line 15]

    Usage: smarty_core_assemble_plugin_filepath( $params, &$smarty, string $type, string $name)

    Parameters

    $type

    $name

    $params

    &$smarty

    Remarks

    assemble filepath of requested plugin

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:28 +0200 by phpDocumentor 1.4.0a2


Docs for page core.assign_smarty_interface.php

File: /smarty/internals/core.assign_smarty_interface.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_core_assign_smarty_interface()
    Smarty assign_smarty_interface core plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_core_assign_smarty_interface() [line 17]

    Usage: smarty_core_assign_smarty_interface( array $params, Smarty &$smarty)

    Parameters

    $params

    Format: null

    &$smarty

    Remarks

    Smarty assign_smarty_interface core plugin

    Type: core
    Name: assign_smarty_interface
    Purpose: assign the $smarty interface variable

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:29 +0200 by phpDocumentor 1.4.0a2


Docs for page core.create_dir_structure.php

File: /smarty/internals/core.create_dir_structure.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_core_create_dir_structure()
    create full directory structure

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_core_create_dir_structure() [line 16]

    Usage: smarty_core_create_dir_structure( $params, &$smarty, string $dir)

    Parameters

    $dir

    $params

    &$smarty

    Remarks

    create full directory structure

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:30 +0200 by phpDocumentor 1.4.0a2


Docs for page core.display_debug_console.php

File: /smarty/internals/core.display_debug_console.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_core_display_debug_console()
    Smarty debug_console function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_core_display_debug_console() [line 17]

    Usage: smarty_core_display_debug_console( array $params, Smarty &$smarty)

    Parameters

    $params

    Format: null

    &$smarty

    Remarks

    Smarty debug_console function plugin

    Type: core
    Name: display_debug_console
    Purpose: display the javascript debug console window

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:30 +0200 by phpDocumentor 1.4.0a2


Docs for page core.get_include_path.php

File: /smarty/internals/core.get_include_path.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • boolean smarty_core_get_include_path()
    Get path to file from include_path

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • boolean smarty_core_get_include_path() [line 19]

    Usage: smarty_core_get_include_path( &$params, &$smarty, string $file_path, string $new_file_path)

    Parameters

    $file_path

    $new_file_path

    &$params

    &$smarty

    Remarks

    Get path to file from include_path

    staticvar

    array|null $_path_array:

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:31 +0200 by phpDocumentor 1.4.0a2


Docs for page core.get_microtime.php

File: /smarty/internals/core.get_microtime.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • double smarty_core_get_microtime()
    Get seconds and microseconds

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • double smarty_core_get_microtime() [line 12]

    Usage: smarty_core_get_microtime( $params, &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Get seconds and microseconds

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:32 +0200 by phpDocumentor 1.4.0a2


Docs for page core.get_php_resource.php

File: /smarty/internals/core.get_php_resource.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • boolean smarty_core_get_php_resource()
    Retrieves PHP script resource

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • boolean smarty_core_get_php_resource() [line 18]

    Usage: smarty_core_get_php_resource( &$params, &$smarty, string $resource, string $resource_type, $php_resource 2)

    Parameters

    $resource

    $resource_type

    2

    &$params

    &$smarty

    Remarks

    Retrieves PHP script resource

    sets $php_resource to the returned resource

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:32 +0200 by phpDocumentor 1.4.0a2


Docs for page core.is_secure.php

File: /smarty/internals/core.is_secure.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • boolean smarty_core_is_secure()
    determines if a resource is secure or not.

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • boolean smarty_core_is_secure() [line 18]

    Usage: smarty_core_is_secure( $params, &$smarty, string $resource_type, string $resource_name)

    Parameters

    $resource_type

    $resource_name

    $params

    &$smarty

    Remarks

    determines if a resource is secure or not.

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:33 +0200 by phpDocumentor 1.4.0a2


Docs for page core.is_trusted.php

File: /smarty/internals/core.is_trusted.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • boolean smarty_core_is_trusted()
    determines if a resource is trusted or not

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • boolean smarty_core_is_trusted() [line 18]

    Usage: smarty_core_is_trusted( $params, &$smarty, string $resource_type, string $resource_name)

    Parameters

    $resource_type

    $resource_name

    $params

    &$smarty

    Remarks

    determines if a resource is trusted or not

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:34 +0200 by phpDocumentor 1.4.0a2


Docs for page core.load_plugins.php

File: /smarty/internals/core.load_plugins.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_core_load_plugins()
    Load requested plugins

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_core_load_plugins() [line 16]

    Usage: smarty_core_load_plugins( $params, &$smarty, array $plugins)

    Parameters

    $plugins

    $params

    &$smarty

    Remarks

    Load requested plugins

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:34 +0200 by phpDocumentor 1.4.0a2


Docs for page core.load_resource_plugin.php

File: /smarty/internals/core.load_resource_plugin.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_core_load_resource_plugin()
    load a resource plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_core_load_resource_plugin() [line 16]

    Usage: smarty_core_load_resource_plugin( $params, &$smarty, string $type)

    Parameters

    $type

    $params

    &$smarty

    Remarks

    load a resource plugin

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:35 +0200 by phpDocumentor 1.4.0a2


Docs for page core.process_cached_inserts.php

File: /smarty/internals/core.process_cached_inserts.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_core_process_cached_inserts()
    Replace cached inserts with the actual results

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_core_process_cached_inserts() [line 14]

    Usage: smarty_core_process_cached_inserts( $params, &$smarty, string $results)

    Parameters

    $results

    $params

    &$smarty

    Remarks

    Replace cached inserts with the actual results

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:36 +0200 by phpDocumentor 1.4.0a2


Docs for page core.process_compiled_include.php

File: /smarty/internals/core.process_compiled_include.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_core_process_compiled_include()
    Replace nocache-tags by results of the corresponding non-cacheable functions and return it

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_core_process_compiled_include() [line 17]

    Usage: smarty_core_process_compiled_include( $params, &$smarty, string $compiled_tpl, string $cached_source)

    Parameters

    $compiled_tpl

    $cached_source

    $params

    &$smarty

    Remarks

    Replace nocache-tags by results of the corresponding non-cacheable functions and return it

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:37 +0200 by phpDocumentor 1.4.0a2


Docs for page core.read_cache_file.php

File: /smarty/internals/core.read_cache_file.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • boolean smarty_core_read_cache_file()
    read a cache file, determine if it needs to be regenerated or not

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • boolean smarty_core_read_cache_file() [line 21]

    Usage: smarty_core_read_cache_file( &$params, &$smarty, string $tpl_file, string $cache_id, string $compile_id, string $results)

    Parameters

    $tpl_file

    $cache_id

    $compile_id

    $results

    &$params

    &$smarty

    Remarks

    read a cache file, determine if it needs to be regenerated or not

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:37 +0200 by phpDocumentor 1.4.0a2


Docs for page core.rmdir.php

File: /smarty/internals/core.rmdir.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • boolean smarty_core_rmdir()
    delete a dir recursively (level=0 -> keep root) WARNING: no tests, it will try to remove what you tell it!

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • boolean smarty_core_rmdir() [line 20]

    Usage: smarty_core_rmdir( $params, &$smarty, string $dirname, integer $level, integer $exp_time)

    Parameters

    $dirname

    $level

    $exp_time

    $params

    &$smarty

    Remarks

    delete a dir recursively (level=0 -> keep root) WARNING: no tests, it will try to remove what you tell it!

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:38 +0200 by phpDocumentor 1.4.0a2


Docs for page core.rm_auto.php

File: /smarty/internals/core.rm_auto.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • boolean smarty_core_rm_auto()
    delete an automagically created file by name and id

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • boolean smarty_core_rm_auto() [line 20]

    Usage: smarty_core_rm_auto( $params, &$smarty, string $auto_base, string $auto_source, string $auto_id, integer $exp_time)

    Parameters

    $auto_base

    $auto_source

    $auto_id

    $exp_time

    $params

    &$smarty

    Remarks

    delete an automagically created file by name and id

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:39 +0200 by phpDocumentor 1.4.0a2


Docs for page core.run_insert_handler.php

File: /smarty/internals/core.run_insert_handler.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_core_run_insert_handler()
    Handle insert tags

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_core_run_insert_handler() [line 14]

    Usage: smarty_core_run_insert_handler( $params, &$smarty, array $args)

    Parameters

    $args

    $params

    &$smarty

    Remarks

    Handle insert tags

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:40 +0200 by phpDocumentor 1.4.0a2


Docs for page core.smarty_include_php.php

File: /smarty/internals/core.smarty_include_php.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_core_smarty_include_php()
    called for included php files within templates

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_core_smarty_include_php() [line 21]

    Usage: smarty_core_smarty_include_php( $params, &$smarty, string $smarty_file, string $smarty_assign, boolean $smarty_once, array $smarty_include_vars)

    Parameters

    $smarty_file

    $smarty_assign

    variable to assign the included template's output into

    $smarty_once

    uses include_once if this is true

    $smarty_include_vars

    associative array of vars from {include file="blah" var=$var}

    $params

    &$smarty

    Remarks

    called for included php files within templates

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:40 +0200 by phpDocumentor 1.4.0a2


Docs for page core.write_cache_file.php

File: /smarty/internals/core.write_cache_file.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • true|null smarty_core_write_cache_file()
    Prepend the cache information to the cache file and write it

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • true|null smarty_core_write_cache_file() [line 21]

    Usage: smarty_core_write_cache_file( $params, &$smarty, string $tpl_file, string $cache_id, string $compile_id, string $results)

    Parameters

    $tpl_file

    $cache_id

    $compile_id

    $results

    $params

    &$smarty

    Remarks

    Prepend the cache information to the cache file and write it

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:41 +0200 by phpDocumentor 1.4.0a2


Docs for page core.write_compiled_include.php

File: /smarty/internals/core.write_compiled_include.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • boolean smarty_core_write_compiled_include()
    Extract non-cacheable parts out of compiled template and write it

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • boolean smarty_core_write_compiled_include() [line 16]

    Usage: smarty_core_write_compiled_include( $params, &$smarty, string $compile_path, string $template_compiled)

    Parameters

    $compile_path

    $template_compiled

    $params

    &$smarty

    Remarks

    Extract non-cacheable parts out of compiled template and write it

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:42 +0200 by phpDocumentor 1.4.0a2


Docs for page core.write_compiled_resource.php

File: /smarty/internals/core.write_compiled_resource.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • true smarty_core_write_compiled_resource()
    write the compiled resource

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • true smarty_core_write_compiled_resource() [line 15]

    Usage: smarty_core_write_compiled_resource( $params, &$smarty, string $compile_path, string $compiled_content)

    Parameters

    $compile_path

    $compiled_content

    $params

    &$smarty

    Remarks

    write the compiled resource

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:43 +0200 by phpDocumentor 1.4.0a2


Docs for page core.write_file.php

File: /smarty/internals/core.write_file.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • boolean smarty_core_write_file()
    write out a file to disk

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • boolean smarty_core_write_file() [line 16]

    Usage: smarty_core_write_file( $params, &$smarty, string $filename, string $contents, boolean $create_dirs)

    Parameters

    $filename

    $contents

    $create_dirs

    $params

    &$smarty

    Remarks

    write out a file to disk

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:44 +0200 by phpDocumentor 1.4.0a2


Docs for page function.assign_debug_info.php

File: /smarty/plugins/function.assign_debug_info.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_function_assign_debug_info()
    Smarty {assign_debug_info} function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_function_assign_debug_info() [line 19]

    Usage: smarty_function_assign_debug_info( array $params, Smarty &$smarty)

    Parameters

    $params

    unused in this plugin, this plugin uses Smarty::$_config, Smarty::$_tpl_vars and Smarty::$_smarty_debug_info

    &$smarty

    Remarks

    Smarty {assign_debug_info} function plugin

    Type: function
    Name: assign_debug_info
    Purpose: assign debug info to the template

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:23 +0200 by phpDocumentor 1.4.0a2


Docs for page function.config_load.php

File: /smarty/plugins/function.config_load.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_function_config_load()
    Smarty {config_load} function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_function_config_load() [line 27]

    Usage: smarty_function_config_load( array $params, Smarty &$smarty)

    Parameters

    $params

    Format:

     array('file' => required config file name,
       'section' => optional config file section to load
       'scope' => local/parent/global
       'global' => overrides scope, setting to parent if true)

    &$smarty

    Remarks

    Smarty {config_load} function plugin

    Type: function
    Name: config_load
    Purpose: load config file vars

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    author

    messju mohr <at lammfellpuschen dot de messju at lammfellpuschen dot de> (added use of resources)

    link

    http://smarty.php.net/manual/en/language.function.config.load.php {config_load} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:24 +0200 by phpDocumentor 1.4.0a2


Docs for page function.counter.php

File: /smarty/plugins/function.counter.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string|null smarty_function_counter()
    Smarty {counter} function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string|null smarty_function_counter() [line 22]

    Usage: smarty_function_counter( array $params, Smarty &$smarty)

    Parameters

    $params

    parameters

    &$smarty

    Remarks

    Smarty {counter} function plugin

    Type: function
    Name: counter
    Purpose: print out a counter value

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.function.counter.php {counter} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:26 +0200 by phpDocumentor 1.4.0a2


Docs for page function.cycle.php

File: /smarty/plugins/function.cycle.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string|null smarty_function_cycle()
    Smarty {cycle} function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string|null smarty_function_cycle() [line 44]

    Usage: smarty_function_cycle( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {cycle} function plugin

    Type: function
    Name: cycle
    Date: May 3, 2002
    Purpose: cycle through given values
    Input:

    • name = name of cycle (optional)
    • values = comma separated list of values to cycle, or an array of values to cycle (this can be left out for subsequent calls)
    • reset = boolean - resets given var to true
    • print = boolean - print var or not. default is true
    • advance = boolean - whether or not to advance the cycle
    • delimiter = the value delimiter, default is ","
    • assign = boolean, assigns to template var instead of printed.
    Examples:
     {cycle values="#eeeeee,#d0d0d0d"}
 {cycle name=row values="one,two,three" reset=true}
 {cycle name=row}

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    author

    credit to Mark Priatel <mpriatel@rogers.com>

    author

    credit to Gerard <gerard@interfold.com>

    author

    credit to Jason Sweat <jsweat_php@yahoo.com>

    version

    1.3

    link

    http://smarty.php.net/manual/en/language.function.cycle.php {cycle} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:26 +0200 by phpDocumentor 1.4.0a2


Docs for page function.debug.php

File: /smarty/plugins/function.debug.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_debug()
    Smarty {debug} function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_debug() [line 24]

    Usage: smarty_function_debug( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Returns

    output from Smarty::_generate_debug_output()

    Remarks

    Smarty {debug} function plugin

    Type: function
    Name: debug
    Date: July 1, 2002
    Purpose: popup debug window

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    version

    1.0

    link

    http://smarty.php.net/manual/en/language.function.debug.php {debug} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:27 +0200 by phpDocumentor 1.4.0a2


Docs for page function.eval.php

File: /smarty/plugins/function.eval.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_function_eval()
    Smarty {eval} function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_function_eval() [line 21]

    Usage: smarty_function_eval( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {eval} function plugin

    Type: function
    Name: eval
    Purpose: evaluate a template variable as a template

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.function.eval.php {eval} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:27 +0200 by phpDocumentor 1.4.0a2


Docs for page function.fetch.php

File: /smarty/plugins/function.fetch.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string|null smarty_function_fetch()
    Smarty {fetch} plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string|null smarty_function_fetch() [line 23]

    Usage: smarty_function_fetch( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Returns

    if the assign parameter is passed, Smarty assigns the result to a template variable

    Remarks

    Smarty {fetch} plugin

    Type: function
    Name: fetch
    Purpose: fetch file, web or ftp data and display results

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.function.fetch.php {fetch} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:28 +0200 by phpDocumentor 1.4.0a2


Docs for page function.html_checkboxes.php

File: /smarty/plugins/function.html_checkboxes.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_html_checkboxes()
    Smarty {html_checkboxes} function plugin
  • void smarty_function_html_checkboxes_output()

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_html_checkboxes() [line 41]

    Usage: smarty_function_html_checkboxes( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {html_checkboxes} function plugin

    File: function.html_checkboxes.php
    Type: function
    Name: html_checkboxes
    Date: 24.Feb.2003
    Purpose: Prints out a list of checkbox input types
    Input:

    • name (optional) - string default "checkbox"
    • values (required) - array
    • options (optional) - associative array
    • checked (optional) - array default not set
    • separator (optional) - ie
      or &nbsp;
    • output (optional) - the output next to each checkbox
    • assign (optional) - assign the output as an array to this variable
    Examples:
     {html_checkboxes values=$ids output=$names}
 {html_checkboxes values=$ids name='box' separator='
    ' output=$names}
 {html_checkboxes values=$ids checked=$checked separator='
    ' output=$names}

    author

    credits to Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    author

    Christopher Kvarme <christopher.kvarme@flashjab.com>

    version

    1.0

    link

    http://smarty.php.net/manual/en/language.function.html.checkboxes.php {html_checkboxes} (Smarty online manual)

    uses

    smarty_function_escape_special_chars()

    [ Top ]

  • void smarty_function_html_checkboxes_output() [line 126]

    Usage: smarty_function_html_checkboxes_output( $name, $value, $output, $selected, $extra, $separator, $labels)

    Parameters

    $name

    $value

    $output

    $selected

    $extra

    $separator

    $labels

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:30 +0200 by phpDocumentor 1.4.0a2


Docs for page function.html_image.php

File: /smarty/plugins/function.html_image.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_html_image()
    Smarty {html_image} function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_html_image() [line 37]

    Usage: smarty_function_html_image( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {html_image} function plugin

    Type: function
    Name: html_image
    Date: Feb 24, 2003
    Purpose: format HTML tags for the image
    Input:

    • file = file (and path) of image (required)
    • height = image height (optional, default actual height)
    • width = image width (optional, default actual width)
    • basedir = base directory for absolute paths, default is environment variable DOCUMENT_ROOT
    • path_prefix = prefix for path output (optional, default empty)
    Examples: {html_image file="/images/masthead.gif"} Output: <img src="/images/masthead.gif" width=400 height=23>

    author

    credits to Duda <duda@big.hu> - wrote first image function in repository, helped with lots of functionality

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    version

    1.0

    link

    http://smarty.php.net/manual/en/language.function.html.image.php {html_image} (Smarty online manual)

    uses

    smarty_function_escape_special_chars()

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:30 +0200 by phpDocumentor 1.4.0a2


Docs for page function.html_options.php

File: /smarty/plugins/function.html_options.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_html_options()
    Smarty {html_options} function plugin
  • void smarty_function_html_options_optgroup()
  • void smarty_function_html_options_optoutput()

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_html_options() [line 30]

    Usage: smarty_function_html_options( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {html_options} function plugin

    Type: function
    Name: html_options
    Input:

    • name (optional) - string default "select"
    • values (required if no options supplied) - array
    • options (required if no values supplied) - associative array
    • selected (optional) - string default not set
    • output (required if not options supplied) - array
    Purpose: Prints the list of <option> tags generated from the passed parameters

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.function.html.options.php {html_image} (Smarty online manual)

    uses

    smarty_function_escape_special_chars()

    [ Top ]

  • void smarty_function_html_options_optgroup() [line 111]

    Usage: smarty_function_html_options_optgroup( $key, $values, $selected)

    Parameters

    $key

    $values

    $selected

    [ Top ]

  • void smarty_function_html_options_optoutput() [line 98]

    Usage: smarty_function_html_options_optoutput( $key, $value, $selected)

    Parameters

    $key

    $value

    $selected

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:31 +0200 by phpDocumentor 1.4.0a2


Docs for page function.html_radios.php

File: /smarty/plugins/function.html_radios.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_html_radios()
    Smarty {html_radios} function plugin
  • void smarty_function_html_radios_output()

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_html_radios() [line 41]

    Usage: smarty_function_html_radios( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {html_radios} function plugin

    File: function.html_radios.php
    Type: function
    Name: html_radios
    Date: 24.Feb.2003
    Purpose: Prints out a list of radio input types
    Input:

    • name (optional) - string default "radio"
    • values (required) - array
    • options (optional) - associative array
    • checked (optional) - array default not set
    • separator (optional) - ie
      or &nbsp;
    • output (optional) - the output next to each radio button
    • assign (optional) - assign the output as an array to this variable
    Examples:
     {html_radios values=$ids output=$names}
 {html_radios values=$ids name='box' separator='
    ' output=$names}
 {html_radios values=$ids checked=$checked separator='
    ' output=$names}

    author

    credits to Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    author

    Christopher Kvarme <christopher.kvarme@flashjab.com>

    version

    1.0

    link

    http://smarty.php.net/manual/en/language.function.html.radios.php {html_radios} (Smarty online manual)

    uses

    smarty_function_escape_special_chars()

    [ Top ]

  • void smarty_function_html_radios_output() [line 130]

    Usage: smarty_function_html_radios_output( $name, $value, $output, $selected, $extra, $separator, $labels, $label_ids)

    Parameters

    $name

    $value

    $output

    $selected

    $extra

    $separator

    $labels

    $label_ids

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:32 +0200 by phpDocumentor 1.4.0a2


Docs for page function.html_select_date.php

File: /smarty/plugins/function.html_select_date.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_html_select_date()
    Smarty {html_select_date} plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_html_select_date() [line 38]

    Usage: smarty_function_html_select_date( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {html_select_date} plugin

    Type: function
    Name: html_select_date
    Purpose: Prints the dropdowns for date selection.

    ChangeLog:

    • 1.0 initial release
    • 1.1 added support for +/- N syntax for begin and end year values. (Monte)
    • 1.2 added support for yyyy-mm-dd syntax for time value. (Jan Rosier)
    • 1.3 added support for choosing format for month values (Gary Loescher)
    • 1.3.1 added support for choosing format for day values (Marcus Bointon)
    • 1.3.2 support negative timestamps, force year dropdown to include given date unless explicitly set (Monte)
    • 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that of 0000-00-00 dates (cybot, boots)

    author

    Andrei Zmievski

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    version

    1.3.4

    link

    http://smarty.php.net/manual/en/language.function.html.select.date.php {html_select_date} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:33 +0200 by phpDocumentor 1.4.0a2


Docs for page function.html_select_time.php

File: /smarty/plugins/function.html_select_time.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_html_select_time()
    Smarty {html_select_time} function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_html_select_time() [line 24]

    Usage: smarty_function_html_select_time( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {html_select_time} function plugin

    Type: function
    Name: html_select_time
    Purpose: Prints the dropdowns for time selection

    author

    Roberto Berto <roberto@berto.net>

    link

    http://smarty.php.net/manual/en/language.function.html.select.time.php {html_select_time} (Smarty online manual)

    uses

    smarty_make_timestamp()

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:35 +0200 by phpDocumentor 1.4.0a2


Docs for page function.html_table.php

File: /smarty/plugins/function.html_table.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_html_table()
    Smarty {html_table} function plugin
  • void smarty_function_html_table_cycle()

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_html_table() [line 49]

    Usage: smarty_function_html_table( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {html_table} function plugin

    Type: function
    Name: html_table
    Date: Feb 17, 2003
    Purpose: make an html table from an array of data
    Input:

    • loop = array to loop through
    • cols = number of columns, comma separated list of column names or array of column names
    • rows = number of rows
    • table_attr = table attributes
    • th_attr = table heading attributes (arrays are cycled)
    • tr_attr = table row attributes (arrays are cycled)
    • td_attr = table cell attributes (arrays are cycled)
    • trailpad = value to pad trailing cells with
    • caption = text for caption element
    • vdir = vertical direction (default: "down", means top-to-bottom)
    • hdir = horizontal direction (default: "right", means left-to-right)
    • inner = inner loop (default "cols": print $loop line by line, $loop will be printed column by column otherwise)

    Examples:

     {table loop=$data}
 {table loop=$data cols=4 tr_attr='"bgcolor=red"'}
 {table loop=$data cols="first,second,third" tr_attr=$colors}

    author

    credit to boots <dot smarty at yahoo dot com boots dot smarty at yahoo dot com>

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    author

    credit to Messju Mohr <at lammfellpuschen dot de messju at lammfellpuschen dot de>

    version

    1.1

    link

    http://smarty.php.net/manual/en/language.function.html.table.php {html_table} (Smarty online manual)

    [ Top ]

  • void smarty_function_html_table_cycle() [line 164]

    Usage: smarty_function_html_table_cycle( $name, $var, $no)

    Parameters

    $name

    $var

    $no

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:37 +0200 by phpDocumentor 1.4.0a2


Docs for page function.mailto.php

File: /smarty/plugins/function.mailto.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_mailto()
    Smarty {mailto} function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_mailto() [line 50]

    Usage: smarty_function_mailto( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {mailto} function plugin

    Type: function
    Name: mailto
    Date: May 21, 2002 Purpose: automate mailto address link creation, and optionally encode them.
    Input:

    • address = e-mail address
    • text = (optional) text to display, default is address
    • encode = (optional) can be one of: * none : no encoding (default) * javascript : encode with javascript * javascript_charcode : encode with javascript charcode * hex : encode with hexidecimal (no javascript)
    • cc = (optional) address(es) to carbon copy
    • bcc = (optional) address(es) to blind carbon copy
    • subject = (optional) e-mail subject
    • newsgroups = (optional) newsgroup(s) to post to
    • followupto = (optional) address(es) to follow up to
    • extra = (optional) extra tags for the href link
    Examples:
     {mailto address="me@domain.com"}
 {mailto address="me@domain.com" encode="javascript"}
 {mailto address="me@domain.com" encode="hex"}
 {mailto address="me@domain.com" subject="Hello to you!"}
 {mailto address="me@domain.com" cc="you@domain.com,they@domain.com"}
 {mailto address="me@domain.com" extra='class="mailto"'}

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    author

    credits to Jason Sweat (added cc, bcc and subject functionality)

    version

    1.2

    link

    http://smarty.php.net/manual/en/language.function.mailto.php {mailto} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:38 +0200 by phpDocumentor 1.4.0a2


Docs for page function.math.php

File: /smarty/plugins/function.math.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_math()
    Smarty {math} function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_math() [line 22]

    Usage: smarty_function_math( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {math} function plugin

    Type: function
    Name: math
    Purpose: handle math computations in template

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.function.math.php {math} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:39 +0200 by phpDocumentor 1.4.0a2


Docs for page function.popup.php

File: /smarty/plugins/function.popup.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_popup()
    Smarty {popup} function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_popup() [line 22]

    Usage: smarty_function_popup( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {popup} function plugin

    Type: function
    Name: popup
    Purpose: make text pop up in windows via overlib

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.function.popup.php {popup} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:39 +0200 by phpDocumentor 1.4.0a2


Docs for page function.popup_init.php

File: /smarty/plugins/function.popup_init.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_popup_init()
    Smarty {popup_init} function plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_popup_init() [line 22]

    Usage: smarty_function_popup_init( array $params, Smarty &$smarty)

    Parameters

    $params

    &$smarty

    Remarks

    Smarty {popup_init} function plugin

    Type: function
    Name: popup_init
    Purpose: initialize overlib

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init} (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:40 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.capitalize.php

File: /smarty/plugins/modifier.capitalize.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_capitalize()
    Smarty capitalize modifier plugin
  • void smarty_modifier_capitalize_ucfirst()

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_capitalize() [line 21]

    Usage: smarty_modifier_capitalize( string $string, [ $uc_digits = false])

    Parameters

    $string

    $uc_digits

    Remarks

    Smarty capitalize modifier plugin

    Type: modifier
    Name: capitalize
    Purpose: capitalize words in the string

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifiers.php#LANGUAGE.MODIFIER.CAPITALIZE capitalize (Smarty online manual)

    [ Top ]

  • void smarty_modifier_capitalize_ucfirst() [line 27]

    Usage: smarty_modifier_capitalize_ucfirst( $string, [ $uc_digits = null])

    Parameters

    $string

    $uc_digits

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:53 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.cat.php

File: /smarty/plugins/modifier.cat.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_cat()
    Smarty cat modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_cat() [line 26]

    Usage: smarty_modifier_cat( string $string, string $cat)

    Parameters

    $string

    $cat

    Remarks

    Smarty cat modifier plugin

    Type: modifier
    Name: cat
    Date: Feb 24, 2003 Purpose: catenate a value to a variable Input: string to catenate Example: {$var|cat:"foo"}

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    version

    1.0

    link

    http://smarty.php.net/manual/en/language.modifier.cat.php cat (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:54 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.count_characters.php

File: /smarty/plugins/modifier.count_characters.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • integer smarty_modifier_count_characters()
    Smarty count_characters modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • integer smarty_modifier_count_characters() [line 22]

    Usage: smarty_modifier_count_characters( string $string, [boolean $include_spaces = false])

    Parameters

    $string

    $include_spaces

    include whitespace in the character count

    Remarks

    Smarty count_characters modifier plugin

    Type: modifier
    Name: count_characteres
    Purpose: count the number of characters in a text

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:54 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.count_paragraphs.php

File: /smarty/plugins/modifier.count_paragraphs.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • integer smarty_modifier_count_paragraphs()
    Smarty count_paragraphs modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • integer smarty_modifier_count_paragraphs() [line 21]

    Usage: smarty_modifier_count_paragraphs( string $string)

    Parameters

    $string

    Remarks

    Smarty count_paragraphs modifier plugin

    Type: modifier
    Name: count_paragraphs
    Purpose: count the number of paragraphs in a text

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php count_paragraphs (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:54 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.count_sentences.php

File: /smarty/plugins/modifier.count_sentences.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • integer smarty_modifier_count_sentences()
    Smarty count_sentences modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • integer smarty_modifier_count_sentences() [line 21]

    Usage: smarty_modifier_count_sentences( string $string)

    Parameters

    $string

    Remarks

    Smarty count_sentences modifier plugin

    Type: modifier
    Name: count_sentences Purpose: count the number of sentences in a text

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php count_sentences (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:54 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.count_words.php

File: /smarty/plugins/modifier.count_words.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • integer smarty_modifier_count_words()
    Smarty count_words modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • integer smarty_modifier_count_words() [line 21]

    Usage: smarty_modifier_count_words( string $string)

    Parameters

    $string

    Remarks

    Smarty count_words modifier plugin

    Type: modifier
    Name: count_words
    Purpose: count the number of words in a text

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.count.words.php count_words (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:55 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.date_format.php

File: /smarty/plugins/modifier.date_format.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

  • require_once = $smarty->_get_plugin_filepath('shared','make_timestamp')
    Include the shared.make_timestamp.php plugin

Global Variable Summary

Constant Summary

Function Summary

  • string|void smarty_modifier_date_format()
    Smarty date_format modifier plugin

Include Statements Detail

  • require_once file: = $smarty->_get_plugin_filepath('shared','make_timestamp') [line 11]

    Remarks

    Include the shared.make_timestamp.php plugin

Global Variable Detail

Constant Detail

Function Detail

  • string|void smarty_modifier_date_format() [line 31]

    Usage: smarty_modifier_date_format( string $string, [string $format = '%b %e, %Y'], [string $default_date = ''])

    Parameters

    $string

    $format

    $default_date

    Remarks

    Smarty date_format modifier plugin

    Type: modifier
    Name: date_format
    Purpose: format datestamps via strftime
    Input:

    • string: input date string
    • format: strftime format for output
    • default_date: default date if $string is empty

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.date.format.php date_format (Smarty online manual)

    uses

    smarty_make_timestamp()

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:55 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.debug_print_var.php

File: /smarty/plugins/modifier.debug_print_var.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_debug_print_var()
    Smarty debug_print_var modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_debug_print_var() [line 23]

    Usage: smarty_modifier_debug_print_var( array|object $var, [integer $depth = 0], [integer $length = 40])

    Parameters

    $var

    $depth

    $length

    Remarks

    Smarty debug_print_var modifier plugin

    Type: modifier
    Name: debug_print_var
    Purpose: formats variable contents for display in the console

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.debug.print.var.php debug_print_var (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:56 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.debug_print_var.php

File: /smarty/xoops_plugins/modifier.debug_print_var.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:56 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.default.php

File: /smarty/plugins/modifier.default.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_default()
    Smarty default modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_default() [line 22]

    Usage: smarty_modifier_default( string $string, [string $default = ''])

    Parameters

    $string

    $default

    Remarks

    Smarty default modifier plugin

    Type: modifier
    Name: default
    Purpose: designate default value for empty variables

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.default.php default (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:57 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.escape.php

File: /smarty/plugins/modifier.escape.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_escape()
    Smarty escape modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_escape() [line 22]

    Usage: smarty_modifier_escape( string $string, [html|htmlall|url|quotes|hex|hexentity|javascript $esc_type = 'html'], [ $char_set = 'ISO-8859-1'])

    Parameters

    $string

    $esc_type

    $char_set

    Remarks

    Smarty escape modifier plugin

    Type: modifier
    Name: escape
    Purpose: Escape the string according to escapement type

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.escape.php escape (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:57 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.indent.php

File: /smarty/plugins/modifier.indent.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_indent()
    Smarty indent modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_indent() [line 23]

    Usage: smarty_modifier_indent( string $string, [integer $chars = 4], [string $char = &quot; &quot;])

    Parameters

    $string

    $chars

    $char

    Remarks

    Smarty indent modifier plugin

    Type: modifier
    Name: indent
    Purpose: indent lines of text

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.indent.php indent (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:58 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.lower.php

File: /smarty/plugins/modifier.lower.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_lower()
    Smarty lower modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_lower() [line 21]

    Usage: smarty_modifier_lower( string $string)

    Parameters

    $string

    Remarks

    Smarty lower modifier plugin

    Type: modifier
    Name: lower
    Purpose: convert string to lowercase

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.lower.php lower (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:58 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.nl2br.php

File: /smarty/plugins/modifier.nl2br.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_nl2br()
    Smarty plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_nl2br() [line 28]

    Usage: smarty_modifier_nl2br( string $string)

    Parameters

    $string

    Remarks

    Smarty plugin

    Type: modifier
    Name: nl2br
    Date: Feb 26, 2003 Purpose: convert \r\n, \r or \n to <br> Input:

    • contents = contents to replace
    • preceed_test = if true, includes preceeding break tags in replacement
    Example: {$text|nl2br}

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    version

    1.0

    link

    http://smarty.php.net/manual/en/language.modifier.nl2br.php nl2br (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:58 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.regex_replace.php

File: /smarty/plugins/modifier.regex_replace.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_regex_replace()
    Smarty regex_replace modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_regex_replace() [line 23]

    Usage: smarty_modifier_regex_replace( string $string, string|array $search, string|array $replace)

    Parameters

    $string

    $search

    $replace

    Remarks

    Smarty regex_replace modifier plugin

    Type: modifier
    Name: regex_replace
    Purpose: regular expression search/replace

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.regex.replace.php regex_replace (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:59 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.replace.php

File: /smarty/plugins/modifier.replace.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_replace()
    Smarty replace modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_replace() [line 23]

    Usage: smarty_modifier_replace( string $string, string $search, string $replace)

    Parameters

    $string

    $search

    $replace

    Remarks

    Smarty replace modifier plugin

    Type: modifier
    Name: replace
    Purpose: simple search/replace

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.replace.php replace (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:59 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.spacify.php

File: /smarty/plugins/modifier.spacify.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_spacify()
    Smarty spacify modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_spacify() [line 22]

    Usage: smarty_modifier_spacify( string $string, [string $spacify_char = ' '])

    Parameters

    $string

    $spacify_char

    Remarks

    Smarty spacify modifier plugin

    Type: modifier
    Name: spacify
    Purpose: add spaces between characters in a string

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:59:00 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.string_format.php

File: /smarty/plugins/modifier.string_format.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_string_format()
    Smarty string_format modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_string_format() [line 22]

    Usage: smarty_modifier_string_format( string $string, string $format)

    Parameters

    $string

    $format

    Remarks

    Smarty string_format modifier plugin

    Type: modifier
    Name: string_format
    Purpose: format strings via sprintf

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.string.format.php string_format (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:59:00 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.strip.php

File: /smarty/plugins/modifier.strip.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_strip()
    Smarty strip modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_strip() [line 26]

    Usage: smarty_modifier_strip( string $text, [string $replace = ' '])

    Parameters

    $text

    $replace

    Remarks

    Smarty strip modifier plugin

    Type: modifier
    Name: strip
    Purpose: Replace all repeated spaces, newlines, tabs with a single space or supplied replacement string.
    Example: {$var|strip} {$var|strip:"&nbsp;"} Date: September 25th, 2002

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    version

    1.0

    link

    http://smarty.php.net/manual/en/language.modifier.strip.php strip (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:59:00 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.strip_tags.php

File: /smarty/plugins/modifier.strip_tags.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_strip_tags()
    Smarty strip_tags modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_strip_tags() [line 22]

    Usage: smarty_modifier_strip_tags( string $string, [boolean $replace_with_space = true])

    Parameters

    $string

    $replace_with_space

    Remarks

    Smarty strip_tags modifier plugin

    Type: modifier
    Name: strip_tags
    Purpose: strip html tags from text

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.strip.tags.php strip_tags (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:59:01 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.truncate.php

File: /smarty/plugins/modifier.truncate.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_truncate()
    Smarty truncate modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_truncate() [line 27]

    Usage: smarty_modifier_truncate( string $string, [integer $length = 80], [string $etc = '...'], [boolean $break_words = false], [boolean $middle = false])

    Parameters

    $string

    $length

    $etc

    $break_words

    $middle

    Remarks

    Smarty truncate modifier plugin

    Type: modifier
    Name: truncate
    Purpose: Truncate a string to a certain length if necessary, optionally splitting in the middle of a word, and appending the $etc string or inserting $etc into the middle.

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.truncate.php truncate (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:59:01 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.upper.php

File: /smarty/plugins/modifier.upper.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_upper()
    Smarty upper modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_upper() [line 21]

    Usage: smarty_modifier_upper( string $string)

    Parameters

    $string

    Remarks

    Smarty upper modifier plugin

    Type: modifier
    Name: upper
    Purpose: convert string to uppercase

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.upper.php upper (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:59:01 +0200 by phpDocumentor 1.4.0a2


Docs for page modifier.wordwrap.php

File: /smarty/plugins/modifier.wordwrap.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_modifier_wordwrap()
    Smarty wordwrap modifier plugin

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_modifier_wordwrap() [line 24]

    Usage: smarty_modifier_wordwrap( string $string, [integer $length = 80], [string $break = &quot;\n&quot;], [boolean $cut = false])

    Parameters

    $string

    $length

    $break

    $cut

    Remarks

    Smarty wordwrap modifier plugin

    Type: modifier
    Name: wordwrap
    Purpose: wrap a string of text at a given length

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    link

    http://smarty.php.net/manual/en/language.modifier.wordwrap.php wordwrap (Smarty online manual)

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:59:02 +0200 by phpDocumentor 1.4.0a2


Docs for page outputfilter.trimwhitespace.php

File: /smarty/plugins/outputfilter.trimwhitespace.php

Remarks

Smarty plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_outputfilter_trimwhitespace()
    Smarty trimwhitespace outputfilter plugin
  • void smarty_outputfilter_trimwhitespace_replace()

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_outputfilter_trimwhitespace() [line 28]

    Usage: smarty_outputfilter_trimwhitespace( string $source, Smarty &$smarty)

    Parameters

    $source

    &$smarty

    Remarks

    Smarty trimwhitespace outputfilter plugin

    File: outputfilter.trimwhitespace.php
    Type: outputfilter
    Name: trimwhitespace
    Date: Jan 25, 2003
    Purpose: trim leading white space and blank lines from template source after it gets interpreted, cleaning up code and saving bandwidth. Does not affect PRE>></PRE> and <SCRIPT></SCRIPT> blocks.
    Install: Drop into the plugin directory, call

  • $smarty->load_filter('output','trimwhitespace');
    •
    from application.

    author

    Contributions from Lars Noschinski <lars@usenet.noschinski.de>

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    version

    1.3

    [ Top ]

  • void smarty_outputfilter_trimwhitespace_replace() [line 64]

    Usage: smarty_outputfilter_trimwhitespace_replace( $search_str, $replace, &$subject)

    Parameters

    $search_str

    $replace

    &$subject

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:59:11 +0200 by phpDocumentor 1.4.0a2


Docs for page shared.escape_special_chars.php

File: /smarty/plugins/shared.escape_special_chars.php

Remarks

Smarty shared plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_function_escape_special_chars()
    escape_special_chars common function

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_function_escape_special_chars() [line 19]

    Usage: smarty_function_escape_special_chars( string $string)

    Parameters

    $string

    Remarks

    escape_special_chars common function

    Function: smarty_function_escape_special_chars
    Purpose: used by other smarty functions to escape special chars except for already escaped ones

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    usedby

    smarty_function_html_radios()

    usedby

    smarty_function_html_options()

    usedby

    smarty_function_html_image()

    usedby

    smarty_function_html_checkboxes()

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:59:21 +0200 by phpDocumentor 1.4.0a2


Docs for page shared.make_timestamp.php

File: /smarty/plugins/shared.make_timestamp.php

Remarks

Smarty shared plugin

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • string smarty_make_timestamp()
    Function: smarty_make_timestamp
    Purpose: used by other smarty functions to make a timestamp from a string.

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • string smarty_make_timestamp() [line 17]

    Usage: smarty_make_timestamp( string $string)

    Parameters

    $string

    Remarks

    Function: smarty_make_timestamp
    Purpose: used by other smarty functions to make a timestamp from a string.

    author

    Monte Ohrt <at ohrt dot com monte at ohrt dot com>

    usedby

    smarty_modifier_date_format()

    usedby

    smarty_function_html_select_time()

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:59:21 +0200 by phpDocumentor 1.4.0a2


Package Smarty Element Index

Element index for package Smarty

Indexes by package:
kernel
default
xos_kernel
PHPMailer
class
xos_opal
xos_logos
XOOPS
xoops20
kernal

Index of all elements
a b c d e f g i l m o p r s t u _
top
_
$_additional_newline | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_additional_newline
$_avar_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_avar_regexp
$_cacheable_state | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_cacheable_state
$_cache_attrs_count | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_cache_attrs_count
$_cache_include in file Smarty.class.php, variable Smarty::$_cache_include
name of optional cache include file
$_cache_include | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_cache_include
$_cache_including in file Smarty.class.php, variable Smarty::$_cache_including
indicate if the current code is used in a compiled include
$_cache_info in file Smarty.class.php, variable Smarty::$_cache_info
info that makes up a cache file
$_cache_serial | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_cache_serial
$_cache_serials in file Smarty.class.php, variable Smarty::$_cache_serials
cache serials
$_capture_stack | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_capture_stack
$_compile_id in file Smarty.class.php, variable Smarty::$_compile_id
for different compiled templates
$_config in file Smarty.class.php, variable Smarty::$_config
loaded configuration settings
$_config_data | in file Config_File.class.php, variable Config_File::$_config_data
$_config_path | in file Config_File.class.php, variable Config_File::$_config_path
$_conf_obj in file Smarty.class.php, variable Smarty::$_conf_obj
configuration object
$_current_file | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_current_file
$_current_line_no | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_current_line_no
$_cvar_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_cvar_regexp
$_db_qstr_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_db_qstr_regexp
$_dir_perms in file Smarty.class.php, variable Smarty::$_dir_perms
default dir permissions
$_dvar_guts_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_dvar_guts_regexp
$_dvar_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_dvar_regexp
$_file_perms in file Smarty.class.php, variable Smarty::$_file_perms
default file permissions
$_folded_blocks | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_folded_blocks
$_foreach in file Smarty.class.php, variable Smarty::$_foreach
keeps track of foreach blocks
$_func_call_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_func_call_regexp
$_func_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_func_regexp
$_inclusion_depth in file Smarty.class.php, variable Smarty::$_inclusion_depth
current template inclusion depth
$_init_smarty_vars | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_init_smarty_vars
$_mod_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_mod_regexp
$_nocache_count | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_nocache_count
$_num_const_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_num_const_regexp
$_obj_call_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_obj_call_regexp
$_obj_ext_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_obj_ext_regexp
$_obj_params_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_obj_params_regexp
$_obj_start_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_obj_start_regexp
$_parenth_param_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_parenth_param_regexp
$_permitted_tokens | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_permitted_tokens
$_plugins in file Smarty.class.php, variable Smarty::$_plugins
table keeping track of plugins
$_plugin_info | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_plugin_info
$_qstr_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_qstr_regexp
$_reg_objects in file Smarty.class.php, variable Smarty::$_reg_objects
registered objects
$_reg_obj_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_reg_obj_regexp
$_sections in file Smarty.class.php, variable Smarty::$_sections
keeps track of sections
$_si_qstr_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_si_qstr_regexp
$_smarty_debug_id in file Smarty.class.php, variable Smarty::$_smarty_debug_id
text in URL to enable debug mode
$_smarty_debug_info in file Smarty.class.php, variable Smarty::$_smarty_debug_info
debugging information for debug console
$_smarty_md5 in file Smarty.class.php, variable Smarty::$_smarty_md5
md5 checksum of the string 'Smarty'
$_smarty_vars in file Smarty.class.php, variable Smarty::$_smarty_vars
stores run-time $smarty.* vars
$_strip_depth | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_strip_depth
$_svar_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_svar_regexp
$_tag_stack in file Smarty.class.php, variable Smarty::$_tag_stack
keeps track of tag hierarchy
$_tpl_vars in file Smarty.class.php, variable Smarty::$_tpl_vars
where assigned template vars are kept
$_var_bracket_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_var_bracket_regexp
$_var_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_var_regexp
$_version in file Smarty.class.php, variable Smarty::$_version
Smarty version number
_add_plugin in file Smarty_Compiler.class.php, method Smarty_Compiler::_add_plugin()
add plugin
_compile_arg_list | in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_arg_list()
_compile_block_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_block_tag()
compile block function tag
_compile_capture_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_capture_tag()
Compile {capture} .. {/capture} tags
_compile_compiler_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_compiler_tag()
compile the custom compiler tag
_compile_custom_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_custom_tag()
compile custom function tag
_compile_file in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_file()
compile a resource
_compile_foreach_start in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_foreach_start()
Compile {foreach ...} tag.
_compile_if_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_if_tag()
Compile {if ...} tag
_compile_include_php_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_include_php_tag()
Compile {include ...} tag
_compile_include_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_include_tag()
Compile {include ...} tag
_compile_insert_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_insert_tag()
Compile {insert ...} tag
_compile_plugin_call in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_plugin_call()
compiles call to plugin of type $type with name $name
_compile_registered_object_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_registered_object_tag()
compile a registered object tag
_compile_resource in file Smarty.class.php, method Smarty::_compile_resource()
compile the template
_compile_section_start in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_section_start()
Compile {section ...} tag
_compile_smarty_ref in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_smarty_ref()
Compiles references of type $smarty.foo
_compile_source in file Smarty.class.php, method Smarty::_compile_source()
compile the given source
_compile_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_tag()
Compile a template tag
_dequote in file Smarty.class.php, method Smarty::_dequote()
Remove starting and ending quotes from the string
_eval in file Smarty.class.php, method Smarty::_eval()
wrapper for eval() retaining $this
_expand_quoted_text in file Smarty_Compiler.class.php, method Smarty_Compiler::_expand_quoted_text()
expand quoted text with embedded variables
_fetch_resource_info in file Smarty.class.php, method Smarty::_fetch_resource_info()
fetch the template info. Gets timestamp, and source if get_source is true
_get_auto_filename in file Smarty.class.php, method Smarty::_get_auto_filename()
get a concrete filename for automagically created content
_get_auto_id in file Smarty.class.php, method Smarty::_get_auto_id()
returns an auto_id for auto-file-functions
_get_compile_path in file Smarty.class.php, method Smarty::_get_compile_path()
Get the compile path for this resource
_get_plugin_filepath in file Smarty.class.php, method Smarty::_get_plugin_filepath()
get filepath of requested plugin
_include in file Smarty.class.php, method Smarty::_include()
wrapper for include() retaining $this
_is_compiled in file Smarty.class.php, method Smarty::_is_compiled()
test if resource needs compiling
_load_filters in file Smarty_Compiler.class.php, method Smarty_Compiler::_load_filters()
load pre- and post-filters
_parse_attrs in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_attrs()
Parse attribute string
_parse_conf_var in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_conf_var()
parse configuration variable expression into PHP code
_parse_is_expr in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_is_expr()
Parse is expression
_parse_modifiers in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_modifiers()
parse modifier chain into PHP code
_parse_parenth_args in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_parenth_args()
parse arguments in function call parenthesis
_parse_resource_name in file Smarty.class.php, method Smarty::_parse_resource_name()
parse out the type and name from the resource
_parse_section_prop in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_section_prop()
parse section property expression into PHP code
_parse_var in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_var()
parse variable expression into PHP code
_parse_vars_props in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_vars_props()
compile multiple variables and section properties tokens into PHP code
_parse_var_props in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_var_props()
compile single variable and section properties token into PHP code
_pop_cacheable_state in file Smarty_Compiler.class.php, method Smarty_Compiler::_pop_cacheable_state()
check if the compilation changes from non-cacheable to cacheable state with the end of the current plugin return php-code to reflect the transition.
_pop_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_pop_tag()
pop closing tag-name
_process_compiled_include_callback in file Smarty.class.php, method Smarty::_process_compiled_include_callback()
callback function for preg_replace, to call a non-cacheable block
_push_cacheable_state in file Smarty_Compiler.class.php, method Smarty_Compiler::_push_cacheable_state()
check if the compilation changes from cacheable to non-cacheable state with the beginning of the current plugin. return php-code to reflect the transition.
_push_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_push_tag()
push opening tag-name, file-name and line-number on the tag-stack
_quote_replace in file Smarty_Compiler.class.php, method Smarty_Compiler::_quote_replace()
Quote subpattern references
_read_file in file Smarty.class.php, method Smarty::_read_file()
read in a file
_run_mod_handler in file Smarty.class.php, method Smarty::_run_mod_handler()
Handle modifiers
_set_config_var | in file Config_File.class.php, method Config_File::_set_config_var()
_smarty_cache_attrs in file Smarty.class.php, method Smarty::_smarty_cache_attrs()
get or set an array of cached attributes for function that is
_smarty_include in file Smarty.class.php, method Smarty::_smarty_include()
called for included templates
_smarty_sort_length in file Smarty_Compiler.class.php, function _smarty_sort_length()
compare to values by their string length
_syntax_error in file Smarty_Compiler.class.php, method Smarty_Compiler::_syntax_error()
display Smarty syntax error
_trigger_error_msg | in file Config_File.class.php, method Config_File::_trigger_error_msg()
_trigger_fatal_error in file Smarty.class.php, method Smarty::_trigger_fatal_error()
trigger Smarty plugin error
_unlink in file Smarty.class.php, method Smarty::_unlink()
unlink a file, possibly using expiration time
top
a
$autoload_filters in file Smarty.class.php, variable Smarty::$autoload_filters
This indicates which filters are automatically loaded into Smarty.
append in file Smarty.class.php, method Smarty::append()
appends values to template variables
append_by_ref in file Smarty.class.php, method Smarty::append_by_ref()
appends values to template variables by reference
assign in file Smarty.class.php, method Smarty::assign()
assigns values to template variables
assign_by_ref in file Smarty.class.php, method Smarty::assign_by_ref()
assigns values to template variables by reference
top
b
$booleanize in file Config_File.class.php, variable Config_File::$booleanize
Controls whether config values of on/true/yes and off/false/no get converted to boolean values automatically.
block.textformat.php | procedural page block.textformat.php
top
c
$cache_dir in file Smarty.class.php, variable Smarty::$cache_dir
The name of the directory for cache files.
$cache_handler_func in file Smarty.class.php, variable Smarty::$cache_handler_func
The function used for cache file handling. If not set, built-in caching is used.
$cache_lifetime in file Smarty.class.php, variable Smarty::$cache_lifetime
This is the number of seconds cached content will persist.
$cache_modified_check in file Smarty.class.php, variable Smarty::$cache_modified_check
Only used when $caching is enabled. If true, then If-Modified-Since headers are respected with cached content, and appropriate HTTP headers are sent.
$caching in file Smarty.class.php, variable Smarty::$caching
This enables template caching.
$compiler_class in file Smarty.class.php, variable Smarty::$compiler_class
The class used for compiling templates.
$compiler_file in file Smarty.class.php, variable Smarty::$compiler_file
The file that contains the compiler class. This can a full pathname, or relative to the php_include path.
$compile_check in file Smarty.class.php, variable Smarty::$compile_check
This tells Smarty whether to check for recompiling or not. Recompiling does not need to happen unless a template or config file is changed.
$compile_dir in file Smarty.class.php, variable Smarty::$compile_dir
The directory where compiled templates are located.
$compile_id in file Smarty.class.php, variable Smarty::$compile_id
Set this if you want different sets of compiled files for the same templates. This is useful for things like different languages.
$config_booleanize in file Smarty.class.php, variable Smarty::$config_booleanize
This tells whether or not to automatically booleanize config file variables.
$config_class in file Smarty.class.php, variable Smarty::$config_class
The class used to load config vars.
$config_dir in file Smarty.class.php, variable Smarty::$config_dir
The directory where config files are located.
$config_fix_newlines in file Smarty.class.php, variable Smarty::$config_fix_newlines
This tells whether or not automatically fix newlines in config files.
$config_overwrite in file Smarty.class.php, variable Smarty::$config_overwrite
This tells if config file vars of the same name overwrite each other or not.
$config_read_hidden in file Smarty.class.php, variable Smarty::$config_read_hidden
This tells whether hidden sections [.foobar] are readable from the tempalates or not. Normally you would never allow this since that is the point behind hidden sections: the application can access them, but the templates cannot.
clear in file Config_File.class.php, method Config_File::clear()
Clear loaded config data for a certain file or all files.
clear_all_assign in file Smarty.class.php, method Smarty::clear_all_assign()
clear all the assigned template variables.
clear_all_cache in file Smarty.class.php, method Smarty::clear_all_cache()
clear the entire contents of cache (all templates)
clear_assign in file Smarty.class.php, method Smarty::clear_assign()
clear the given assigned template variable.
clear_cache in file Smarty.class.php, method Smarty::clear_cache()
clear cached content for the given template and cache id
clear_compiled_tpl in file Smarty.class.php, method Smarty::clear_compiled_tpl()
clears compiled version of specified template resource, or all compiled template files if one is not specified.
clear_config in file Smarty.class.php, method Smarty::clear_config()
clear configuration values
Config_File in file Config_File.class.php, class Config_File
Config file reading class
Config_File in file Config_File.class.php, method Config_File::Config_File()
Constructs a new config file class.
config_load in file Smarty.class.php, method Smarty::config_load()
load configuration values
Config_File.class.php | procedural page Config_File.class.php
core.assemble_plugin_filepath.php | procedural page core.assemble_plugin_filepath.php
core.assign_smarty_interface.php | procedural page core.assign_smarty_interface.php
core.create_dir_structure.php | procedural page core.create_dir_structure.php
core.display_debug_console.php | procedural page core.display_debug_console.php
core.get_include_path.php | procedural page core.get_include_path.php
core.get_microtime.php | procedural page core.get_microtime.php
core.get_php_resource.php | procedural page core.get_php_resource.php
core.is_secure.php | procedural page core.is_secure.php
core.is_trusted.php | procedural page core.is_trusted.php
core.load_plugins.php | procedural page core.load_plugins.php
core.load_resource_plugin.php | procedural page core.load_resource_plugin.php
core.process_cached_inserts.php | procedural page core.process_cached_inserts.php
core.process_compiled_include.php | procedural page core.process_compiled_include.php
core.read_cache_file.php | procedural page core.read_cache_file.php
core.rmdir.php | procedural page core.rmdir.php
core.rm_auto.php | procedural page core.rm_auto.php
core.run_insert_handler.php | procedural page core.run_insert_handler.php
core.smarty_include_php.php | procedural page core.smarty_include_php.php
core.write_cache_file.php | procedural page core.write_cache_file.php
core.write_compiled_include.php | procedural page core.write_compiled_include.php
core.write_compiled_resource.php | procedural page core.write_compiled_resource.php
core.write_file.php | procedural page core.write_file.php
compiler.assign.php | procedural page compiler.assign.php
top
d
$debugging in file Smarty.class.php, variable Smarty::$debugging
If debugging is enabled, a debug console window will display when the page loads (make sure your browser allows unrequested popup windows)
$debugging_ctrl in file Smarty.class.php, variable Smarty::$debugging_ctrl
This determines if debugging is enable-able from the browser.
$debug_tpl in file Smarty.class.php, variable Smarty::$debug_tpl
This is the path to the debug console template. If not set, the default one will be used.
$default_modifiers in file Smarty.class.php, variable Smarty::$default_modifiers
This is a list of the modifiers to apply to all template variables.
$default_resource_type in file Smarty.class.php, variable Smarty::$default_resource_type
This is the resource type to be used when not specified
$default_template_handler_func in file Smarty.class.php, variable Smarty::$default_template_handler_func
If a template cannot be found, this PHP function will be executed.
DIR_SEP in file Smarty.class.php, constant DIR_SEP
DIR_SEP isn't used anymore, but third party apps might
display in file Smarty.class.php, method Smarty::display()
executes & displays the template results
top
e
$error_reporting in file Smarty.class.php, variable Smarty::$error_reporting
When set, smarty does uses this value as error_reporting-level.
top
f
$fix_newlines in file Config_File.class.php, variable Config_File::$fix_newlines
Controls whether or not to fix mac or dos formatted newlines.
$force_compile in file Smarty.class.php, variable Smarty::$force_compile
This forces templates to compile every time. Useful for development or debugging.
fetch in file Smarty.class.php, method Smarty::fetch()
executes & returns or displays the template results
function.assign_debug_info.php | procedural page function.assign_debug_info.php
function.config_load.php | procedural page function.config_load.php
function.counter.php | procedural page function.counter.php
function.cycle.php | procedural page function.cycle.php
function.debug.php | procedural page function.debug.php
function.eval.php | procedural page function.eval.php
function.fetch.php | procedural page function.fetch.php
function.html_checkboxes.php | procedural page function.html_checkboxes.php
function.html_image.php | procedural page function.html_image.php
function.html_options.php | procedural page function.html_options.php
function.html_radios.php | procedural page function.html_radios.php
function.html_select_date.php | procedural page function.html_select_date.php
function.html_select_time.php | procedural page function.html_select_time.php
function.html_table.php | procedural page function.html_table.php
function.mailto.php | procedural page function.mailto.php
function.math.php | procedural page function.math.php
function.popup.php | procedural page function.popup.php
function.popup_init.php | procedural page function.popup_init.php
top
g
get in file Config_File.class.php, method Config_File::get()
Retrieves config info based on the file, section, and variable name.
get_config_vars in file Smarty.class.php, method Smarty::get_config_vars()
Returns an array containing config variables
get_file_names in file Config_File.class.php, method Config_File::get_file_names()
Get all loaded config file names.
get_key in file Config_File.class.php, method Config_File::get_key()
Retrieves config info based on the key.
get_registered_object in file Smarty.class.php, method Smarty::get_registered_object()
return a reference to a registered object
get_section_names in file Config_File.class.php, method Config_File::get_section_names()
Get all section names from a loaded file.
get_template_vars in file Smarty.class.php, method Smarty::get_template_vars()
Returns an array containing template variables
get_var_names in file Config_File.class.php, method Config_File::get_var_names()
Get all global or section variable names.
top
i
is_cached in file Smarty.class.php, method Smarty::is_cached()
test to see if valid cache exists for this template
top
l
$left_delimiter in file Smarty.class.php, variable Smarty::$left_delimiter
The left delimiter used for the template tags.
load_file in file Config_File.class.php, method Config_File::load_file()
Load a configuration file manually.
load_filter in file Smarty.class.php, method Smarty::load_filter()
load a filter of specified type and name
top
m
modifier.capitalize.php | procedural page modifier.capitalize.php
modifier.cat.php | procedural page modifier.cat.php
modifier.count_characters.php | procedural page modifier.count_characters.php
modifier.count_paragraphs.php | procedural page modifier.count_paragraphs.php
modifier.count_sentences.php | procedural page modifier.count_sentences.php
modifier.count_words.php | procedural page modifier.count_words.php
modifier.date_format.php | procedural page modifier.date_format.php
modifier.debug_print_var.php | procedural page modifier.debug_print_var.php
modifier.default.php | procedural page modifier.default.php
modifier.escape.php | procedural page modifier.escape.php
modifier.indent.php | procedural page modifier.indent.php
modifier.lower.php | procedural page modifier.lower.php
modifier.nl2br.php | procedural page modifier.nl2br.php
modifier.regex_replace.php | procedural page modifier.regex_replace.php
modifier.replace.php | procedural page modifier.replace.php
modifier.spacify.php | procedural page modifier.spacify.php
modifier.string_format.php | procedural page modifier.string_format.php
modifier.strip.php | procedural page modifier.strip.php
modifier.strip_tags.php | procedural page modifier.strip_tags.php
modifier.truncate.php | procedural page modifier.truncate.php
modifier.upper.php | procedural page modifier.upper.php
modifier.wordwrap.php | procedural page modifier.wordwrap.php
modifier.debug_print_var.php | procedural page modifier.debug_print_var.php
top
o
$overwrite in file Config_File.class.php, variable Config_File::$overwrite
Controls whether variables with the same name overwrite each other.
outputfilter.trimwhitespace.php | procedural page outputfilter.trimwhitespace.php
top
p
$php_handling in file Smarty.class.php, variable Smarty::$php_handling
This determines how Smarty handles "<?php ... ?>" tags in templates.
$plugins_dir in file Smarty.class.php, variable Smarty::$plugins_dir
An array of directories searched for plugins.
parse_contents in file Config_File.class.php, method Config_File::parse_contents()
parse the source of a configuration file manually.
top
r
$read_hidden in file Config_File.class.php, variable Config_File::$read_hidden
Controls whether hidden config sections/vars are read from the file.
$request_use_auto_globals in file Smarty.class.php, variable Smarty::$request_use_auto_globals
Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false)
$request_vars_order in file Smarty.class.php, variable Smarty::$request_vars_order
The order in which request variables are registered, similar to variables_order in php.ini E = Environment, G = GET, P = POST, C = Cookies, S = Server
$right_delimiter in file Smarty.class.php, variable Smarty::$right_delimiter
The right delimiter used for the template tags.
register_block in file Smarty.class.php, method Smarty::register_block()
Registers block function to be used in templates
register_compiler_function in file Smarty.class.php, method Smarty::register_compiler_function()
Registers compiler function
register_function in file Smarty.class.php, method Smarty::register_function()
Registers custom function to be used in templates
register_modifier in file Smarty.class.php, method Smarty::register_modifier()
Registers modifier to be used in templates
register_object in file Smarty.class.php, method Smarty::register_object()
Registers object to be used in templates
register_outputfilter in file Smarty.class.php, method Smarty::register_outputfilter()
Registers an output filter function to apply to a template output
register_postfilter in file Smarty.class.php, method Smarty::register_postfilter()
Registers a postfilter function to apply to a compiled template after compilation
register_prefilter in file Smarty.class.php, method Smarty::register_prefilter()
Registers a prefilter function to apply to a template before compiling
register_resource in file Smarty.class.php, method Smarty::register_resource()
Registers a resource to fetch a template
top
s
$secure_dir in file Smarty.class.php, variable Smarty::$secure_dir
This is the list of template directories that are considered secure. This is used only if $security is enabled. One directory per array element. $template_dir is in this list implicitly.
$security in file Smarty.class.php, variable Smarty::$security
This enables template security. When enabled, many things are restricted
$security_settings in file Smarty.class.php, variable Smarty::$security_settings
These are the security settings for Smarty. They are used only when $security is enabled.
set_file_contents in file Config_File.class.php, method Config_File::set_file_contents()
Store the contents of a file manually.
set_path in file Config_File.class.php, method Config_File::set_path()
Set the path where configuration files can be found.
Smarty in file Smarty.class.php, method Smarty::Smarty()
The class constructor.
Smarty | in file Smarty.class.php, class Smarty
Smarty.class.php | procedural page Smarty.class.php
Smarty_Compiler.class.php | procedural page Smarty_Compiler.class.php
Smarty_Compiler in file Smarty_Compiler.class.php, method Smarty_Compiler::Smarty_Compiler()
The class constructor.
Smarty_Compiler in file Smarty_Compiler.class.php, class Smarty_Compiler
Template compiling class
SMARTY_CORE_DIR | in file Smarty.class.php, constant SMARTY_CORE_DIR
SMARTY_DIR in file Smarty.class.php, constant SMARTY_DIR
set SMARTY_DIR to absolute path to Smarty library files.
SMARTY_PHP_ALLOW | in file Smarty.class.php, constant SMARTY_PHP_ALLOW
SMARTY_PHP_PASSTHRU | in file Smarty.class.php, constant SMARTY_PHP_PASSTHRU
SMARTY_PHP_QUOTE | in file Smarty.class.php, constant SMARTY_PHP_QUOTE
SMARTY_PHP_REMOVE | in file Smarty.class.php, constant SMARTY_PHP_REMOVE
shared.escape_special_chars.php | procedural page shared.escape_special_chars.php
shared.make_timestamp.php | procedural page shared.make_timestamp.php
smarty_block_textformat in file block.textformat.php, function smarty_block_textformat()
Smarty {textformat}{/textformat} block plugin
smarty_compiler_assign in file compiler.assign.php, function smarty_compiler_assign()
Smarty {assign} compiler function plugin
smarty_core_assemble_plugin_filepath in file core.assemble_plugin_filepath.php, function smarty_core_assemble_plugin_filepath()
assemble filepath of requested plugin
smarty_core_assign_smarty_interface in file core.assign_smarty_interface.php, function smarty_core_assign_smarty_interface()
Smarty assign_smarty_interface core plugin
smarty_core_create_dir_structure in file core.create_dir_structure.php, function smarty_core_create_dir_structure()
create full directory structure
smarty_core_display_debug_console in file core.display_debug_console.php, function smarty_core_display_debug_console()
Smarty debug_console function plugin
smarty_core_get_include_path in file core.get_include_path.php, function smarty_core_get_include_path()
Get path to file from include_path
smarty_core_get_microtime in file core.get_microtime.php, function smarty_core_get_microtime()
Get seconds and microseconds
smarty_core_get_php_resource in file core.get_php_resource.php, function smarty_core_get_php_resource()
Retrieves PHP script resource
smarty_core_is_secure in file core.is_secure.php, function smarty_core_is_secure()
determines if a resource is secure or not.
smarty_core_is_trusted in file core.is_trusted.php, function smarty_core_is_trusted()
determines if a resource is trusted or not
smarty_core_load_plugins in file core.load_plugins.php, function smarty_core_load_plugins()
Load requested plugins
smarty_core_load_resource_plugin in file core.load_resource_plugin.php, function smarty_core_load_resource_plugin()
load a resource plugin
smarty_core_process_cached_inserts in file core.process_cached_inserts.php, function smarty_core_process_cached_inserts()
Replace cached inserts with the actual results
smarty_core_process_compiled_include in file core.process_compiled_include.php, function smarty_core_process_compiled_include()
Replace nocache-tags by results of the corresponding non-cacheable functions and return it
smarty_core_read_cache_file in file core.read_cache_file.php, function smarty_core_read_cache_file()
read a cache file, determine if it needs to be regenerated or not
smarty_core_rmdir in file core.rmdir.php, function smarty_core_rmdir()
delete a dir recursively (level=0 -> keep root) WARNING: no tests, it will try to remove what you tell it!
smarty_core_rm_auto in file core.rm_auto.php, function smarty_core_rm_auto()
delete an automagically created file by name and id
smarty_core_run_insert_handler in file core.run_insert_handler.php, function smarty_core_run_insert_handler()
Handle insert tags
smarty_core_smarty_include_php in file core.smarty_include_php.php, function smarty_core_smarty_include_php()
called for included php files within templates
smarty_core_write_cache_file in file core.write_cache_file.php, function smarty_core_write_cache_file()
Prepend the cache information to the cache file and write it
smarty_core_write_compiled_include in file core.write_compiled_include.php, function smarty_core_write_compiled_include()
Extract non-cacheable parts out of compiled template and write it
smarty_core_write_compiled_resource in file core.write_compiled_resource.php, function smarty_core_write_compiled_resource()
write the compiled resource
smarty_core_write_file in file core.write_file.php, function smarty_core_write_file()
write out a file to disk
smarty_function_assign_debug_info in file function.assign_debug_info.php, function smarty_function_assign_debug_info()
Smarty {assign_debug_info} function plugin
smarty_function_config_load in file function.config_load.php, function smarty_function_config_load()
Smarty {config_load} function plugin
smarty_function_counter in file function.counter.php, function smarty_function_counter()
Smarty {counter} function plugin
smarty_function_cycle in file function.cycle.php, function smarty_function_cycle()
Smarty {cycle} function plugin
smarty_function_debug in file function.debug.php, function smarty_function_debug()
Smarty {debug} function plugin
smarty_function_escape_special_chars in file shared.escape_special_chars.php, function smarty_function_escape_special_chars()
escape_special_chars common function
smarty_function_eval in file function.eval.php, function smarty_function_eval()
Smarty {eval} function plugin
smarty_function_fetch in file function.fetch.php, function smarty_function_fetch()
Smarty {fetch} plugin
smarty_function_html_checkboxes in file function.html_checkboxes.php, function smarty_function_html_checkboxes()
Smarty {html_checkboxes} function plugin
smarty_function_html_checkboxes_output | in file function.html_checkboxes.php, function smarty_function_html_checkboxes_output()
smarty_function_html_image in file function.html_image.php, function smarty_function_html_image()
Smarty {html_image} function plugin
smarty_function_html_options in file function.html_options.php, function smarty_function_html_options()
Smarty {html_options} function plugin
smarty_function_html_options_optgroup | in file function.html_options.php, function smarty_function_html_options_optgroup()
smarty_function_html_options_optoutput | in file function.html_options.php, function smarty_function_html_options_optoutput()
smarty_function_html_radios in file function.html_radios.php, function smarty_function_html_radios()
Smarty {html_radios} function plugin
smarty_function_html_radios_output | in file function.html_radios.php, function smarty_function_html_radios_output()
smarty_function_html_select_date in file function.html_select_date.php, function smarty_function_html_select_date()
Smarty {html_select_date} plugin
smarty_function_html_select_time in file function.html_select_time.php, function smarty_function_html_select_time()
Smarty {html_select_time} function plugin
smarty_function_html_table in file function.html_table.php, function smarty_function_html_table()
Smarty {html_table} function plugin
smarty_function_html_table_cycle | in file function.html_table.php, function smarty_function_html_table_cycle()
smarty_function_mailto in file function.mailto.php, function smarty_function_mailto()
Smarty {mailto} function plugin
smarty_function_math in file function.math.php, function smarty_function_math()
Smarty {math} function plugin
smarty_function_popup in file function.popup.php, function smarty_function_popup()
Smarty {popup} function plugin
smarty_function_popup_init in file function.popup_init.php, function smarty_function_popup_init()
Smarty {popup_init} function plugin
smarty_make_timestamp in file shared.make_timestamp.php, function smarty_make_timestamp()
Function: smarty_make_timestamp
Purpose: used by other smarty functions to make a timestamp from a string.
smarty_modifier_capitalize in file modifier.capitalize.php, function smarty_modifier_capitalize()
Smarty capitalize modifier plugin
smarty_modifier_capitalize_ucfirst | in file modifier.capitalize.php, function smarty_modifier_capitalize_ucfirst()
smarty_modifier_cat in file modifier.cat.php, function smarty_modifier_cat()
Smarty cat modifier plugin
smarty_modifier_count_characters in file modifier.count_characters.php, function smarty_modifier_count_characters()
Smarty count_characters modifier plugin
smarty_modifier_count_paragraphs in file modifier.count_paragraphs.php, function smarty_modifier_count_paragraphs()
Smarty count_paragraphs modifier plugin
smarty_modifier_count_sentences in file modifier.count_sentences.php, function smarty_modifier_count_sentences()
Smarty count_sentences modifier plugin
smarty_modifier_count_words in file modifier.count_words.php, function smarty_modifier_count_words()
Smarty count_words modifier plugin
smarty_modifier_date_format in file modifier.date_format.php, function smarty_modifier_date_format()
Smarty date_format modifier plugin
smarty_modifier_debug_print_var in file modifier.debug_print_var.php, function smarty_modifier_debug_print_var()
Smarty debug_print_var modifier plugin
smarty_modifier_default in file modifier.default.php, function smarty_modifier_default()
Smarty default modifier plugin
smarty_modifier_escape in file modifier.escape.php, function smarty_modifier_escape()
Smarty escape modifier plugin
smarty_modifier_indent in file modifier.indent.php, function smarty_modifier_indent()
Smarty indent modifier plugin
smarty_modifier_lower in file modifier.lower.php, function smarty_modifier_lower()
Smarty lower modifier plugin
smarty_modifier_nl2br in file modifier.nl2br.php, function smarty_modifier_nl2br()
Smarty plugin
smarty_modifier_regex_replace in file modifier.regex_replace.php, function smarty_modifier_regex_replace()
Smarty regex_replace modifier plugin
smarty_modifier_replace in file modifier.replace.php, function smarty_modifier_replace()
Smarty replace modifier plugin
smarty_modifier_spacify in file modifier.spacify.php, function smarty_modifier_spacify()
Smarty spacify modifier plugin
smarty_modifier_string_format in file modifier.string_format.php, function smarty_modifier_string_format()
Smarty string_format modifier plugin
smarty_modifier_strip in file modifier.strip.php, function smarty_modifier_strip()
Smarty strip modifier plugin
smarty_modifier_strip_tags in file modifier.strip_tags.php, function smarty_modifier_strip_tags()
Smarty strip_tags modifier plugin
smarty_modifier_truncate in file modifier.truncate.php, function smarty_modifier_truncate()
Smarty truncate modifier plugin
smarty_modifier_upper in file modifier.upper.php, function smarty_modifier_upper()
Smarty upper modifier plugin
smarty_modifier_wordwrap in file modifier.wordwrap.php, function smarty_modifier_wordwrap()
Smarty wordwrap modifier plugin
smarty_outputfilter_trimwhitespace in file outputfilter.trimwhitespace.php, function smarty_outputfilter_trimwhitespace()
Smarty trimwhitespace outputfilter plugin
smarty_outputfilter_trimwhitespace_replace | in file outputfilter.trimwhitespace.php, function smarty_outputfilter_trimwhitespace_replace()
top
t
$template_dir in file Smarty.class.php, variable Smarty::$template_dir
The name of the directory where templates are located.
$trusted_dir in file Smarty.class.php, variable Smarty::$trusted_dir
This is an array of directories where trusted php scripts reside.
template_exists in file Smarty.class.php, method Smarty::template_exists()
Checks whether requested template exists.
trigger_error in file Smarty.class.php, method Smarty::trigger_error()
trigger Smarty error
top
u
$use_sub_dirs in file Smarty.class.php, variable Smarty::$use_sub_dirs
This tells Smarty whether or not to use sub dirs in the cache/ and templates_c/ directories. sub directories better organized, but may not work well with PHP safe mode enabled.
unregister_block in file Smarty.class.php, method Smarty::unregister_block()
Unregisters block function
unregister_compiler_function in file Smarty.class.php, method Smarty::unregister_compiler_function()
Unregisters compiler function
unregister_function in file Smarty.class.php, method Smarty::unregister_function()
Unregisters custom function
unregister_modifier in file Smarty.class.php, method Smarty::unregister_modifier()
Unregisters modifier
unregister_object in file Smarty.class.php, method Smarty::unregister_object()
Unregisters object
unregister_outputfilter in file Smarty.class.php, method Smarty::unregister_outputfilter()
Unregisters an outputfilter function
unregister_postfilter in file Smarty.class.php, method Smarty::unregister_postfilter()
Unregisters a postfilter function
unregister_prefilter in file Smarty.class.php, method Smarty::unregister_prefilter()
Unregisters a prefilter function
unregister_resource in file Smarty.class.php, method Smarty::unregister_resource()
Unregisters a resource


Class Trees for Package Smarty

Documentation generated on Tue, 28 Aug 2007 22:56:21 +0200 by phpDocumentor 1.4.0a2


Docs for page Config_File.class.php

File: /smarty/Config_File.class.php

Remarks

Config_File class.

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 (at your option) 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

author

Andrei Zmievski <andrei@php.net>

version

2.6.18

copyright

Copyright: 2001-2005 New Digital Group, Inc.

link

http://smarty.php.net/

access

public

filesource

Source Code for this file

Classes in this file:
Config_File
Config file reading class

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:26 +0200 by phpDocumentor 1.4.0a2


Docs for page Smarty.class.php

File: /smarty/Smarty.class.php

Remarks

Project: Smarty: the PHP compiling template engine File: Smarty.class.php

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 (at your option) 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

For questions, help, comments, discussion, etc., please join the Smarty mailing list. Send a blank e-mail to smarty-general-subscribe@lists.php.net

author

Monte Ohrt <at ohrt dot com monte at ohrt dot com>

author

Andrei Zmievski <andrei@php.net>

version

2.6.18

copyright

2001-2005 New Digital Group, Inc.

link

http://smarty.php.net/

filesource

Source Code for this file

Classes in this file:
Smarty

Include Statements Summary

Global Variable Summary

Constant Summary

  • DIR_SEP = DIRECTORY_SEPARATOR
    DIR_SEP isn't used anymore, but third party apps might
  • SMARTY_CORE_DIR = SMARTY_DIR.'internals'.DIRECTORY_SEPARATOR
  • SMARTY_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR
    set SMARTY_DIR to absolute path to Smarty library files.
  • SMARTY_PHP_ALLOW = 3
  • SMARTY_PHP_PASSTHRU = 0
  • SMARTY_PHP_QUOTE = 1
  • SMARTY_PHP_REMOVE = 2

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

  • DIR_SEP = DIRECTORY_SEPARATOR [line 39]

    Remarks

    DIR_SEP isn't used anymore, but third party apps might

  • SMARTY_CORE_DIR = SMARTY_DIR.'internals'.DIRECTORY_SEPARATOR [line 53]

  • SMARTY_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR [line 49]

    Remarks

    set SMARTY_DIR to absolute path to Smarty library files.

    if not defined, include_path will be used. Sets SMARTY_DIR only if user application has not already defined it.

  • SMARTY_PHP_ALLOW = 3 [line 59]

  • SMARTY_PHP_PASSTHRU = 0 [line 56]

  • SMARTY_PHP_QUOTE = 1 [line 57]

  • SMARTY_PHP_REMOVE = 2 [line 58]

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:59:23 +0200 by phpDocumentor 1.4.0a2


Docs for page Smarty_Compiler.class.php

File: /smarty/Smarty_Compiler.class.php

Remarks

Project: Smarty: the PHP compiling template engine File: Smarty_Compiler.class.php

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 (at your option) 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

author

Andrei Zmievski <andrei@php.net>

author

Monte Ohrt <at ohrt dot com monte at ohrt dot com>

version

2.6.18

copyright

2001-2005 New Digital Group, Inc.

link

http://smarty.php.net/

filesource

Source Code for this file

Classes in this file:
Smarty_Compiler
Template compiling class

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • 0-1|1 _smarty_sort_length()
    compare to values by their string length

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • 0-1|1 _smarty_sort_length() [line 2313]

    Usage: _smarty_sort_length( string $a, string $b)

    Parameters

    $a

    $b

    Remarks

    compare to values by their string length

    access

    private

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:59:36 +0200 by phpDocumentor 1.4.0a2


File Source for Config_File.class.php

Source for file Config_File.class.php

Documentation is available at Config_File.class.php

  • <?php
    •

  •
    •

  • /**
    •

  •  * Config_File class.
    •

  •  *
    •

  •  * 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 (at your option) 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
    •

  •  *
    •

  •  * @link http://smarty.php.net/
    •

  •  * @version 2.6.18
    •

  •  * @copyright Copyright: 2001-2005 New Digital Group, Inc.
    •

  •  * @author Andrei Zmievski <andrei@php.net>
    •

  •  * @access public
    •

  •  * @package Smarty
    •

  •  */
    •

  •
    •

  • /* $Id: Config_File.class.php 942 2007-08-05 15:12:39Z dugris $ */
    •

  •
    •

  • /**
    •

  •  * Config file reading class
    •

  •  * @package Smarty
    •

  •  */
    •

  • class Config_File {
    •

  •     /**#@+
    •

  •      * Options
    •

  •      * @var boolean
    •

  •      */
    •

  •     /**
    •

  •      * Controls whether variables with the same name overwrite each other.
    •

  •      */
    •

  •     var $overwrite        =    true;
    •

  •
    •

  •     /**
    •

  •      * Controls whether config values of on/true/yes and off/false/no get
    •

  •      * converted to boolean values automatically.
    •

  •      */
    •

  •     var $booleanize        =    true;
    •

  •
    •

  •     /**
    •

  •      * Controls whether hidden config sections/vars are read from the file.
    •

  •      */
    •

  •     var $read_hidden     =    true;
    •

  •
    •

  •     /**
    •

  •      * Controls whether or not to fix mac or dos formatted newlines.
    •

  •      * If set to true, \r or \r\n will be changed to \n.
    •

  •      */
    •

  •     var $fix_newlines =    true;
    •

  •     /**#@-*/
    •

  •
    •

  •     /** @access private */
    •

  •     var $_config_path    = "";
    •

  •     var $_config_data    = array();
    •

  •     /**#@-*/
    •

  •
    •

  •     /**
    •

  •      * Constructs a new config file class.
    •

  •      *
    •

  •      * @param string $config_path (optional) path to the config files
    •

  •      */
    •

  •     function Config_File($config_path = NULL)
    •

  •     {
    •

  •         if (isset($config_path))
    •

  •             $this->set_path($config_path);
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Set the path where configuration files can be found.
    •

  •      *
    •

  •      * @param string $config_path path to the config files
    •

  •      */
    •

  •     function set_path($config_path)
    •

  •     {
    •

  •         if (!empty($config_path)) {
    •

  •             if (!is_string($config_path) || !file_exists($config_path) || !is_dir($config_path)) {
    •

  •                 $this->_trigger_error_msg("Bad config file path '$config_path'");
    •

  •                 return;
    •

  •             }
    •

  •             if(substr($config_path, -1) != DIRECTORY_SEPARATOR) {
    •

  •                 $config_path .= DIRECTORY_SEPARATOR;
    •

  •             }
    •

  •
    •

  •             $this->_config_path = $config_path;
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Retrieves config info based on the file, section, and variable name.
    •

  •      *
    •

  •      * @param string $file_name config file to get info for
    •

  •      * @param string $section_name (optional) section to get info for
    •

  •      * @param string $var_name (optional) variable to get info for
    •

  •      * @return string|arraya value or array of values
    •

  •      */
    •

  •     function get($file_name, $section_name = NULL, $var_name = NULL)
    •

  •     {
    •

  •         if (empty($file_name)) {
    •

  •             $this->_trigger_error_msg('Empty config file name');
    •

  •             return;
    •

  •         } else {
    •

  •             $file_name = $this->_config_path . $file_name;
    •

  •             if (!isset($this->_config_data[$file_name]))
    •

  •                 $this->load_file($file_name, false);
    •

  •         }
    •

  •
    •

  •         if (!empty($var_name)) {
    •

  •             if (empty($section_name)) {
    •

  •                 return $this->_config_data[$file_name]["vars"][$var_name];
    •

  •             } else {
    •

  •                 if(isset($this->_config_data[$file_name]["sections"][$section_name]["vars"][$var_name]))
    •

  •                     return $this->_config_data[$file_name]["sections"][$section_name]["vars"][$var_name];
    •

  •                 else
    •

  •                     return array();
    •

  •             }
    •

  •         } else {
    •

  •             if (empty($section_name)) {
    •

  •                 return (array)$this->_config_data[$file_name]["vars"];
    •

  •             } else {
    •

  •                 if(isset($this->_config_data[$file_name]["sections"][$section_name]["vars"]))
    •

  •                     return (array)$this->_config_data[$file_name]["sections"][$section_name]["vars"];
    •

  •                 else
    •

  •                     return array();
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Retrieves config info based on the key.
    •

  •      *
    •

  •      * @param $file_name string config key (filename/section/var)
    •

  •      * @return string|arraysame as get()
    •

  •      * @uses get() retrieves information from config file and returns it
    •

  •      */
    •

  •     function &get_key($config_key)
    •

  •     {
    •

  •         list($file_name, $section_name, $var_name) = explode('/', $config_key, 3);
    •

  •         $result = &$this->get($file_name, $section_name, $var_name);
    •

  •         return $result;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get all loaded config file names.
    •

  •      *
    •

  •      * @return array an array of loaded config file names
    •

  •      */
    •

  •     function get_file_names()
    •

  •     {
    •

  •         return array_keys($this->_config_data);
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Get all section names from a loaded file.
    •

  •      *
    •

  •      * @param string $file_name config file to get section names from
    •

  •      * @return array an array of section names from the specified file
    •

  •      */
    •

  •     function get_section_names($file_name)
    •

  •     {
    •

  •         $file_name = $this->_config_path . $file_name;
    •

  •         if (!isset($this->_config_data[$file_name])) {
    •

  •             $this->_trigger_error_msg("Unknown config file '$file_name'");
    •

  •             return;
    •

  •         }
    •

  •
    •

  •         return array_keys($this->_config_data[$file_name]["sections"]);
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Get all global or section variable names.
    •

  •      *
    •

  •      * @param string $file_name config file to get info for
    •

  •      * @param string $section_name (optional) section to get info for
    •

  •      * @return array an array of variables names from the specified file/section
    •

  •      */
    •

  •     function get_var_names($file_name, $section = NULL)
    •

  •     {
    •

  •         if (empty($file_name)) {
    •

  •             $this->_trigger_error_msg('Empty config file name');
    •

  •             return;
    •

  •         } else if (!isset($this->_config_data[$file_name])) {
    •

  •             $this->_trigger_error_msg("Unknown config file '$file_name'");
    •

  •             return;
    •

  •         }
    •

  •
    •

  •         if (empty($section))
    •

  •             return array_keys($this->_config_data[$file_name]["vars"]);
    •

  •         else
    •

  •             return array_keys($this->_config_data[$file_name]["sections"][$section]["vars"]);
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Clear loaded config data for a certain file or all files.
    •

  •      *
    •

  •      * @param string $file_name file to clear config data for
    •

  •      */
    •

  •     function clear($file_name = NULL)
    •

  •     {
    •

  •         if ($file_name === NULL)
    •

  •             $this->_config_data = array();
    •

  •         else if (isset($this->_config_data[$file_name]))
    •

  •             $this->_config_data[$file_name] = array();
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Load a configuration file manually.
    •

  •      *
    •

  •      * @param string $file_name file name to load
    •

  •      * @param boolean $prepend_path whether current config path should be
    •

  •      *                               prepended to the filename
    •

  •      */
    •

  •     function load_file($file_name, $prepend_path = true)
    •

  •     {
    •

  •         if ($prepend_path && $this->_config_path != "")
    •

  •             $config_file = $this->_config_path . $file_name;
    •

  •         else
    •

  •             $config_file = $file_name;
    •

  •
    •

  •         ini_set('track_errors', true);
    •

  •         $fp = @fopen($config_file, "r");
    •

  •         if (!is_resource($fp)) {
    •

  •             $this->_trigger_error_msg("Could not open config file '$config_file'");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         $contents = ($size = filesize($config_file)) ? fread($fp, $size) : '';
    •

  •         fclose($fp);
    •

  •
    •

  •         $this->_config_data[$config_file] = $this->parse_contents($contents);
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Store the contents of a file manually.
    •

  •      *
    •

  •      * @param string $config_file file name of the related contents
    •

  •      * @param string $contents the file-contents to parse
    •

  •      */
    •

  •     function set_file_contents($config_file, $contents)
    •

  •     {
    •

  •         $this->_config_data[$config_file] = $this->parse_contents($contents);
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * parse the source of a configuration file manually.
    •

  •      *
    •

  •      * @param string $contents the file-contents to parse
    •

  •      */
    •

  •     function parse_contents($contents)
    •

  •     {
    •

  •         if($this->fix_newlines) {
    •

  •             // fix mac/dos formatted newlines
    •

  •             $contents = preg_replace('!\r\n?!', "\n", $contents);
    •

  •         }
    •

  •
    •

  •         $config_data = array();
    •

  •         $config_data['sections'] = array();
    •

  •         $config_data['vars'] = array();
    •

  •
    •

  •         /* reference to fill with data */
    •

  •         $vars =& $config_data['vars'];
    •

  •
    •

  •         /* parse file line by line */
    •

  •         preg_match_all('!^.*\r?\n?!m', $contents, $match);
    •

  •         $lines = $match[0];
    •

  •         for ($i=0, $count=count($lines); $i<$count; $i++) {
    •

  •             $line = $lines[$i];
    •

  •             if (empty($line)) continue;
    •

  •
    •

  •             if ( substr($line, 0, 1) == '[' && preg_match('!^\[(.*?)\]!', $line, $match) ) {
    •

  •                 /* section found */
    •

  •                 if (substr($match[1], 0, 1) == '.') {
    •

  •                     /* hidden section */
    •

  •                     if ($this->read_hidden) {
    •

  •                         $section_name = substr($match[1], 1);
    •

  •                     } else {
    •

  •                         /* break reference to $vars to ignore hidden section */
    •

  •                         unset($vars);
    •

  •                         $vars = array();
    •

  •                         continue;
    •

  •                     }
    •

  •                 } else {
    •

  •                     $section_name = $match[1];
    •

  •                 }
    •

  •                 if (!isset($config_data['sections'][$section_name]))
    •

  •                     $config_data['sections'][$section_name] = array('vars' => array());
    •

  •                 $vars =& $config_data['sections'][$section_name]['vars'];
    •

  •                 continue;
    •

  •             }
    •

  •
    •

  •             if (preg_match('/^\s*(\.?\w+)\s*=\s*(.*)/s', $line, $match)) {
    •

  •                 /* variable found */
    •

  •                 $var_name = rtrim($match[1]);
    •

  •                 if (strpos($match[2], '"""') === 0) {
    •

  •                     /* handle multiline-value */
    •

  •                     $lines[$i] = substr($match[2], 3);
    •

  •                     $var_value = '';
    •

  •                     while ($i<$count) {
    •

  •                         if (($pos = strpos($lines[$i], '"""')) === false) {
    •

  •                             $var_value .= $lines[$i++];
    •

  •                         } else {
    •

  •                             /* end of multiline-value */
    •

  •                             $var_value .= substr($lines[$i], 0, $pos);
    •

  •                             break;
    •

  •                         }
    •

  •                     }
    •

  •                     $booleanize = false;
    •

  •
    •

  •                 } else {
    •

  •                     /* handle simple value */
    •

  •                     $var_value = preg_replace('/^([\'"])(.*)\1$/', '\2', rtrim($match[2]));
    •

  •                     $booleanize = $this->booleanize;
    •

  •
    •

  •                 }
    •

  •                 $this->_set_config_var($vars, $var_name, $var_value, $booleanize);
    •

  •             }
    •

  •             /* else unparsable line / means it is a comment / means ignore it */
    •

  •         }
    •

  •         return $config_data;
    •

  •     }
    •

  •
    •

  •     /**#@+ @access private */
    •

  •     /**
    •

  •      * @param array &$container
    •

  •      * @param string $var_name
    •

  •      * @param mixed $var_value
    •

  •      * @param boolean $booleanize determines whether $var_value is converted to
    •

  •      *                             to true/false
    •

  •      */
    •

  •     function _set_config_var(&$container, $var_name, $var_value, $booleanize)
    •

  •     {
    •

  •         if (substr($var_name, 0, 1) == '.') {
    •

  •             if (!$this->read_hidden)
    •

  •                 return;
    •

  •             else
    •

  •                 $var_name = substr($var_name, 1);
    •

  •         }
    •

  •
    •

  •         if (!preg_match("/^[a-zA-Z_]\w*$/", $var_name)) {
    •

  •             $this->_trigger_error_msg("Bad variable name '$var_name'");
    •

  •             return;
    •

  •         }
    •

  •
    •

  •         if ($booleanize) {
    •

  •             if (preg_match("/^(on|true|yes)$/i", $var_value))
    •

  •                 $var_value = true;
    •

  •             else if (preg_match("/^(off|false|no)$/i", $var_value))
    •

  •                 $var_value = false;
    •

  •         }
    •

  •
    •

  •         if (!isset($container[$var_name]) || $this->overwrite)
    •

  •             $container[$var_name] = $var_value;
    •

  •         else {
    •

  •             settype($container[$var_name], 'array');
    •

  •             $container[$var_name][] = $var_value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * @uses trigger_error() creates a PHP warning/error
    •

  •      * @param string $error_msg
    •

  •      * @param integer $error_type one of
    •

  •      */
    •

  •     function _trigger_error_msg($error_msg, $error_type = E_USER_WARNING)
    •

  •     {
    •

  •         trigger_error("Config_File error: $error_msg", $error_type);
    •

  •     }
    •

  •     /**#@-*/
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:27 +0200 by phpDocumentor 1.4.0a2


File Source for Smarty.class.php

Source for file Smarty.class.php

Documentation is available at Smarty.class.php

  • <?php
    •

  •
    •

  • /**
    •

  •  * Project:     Smarty: the PHP compiling template engine
    •

  •  * File:        Smarty.class.php
    •

  •  *
    •

  •  * 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 (at your option) 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
    •

  •  *
    •

  •  * For questions, help, comments, discussion, etc., please join the
    •

  •  * Smarty mailing list. Send a blank e-mail to
    •

  •  * smarty-general-subscribe@lists.php.net
    •

  •  *
    •

  •  * @link http://smarty.php.net/
    •

  •  * @copyright 2001-2005 New Digital Group, Inc.
    •

  •  * @author Monte Ohrt <monte at ohrt dot com>
    •

  •  * @author Andrei Zmievski <andrei@php.net>
    •

  •  * @package Smarty
    •

  •  * @version 2.6.18
    •

  •  */
    •

  •
    •

  • /* $Id: Smarty.class.php 942 2007-08-05 15:12:39Z dugris $ */
    •

  •
    •

  • /**
    •

  •  * DIR_SEP isn't used anymore, but third party apps might
    •

  •  */
    •

  • if(!defined('DIR_SEP')) {
    •

  •     define('DIR_SEP', DIRECTORY_SEPARATOR);
    •

  • }
    •

  •
    •

  • /**
    •

  •  * set SMARTY_DIR to absolute path to Smarty library files.
    •

  •  * if not defined, include_path will be used. Sets SMARTY_DIR only if user
    •

  •  * application has not already defined it.
    •

  •  */
    •

  •
    •

  • if (!defined('SMARTY_DIR')) {
    •

  •     define('SMARTY_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
    •

  • }
    •

  •
    •

  • if (!defined('SMARTY_CORE_DIR')) {
    •

  •     define('SMARTY_CORE_DIR', SMARTY_DIR . 'internals' . DIRECTORY_SEPARATOR);
    •

  • }
    •

  •
    •

  • define('SMARTY_PHP_PASSTHRU',   0);
    •

  • define('SMARTY_PHP_QUOTE',      1);
    •

  • define('SMARTY_PHP_REMOVE',     2);
    •

  • define('SMARTY_PHP_ALLOW',      3);
    •

  •
    •

  • /**
    •

  •  * @package Smarty
    •

  •  */
    •

  • class Smarty
    •

  • {
    •

  •     /**#@+
    •

  •      * Smarty Configuration Section
    •

  •      */
    •

  •
    •

  •     /**
    •

  •      * The name of the directory where templates are located.
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $template_dir    =  'templates';
    •

  •
    •

  •     /**
    •

  •      * The directory where compiled templates are located.
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $compile_dir     =  'templates_c';
    •

  •
    •

  •     /**
    •

  •      * The directory where config files are located.
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $config_dir      =  'configs';
    •

  •
    •

  •     /**
    •

  •      * An array of directories searched for plugins.
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $plugins_dir     =  array('plugins');
    •

  •
    •

  •     /**
    •

  •      * If debugging is enabled, a debug console window will display
    •

  •      * when the page loads (make sure your browser allows unrequested
    •

  •      * popup windows)
    •

  •      *
    •

  •      * @var boolean
    •

  •      */
    •

  •     var $debugging       =  false;
    •

  •
    •

  •     /**
    •

  •      * When set, smarty does uses this value as error_reporting-level.
    •

  •      *
    •

  •      * @var boolean
    •

  •      */
    •

  •     var $error_reporting  =  null;
    •

  •
    •

  •     /**
    •

  •      * This is the path to the debug console template. If not set,
    •

  •      * the default one will be used.
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $debug_tpl       =  '';
    •

  •
    •

  •     /**
    •

  •      * This determines if debugging is enable-able from the browser.
    •

  •      * <ul>
    •

  •      *  <li>NONE => no debugging control allowed</li>
    •

  •      *  <li>URL => enable debugging when SMARTY_DEBUG is found in the URL.</li>
    •

  •      * </ul>
    •

  •      * @link http://www.foo.dom/index.php?SMARTY_DEBUG
    •

  •      * @var string
    •

  •      */
    •

  •     var $debugging_ctrl  =  'NONE';
    •

  •
    •

  •     /**
    •

  •      * This tells Smarty whether to check for recompiling or not. Recompiling
    •

  •      * does not need to happen unless a template or config file is changed.
    •

  •      * Typically you enable this during development, and disable for
    •

  •      * production.
    •

  •      *
    •

  •      * @var boolean
    •

  •      */
    •

  •     var $compile_check   =  true;
    •

  •
    •

  •     /**
    •

  •      * This forces templates to compile every time. Useful for development
    •

  •      * or debugging.
    •

  •      *
    •

  •      * @var boolean
    •

  •      */
    •

  •     var $force_compile   =  false;
    •

  •
    •

  •     /**
    •

  •      * This enables template caching.
    •

  •      * <ul>
    •

  •      *  <li>0 = no caching</li>
    •

  •      *  <li>1 = use class cache_lifetime value</li>
    •

  •      *  <li>2 = use cache_lifetime in cache file</li>
    •

  •      * </ul>
    •

  •      * @var integer
    •

  •      */
    •

  •     var $caching         =  0;
    •

  •
    •

  •     /**
    •

  •      * The name of the directory for cache files.
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $cache_dir       =  'cache';
    •

  •
    •

  •     /**
    •

  •      * This is the number of seconds cached content will persist.
    •

  •      * <ul>
    •

  •      *  <li>0 = always regenerate cache</li>
    •

  •      *  <li>-1 = never expires</li>
    •

  •      * </ul>
    •

  •      *
    •

  •      * @var integer
    •

  •      */
    •

  •     var $cache_lifetime  =  3600;
    •

  •
    •

  •     /**
    •

  •      * Only used when $caching is enabled. If true, then If-Modified-Since headers
    •

  •      * are respected with cached content, and appropriate HTTP headers are sent.
    •

  •      * This way repeated hits to a cached page do not send the entire page to the
    •

  •      * client every time.
    •

  •      *
    •

  •      * @var boolean
    •

  •      */
    •

  •     var $cache_modified_check = false;
    •

  •
    •

  •     /**
    •

  •      * This determines how Smarty handles "<?php ... ?>" tags in templates.
    •

  •      * possible values:
    •

  •      * <ul>
    •

  •      *  <li>SMARTY_PHP_PASSTHRU -> print tags as plain text</li>
    •

  •      *  <li>SMARTY_PHP_QUOTE    -> escape tags as entities</li>
    •

  •      *  <li>SMARTY_PHP_REMOVE   -> remove php tags</li>
    •

  •      *  <li>SMARTY_PHP_ALLOW    -> execute php tags</li>
    •

  •      * </ul>
    •

  •      *
    •

  •      * @var integer
    •

  •      */
    •

  •     var $php_handling    =  SMARTY_PHP_PASSTHRU;
    •

  •
    •

  •     /**
    •

  •      * This enables template security. When enabled, many things are restricted
    •

  •      * in the templates that normally would go unchecked. This is useful when
    •

  •      * untrusted parties are editing templates and you want a reasonable level
    •

  •      * of security. (no direct execution of PHP in templates for example)
    •

  •      *
    •

  •      * @var boolean
    •

  •      */
    •

  •     var $security       =   false;
    •

  •
    •

  •     /**
    •

  •      * This is the list of template directories that are considered secure. This
    •

  •      * is used only if {@link $security} is enabled. One directory per array
    •

  •      * element.  {@link $template_dir} is in this list implicitly.
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $secure_dir     =   array();
    •

  •
    •

  •     /**
    •

  •      * These are the security settings for Smarty. They are used only when
    •

  •      * {@link $security} is enabled.
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $security_settings  = array(
    •

  •                                     'PHP_HANDLING'    => false,
    •

  •                                     'IF_FUNCS'        => array('array', 'list',
    •

  •                                                                'isset', 'empty',
    •

  •                                                                'count', 'sizeof',
    •

  •                                                                'in_array', 'is_array',
    •

  •                                                                'true', 'false', 'null'),
    •

  •                                     'INCLUDE_ANY'     => false,
    •

  •                                     'PHP_TAGS'        => false,
    •

  •                                     'MODIFIER_FUNCS'  => array('count'),
    •

  •                                     'ALLOW_CONSTANTS'  => false
    •

  •                                    );
    •

  •
    •

  •     /**
    •

  •      * This is an array of directories where trusted php scripts reside.
    •

  •      * {@link $security} is disabled during their inclusion/execution.
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $trusted_dir        = array();
    •

  •
    •

  •     /**
    •

  •      * The left delimiter used for the template tags.
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $left_delimiter  =  '{';
    •

  •
    •

  •     /**
    •

  •      * The right delimiter used for the template tags.
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $right_delimiter =  '}';
    •

  •
    •

  •     /**
    •

  •      * The order in which request variables are registered, similar to
    •

  •      * variables_order in php.ini E = Environment, G = GET, P = POST,
    •

  •      * C = Cookies, S = Server
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $request_vars_order    = 'EGPCS';
    •

  •
    •

  •     /**
    •

  •      * Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false)
    •

  •      * are uses as request-vars or $_*[]-vars. note: if
    •

  •      * request_use_auto_globals is true, then $request_vars_order has
    •

  •      * no effect, but the php-ini-value "gpc_order"
    •

  •      *
    •

  •      * @var boolean
    •

  •      */
    •

  •     var $request_use_auto_globals      = true;
    •

  •
    •

  •     /**
    •

  •      * Set this if you want different sets of compiled files for the same
    •

  •      * templates. This is useful for things like different languages.
    •

  •      * Instead of creating separate sets of templates per language, you
    •

  •      * set different compile_ids like 'en' and 'de'.
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $compile_id            = null;
    •

  •
    •

  •     /**
    •

  •      * This tells Smarty whether or not to use sub dirs in the cache/ and
    •

  •      * templates_c/ directories. sub directories better organized, but
    •

  •      * may not work well with PHP safe mode enabled.
    •

  •      *
    •

  •      * @var boolean
    •

  •      *
    •

  •      */
    •

  •     var $use_sub_dirs          = false;
    •

  •
    •

  •     /**
    •

  •      * This is a list of the modifiers to apply to all template variables.
    •

  •      * Put each modifier in a separate array element in the order you want
    •

  •      * them applied. example: <code>array('escape:"htmlall"');</code>
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $default_modifiers        = array();
    •

  •
    •

  •     /**
    •

  •      * This is the resource type to be used when not specified
    •

  •      * at the beginning of the resource path. examples:
    •

  •      * $smarty->display('file:index.tpl');
    •

  •      * $smarty->display('db:index.tpl');
    •

  •      * $smarty->display('index.tpl'); // will use default resource type
    •

  •      * {include file="file:index.tpl"}
    •

  •      * {include file="db:index.tpl"}
    •

  •      * {include file="index.tpl"} {* will use default resource type *}
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $default_resource_type    = 'file';
    •

  •
    •

  •     /**
    •

  •      * The function used for cache file handling. If not set, built-in caching is used.
    •

  •      *
    •

  •      * @var null|stringfunction name
    •

  •      */
    •

  •     var $cache_handler_func   = null;
    •

  •
    •

  •     /**
    •

  •      * This indicates which filters are automatically loaded into Smarty.
    •

  •      *
    •

  •      * @var array array of filter names
    •

  •      */
    •

  •     var $autoload_filters = array();
    •

  •
    •

  •     /**#@+
    •

  •      * @var boolean
    •

  •      */
    •

  •     /**
    •

  •      * This tells if config file vars of the same name overwrite each other or not.
    •

  •      * if disabled, same name variables are accumulated in an array.
    •

  •      */
    •

  •     var $config_overwrite = true;
    •

  •
    •

  •     /**
    •

  •      * This tells whether or not to automatically booleanize config file variables.
    •

  •      * If enabled, then the strings "on", "true", and "yes" are treated as boolean
    •

  •      * true, and "off", "false" and "no" are treated as boolean false.
    •

  •      */
    •

  •     var $config_booleanize = true;
    •

  •
    •

  •     /**
    •

  •      * This tells whether hidden sections [.foobar] are readable from the
    •

  •      * tempalates or not. Normally you would never allow this since that is
    •

  •      * the point behind hidden sections: the application can access them, but
    •

  •      * the templates cannot.
    •

  •      */
    •

  •     var $config_read_hidden = false;
    •

  •
    •

  •     /**
    •

  •      * This tells whether or not automatically fix newlines in config files.
    •

  •      * It basically converts \r (mac) or \r\n (dos) to \n
    •

  •      */
    •

  •     var $config_fix_newlines = true;
    •

  •     /**#@-*/
    •

  •
    •

  •     /**
    •

  •      * If a template cannot be found, this PHP function will be executed.
    •

  •      * Useful for creating templates on-the-fly or other special action.
    •

  •      *
    •

  •      * @var string function name
    •

  •      */
    •

  •     var $default_template_handler_func = '';
    •

  •
    •

  •     /**
    •

  •      * The file that contains the compiler class. This can a full
    •

  •      * pathname, or relative to the php_include path.
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $compiler_file        =    'Smarty_Compiler.class.php';
    •

  •
    •

  •     /**
    •

  •      * The class used for compiling templates.
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $compiler_class        =   'Smarty_Compiler';
    •

  •
    •

  •     /**
    •

  •      * The class used to load config vars.
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $config_class          =   'Config_File';
    •

  •
    •

  • /**#@+
    •

  •  * END Smarty Configuration Section
    •

  •  * There should be no need to touch anything below this line.
    •

  •  * @access private
    •

  •  */
    •

  •     /**
    •

  •      * where assigned template vars are kept
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $_tpl_vars             = array();
    •

  •
    •

  •     /**
    •

  •      * stores run-time $smarty.* vars
    •

  •      *
    •

  •      * @var null|array
    •

  •      */
    •

  •     var $_smarty_vars          = null;
    •

  •
    •

  •     /**
    •

  •      * keeps track of sections
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $_sections             = array();
    •

  •
    •

  •     /**
    •

  •      * keeps track of foreach blocks
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $_foreach              = array();
    •

  •
    •

  •     /**
    •

  •      * keeps track of tag hierarchy
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $_tag_stack            = array();
    •

  •
    •

  •     /**
    •

  •      * configuration object
    •

  •      *
    •

  •      * @var Config_file
    •

  •      */
    •

  •     var $_conf_obj             = null;
    •

  •
    •

  •     /**
    •

  •      * loaded configuration settings
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $_config               = array(array('vars'  => array(), 'files' => array()));
    •

  •
    •

  •     /**
    •

  •      * md5 checksum of the string 'Smarty'
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $_smarty_md5           = 'f8d698aea36fcbead2b9d5359ffca76f';
    •

  •
    •

  •     /**
    •

  •      * Smarty version number
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $_version              = '2.6.18';
    •

  •
    •

  •     /**
    •

  •      * current template inclusion depth
    •

  •      *
    •

  •      * @var integer
    •

  •      */
    •

  •     var $_inclusion_depth      = 0;
    •

  •
    •

  •     /**
    •

  •      * for different compiled templates
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $_compile_id           = null;
    •

  •
    •

  •     /**
    •

  •      * text in URL to enable debug mode
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $_smarty_debug_id      = 'SMARTY_DEBUG';
    •

  •
    •

  •     /**
    •

  •      * debugging information for debug console
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $_smarty_debug_info    = array();
    •

  •
    •

  •     /**
    •

  •      * info that makes up a cache file
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $_cache_info           = array();
    •

  •
    •

  •     /**
    •

  •      * default file permissions
    •

  •      *
    •

  •      * @var integer
    •

  •      */
    •

  •     var $_file_perms           = 0644;
    •

  •
    •

  •     /**
    •

  •      * default dir permissions
    •

  •      *
    •

  •      * @var integer
    •

  •      */
    •

  •     var $_dir_perms               = 0771;
    •

  •
    •

  •     /**
    •

  •      * registered objects
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $_reg_objects           = array();
    •

  •
    •

  •     /**
    •

  •      * table keeping track of plugins
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $_plugins              = array(
    •

  •                                        'modifier'      => array(),
    •

  •                                        'function'      => array(),
    •

  •                                        'block'         => array(),
    •

  •                                        'compiler'      => array(),
    •

  •                                        'prefilter'     => array(),
    •

  •                                        'postfilter'    => array(),
    •

  •                                        'outputfilter'  => array(),
    •

  •                                        'resource'      => array(),
    •

  •                                        'insert'        => array());
    •

  •
    •

  •
    •

  •     /**
    •

  •      * cache serials
    •

  •      *
    •

  •      * @var array
    •

  •      */
    •

  •     var $_cache_serials = array();
    •

  •
    •

  •     /**
    •

  •      * name of optional cache include file
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $_cache_include = null;
    •

  •
    •

  •     /**
    •

  •      * indicate if the current code is used in a compiled
    •

  •      * include
    •

  •      *
    •

  •      * @var string
    •

  •      */
    •

  •     var $_cache_including = false;
    •

  •
    •

  •     /**#@-*/
    •

  •     /**
    •

  •      * The class constructor.
    •

  •      */
    •

  •     function Smarty()
    •

  •     {
    •

  •       $this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME']
    •

  •                     : @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * assigns values to template variables
    •

  •      *
    •

  •      * @param array|string$tpl_var the template variable name(s)
    •

  •      * @param mixed $value the value to assign
    •

  •      */
    •

  •     function assign($tpl_var, $value = null)
    •

  •     {
    •

  •         if (is_array($tpl_var)){
    •

  •             foreach ($tpl_var as $key => $val) {
    •

  •                 if ($key != '') {
    •

  •                     $this->_tpl_vars[$key] = $val;
    •

  •                 }
    •

  •             }
    •

  •         } else {
    •

  •             if ($tpl_var != '')
    •

  •                 $this->_tpl_vars[$tpl_var] = $value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * assigns values to template variables by reference
    •

  •      *
    •

  •      * @param string $tpl_var the template variable name
    •

  •      * @param mixed $value the referenced value to assign
    •

  •      */
    •

  •     function assign_by_ref($tpl_var, &$value)
    •

  •     {
    •

  •         if ($tpl_var != '')
    •

  •             $this->_tpl_vars[$tpl_var] = &$value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * appends values to template variables
    •

  •      *
    •

  •      * @param array|string$tpl_var the template variable name(s)
    •

  •      * @param mixed $value the value to append
    •

  •      */
    •

  •     function append($tpl_var, $value=null, $merge=false)
    •

  •     {
    •

  •         if (is_array($tpl_var)) {
    •

  •             // $tpl_var is an array, ignore $value
    •

  •             foreach ($tpl_var as $_key => $_val) {
    •

  •                 if ($_key != '') {
    •

  •                     if(!@is_array($this->_tpl_vars[$_key])) {
    •

  •                         settype($this->_tpl_vars[$_key],'array');
    •

  •                     }
    •

  •                     if($merge && is_array($_val)) {
    •

  •                         foreach($_val as $_mkey => $_mval) {
    •

  •                             $this->_tpl_vars[$_key][$_mkey] = $_mval;
    •

  •                         }
    •

  •                     } else {
    •

  •                         $this->_tpl_vars[$_key][] = $_val;
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •         } else {
    •

  •             if ($tpl_var != '' && isset($value)) {
    •

  •                 if(!@is_array($this->_tpl_vars[$tpl_var])) {
    •

  •                     settype($this->_tpl_vars[$tpl_var],'array');
    •

  •                 }
    •

  •                 if($merge && is_array($value)) {
    •

  •                     foreach($value as $_mkey => $_mval) {
    •

  •                         $this->_tpl_vars[$tpl_var][$_mkey] = $_mval;
    •

  •                     }
    •

  •                 } else {
    •

  •                     $this->_tpl_vars[$tpl_var][] = $value;
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * appends values to template variables by reference
    •

  •      *
    •

  •      * @param string $tpl_var the template variable name
    •

  •      * @param mixed $value the referenced value to append
    •

  •      */
    •

  •     function append_by_ref($tpl_var, &$value, $merge=false)
    •

  •     {
    •

  •         if ($tpl_var != '' && isset($value)) {
    •

  •             if(!@is_array($this->_tpl_vars[$tpl_var])) {
    •

  •              settype($this->_tpl_vars[$tpl_var],'array');
    •

  •             }
    •

  •             if ($merge && is_array($value)) {
    •

  •                 foreach($value as $_key => $_val) {
    •

  •                     $this->_tpl_vars[$tpl_var][$_key] = &$value[$_key];
    •

  •                 }
    •

  •             } else {
    •

  •                 $this->_tpl_vars[$tpl_var][] = &$value;
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * clear the given assigned template variable.
    •

  •      *
    •

  •      * @param string $tpl_var the template variable to clear
    •

  •      */
    •

  •     function clear_assign($tpl_var)
    •

  •     {
    •

  •         if (is_array($tpl_var))
    •

  •             foreach ($tpl_var as $curr_var)
    •

  •                 unset($this->_tpl_vars[$curr_var]);
    •

  •         else
    •

  •             unset($this->_tpl_vars[$tpl_var]);
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Registers custom function to be used in templates
    •

  •      *
    •

  •      * @param string $function the name of the template function
    •

  •      * @param string $function_impl the name of the PHP function to register
    •

  •      */
    •

  •     function register_function($function, $function_impl, $cacheable=true, $cache_attrs=null)
    •

  •     {
    •

  •         $this->_plugins['function'][$function] =
    •

  •             array($function_impl, null, null, false, $cacheable, $cache_attrs);
    •

  •
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Unregisters custom function
    •

  •      *
    •

  •      * @param string $function name of template function
    •

  •      */
    •

  •     function unregister_function($function)
    •

  •     {
    •

  •         unset($this->_plugins['function'][$function]);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Registers object to be used in templates
    •

  •      *
    •

  •      * @param string $object name of template object
    •

  •      * @param object &$object_impl the referenced PHP object to register
    •

  •      * @param null|array$allowed list of allowed methods (empty = all)
    •

  •      * @param boolean $smarty_args smarty argument format, else traditional
    •

  •      * @param null|array$block_functs list of methods that are block format
    •

  •      */
    •

  •     function register_object($object, &$object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
    •

  •     {
    •

  •         settype($allowed, 'array');
    •

  •         settype($smarty_args, 'boolean');
    •

  •         $this->_reg_objects[$object] =
    •

  •             array(&$object_impl, $allowed, $smarty_args, $block_methods);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Unregisters object
    •

  •      *
    •

  •      * @param string $object name of template object
    •

  •      */
    •

  •     function unregister_object($object)
    •

  •     {
    •

  •         unset($this->_reg_objects[$object]);
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Registers block function to be used in templates
    •

  •      *
    •

  •      * @param string $block name of template block
    •

  •      * @param string $block_impl PHP function to register
    •

  •      */
    •

  •     function register_block($block, $block_impl, $cacheable=true, $cache_attrs=null)
    •

  •     {
    •

  •         $this->_plugins['block'][$block] =
    •

  •             array($block_impl, null, null, false, $cacheable, $cache_attrs);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Unregisters block function
    •

  •      *
    •

  •      * @param string $block name of template function
    •

  •      */
    •

  •     function unregister_block($block)
    •

  •     {
    •

  •         unset($this->_plugins['block'][$block]);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Registers compiler function
    •

  •      *
    •

  •      * @param string $function name of template function
    •

  •      * @param string $function_impl name of PHP function to register
    •

  •      */
    •

  •     function register_compiler_function($function, $function_impl, $cacheable=true)
    •

  •     {
    •

  •         $this->_plugins['compiler'][$function] =
    •

  •             array($function_impl, null, null, false, $cacheable);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Unregisters compiler function
    •

  •      *
    •

  •      * @param string $function name of template function
    •

  •      */
    •

  •     function unregister_compiler_function($function)
    •

  •     {
    •

  •         unset($this->_plugins['compiler'][$function]);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Registers modifier to be used in templates
    •

  •      *
    •

  •      * @param string $modifier name of template modifier
    •

  •      * @param string $modifier_impl name of PHP function to register
    •

  •      */
    •

  •     function register_modifier($modifier, $modifier_impl)
    •

  •     {
    •

  •         $this->_plugins['modifier'][$modifier] =
    •

  •             array($modifier_impl, null, null, false);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Unregisters modifier
    •

  •      *
    •

  •      * @param string $modifier name of template modifier
    •

  •      */
    •

  •     function unregister_modifier($modifier)
    •

  •     {
    •

  •         unset($this->_plugins['modifier'][$modifier]);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Registers a resource to fetch a template
    •

  •      *
    •

  •      * @param string $type name of resource
    •

  •      * @param array $functions array of functions to handle resource
    •

  •      */
    •

  •     function register_resource($type, $functions)
    •

  •     {
    •

  •         if (count($functions)==4) {
    •

  •             $this->_plugins['resource'][$type] =
    •

  •                 array($functions, false);
    •

  •
    •

  •         } elseif (count($functions)==5) {
    •

  •             $this->_plugins['resource'][$type] =
    •

  •                 array(array(array(&$functions[0], $functions[1])
    •

  •                             ,array(&$functions[0], $functions[2])
    •

  •                             ,array(&$functions[0], $functions[3])
    •

  •                             ,array(&$functions[0], $functions[4]))
    •

  •                       ,false);
    •

  •
    •

  •         } else {
    •

  •             $this->trigger_error("malformed function-list for '$type' in register_resource");
    •

  •
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Unregisters a resource
    •

  •      *
    •

  •      * @param string $type name of resource
    •

  •      */
    •

  •     function unregister_resource($type)
    •

  •     {
    •

  •         unset($this->_plugins['resource'][$type]);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Registers a prefilter function to apply
    •

  •      * to a template before compiling
    •

  •      *
    •

  •      * @param string $function name of PHP function to register
    •

  •      */
    •

  •     function register_prefilter($function)
    •

  •     {
    •

  •     $_name = (is_array($function)) ? $function[1] : $function;
    •

  •         $this->_plugins['prefilter'][$_name]
    •

  •             = array($function, null, null, false);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Unregisters a prefilter function
    •

  •      *
    •

  •      * @param string $function name of PHP function
    •

  •      */
    •

  •     function unregister_prefilter($function)
    •

  •     {
    •

  •         unset($this->_plugins['prefilter'][$function]);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Registers a postfilter function to apply
    •

  •      * to a compiled template after compilation
    •

  •      *
    •

  •      * @param string $function name of PHP function to register
    •

  •      */
    •

  •     function register_postfilter($function)
    •

  •     {
    •

  •     $_name = (is_array($function)) ? $function[1] : $function;
    •

  •         $this->_plugins['postfilter'][$_name]
    •

  •             = array($function, null, null, false);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Unregisters a postfilter function
    •

  •      *
    •

  •      * @param string $function name of PHP function
    •

  •      */
    •

  •     function unregister_postfilter($function)
    •

  •     {
    •

  •         unset($this->_plugins['postfilter'][$function]);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Registers an output filter function to apply
    •

  •      * to a template output
    •

  •      *
    •

  •      * @param string $function name of PHP function
    •

  •      */
    •

  •     function register_outputfilter($function)
    •

  •     {
    •

  •     $_name = (is_array($function)) ? $function[1] : $function;
    •

  •         $this->_plugins['outputfilter'][$_name]
    •

  •             = array($function, null, null, false);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Unregisters an outputfilter function
    •

  •      *
    •

  •      * @param string $function name of PHP function
    •

  •      */
    •

  •     function unregister_outputfilter($function)
    •

  •     {
    •

  •         unset($this->_plugins['outputfilter'][$function]);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * load a filter of specified type and name
    •

  •      *
    •

  •      * @param string $type filter type
    •

  •      * @param string $name filter name
    •

  •      */
    •

  •     function load_filter($type, $name)
    •

  •     {
    •

  •         switch ($type) {
    •

  •             case 'output':
    •

  •                 $_params = array('plugins' => array(array($type . 'filter', $name, null, null, false)));
    •

  •                 require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
    •

  •                 smarty_core_load_plugins($_params, $this);
    •

  •                 break;
    •

  •
    •

  •             case 'pre':
    •

  •             case 'post':
    •

  •                 if (!isset($this->_plugins[$type . 'filter'][$name]))
    •

  •                     $this->_plugins[$type . 'filter'][$name] = false;
    •

  •                 break;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * clear cached content for the given template and cache id
    •

  •      *
    •

  •      * @param string $tpl_file name of template file
    •

  •      * @param string $cache_id name of cache_id
    •

  •      * @param string $compile_id name of compile_id
    •

  •      * @param string $exp_time expiration time
    •

  •      * @return boolean
    •

  •      */
    •

  •     function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null)
    •

  •     {
    •

  •
    •

  •         if (!isset($compile_id))
    •

  •             $compile_id = $this->compile_id;
    •

  •
    •

  •         if (!isset($tpl_file))
    •

  •             $compile_id = null;
    •

  •
    •

  •         $_auto_id = $this->_get_auto_id($cache_id, $compile_id);
    •

  •
    •

  •         if (!empty($this->cache_handler_func)) {
    •

  •             return call_user_func_array($this->cache_handler_func,
    •

  •                                   array('clear', &$this, &$dummy, $tpl_file, $cache_id, $compile_id, $exp_time));
    •

  •         } else {
    •

  •             $_params = array('auto_base' => $this->cache_dir,
    •

  •                             'auto_source' => $tpl_file,
    •

  •                             'auto_id' => $_auto_id,
    •

  •                             'exp_time' => $exp_time);
    •

  •             require_once(SMARTY_CORE_DIR . 'core.rm_auto.php');
    •

  •             return smarty_core_rm_auto($_params, $this);
    •

  •         }
    •

  •
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * clear the entire contents of cache (all templates)
    •

  •      *
    •

  •      * @param string $exp_time expire time
    •

  •      * @return boolean results of {@link smarty_core_rm_auto()}
    •

  •      */
    •

  •     function clear_all_cache($exp_time = null)
    •

  •     {
    •

  •         return $this->clear_cache(null, null, null, $exp_time);
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * test to see if valid cache exists for this template
    •

  •      *
    •

  •      * @param string $tpl_file name of template file
    •

  •      * @param string $cache_id
    •

  •      * @param string $compile_id
    •

  •      * @return string|falseresults of {@link _read_cache_file()}
    •

  •      */
    •

  •     function is_cached($tpl_file, $cache_id = null, $compile_id = null)
    •

  •     {
    •

  •         if (!$this->caching)
    •

  •             return false;
    •

  •
    •

  •         if (!isset($compile_id))
    •

  •             $compile_id = $this->compile_id;
    •

  •
    •

  •         $_params = array(
    •

  •             'tpl_file' => $tpl_file,
    •

  •             'cache_id' => $cache_id,
    •

  •             'compile_id' => $compile_id
    •

  •         );
    •

  •         require_once(SMARTY_CORE_DIR . 'core.read_cache_file.php');
    •

  •         return smarty_core_read_cache_file($_params, $this);
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * clear all the assigned template variables.
    •

  •      *
    •

  •      */
    •

  •     function clear_all_assign()
    •

  •     {
    •

  •         $this->_tpl_vars = array();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * clears compiled version of specified template resource,
    •

  •      * or all compiled template files if one is not specified.
    •

  •      * This function is for advanced use only, not normally needed.
    •

  •      *
    •

  •      * @param string $tpl_file
    •

  •      * @param string $compile_id
    •

  •      * @param string $exp_time
    •

  •      * @return boolean results of {@link smarty_core_rm_auto()}
    •

  •      */
    •

  •     function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null)
    •

  •     {
    •

  •         if (!isset($compile_id)) {
    •

  •             $compile_id = $this->compile_id;
    •

  •         }
    •

  •         $_params = array('auto_base' => $this->compile_dir,
    •

  •                         'auto_source' => $tpl_file,
    •

  •                         'auto_id' => $compile_id,
    •

  •                         'exp_time' => $exp_time,
    •

  •                         'extensions' => array('.inc', '.php'));
    •

  •         require_once(SMARTY_CORE_DIR . 'core.rm_auto.php');
    •

  •         return smarty_core_rm_auto($_params, $this);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Checks whether requested template exists.
    •

  •      *
    •

  •      * @param string $tpl_file
    •

  •      * @return boolean
    •

  •      */
    •

  •     function template_exists($tpl_file)
    •

  •     {
    •

  •         $_params = array('resource_name' => $tpl_file, 'quiet'=>true, 'get_source'=>false);
    •

  •         return $this->_fetch_resource_info($_params);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns an array containing template variables
    •

  •      *
    •

  •      * @param string $name
    •

  •      * @param string $type
    •

  •      * @return array
    •

  •      */
    •

  •     function &get_template_vars($name=null)
    •

  •     {
    •

  •         if(!isset($name)) {
    •

  •             return $this->_tpl_vars;
    •

  •         } elseif(isset($this->_tpl_vars[$name])) {
    •

  •             return $this->_tpl_vars[$name];
    •

  •         } else {
    •

  •             // var non-existant, return valid reference
    •

  •             $_tmp = null;
    •

  •             return $_tmp;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns an array containing config variables
    •

  •      *
    •

  •      * @param string $name
    •

  •      * @param string $type
    •

  •      * @return array
    •

  •      */
    •

  •     function &get_config_vars($name=null)
    •

  •     {
    •

  •         if(!isset($name) && is_array($this->_config[0])) {
    •

  •             return $this->_config[0]['vars'];
    •

  •         } else if(isset($this->_config[0]['vars'][$name])) {
    •

  •             return $this->_config[0]['vars'][$name];
    •

  •         } else {
    •

  •             // var non-existant, return valid reference
    •

  •             $_tmp = null;
    •

  •             return $_tmp;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * trigger Smarty error
    •

  •      *
    •

  •      * @param string $error_msg
    •

  •      * @param integer $error_type
    •

  •      */
    •

  •     function trigger_error($error_msg, $error_type = E_USER_WARNING)
    •

  •     {
    •

  •         trigger_error("Smarty error: $error_msg", $error_type);
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * executes & displays the template results
    •

  •      *
    •

  •      * @param string $resource_name
    •

  •      * @param string $cache_id
    •

  •      * @param string $compile_id
    •

  •      */
    •

  •     function display($resource_name, $cache_id = null, $compile_id = null)
    •

  •     {
    •

  •         $this->fetch($resource_name, $cache_id, $compile_id, true);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * executes & returns or displays the template results
    •

  •      *
    •

  •      * @param string $resource_name
    •

  •      * @param string $cache_id
    •

  •      * @param string $compile_id
    •

  •      * @param boolean $display
    •

  •      */
    •

  •     function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)
    •

  •     {
    •

  •         static $_cache_info = array();
    •

  •
    •

  •         $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting)
    •

  •                ? $this->error_reporting : error_reporting() & ~E_NOTICE);
    •

  •
    •

  •         if (!$this->debugging && $this->debugging_ctrl == 'URL') {
    •

  •             $_query_string = $this->request_use_auto_globals ? $_SERVER['QUERY_STRING'] : $GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'];
    •

  •             if (@strstr($_query_string, $this->_smarty_debug_id)) {
    •

  •                 if (@strstr($_query_string, $this->_smarty_debug_id . '=on')) {
    •

  •                     // enable debugging for this browser session
    •

  •                     @setcookie('SMARTY_DEBUG', true);
    •

  •                     $this->debugging = true;
    •

  •                 } elseif (@strstr($_query_string, $this->_smarty_debug_id . '=off')) {
    •

  •                     // disable debugging for this browser session
    •

  •                     @setcookie('SMARTY_DEBUG', false);
    •

  •                     $this->debugging = false;
    •

  •                 } else {
    •

  •                     // enable debugging for this page
    •

  •                     $this->debugging = true;
    •

  •                 }
    •

  •             } else {
    •

  •                 $this->debugging = (bool)($this->request_use_auto_globals ? @$_COOKIE['SMARTY_DEBUG'] : @$GLOBALS['HTTP_COOKIE_VARS']['SMARTY_DEBUG']);
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if ($this->debugging) {
    •

  •             // capture time for debugging info
    •

  •             $_params = array();
    •

  •             require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
    •

  •             $_debug_start_time = smarty_core_get_microtime($_params, $this);
    •

  •             $this->_smarty_debug_info[] = array('type'      => 'template',
    •

  •                                                 'filename'  => $resource_name,
    •

  •                                                 'depth'     => 0);
    •

  •             $_included_tpls_idx = count($this->_smarty_debug_info) - 1;
    •

  •         }
    •

  •
    •

  •         if (!isset($compile_id)) {
    •

  •             $compile_id = $this->compile_id;
    •

  •         }
    •

  •
    •

  •         $this->_compile_id = $compile_id;
    •

  •         $this->_inclusion_depth = 0;
    •

  •
    •

  •         if ($this->caching) {
    •

  •             // save old cache_info, initialize cache_info
    •

  •             array_push($_cache_info, $this->_cache_info);
    •

  •             $this->_cache_info = array();
    •

  •             $_params = array(
    •

  •                 'tpl_file' => $resource_name,
    •

  •                 'cache_id' => $cache_id,
    •

  •                 'compile_id' => $compile_id,
    •

  •                 'results' => null
    •

  •             );
    •

  •             require_once(SMARTY_CORE_DIR . 'core.read_cache_file.php');
    •

  •             if (smarty_core_read_cache_file($_params, $this)) {
    •

  •                 $_smarty_results = $_params['results'];
    •

  •                 if (!empty($this->_cache_info['insert_tags'])) {
    •

  •                     $_params = array('plugins' => $this->_cache_info['insert_tags']);
    •

  •                     require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
    •

  •                     smarty_core_load_plugins($_params, $this);
    •

  •                     $_params = array('results' => $_smarty_results);
    •

  •                     require_once(SMARTY_CORE_DIR . 'core.process_cached_inserts.php');
    •

  •                     $_smarty_results = smarty_core_process_cached_inserts($_params, $this);
    •

  •                 }
    •

  •                 if (!empty($this->_cache_info['cache_serials'])) {
    •

  •                     $_params = array('results' => $_smarty_results);
    •

  •                     require_once(SMARTY_CORE_DIR . 'core.process_compiled_include.php');
    •

  •                     $_smarty_results = smarty_core_process_compiled_include($_params, $this);
    •

  •                 }
    •

  •
    •

  •
    •

  •                 if ($display) {
    •

  •                     if ($this->debugging)
    •

  •                     {
    •

  •                         // capture time for debugging info
    •

  •                         $_params = array();
    •

  •                         require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
    •

  •                         $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = smarty_core_get_microtime($_params, $this) - $_debug_start_time;
    •

  •                         require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');
    •

  •                         $_smarty_results .= smarty_core_display_debug_console($_params, $this);
    •

  •                     }
    •

  •                     if ($this->cache_modified_check) {
    •

  •                         $_server_vars = ($this->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
    •

  •                         $_last_modified_date = @substr($_server_vars['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_server_vars['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
    •

  •                         $_gmt_mtime = gmdate('D, d M Y H:i:s', $this->_cache_info['timestamp']).' GMT';
    •

  •                         if (@count($this->_cache_info['insert_tags']) == 0
    •

  •                             && !$this->_cache_serials
    •

  •                             && $_gmt_mtime == $_last_modified_date) {
    •

  •                             if (php_sapi_name()=='cgi')
    •

  •                                 header('Status: 304 Not Modified');
    •

  •                             else
    •

  •                                 header('HTTP/1.1 304 Not Modified');
    •

  •
    •

  •                         } else {
    •

  •                             header('Last-Modified: '.$_gmt_mtime);
    •

  •                             echo $_smarty_results;
    •

  •                         }
    •

  •                     } else {
    •

  •                             echo $_smarty_results;
    •

  •                     }
    •

  •                     error_reporting($_smarty_old_error_level);
    •

  •                     // restore initial cache_info
    •

  •                     $this->_cache_info = array_pop($_cache_info);
    •

  •                     return true;
    •

  •                 } else {
    •

  •                     error_reporting($_smarty_old_error_level);
    •

  •                     // restore initial cache_info
    •

  •                     $this->_cache_info = array_pop($_cache_info);
    •

  •                     return $_smarty_results;
    •

  •                 }
    •

  •             } else {
    •

  •                 $this->_cache_info['template'][$resource_name] = true;
    •

  •                 if ($this->cache_modified_check && $display) {
    •

  •                     header('Last-Modified: '.gmdate('D, d M Y H:i:s', time()).' GMT');
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •
    •

  •         // load filters that are marked as autoload
    •

  •         if (count($this->autoload_filters)) {
    •

  •             foreach ($this->autoload_filters as $_filter_type => $_filters) {
    •

  •                 foreach ($_filters as $_filter) {
    •

  •                     $this->load_filter($_filter_type, $_filter);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •
    •

  •         $_smarty_compile_path = $this->_get_compile_path($resource_name);
    •

  •
    •

  •         // if we just need to display the results, don't perform output
    •

  •         // buffering - for speed
    •

  •         $_cache_including = $this->_cache_including;
    •

  •         $this->_cache_including = false;
    •

  •         if ($display && !$this->caching && count($this->_plugins['outputfilter']) == 0) {
    •

  •             if ($this->_is_compiled($resource_name, $_smarty_compile_path)
    •

  •                     || $this->_compile_resource($resource_name, $_smarty_compile_path))
    •

  •             {
    •

  •                 include($_smarty_compile_path);
    •

  •             }
    •

  •         } else {
    •

  •             ob_start();
    •

  •             if ($this->_is_compiled($resource_name, $_smarty_compile_path)
    •

  •                     || $this->_compile_resource($resource_name, $_smarty_compile_path))
    •

  •             {
    •

  •                 include($_smarty_compile_path);
    •

  •             }
    •

  •             $_smarty_results = ob_get_contents();
    •

  •             ob_end_clean();
    •

  •
    •

  •             foreach ((array)$this->_plugins['outputfilter'] as $_output_filter) {
    •

  •                 $_smarty_results = call_user_func_array($_output_filter[0], array($_smarty_results, &$this));
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if ($this->caching) {
    •

  •             $_params = array('tpl_file' => $resource_name,
    •

  •                         'cache_id' => $cache_id,
    •

  •                         'compile_id' => $compile_id,
    •

  •                         'results' => $_smarty_results);
    •

  •             require_once(SMARTY_CORE_DIR . 'core.write_cache_file.php');
    •

  •             smarty_core_write_cache_file($_params, $this);
    •

  •             require_once(SMARTY_CORE_DIR . 'core.process_cached_inserts.php');
    •

  •             $_smarty_results = smarty_core_process_cached_inserts($_params, $this);
    •

  •
    •

  •             if ($this->_cache_serials) {
    •

  •                 // strip nocache-tags from output
    •

  •                 $_smarty_results = preg_replace('!(\{/?nocache\:[0-9a-f]{32}#\d+\})!s'
    •

  •                                                 ,''
    •

  •                                                 ,$_smarty_results);
    •

  •             }
    •

  •             // restore initial cache_info
    •

  •             $this->_cache_info = array_pop($_cache_info);
    •

  •         }
    •

  •         $this->_cache_including = $_cache_including;
    •

  •
    •

  •         if ($display) {
    •

  •             if (isset($_smarty_results)) { echo $_smarty_results; }
    •

  •             if ($this->debugging) {
    •

  •                 // capture time for debugging info
    •

  •                 $_params = array();
    •

  •                 require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
    •

  •                 $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = (smarty_core_get_microtime($_params, $this) - $_debug_start_time);
    •

  •                 require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');
    •

  •                 echo smarty_core_display_debug_console($_params, $this);
    •

  •             }
    •

  •             error_reporting($_smarty_old_error_level);
    •

  •             return;
    •

  •         } else {
    •

  •             error_reporting($_smarty_old_error_level);
    •

  •             if (isset($_smarty_results)) { return $_smarty_results; }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * load configuration values
    •

  •      *
    •

  •      * @param string $file
    •

  •      * @param string $section
    •

  •      * @param string $scope
    •

  •      */
    •

  •     function config_load($file, $section = null, $scope = 'global')
    •

  •     {
    •

  •         require_once($this->_get_plugin_filepath('function', 'config_load'));
    •

  •         smarty_function_config_load(array('file' => $file, 'section' => $section, 'scope' => $scope), $this);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * return a reference to a registered object
    •

  •      *
    •

  •      * @param string $name
    •

  •      * @return object
    •

  •      */
    •

  •     function &get_registered_object($name) {
    •

  •         if (!isset($this->_reg_objects[$name]))
    •

  •         $this->_trigger_fatal_error("'$name' is not a registered object");
    •

  •
    •

  •         if (!is_object($this->_reg_objects[$name][0]))
    •

  •         $this->_trigger_fatal_error("registered '$name' is not an object");
    •

  •
    •

  •         return $this->_reg_objects[$name][0];
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * clear configuration values
    •

  •      *
    •

  •      * @param string $var
    •

  •      */
    •

  •     function clear_config($var = null)
    •

  •     {
    •

  •         if(!isset($var)) {
    •

  •             // clear all values
    •

  •             $this->_config = array(array('vars'  => array(),
    •

  •                                          'files' => array()));
    •

  •         } else {
    •

  •             unset($this->_config[0]['vars'][$var]);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get filepath of requested plugin
    •

  •      *
    •

  •      * @param string $type
    •

  •      * @param string $name
    •

  •      * @return string|false
    •

  •      */
    •

  •     function _get_plugin_filepath($type, $name)
    •

  •     {
    •

  •         $_params = array('type' => $type, 'name' => $name);
    •

  •         require_once(SMARTY_CORE_DIR . 'core.assemble_plugin_filepath.php');
    •

  •         return smarty_core_assemble_plugin_filepath($_params, $this);
    •

  •     }
    •

  •
    •

  •    /**
    •

  •      * test if resource needs compiling
    •

  •      *
    •

  •      * @param string $resource_name
    •

  •      * @param string $compile_path
    •

  •      * @return boolean
    •

  •      */
    •

  •     function _is_compiled($resource_name, $compile_path)
    •

  •     {
    •

  •         if (!$this->force_compile && file_exists($compile_path)) {
    •

  •             if (!$this->compile_check) {
    •

  •                 // no need to check compiled file
    •

  •                 return true;
    •

  •             } else {
    •

  •                 // get file source and timestamp
    •

  •                 $_params = array('resource_name' => $resource_name, 'get_source'=>false);
    •

  •                 if (!$this->_fetch_resource_info($_params)) {
    •

  •                     return false;
    •

  •                 }
    •

  •                 if ($_params['resource_timestamp'] <= filemtime($compile_path)) {
    •

  •                     // template not expired, no recompile
    •

  •                     return true;
    •

  •                 } else {
    •

  •                     // compile template
    •

  •                     return false;
    •

  •                 }
    •

  •             }
    •

  •         } else {
    •

  •             // compiled template does not exist, or forced compile
    •

  •             return false;
    •

  •         }
    •

  •     }
    •

  •
    •

  •    /**
    •

  •      * compile the template
    •

  •      *
    •

  •      * @param string $resource_name
    •

  •      * @param string $compile_path
    •

  •      * @return boolean
    •

  •      */
    •

  •     function _compile_resource($resource_name, $compile_path)
    •

  •     {
    •

  •
    •

  •         $_params = array('resource_name' => $resource_name);
    •

  •         if (!$this->_fetch_resource_info($_params)) {
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         $_source_content = $_params['source_content'];
    •

  •         $_cache_include    = substr($compile_path, 0, -4).'.inc';
    •

  •
    •

  •         if ($this->_compile_source($resource_name, $_source_content, $_compiled_content, $_cache_include)) {
    •

  •             // if a _cache_serial was set, we also have to write an include-file:
    •

  •             if ($this->_cache_include_info) {
    •

  •                 require_once(SMARTY_CORE_DIR . 'core.write_compiled_include.php');
    •

  •                 smarty_core_write_compiled_include(array_merge($this->_cache_include_info, array('compiled_content'=>$_compiled_content, 'resource_name'=>$resource_name)),  $this);
    •

  •             }
    •

  •
    •

  •             $_params = array('compile_path'=>$compile_path, 'compiled_content' => $_compiled_content);
    •

  •             require_once(SMARTY_CORE_DIR . 'core.write_compiled_resource.php');
    •

  •             smarty_core_write_compiled_resource($_params, $this);
    •

  •
    •

  •             return true;
    •

  •         } else {
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •     }
    •

  •
    •

  •    /**
    •

  •      * compile the given source
    •

  •      *
    •

  •      * @param string $resource_name
    •

  •      * @param string $source_content
    •

  •      * @param string $compiled_content
    •

  •      * @return boolean
    •

  •      */
    •

  •     function _compile_source($resource_name, &$source_content, &$compiled_content, $cache_include_path=null)
    •

  •     {
    •

  •         if (file_exists(SMARTY_DIR . $this->compiler_file)) {
    •

  •             require_once(SMARTY_DIR . $this->compiler_file);
    •

  •         } else {
    •

  •             // use include_path
    •

  •             require_once($this->compiler_file);
    •

  •         }
    •

  •
    •

  •
    •

  •         $smarty_compiler = new $this->compiler_class;
    •

  •
    •

  •         $smarty_compiler->template_dir      = $this->template_dir;
    •

  •         $smarty_compiler->compile_dir       = $this->compile_dir;
    •

  •         $smarty_compiler->plugins_dir       = $this->plugins_dir;
    •

  •         $smarty_compiler->config_dir        = $this->config_dir;
    •

  •         $smarty_compiler->force_compile     = $this->force_compile;
    •

  •         $smarty_compiler->caching           = $this->caching;
    •

  •         $smarty_compiler->php_handling      = $this->php_handling;
    •

  •         $smarty_compiler->left_delimiter    = $this->left_delimiter;
    •

  •         $smarty_compiler->right_delimiter   = $this->right_delimiter;
    •

  •         $smarty_compiler->_version          = $this->_version;
    •

  •         $smarty_compiler->security          = $this->security;
    •

  •         $smarty_compiler->secure_dir        = $this->secure_dir;
    •

  •         $smarty_compiler->security_settings = $this->security_settings;
    •

  •         $smarty_compiler->trusted_dir       = $this->trusted_dir;
    •

  •         $smarty_compiler->use_sub_dirs      = $this->use_sub_dirs;
    •

  •         $smarty_compiler->_reg_objects      = &$this->_reg_objects;
    •

  •         $smarty_compiler->_plugins          = &$this->_plugins;
    •

  •         $smarty_compiler->_tpl_vars         = &$this->_tpl_vars;
    •

  •         $smarty_compiler->default_modifiers = $this->default_modifiers;
    •

  •         $smarty_compiler->compile_id        = $this->_compile_id;
    •

  •         $smarty_compiler->_config            = $this->_config;
    •

  •         $smarty_compiler->request_use_auto_globals  = $this->request_use_auto_globals;
    •

  •
    •

  •         if (isset($cache_include_path) && isset($this->_cache_serials[$cache_include_path])) {
    •

  •             $smarty_compiler->_cache_serial = $this->_cache_serials[$cache_include_path];
    •

  •         }
    •

  •         $smarty_compiler->_cache_include = $cache_include_path;
    •

  •
    •

  •
    •

  •         $_results = $smarty_compiler->_compile_file($resource_name, $source_content, $compiled_content);
    •

  •
    •

  •         if ($smarty_compiler->_cache_serial) {
    •

  •             $this->_cache_include_info = array(
    •

  •                 'cache_serial'=>$smarty_compiler->_cache_serial
    •

  •                 ,'plugins_code'=>$smarty_compiler->_plugins_code
    •

  •                 ,'include_file_path' => $cache_include_path);
    •

  •
    •

  •         } else {
    •

  •             $this->_cache_include_info = null;
    •

  •
    •

  •         }
    •

  •
    •

  •         return $_results;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get the compile path for this resource
    •

  •      *
    •

  •      * @param string $resource_name
    •

  •      * @return string results of {@link _get_auto_filename()}
    •

  •      */
    •

  •     function _get_compile_path($resource_name)
    •

  •     {
    •

  •         return $this->_get_auto_filename($this->compile_dir, $resource_name,
    •

  •                                          $this->_compile_id) . '.php';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * fetch the template info. Gets timestamp, and source
    •

  •      * if get_source is true
    •

  •      *
    •

  •      * sets $source_content to the source of the template, and
    •

  •      * $resource_timestamp to its time stamp
    •

  •      * @param string $resource_name
    •

  •      * @param string $source_content
    •

  •      * @param integer $resource_timestamp
    •

  •      * @param boolean $get_source
    •

  •      * @param boolean $quiet
    •

  •      * @return boolean
    •

  •      */
    •

  •
    •

  •     function _fetch_resource_info(&$params)
    •

  •     {
    •

  •         if(!isset($params['get_source'])) { $params['get_source'] = true; }
    •

  •         if(!isset($params['quiet'])) { $params['quiet'] = false; }
    •

  •
    •

  •         $_return = false;
    •

  •         $_params = array('resource_name' => $params['resource_name']) ;
    •

  •         if (isset($params['resource_base_path']))
    •

  •             $_params['resource_base_path'] = $params['resource_base_path'];
    •

  •         else
    •

  •             $_params['resource_base_path'] = $this->template_dir;
    •

  •
    •

  •         if ($this->_parse_resource_name($_params)) {
    •

  •             $_resource_type = $_params['resource_type'];
    •

  •             $_resource_name = $_params['resource_name'];
    •

  •             switch ($_resource_type) {
    •

  •                 case 'file':
    •

  •                     if ($params['get_source']) {
    •

  •                         $params['source_content'] = $this->_read_file($_resource_name);
    •

  •                     }
    •

  •                     $params['resource_timestamp'] = filemtime($_resource_name);
    •

  •                     $_return = is_file($_resource_name);
    •

  •                     break;
    •

  •
    •

  •                 default:
    •

  •                     // call resource functions to fetch the template source and timestamp
    •

  •                     if ($params['get_source']) {
    •

  •                         $_source_return = isset($this->_plugins['resource'][$_resource_type]) &&
    •

  •                             call_user_func_array($this->_plugins['resource'][$_resource_type][0][0],
    •

  •                                                  array($_resource_name, &$params['source_content'], &$this));
    •

  •                     } else {
    •

  •                         $_source_return = true;
    •

  •                     }
    •

  •
    •

  •                     $_timestamp_return = isset($this->_plugins['resource'][$_resource_type]) &&
    •

  •                         call_user_func_array($this->_plugins['resource'][$_resource_type][0][1],
    •

  •                                              array($_resource_name, &$params['resource_timestamp'], &$this));
    •

  •
    •

  •                     $_return = $_source_return && $_timestamp_return;
    •

  •                     break;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if (!$_return) {
    •

  •             // see if we can get a template with the default template handler
    •

  •             if (!empty($this->default_template_handler_func)) {
    •

  •                 if (!is_callable($this->default_template_handler_func)) {
    •

  •                     $this->trigger_error("default template handler function \"$this->default_template_handler_func\" doesn't exist.");
    •

  •                 } else {
    •

  •                     $_return = call_user_func_array(
    •

  •                         $this->default_template_handler_func,
    •

  •                         array($_params['resource_type'], $_params['resource_name'], &$params['source_content'], &$params['resource_timestamp'], &$this));
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if (!$_return) {
    •

  •             if (!$params['quiet']) {
    •

  •                 $this->trigger_error('unable to read resource: "' . $params['resource_name'] . '"');
    •

  •             }
    •

  •         } else if ($_return && $this->security) {
    •

  •             require_once(SMARTY_CORE_DIR . 'core.is_secure.php');
    •

  •             if (!smarty_core_is_secure($_params, $this)) {
    •

  •                 if (!$params['quiet'])
    •

  •                     $this->trigger_error('(secure mode) accessing "' . $params['resource_name'] . '" is not allowed');
    •

  •                 $params['source_content'] = null;
    •

  •                 $params['resource_timestamp'] = null;
    •

  •                 return false;
    •

  •             }
    •

  •         }
    •

  •         return $_return;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * parse out the type and name from the resource
    •

  •      *
    •

  •      * @param string $resource_base_path
    •

  •      * @param string $resource_name
    •

  •      * @param string $resource_type
    •

  •      * @param string $resource_name
    •

  •      * @return boolean
    •

  •      */
    •

  •
    •

  •     function _parse_resource_name(&$params)
    •

  •     {
    •

  •
    •

  •         // split tpl_path by the first colon
    •

  •         $_resource_name_parts = explode(':', $params['resource_name'], 2);
    •

  •
    •

  •         if (count($_resource_name_parts) == 1) {
    •

  •             // no resource type given
    •

  •             $params['resource_type'] = $this->default_resource_type;
    •

  •             $params['resource_name'] = $_resource_name_parts[0];
    •

  •         } else {
    •

  •             if(strlen($_resource_name_parts[0]) == 1) {
    •

  •                 // 1 char is not resource type, but part of filepath
    •

  •                 $params['resource_type'] = $this->default_resource_type;
    •

  •                 $params['resource_name'] = $params['resource_name'];
    •

  •             } else {
    •

  •                 $params['resource_type'] = $_resource_name_parts[0];
    •

  •                 $params['resource_name'] = $_resource_name_parts[1];
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if ($params['resource_type'] == 'file') {
    •

  •             if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $params['resource_name'])) {
    •

  •                 // relative pathname to $params['resource_base_path']
    •

  •                 // use the first directory where the file is found
    •

  •                 foreach ((array)$params['resource_base_path'] as $_curr_path) {
    •

  •                     $_fullpath = $_curr_path . DIRECTORY_SEPARATOR . $params['resource_name'];
    •

  •                     if (file_exists($_fullpath) && is_file($_fullpath)) {
    •

  •                         $params['resource_name'] = $_fullpath;
    •

  •                         return true;
    •

  •                     }
    •

  •                     // didn't find the file, try include_path
    •

  •                     $_params = array('file_path' => $_fullpath);
    •

  •                     require_once(SMARTY_CORE_DIR . 'core.get_include_path.php');
    •

  •                     if(smarty_core_get_include_path($_params, $this)) {
    •

  •                         $params['resource_name'] = $_params['new_file_path'];
    •

  •                         return true;
    •

  •                     }
    •

  •                 }
    •

  •                 return false;
    •

  •             } else {
    •

  •                 /* absolute path */
    •

  •                 return file_exists($params['resource_name']);
    •

  •             }
    •

  •         } elseif (empty($this->_plugins['resource'][$params['resource_type']])) {
    •

  •             $_params = array('type' => $params['resource_type']);
    •

  •             require_once(SMARTY_CORE_DIR . 'core.load_resource_plugin.php');
    •

  •             smarty_core_load_resource_plugin($_params, $this);
    •

  •         }
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Handle modifiers
    •

  •      *
    •

  •      * @param string|null$modifier_name
    •

  •      * @param array|null$map_array
    •

  •      * @return string result of modifiers
    •

  •      */
    •

  •     function _run_mod_handler()
    •

  •     {
    •

  •         $_args = func_get_args();
    •

  •         list($_modifier_name, $_map_array) = array_splice($_args, 0, 2);
    •

  •         list($_func_name, $_tpl_file, $_tpl_line) =
    •

  •             $this->_plugins['modifier'][$_modifier_name];
    •

  •
    •

  •         $_var = $_args[0];
    •

  •         foreach ($_var as $_key => $_val) {
    •

  •             $_args[0] = $_val;
    •

  •             $_var[$_key] = call_user_func_array($_func_name, $_args);
    •

  •         }
    •

  •         return $_var;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Remove starting and ending quotes from the string
    •

  •      *
    •

  •      * @param string $string
    •

  •      * @return string
    •

  •      */
    •

  •     function _dequote($string)
    •

  •     {
    •

  •         if ((substr($string, 0, 1) == "'" || substr($string, 0, 1) == '"') &&
    •

  •             substr($string, -1) == substr($string, 0, 1))
    •

  •             return substr($string, 1, -1);
    •

  •         else
    •

  •             return $string;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * read in a file
    •

  •      *
    •

  •      * @param string $filename
    •

  •      * @return string
    •

  •      */
    •

  •     function _read_file($filename)
    •

  •     {
    •

  •         if ( file_exists($filename) && ($fd = @fopen($filename, 'rb')) ) {
    •

  •             $contents = '';
    •

  •             while (!feof($fd)) {
    •

  •                 $contents .= fread($fd, 8192);
    •

  •             }
    •

  •             fclose($fd);
    •

  •             return $contents;
    •

  •         } else {
    •

  •             return false;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * get a concrete filename for automagically created content
    •

  •      *
    •

  •      * @param string $auto_base
    •

  •      * @param string $auto_source
    •

  •      * @param string $auto_id
    •

  •      * @return string
    •

  •      * @staticvar string|null
    •

  •      * @staticvar string|null
    •

  •      */
    •

  •     function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null)
    •

  •     {
    •

  •         $_compile_dir_sep =  $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^';
    •

  •         $_return = $auto_base . DIRECTORY_SEPARATOR;
    •

  •
    •

  •         if(isset($auto_id)) {
    •

  •             // make auto_id safe for directory names
    •

  •             $auto_id = str_replace('%7C',$_compile_dir_sep,(urlencode($auto_id)));
    •

  •             // split into separate directories
    •

  •             $_return .= $auto_id . $_compile_dir_sep;
    •

  •         }
    •

  •
    •

  •         if(isset($auto_source)) {
    •

  •             // make source name safe for filename
    •

  •             $_filename = urlencode(basename($auto_source));
    •

  •             $_crc32 = sprintf('%08X', crc32($auto_source));
    •

  •             // prepend %% to avoid name conflicts with
    •

  •             // with $params['auto_id'] names
    •

  •             $_crc32 = substr($_crc32, 0, 2) . $_compile_dir_sep .
    •

  •                       substr($_crc32, 0, 3) . $_compile_dir_sep . $_crc32;
    •

  •             $_return .= '%%' . $_crc32 . '%%' . $_filename;
    •

  •         }
    •

  •
    •

  •         return $_return;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * unlink a file, possibly using expiration time
    •

  •      *
    •

  •      * @param string $resource
    •

  •      * @param integer $exp_time
    •

  •      */
    •

  •     function _unlink($resource, $exp_time = null)
    •

  •     {
    •

  •         if(isset($exp_time)) {
    •

  •             if(time() - @filemtime($resource) >= $exp_time) {
    •

  •                 return @unlink($resource);
    •

  •             }
    •

  •         } else {
    •

  •             return @unlink($resource);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * returns an auto_id for auto-file-functions
    •

  •      *
    •

  •      * @param string $cache_id
    •

  •      * @param string $compile_id
    •

  •      * @return string|null
    •

  •      */
    •

  •     function _get_auto_id($cache_id=null, $compile_id=null) {
    •

  •     if (isset($cache_id))
    •

  •         return (isset($compile_id)) ? $cache_id . '|' . $compile_id  : $cache_id;
    •

  •     elseif(isset($compile_id))
    •

  •         return $compile_id;
    •

  •     else
    •

  •         return null;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * trigger Smarty plugin error
    •

  •      *
    •

  •      * @param string $error_msg
    •

  •      * @param string $tpl_file
    •

  •      * @param integer $tpl_line
    •

  •      * @param string $file
    •

  •      * @param integer $line
    •

  •      * @param integer $error_type
    •

  •      */
    •

  •     function _trigger_fatal_error($error_msg, $tpl_file = null, $tpl_line = null,
    •

  •             $file = null, $line = null, $error_type = E_USER_ERROR)
    •

  •     {
    •

  •         if(isset($file) && isset($line)) {
    •

  •             $info = ' ('.basename($file).", line $line)";
    •

  •         } else {
    •

  •             $info = '';
    •

  •         }
    •

  •         if (isset($tpl_line) && isset($tpl_file)) {
    •

  •             $this->trigger_error('[in ' . $tpl_file . ' line ' . $tpl_line . "]: $error_msg$info", $error_type);
    •

  •         } else {
    •

  •             $this->trigger_error($error_msg . $info, $error_type);
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * callback function for preg_replace, to call a non-cacheable block
    •

  •      * @return string
    •

  •      */
    •

  •     function _process_compiled_include_callback($match) {
    •

  •         $_func = '_smarty_tplfunc_'.$match[2].'_'.$match[3];
    •

  •         ob_start();
    •

  •         $_func($this);
    •

  •         $_ret = ob_get_contents();
    •

  •         ob_end_clean();
    •

  •         return $_ret;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * called for included templates
    •

  •      *
    •

  •      * @param string $_smarty_include_tpl_file
    •

  •      * @param string $_smarty_include_vars
    •

  •      */
    •

  •
    •

  •     // $_smarty_include_tpl_file, $_smarty_include_vars
    •

  •
    •

  •     function _smarty_include($params)
    •

  •     {
    •

  •         if ($this->debugging) {
    •

  •             $_params = array();
    •

  •             require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
    •

  •             $debug_start_time = smarty_core_get_microtime($_params, $this);
    •

  •             $this->_smarty_debug_info[] = array('type'      => 'template',
    •

  •                                                   'filename'  => $params['smarty_include_tpl_file'],
    •

  •                                                   'depth'     => ++$this->_inclusion_depth);
    •

  •             $included_tpls_idx = count($this->_smarty_debug_info) - 1;
    •

  •         }
    •

  •
    •

  •         $this->_tpl_vars = array_merge($this->_tpl_vars, $params['smarty_include_vars']);
    •

  •
    •

  •         // config vars are treated as local, so push a copy of the
    •

  •         // current ones onto the front of the stack
    •

  •         array_unshift($this->_config, $this->_config[0]);
    •

  •
    •

  •         $_smarty_compile_path = $this->_get_compile_path($params['smarty_include_tpl_file']);
    •

  •
    •

  •
    •

  •         if ($this->_is_compiled($params['smarty_include_tpl_file'], $_smarty_compile_path)
    •

  •             || $this->_compile_resource($params['smarty_include_tpl_file'], $_smarty_compile_path))
    •

  •         {
    •

  •             include($_smarty_compile_path);
    •

  •         }
    •

  •
    •

  •         // pop the local vars off the front of the stack
    •

  •         array_shift($this->_config);
    •

  •
    •

  •         $this->_inclusion_depth--;
    •

  •
    •

  •         if ($this->debugging) {
    •

  •             // capture time for debugging info
    •

  •             $_params = array();
    •

  •             require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
    •

  •             $this->_smarty_debug_info[$included_tpls_idx]['exec_time'] = smarty_core_get_microtime($_params, $this) - $debug_start_time;
    •

  •         }
    •

  •
    •

  •         if ($this->caching) {
    •

  •             $this->_cache_info['template'][$params['smarty_include_tpl_file']] = true;
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * get or set an array of cached attributes for function that is
    •

  •      * not cacheable
    •

  •      * @return array
    •

  •      */
    •

  •     function &_smarty_cache_attrs($cache_serial, $count) {
    •

  •         $_cache_attrs =& $this->_cache_info['cache_attrs'][$cache_serial][$count];
    •

  •
    •

  •         if ($this->_cache_including) {
    •

  •             /* return next set of cache_attrs */
    •

  •             $_return = current($_cache_attrs);
    •

  •             next($_cache_attrs);
    •

  •             return $_return;
    •

  •
    •

  •         } else {
    •

  •             /* add a reference to a new set of cache_attrs */
    •

  •             $_cache_attrs[] = array();
    •

  •             return $_cache_attrs[count($_cache_attrs)-1];
    •

  •
    •

  •         }
    •

  •
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * wrapper for include() retaining $this
    •

  •      * @return mixed
    •

  •      */
    •

  •     function _include($filename, $once=false, $params=null)
    •

  •     {
    •

  •         if ($once) {
    •

  •             return include_once($filename);
    •

  •         } else {
    •

  •             return include($filename);
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * wrapper for eval() retaining $this
    •

  •      * @return mixed
    •

  •      */
    •

  •     function _eval($code, $params=null)
    •

  •     {
    •

  •         return eval($code);
    •

  •     }
    •

  •     /**#@-*/
    •

  •
    •

  • }
    •

  •
    •

  • /* vim: set expandtab: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:32 +0200 by phpDocumentor 1.4.0a2


File Source for Smarty_Compiler.class.php

Source for file Smarty_Compiler.class.php

Documentation is available at Smarty_Compiler.class.php

  • <?php
    •

  •
    •

  • /**
    •

  •  * Project:     Smarty: the PHP compiling template engine
    •

  •  * File:        Smarty_Compiler.class.php
    •

  •  *
    •

  •  * 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 (at your option) 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
    •

  •  *
    •

  •  * @link http://smarty.php.net/
    •

  •  * @author Monte Ohrt <monte at ohrt dot com>
    •

  •  * @author Andrei Zmievski <andrei@php.net>
    •

  •  * @version 2.6.18
    •

  •  * @copyright 2001-2005 New Digital Group, Inc.
    •

  •  * @package Smarty
    •

  •  */
    •

  •
    •

  • /* $Id: Smarty_Compiler.class.php 942 2007-08-05 15:12:39Z dugris $ */
    •

  •
    •

  • /**
    •

  •  * Template compiling class
    •

  •  * @package Smarty
    •

  •  */
    •

  • class Smarty_Compiler extends Smarty {
    •

  •
    •

  •     // internal vars
    •

  •     /**#@+
    •

  •      * @access private
    •

  •      */
    •

  •     var $_folded_blocks         =   array();    // keeps folded template blocks
    •

  •     var $_current_file          =   null;       // the current template being compiled
    •

  •     var $_current_line_no       =   1;          // line number for error messages
    •

  •     var $_capture_stack         =   array();    // keeps track of nested capture buffers
    •

  •     var $_plugin_info           =   array();    // keeps track of plugins to load
    •

  •     var $_init_smarty_vars      =   false;
    •

  •     var $_permitted_tokens      =   array('true','false','yes','no','on','off','null');
    •

  •     var $_db_qstr_regexp        =   null;        // regexps are setup in the constructor
    •

  •     var $_si_qstr_regexp        =   null;
    •

  •     var $_qstr_regexp           =   null;
    •

  •     var $_func_regexp           =   null;
    •

  •     var $_reg_obj_regexp        =   null;
    •

  •     var $_var_bracket_regexp    =   null;
    •

  •     var $_num_const_regexp      =   null;
    •

  •     var $_dvar_guts_regexp      =   null;
    •

  •     var $_dvar_regexp           =   null;
    •

  •     var $_cvar_regexp           =   null;
    •

  •     var $_svar_regexp           =   null;
    •

  •     var $_avar_regexp           =   null;
    •

  •     var $_mod_regexp            =   null;
    •

  •     var $_var_regexp            =   null;
    •

  •     var $_parenth_param_regexp  =   null;
    •

  •     var $_func_call_regexp      =   null;
    •

  •     var $_obj_ext_regexp        =   null;
    •

  •     var $_obj_start_regexp      =   null;
    •

  •     var $_obj_params_regexp     =   null;
    •

  •     var $_obj_call_regexp       =   null;
    •

  •     var $_cacheable_state       =   0;
    •

  •     var $_cache_attrs_count     =   0;
    •

  •     var $_nocache_count         =   0;
    •

  •     var $_cache_serial          =   null;
    •

  •     var $_cache_include         =   null;
    •

  •
    •

  •     var $_strip_depth           =   0;
    •

  •     var $_additional_newline    =   "\n";
    •

  •
    •

  •     /**#@-*/
    •

  •     /**
    •

  •      * The class constructor.
    •

  •      */
    •

  •     function Smarty_Compiler()
    •

  •     {
    •

  •         // matches double quoted strings:
    •

  •         // "foobar"
    •

  •         // "foo\"bar"
    •

  •         $this->_db_qstr_regexp = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"';
    •

  •
    •

  •         // matches single quoted strings:
    •

  •         // 'foobar'
    •

  •         // 'foo\'bar'
    •

  •         $this->_si_qstr_regexp = '\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'';
    •

  •
    •

  •         // matches single or double quoted strings
    •

  •         $this->_qstr_regexp = '(?:' . $this->_db_qstr_regexp . '|' . $this->_si_qstr_regexp . ')';
    •

  •
    •

  •         // matches bracket portion of vars
    •

  •         // [0]
    •

  •         // [foo]
    •

  •         // [$bar]
    •

  •         $this->_var_bracket_regexp = '\[\$?[\w\.]+\]';
    •

  •
    •

  •         // matches numerical constants
    •

  •         // 30
    •

  •         // -12
    •

  •         // 13.22
    •

  •         $this->_num_const_regexp = '(?:\-?\d+(?:\.\d+)?)';
    •

  •
    •

  •         // matches $ vars (not objects):
    •

  •         // $foo
    •

  •         // $foo.bar
    •

  •         // $foo.bar.foobar
    •

  •         // $foo[0]
    •

  •         // $foo[$bar]
    •

  •         // $foo[5][blah]
    •

  •         // $foo[5].bar[$foobar][4]
    •

  •         $this->_dvar_math_regexp = '(?:[\+\*\/\%]|(?:-(?!>)))';
    •

  •         $this->_dvar_math_var_regexp = '[\$\w\.\+\-\*\/\%\d\>\[\]]';
    •

  •         $this->_dvar_guts_regexp = '\w+(?:' . $this->_var_bracket_regexp
    •

  •                 . ')*(?:\.\$?\w+(?:' . $this->_var_bracket_regexp . ')*)*(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?';
    •

  •         $this->_dvar_regexp = '\$' . $this->_dvar_guts_regexp;
    •

  •
    •

  •         // matches config vars:
    •

  •         // #foo#
    •

  •         // #foobar123_foo#
    •

  •         $this->_cvar_regexp = '\#\w+\#';
    •

  •
    •

  •         // matches section vars:
    •

  •         // %foo.bar%
    •

  •         $this->_svar_regexp = '\%\w+\.\w+\%';
    •

  •
    •

  •         // matches all valid variables (no quotes, no modifiers)
    •

  •         $this->_avar_regexp = '(?:' . $this->_dvar_regexp . '|'
    •

  •            . $this->_cvar_regexp . '|' . $this->_svar_regexp . ')';
    •

  •
    •

  •         // matches valid variable syntax:
    •

  •         // $foo
    •

  •         // $foo
    •

  •         // #foo#
    •

  •         // #foo#
    •

  •         // "text"
    •

  •         // "text"
    •

  •         $this->_var_regexp = '(?:' . $this->_avar_regexp . '|' . $this->_qstr_regexp . ')';
    •

  •
    •

  •         // matches valid object call (one level of object nesting allowed in parameters):
    •

  •         // $foo->bar
    •

  •         // $foo->bar()
    •

  •         // $foo->bar("text")
    •

  •         // $foo->bar($foo, $bar, "text")
    •

  •         // $foo->bar($foo, "foo")
    •

  •         // $foo->bar->foo()
    •

  •         // $foo->bar->foo->bar()
    •

  •         // $foo->bar($foo->bar)
    •

  •         // $foo->bar($foo->bar())
    •

  •         // $foo->bar($foo->bar($blah,$foo,44,"foo",$foo[0].bar))
    •

  •         $this->_obj_ext_regexp = '\->(?:\$?' . $this->_dvar_guts_regexp . ')';
    •

  •         $this->_obj_restricted_param_regexp = '(?:'
    •

  •                 . '(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')(?:' . $this->_obj_ext_regexp . '(?:\((?:(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')'
    •

  •                 . '(?:\s*,\s*(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . '))*)?\))?)*)';
    •

  •         $this->_obj_single_param_regexp = '(?:\w+|' . $this->_obj_restricted_param_regexp . '(?:\s*,\s*(?:(?:\w+|'
    •

  •                 . $this->_var_regexp . $this->_obj_restricted_param_regexp . ')))*)';
    •

  •         $this->_obj_params_regexp = '\((?:' . $this->_obj_single_param_regexp
    •

  •                 . '(?:\s*,\s*' . $this->_obj_single_param_regexp . ')*)?\)';
    •

  •         $this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)';
    •

  •         $this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)';
    •

  •
    •

  •         // matches valid modifier syntax:
    •

  •         // |foo
    •

  •         // |@foo
    •

  •         // |foo:"bar"
    •

  •         // |foo:$bar
    •

  •         // |foo:"bar":$foobar
    •

  •         // |foo|bar
    •

  •         // |foo:$foo->bar
    •

  •         $this->_mod_regexp = '(?:\|@?\w+(?::(?:\w+|' . $this->_num_const_regexp . '|'
    •

  •            . $this->_obj_call_regexp . '|' . $this->_avar_regexp . '|' . $this->_qstr_regexp .'))*)';
    •

  •
    •

  •         // matches valid function name:
    •

  •         // foo123
    •

  •         // _foo_bar
    •

  •         $this->_func_regexp = '[a-zA-Z_]\w*';
    •

  •
    •

  •         // matches valid registered object:
    •

  •         // foo->bar
    •

  •         $this->_reg_obj_regexp = '[a-zA-Z_]\w*->[a-zA-Z_]\w*';
    •

  •
    •

  •         // matches valid parameter values:
    •

  •         // true
    •

  •         // $foo
    •

  •         // $foo|bar
    •

  •         // #foo#
    •

  •         // #foo#|bar
    •

  •         // "text"
    •

  •         // "text"|bar
    •

  •         // $foo->bar
    •

  •         $this->_param_regexp = '(?:\s*(?:' . $this->_obj_call_regexp . '|'
    •

  •            . $this->_var_regexp . '|' . $this->_num_const_regexp  . '|\w+)(?>' . $this->_mod_regexp . '*)\s*)';
    •

  •
    •

  •         // matches valid parenthesised function parameters:
    •

  •         //
    •

  •         // "text"
    •

  •         //    $foo, $bar, "text"
    •

  •         // $foo|bar, "foo"|bar, $foo->bar($foo)|bar
    •

  •         $this->_parenth_param_regexp = '(?:\((?:\w+|'
    •

  •                 . $this->_param_regexp . '(?:\s*,\s*(?:(?:\w+|'
    •

  •                 . $this->_param_regexp . ')))*)?\))';
    •

  •
    •

  •         // matches valid function call:
    •

  •         // foo()
    •

  •         // foo_bar($foo)
    •

  •         // _foo_bar($foo,"bar")
    •

  •         // foo123($foo,$foo->bar(),"foo")
    •

  •         $this->_func_call_regexp = '(?:' . $this->_func_regexp . '\s*(?:'
    •

  •            . $this->_parenth_param_regexp . '))';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * compile a resource
    •

  •      *
    •

  •      * sets $compiled_content to the compiled source
    •

  •      * @param string $resource_name
    •

  •      * @param string $source_content
    •

  •      * @param string $compiled_content
    •

  •      * @return true
    •

  •      */
    •

  •     function _compile_file($resource_name, $source_content, &$compiled_content)
    •

  •     {
    •

  •
    •

  •         if ($this->security) {
    •

  •             // do not allow php syntax to be executed unless specified
    •

  •             if ($this->php_handling == SMARTY_PHP_ALLOW &&
    •

  •                 !$this->security_settings['PHP_HANDLING']) {
    •

  •                 $this->php_handling = SMARTY_PHP_PASSTHRU;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         $this->_load_filters();
    •

  •
    •

  •         $this->_current_file = $resource_name;
    •

  •         $this->_current_line_no = 1;
    •

  •         $ldq = preg_quote($this->left_delimiter, '~');
    •

  •         $rdq = preg_quote($this->right_delimiter, '~');
    •

  •
    •

  •         // run template source through prefilter functions
    •

  •         if (count($this->_plugins['prefilter']) > 0) {
    •

  •             foreach ($this->_plugins['prefilter'] as $filter_name => $prefilter) {
    •

  •                 if ($prefilter === false) continue;
    •

  •                 if ($prefilter[3] || is_callable($prefilter[0])) {
    •

  •                     $source_content = call_user_func_array($prefilter[0],
    •

  •                                                             array($source_content, &$this));
    •

  •                     $this->_plugins['prefilter'][$filter_name][3] = true;
    •

  •                 } else {
    •

  •                     $this->_trigger_fatal_error("[plugin] prefilter '$filter_name' is not implemented");
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •
    •

  •         /* fetch all special blocks */
    •

  •         $search = "~{$ldq}\*(.*?)\*{$rdq}|{$ldq}\s*literal\s*{$rdq}(.*?){$ldq}\s*/literal\s*{$rdq}|{$ldq}\s*php\s*{$rdq}(.*?){$ldq}\s*/php\s*{$rdq}~s";
    •

  •
    •

  •         preg_match_all($search, $source_content, $match,  PREG_SET_ORDER);
    •

  •         $this->_folded_blocks = $match;
    •

  •         reset($this->_folded_blocks);
    •

  •
    •

  •         /* replace special blocks by "{php}" */
    •

  •         $source_content = preg_replace($search.'e', "'"
    •

  •                                        . $this->_quote_replace($this->left_delimiter) . 'php'
    •

  •                                        . "' . str_repeat(\"\n\", substr_count('\\0', \"\n\")) .'"
    •

  •                                        . $this->_quote_replace($this->right_delimiter)
    •

  •                                        . "'"
    •

  •                                        , $source_content);
    •

  •
    •

  •         /* Gather all template tags. */
    •

  •         preg_match_all("~{$ldq}\s*(.*?)\s*{$rdq}~s", $source_content, $_match);
    •

  •         $template_tags = $_match[1];
    •

  •         /* Split content by template tags to obtain non-template content. */
    •

  •         $text_blocks = preg_split("~{$ldq}.*?{$rdq}~s", $source_content);
    •

  •
    •

  •         /* loop through text blocks */
    •

  •         for ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb < $for_max; $curr_tb++) {
    •

  •             /* match anything resembling php tags */
    •

  •             if (preg_match_all('~(<\?(?:\w+|=)?|\?>|language\s*=\s*[\"\']?\s*php\s*[\"\']?)~is', $text_blocks[$curr_tb], $sp_match)) {
    •

  •                 /* replace tags with placeholders to prevent recursive replacements */
    •

  •                 $sp_match[1] = array_unique($sp_match[1]);
    •

  •                 usort($sp_match[1], '_smarty_sort_length');
    •

  •                 for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {
    •

  •                     $text_blocks[$curr_tb] = str_replace($sp_match[1][$curr_sp],'%%%SMARTYSP'.$curr_sp.'%%%',$text_blocks[$curr_tb]);
    •

  •                 }
    •

  •                 /* process each one */
    •

  •                 for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {
    •

  •                     if ($this->php_handling == SMARTY_PHP_PASSTHRU) {
    •

  •                         /* echo php contents */
    •

  •                         $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '<?php echo \''.str_replace("'", "\'", $sp_match[1][$curr_sp]).'\'; ?>'."\n", $text_blocks[$curr_tb]);
    •

  •                     } else if ($this->php_handling == SMARTY_PHP_QUOTE) {
    •

  •                         /* quote php tags */
    •

  •                         $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', htmlspecialchars($sp_match[1][$curr_sp]), $text_blocks[$curr_tb]);
    •

  •                     } else if ($this->php_handling == SMARTY_PHP_REMOVE) {
    •

  •                         /* remove php tags */
    •

  •                         $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '', $text_blocks[$curr_tb]);
    •

  •                     } else {
    •

  •                         /* SMARTY_PHP_ALLOW, but echo non php starting tags */
    •

  •                         $sp_match[1][$curr_sp] = preg_replace('~(<\?(?!php|=|$))~i', '<?php echo \'\\1\'?>'."\n", $sp_match[1][$curr_sp]);
    •

  •                         $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', $sp_match[1][$curr_sp], $text_blocks[$curr_tb]);
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •
    •

  •         /* Compile the template tags into PHP code. */
    •

  •         $compiled_tags = array();
    •

  •         for ($i = 0, $for_max = count($template_tags); $i < $for_max; $i++) {
    •

  •             $this->_current_line_no += substr_count($text_blocks[$i], "\n");
    •

  •             $compiled_tags[] = $this->_compile_tag($template_tags[$i]);
    •

  •             $this->_current_line_no += substr_count($template_tags[$i], "\n");
    •

  •         }
    •

  •         if (count($this->_tag_stack)>0) {
    •

  •             list($_open_tag, $_line_no) = end($this->_tag_stack);
    •

  •             $this->_syntax_error("unclosed tag \{$_open_tag} (opened line $_line_no).", E_USER_ERROR, __FILE__, __LINE__);
    •

  •             return;
    •

  •         }
    •

  •
    •

  •         /* Reformat $text_blocks between 'strip' and '/strip' tags,
    •

  •            removing spaces, tabs and newlines. */
    •

  •         $strip = false;
    •

  •         for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; $i++) {
    •

  •             if ($compiled_tags[$i] == '{strip}') {
    •

  •                 $compiled_tags[$i] = '';
    •

  •                 $strip = true;
    •

  •                 /* remove leading whitespaces */
    •

  •                 $text_blocks[$i + 1] = ltrim($text_blocks[$i + 1]);
    •

  •             }
    •

  •             if ($strip) {
    •

  •                 /* strip all $text_blocks before the next '/strip' */
    •

  •                 for ($j = $i + 1; $j < $for_max; $j++) {
    •

  •                     /* remove leading and trailing whitespaces of each line */
    •

  •                     $text_blocks[$j] = preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $text_blocks[$j]);
    •

  •                     if ($compiled_tags[$j] == '{/strip}') {
    •

  •                         /* remove trailing whitespaces from the last text_block */
    •

  •                         $text_blocks[$j] = rtrim($text_blocks[$j]);
    •

  •                     }
    •

  •                     $text_blocks[$j] = "<?php echo '" . strtr($text_blocks[$j], array("'"=>"\'", "\\"=>"\\\\")) . "'; ?>";
    •

  •                     if ($compiled_tags[$j] == '{/strip}') {
    •

  •                         $compiled_tags[$j] = "\n"; /* slurped by php, but necessary
    •

  •                                     if a newline is following the closing strip-tag */
    •

  •                         $strip = false;
    •

  •                         $i = $j;
    •

  •                         break;
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         $compiled_content = '';
    •

  •
    •

  •         $tag_guard = '%%%SMARTYOTG' . md5(uniqid(rand(), true)) . '%%%';
    •

  •
    •

  •         /* Interleave the compiled contents and text blocks to get the final result. */
    •

  •         for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; $i++) {
    •

  •             if ($compiled_tags[$i] == '') {
    •

  •                 // tag result empty, remove first newline from following text block
    •

  •                 $text_blocks[$i+1] = preg_replace('~^(\r\n|\r|\n)~', '', $text_blocks[$i+1]);
    •

  •             }
    •

  •             // replace legit PHP tags with placeholder
    •

  •             $text_blocks[$i] = str_replace('<?', $tag_guard, $text_blocks[$i]);
    •

  •             $compiled_tags[$i] = str_replace('<?', $tag_guard, $compiled_tags[$i]);
    •

  •
    •

  •             $compiled_content .= $text_blocks[$i] . $compiled_tags[$i];
    •

  •         }
    •

  •         $compiled_content .= str_replace('<?', $tag_guard, $text_blocks[$i]);
    •

  •
    •

  •         // escape php tags created by interleaving
    •

  •         $compiled_content = str_replace('<?', "<?php echo '<?' ?>\n", $compiled_content);
    •

  •         $compiled_content = preg_replace("~(?<!')language\s*=\s*[\"\']?\s*php\s*[\"\']?~", "<?php echo 'language=php' ?>\n", $compiled_content);
    •

  •
    •

  •         // recover legit tags
    •

  •         $compiled_content = str_replace($tag_guard, '<?', $compiled_content);
    •

  •
    •

  •         // remove \n from the end of the file, if any
    •

  •         if (strlen($compiled_content) && (substr($compiled_content, -1) == "\n") ) {
    •

  •             $compiled_content = substr($compiled_content, 0, -1);
    •

  •         }
    •

  •
    •

  •         if (!empty($this->_cache_serial)) {
    •

  •             $compiled_content = "<?php \$this->_cache_serials['".$this->_cache_include."'] = '".$this->_cache_serial."'; ?>" . $compiled_content;
    •

  •         }
    •

  •
    •

  •         // run compiled template through postfilter functions
    •

  •         if (count($this->_plugins['postfilter']) > 0) {
    •

  •             foreach ($this->_plugins['postfilter'] as $filter_name => $postfilter) {
    •

  •                 if ($postfilter === false) continue;
    •

  •                 if ($postfilter[3] || is_callable($postfilter[0])) {
    •

  •                     $compiled_content = call_user_func_array($postfilter[0],
    •

  •                                                               array($compiled_content, &$this));
    •

  •                     $this->_plugins['postfilter'][$filter_name][3] = true;
    •

  •                 } else {
    •

  •                     $this->_trigger_fatal_error("Smarty plugin error: postfilter '$filter_name' is not implemented");
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •
    •

  •         // put header at the top of the compiled template
    •

  •         $template_header = "<?php /* Smarty version ".$this->_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n";
    •

  •         $template_header .= "         compiled from ".strtr(urlencode($resource_name), array('%2F'=>'/', '%3A'=>':'))." */ ?>\n";
    •

  •
    •

  •         /* Emit code to load needed plugins. */
    •

  •         $this->_plugins_code = '';
    •

  •         if (count($this->_plugin_info)) {
    •

  •             $_plugins_params = "array('plugins' => array(";
    •

  •             foreach ($this->_plugin_info as $plugin_type => $plugins) {
    •

  •                 foreach ($plugins as $plugin_name => $plugin_info) {
    •

  •                     $_plugins_params .= "array('$plugin_type', '$plugin_name', '" . strtr($plugin_info[0], array("'" => "\\'", "\\" => "\\\\")) . "', $plugin_info[1], ";
    •

  •                     $_plugins_params .= $plugin_info[2] ? 'true),' : 'false),';
    •

  •                 }
    •

  •             }
    •

  •             $_plugins_params .= '))';
    •

  •             $plugins_code = "<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');\nsmarty_core_load_plugins($_plugins_params, \$this); ?>\n";
    •

  •             $template_header .= $plugins_code;
    •

  •             $this->_plugin_info = array();
    •

  •             $this->_plugins_code = $plugins_code;
    •

  •         }
    •

  •
    •

  •         if ($this->_init_smarty_vars) {
    •

  •             $template_header .= "<?php require_once(SMARTY_CORE_DIR . 'core.assign_smarty_interface.php');\nsmarty_core_assign_smarty_interface(null, \$this); ?>\n";
    •

  •             $this->_init_smarty_vars = false;
    •

  •         }
    •

  •
    •

  •         $compiled_content = $template_header . $compiled_content;
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Compile a template tag
    •

  •      *
    •

  •      * @param string $template_tag
    •

  •      * @return string
    •

  •      */
    •

  •     function _compile_tag($template_tag)
    •

  •     {
    •

  •         /* Matched comment. */
    •

  •         if (substr($template_tag, 0, 1) == '*' && substr($template_tag, -1) == '*')
    •

  •             return '';
    •

  •
    •

  •         /* Split tag into two three parts: command, command modifiers and the arguments. */
    •

  •         if(! preg_match('~^(?:(' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_var_regexp
    •

  •                 . '|\/?' . $this->_reg_obj_regexp . '|\/?' . $this->_func_regexp . ')(' . $this->_mod_regexp . '*))
    •

  •                       (?:\s+(.*))?$
    •

  •                     ~xs', $template_tag, $match)) {
    •

  •             $this->_syntax_error("unrecognized tag: $template_tag", E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •
    •

  •         $tag_command = $match[1];
    •

  •         $tag_modifier = isset($match[2]) ? $match[2] : null;
    •

  •         $tag_args = isset($match[3]) ? $match[3] : null;
    •

  •
    •

  •         if (preg_match('~^' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '$~', $tag_command)) {
    •

  •             /* tag name is a variable or object */
    •

  •             $_return = $this->_parse_var_props($tag_command . $tag_modifier);
    •

  •             return "<?php echo $_return; ?>" . $this->_additional_newline;
    •

  •         }
    •

  •
    •

  •         /* If the tag name is a registered object, we process it. */
    •

  •         if (preg_match('~^\/?' . $this->_reg_obj_regexp . '$~', $tag_command)) {
    •

  •             return $this->_compile_registered_object_tag($tag_command, $this->_parse_attrs($tag_args), $tag_modifier);
    •

  •         }
    •

  •
    •

  •         switch ($tag_command) {
    •

  •             case 'include':
    •

  •                 return $this->_compile_include_tag($tag_args);
    •

  •
    •

  •             case 'include_php':
    •

  •                 return $this->_compile_include_php_tag($tag_args);
    •

  •
    •

  •             case 'if':
    •

  •                 $this->_push_tag('if');
    •

  •                 return $this->_compile_if_tag($tag_args);
    •

  •
    •

  •             case 'else':
    •

  •                 list($_open_tag) = end($this->_tag_stack);
    •

  •                 if ($_open_tag != 'if' && $_open_tag != 'elseif')
    •

  •                     $this->_syntax_error('unexpected {else}', E_USER_ERROR, __FILE__, __LINE__);
    •

  •                 else
    •

  •                     $this->_push_tag('else');
    •

  •                 return '<?php else: ?>';
    •

  •
    •

  •             case 'elseif':
    •

  •                 list($_open_tag) = end($this->_tag_stack);
    •

  •                 if ($_open_tag != 'if' && $_open_tag != 'elseif')
    •

  •                     $this->_syntax_error('unexpected {elseif}', E_USER_ERROR, __FILE__, __LINE__);
    •

  •                 if ($_open_tag == 'if')
    •

  •                     $this->_push_tag('elseif');
    •

  •                 return $this->_compile_if_tag($tag_args, true);
    •

  •
    •

  •             case '/if':
    •

  •                 $this->_pop_tag('if');
    •

  •                 return '<?php endif; ?>';
    •

  •
    •

  •             case 'capture':
    •

  •                 return $this->_compile_capture_tag(true, $tag_args);
    •

  •
    •

  •             case '/capture':
    •

  •                 return $this->_compile_capture_tag(false);
    •

  •
    •

  •             case 'ldelim':
    •

  •                 return $this->left_delimiter;
    •

  •
    •

  •             case 'rdelim':
    •

  •                 return $this->right_delimiter;
    •

  •
    •

  •             case 'section':
    •

  •                 $this->_push_tag('section');
    •

  •                 return $this->_compile_section_start($tag_args);
    •

  •
    •

  •             case 'sectionelse':
    •

  •                 $this->_push_tag('sectionelse');
    •

  •                 return "<?php endfor; else: ?>";
    •

  •                 break;
    •

  •
    •

  •             case '/section':
    •

  •                 $_open_tag = $this->_pop_tag('section');
    •

  •                 if ($_open_tag == 'sectionelse')
    •

  •                     return "<?php endif; ?>";
    •

  •                 else
    •

  •                     return "<?php endfor; endif; ?>";
    •

  •
    •

  •             case 'foreach':
    •

  •                 $this->_push_tag('foreach');
    •

  •                 return $this->_compile_foreach_start($tag_args);
    •

  •                 break;
    •

  •
    •

  •             case 'foreachelse':
    •

  •                 $this->_push_tag('foreachelse');
    •

  •                 return "<?php endforeach; else: ?>";
    •

  •
    •

  •             case '/foreach':
    •

  •                 $_open_tag = $this->_pop_tag('foreach');
    •

  •                 if ($_open_tag == 'foreachelse')
    •

  •                     return "<?php endif; unset(\$_from); ?>";
    •

  •                 else
    •

  •                     return "<?php endforeach; endif; unset(\$_from); ?>";
    •

  •                 break;
    •

  •
    •

  •             case 'strip':
    •

  •             case '/strip':
    •

  •                 if (substr($tag_command, 0, 1)=='/') {
    •

  •                     $this->_pop_tag('strip');
    •

  •                     if (--$this->_strip_depth==0) { /* outermost closing {/strip} */
    •

  •                         $this->_additional_newline = "\n";
    •

  •                         return '{' . $tag_command . '}';
    •

  •                     }
    •

  •                 } else {
    •

  •                     $this->_push_tag('strip');
    •

  •                     if ($this->_strip_depth++==0) { /* outermost opening {strip} */
    •

  •                         $this->_additional_newline = "";
    •

  •                         return '{' . $tag_command . '}';
    •

  •                     }
    •

  •                 }
    •

  •                 return '';
    •

  •
    •

  •             case 'php':
    •

  •                 /* handle folded tags replaced by {php} */
    •

  •                 list(, $block) = each($this->_folded_blocks);
    •

  •                 $this->_current_line_no += substr_count($block[0], "\n");
    •

  •                 /* the number of matched elements in the regexp in _compile_file()
    •

  •                    determins the type of folded tag that was found */
    •

  •                 switch (count($block)) {
    •

  •                     case 2: /* comment */
    •

  •                         return '';
    •

  •
    •

  •                     case 3: /* literal */
    •

  •                         return "<?php echo '" . strtr($block[2], array("'"=>"\'", "\\"=>"\\\\")) . "'; ?>" . $this->_additional_newline;
    •

  •
    •

  •                     case 4: /* php */
    •

  •                         if ($this->security && !$this->security_settings['PHP_TAGS']) {
    •

  •                             $this->_syntax_error("(secure mode) php tags not permitted", E_USER_WARNING, __FILE__, __LINE__);
    •

  •                             return;
    •

  •                         }
    •

  •                         return '<?php ' . $block[3] .' ?>';
    •

  •                 }
    •

  •                 break;
    •

  •
    •

  •             case 'insert':
    •

  •                 return $this->_compile_insert_tag($tag_args);
    •

  •
    •

  •             default:
    •

  •                 if ($this->_compile_compiler_tag($tag_command, $tag_args, $output)) {
    •

  •                     return $output;
    •

  •                 } else if ($this->_compile_block_tag($tag_command, $tag_args, $tag_modifier, $output)) {
    •

  •                     return $output;
    •

  •                 } else if ($this->_compile_custom_tag($tag_command, $tag_args, $tag_modifier, $output)) {
    •

  •                     return $output;
    •

  •                 } else {
    •

  •                     $this->_syntax_error("unrecognized tag '$tag_command'", E_USER_ERROR, __FILE__, __LINE__);
    •

  •                 }
    •

  •
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * compile the custom compiler tag
    •

  •      *
    •

  •      * sets $output to the compiled custom compiler tag
    •

  •      * @param string $tag_command
    •

  •      * @param string $tag_args
    •

  •      * @param string $output
    •

  •      * @return boolean
    •

  •      */
    •

  •     function _compile_compiler_tag($tag_command, $tag_args, &$output)
    •

  •     {
    •

  •         $found = false;
    •

  •         $have_function = true;
    •

  •
    •

  •         /*
    •

  •          * First we check if the compiler function has already been registered
    •

  •          * or loaded from a plugin file.
    •

  •          */
    •

  •         if (isset($this->_plugins['compiler'][$tag_command])) {
    •

  •             $found = true;
    •

  •             $plugin_func = $this->_plugins['compiler'][$tag_command][0];
    •

  •             if (!is_callable($plugin_func)) {
    •

  •                 $message = "compiler function '$tag_command' is not implemented";
    •

  •                 $have_function = false;
    •

  •             }
    •

  •         }
    •

  •         /*
    •

  •          * Otherwise we need to load plugin file and look for the function
    •

  •          * inside it.
    •

  •          */
    •

  •         else if ($plugin_file = $this->_get_plugin_filepath('compiler', $tag_command)) {
    •

  •             $found = true;
    •

  •
    •

  •             include_once $plugin_file;
    •

  •
    •

  •             $plugin_func = 'smarty_compiler_' . $tag_command;
    •

  •             if (!is_callable($plugin_func)) {
    •

  •                 $message = "plugin function $plugin_func() not found in $plugin_file\n";
    •

  •                 $have_function = false;
    •

  •             } else {
    •

  •                 $this->_plugins['compiler'][$tag_command] = array($plugin_func, null, null, null, true);
    •

  •             }
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          * True return value means that we either found a plugin or a
    •

  •          * dynamically registered function. False means that we didn't and the
    •

  •          * compiler should now emit code to load custom function plugin for this
    •

  •          * tag.
    •

  •          */
    •

  •         if ($found) {
    •

  •             if ($have_function) {
    •

  •                 $output = call_user_func_array($plugin_func, array($tag_args, &$this));
    •

  •                 if($output != '') {
    •

  •                 $output = '<?php ' . $this->_push_cacheable_state('compiler', $tag_command)
    •

  •                                    . $output
    •

  •                                    . $this->_pop_cacheable_state('compiler', $tag_command) . ' ?>';
    •

  •                 }
    •

  •             } else {
    •

  •                 $this->_syntax_error($message, E_USER_WARNING, __FILE__, __LINE__);
    •

  •             }
    •

  •             return true;
    •

  •         } else {
    •

  •             return false;
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * compile block function tag
    •

  •      *
    •

  •      * sets $output to compiled block function tag
    •

  •      * @param string $tag_command
    •

  •      * @param string $tag_args
    •

  •      * @param string $tag_modifier
    •

  •      * @param string $output
    •

  •      * @return boolean
    •

  •      */
    •

  •     function _compile_block_tag($tag_command, $tag_args, $tag_modifier, &$output)
    •

  •     {
    •

  •         if (substr($tag_command, 0, 1) == '/') {
    •

  •             $start_tag = false;
    •

  •             $tag_command = substr($tag_command, 1);
    •

  •         } else
    •

  •             $start_tag = true;
    •

  •
    •

  •         $found = false;
    •

  •         $have_function = true;
    •

  •
    •

  •         /*
    •

  •          * First we check if the block function has already been registered
    •

  •          * or loaded from a plugin file.
    •

  •          */
    •

  •         if (isset($this->_plugins['block'][$tag_command])) {
    •

  •             $found = true;
    •

  •             $plugin_func = $this->_plugins['block'][$tag_command][0];
    •

  •             if (!is_callable($plugin_func)) {
    •

  •                 $message = "block function '$tag_command' is not implemented";
    •

  •                 $have_function = false;
    •

  •             }
    •

  •         }
    •

  •         /*
    •

  •          * Otherwise we need to load plugin file and look for the function
    •

  •          * inside it.
    •

  •          */
    •

  •         else if ($plugin_file = $this->_get_plugin_filepath('block', $tag_command)) {
    •

  •             $found = true;
    •

  •
    •

  •             include_once $plugin_file;
    •

  •
    •

  •             $plugin_func = 'smarty_block_' . $tag_command;
    •

  •             if (!function_exists($plugin_func)) {
    •

  •                 $message = "plugin function $plugin_func() not found in $plugin_file\n";
    •

  •                 $have_function = false;
    •

  •             } else {
    •

  •                 $this->_plugins['block'][$tag_command] = array($plugin_func, null, null, null, true);
    •

  •
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if (!$found) {
    •

  •             return false;
    •

  •         } else if (!$have_function) {
    •

  •             $this->_syntax_error($message, E_USER_WARNING, __FILE__, __LINE__);
    •

  •             return true;
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          * Even though we've located the plugin function, compilation
    •

  •          * happens only once, so the plugin will still need to be loaded
    •

  •          * at runtime for future requests.
    •

  •          */
    •

  •         $this->_add_plugin('block', $tag_command);
    •

  •
    •

  •         if ($start_tag)
    •

  •             $this->_push_tag($tag_command);
    •

  •         else
    •

  •             $this->_pop_tag($tag_command);
    •

  •
    •

  •         if ($start_tag) {
    •

  •             $output = '<?php ' . $this->_push_cacheable_state('block', $tag_command);
    •

  •             $attrs = $this->_parse_attrs($tag_args);
    •

  •             $_cache_attrs='';
    •

  •             $arg_list = $this->_compile_arg_list('block', $tag_command, $attrs, $_cache_attrs);
    •

  •             $output .= "$_cache_attrs\$this->_tag_stack[] = array('$tag_command', array(".implode(',', $arg_list).')); ';
    •

  •             $output .= '$_block_repeat=true;' . $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);';
    •

  •             $output .= 'while ($_block_repeat) { ob_start(); ?>';
    •

  •         } else {
    •

  •             $output = '<?php $_block_content = ob_get_contents(); ob_end_clean(); ';
    •

  •             $_out_tag_text = $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat)';
    •

  •             if ($tag_modifier != '') {
    •

  •                 $this->_parse_modifiers($_out_tag_text, $tag_modifier);
    •

  •             }
    •

  •             $output .= '$_block_repeat=false;echo ' . $_out_tag_text . '; } ';
    •

  •             $output .= " array_pop(\$this->_tag_stack); " . $this->_pop_cacheable_state('block', $tag_command) . '?>';
    •

  •         }
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * compile custom function tag
    •

  •      *
    •

  •      * @param string $tag_command
    •

  •      * @param string $tag_args
    •

  •      * @param string $tag_modifier
    •

  •      * @return string
    •

  •      */
    •

  •     function _compile_custom_tag($tag_command, $tag_args, $tag_modifier, &$output)
    •

  •     {
    •

  •         $found = false;
    •

  •         $have_function = true;
    •

  •
    •

  •         /*
    •

  •          * First we check if the custom function has already been registered
    •

  •          * or loaded from a plugin file.
    •

  •          */
    •

  •         if (isset($this->_plugins['function'][$tag_command])) {
    •

  •             $found = true;
    •

  •             $plugin_func = $this->_plugins['function'][$tag_command][0];
    •

  •             if (!is_callable($plugin_func)) {
    •

  •                 $message = "custom function '$tag_command' is not implemented";
    •

  •                 $have_function = false;
    •

  •             }
    •

  •         }
    •

  •         /*
    •

  •          * Otherwise we need to load plugin file and look for the function
    •

  •          * inside it.
    •

  •          */
    •

  •         else if ($plugin_file = $this->_get_plugin_filepath('function', $tag_command)) {
    •

  •             $found = true;
    •

  •
    •

  •             include_once $plugin_file;
    •

  •
    •

  •             $plugin_func = 'smarty_function_' . $tag_command;
    •

  •             if (!function_exists($plugin_func)) {
    •

  •                 $message = "plugin function $plugin_func() not found in $plugin_file\n";
    •

  •                 $have_function = false;
    •

  •             } else {
    •

  •                 $this->_plugins['function'][$tag_command] = array($plugin_func, null, null, null, true);
    •

  •
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if (!$found) {
    •

  •             return false;
    •

  •         } else if (!$have_function) {
    •

  •             $this->_syntax_error($message, E_USER_WARNING, __FILE__, __LINE__);
    •

  •             return true;
    •

  •         }
    •

  •
    •

  •         /* declare plugin to be loaded on display of the template that
    •

  •            we compile right now */
    •

  •         $this->_add_plugin('function', $tag_command);
    •

  •
    •

  •         $_cacheable_state = $this->_push_cacheable_state('function', $tag_command);
    •

  •         $attrs = $this->_parse_attrs($tag_args);
    •

  •         $_cache_attrs = '';
    •

  •         $arg_list = $this->_compile_arg_list('function', $tag_command, $attrs, $_cache_attrs);
    •

  •
    •

  •         $output = $this->_compile_plugin_call('function', $tag_command).'(array('.implode(',', $arg_list)."), \$this)";
    •

  •         if($tag_modifier != '') {
    •

  •             $this->_parse_modifiers($output, $tag_modifier);
    •

  •         }
    •

  •
    •

  •         if($output != '') {
    •

  •             $output =  '<?php ' . $_cacheable_state . $_cache_attrs . 'echo ' . $output . ';'
    •

  •                 . $this->_pop_cacheable_state('function', $tag_command) . "?>" . $this->_additional_newline;
    •

  •         }
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * compile a registered object tag
    •

  •      *
    •

  •      * @param string $tag_command
    •

  •      * @param array $attrs
    •

  •      * @param string $tag_modifier
    •

  •      * @return string
    •

  •      */
    •

  •     function _compile_registered_object_tag($tag_command, $attrs, $tag_modifier)
    •

  •     {
    •

  •         if (substr($tag_command, 0, 1) == '/') {
    •

  •             $start_tag = false;
    •

  •             $tag_command = substr($tag_command, 1);
    •

  •         } else {
    •

  •             $start_tag = true;
    •

  •         }
    •

  •
    •

  •         list($object, $obj_comp) = explode('->', $tag_command);
    •

  •
    •

  •         $arg_list = array();
    •

  •         if(count($attrs)) {
    •

  •             $_assign_var = false;
    •

  •             foreach ($attrs as $arg_name => $arg_value) {
    •

  •                 if($arg_name == 'assign') {
    •

  •                     $_assign_var = $arg_value;
    •

  •                     unset($attrs['assign']);
    •

  •                     continue;
    •

  •                 }
    •

  •                 if (is_bool($arg_value))
    •

  •                     $arg_value = $arg_value ? 'true' : 'false';
    •

  •                 $arg_list[] = "'$arg_name' => $arg_value";
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if($this->_reg_objects[$object][2]) {
    •

  •             // smarty object argument format
    •

  •             $args = "array(".implode(',', (array)$arg_list)."), \$this";
    •

  •         } else {
    •

  •             // traditional argument format
    •

  •             $args = implode(',', array_values($attrs));
    •

  •             if (empty($args)) {
    •

  •                 $args = 'null';
    •

  •             }
    •

  •         }
    •

  •
    •

  •         $prefix = '';
    •

  •         $postfix = '';
    •

  •         $newline = '';
    •

  •         if(!is_object($this->_reg_objects[$object][0])) {
    •

  •             $this->_trigger_fatal_error("registered '$object' is not an object" , $this->_current_file, $this->_current_line_no, __FILE__, __LINE__);
    •

  •         } elseif(!empty($this->_reg_objects[$object][1]) && !in_array($obj_comp, $this->_reg_objects[$object][1])) {
    •

  •             $this->_trigger_fatal_error("'$obj_comp' is not a registered component of object '$object'", $this->_current_file, $this->_current_line_no, __FILE__, __LINE__);
    •

  •         } elseif(method_exists($this->_reg_objects[$object][0], $obj_comp)) {
    •

  •             // method
    •

  •             if(in_array($obj_comp, $this->_reg_objects[$object][3])) {
    •

  •                 // block method
    •

  •                 if ($start_tag) {
    •

  •                     $prefix = "\$this->_tag_stack[] = array('$obj_comp', $args); ";
    •

  •                     $prefix .= "\$_block_repeat=true; \$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], null, \$this, \$_block_repeat); ";
    •

  •                     $prefix .= "while (\$_block_repeat) { ob_start();";
    •

  •                     $return = null;
    •

  •                     $postfix = '';
    •

  •                 } else {
    •

  •                     $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); \$_block_repeat=false;";
    •

  •                     $return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)";
    •

  •                     $postfix = "} array_pop(\$this->_tag_stack);";
    •

  •                 }
    •

  •             } else {
    •

  •                 // non-block method
    •

  •                 $return = "\$this->_reg_objects['$object'][0]->$obj_comp($args)";
    •

  •             }
    •

  •         } else {
    •

  •             // property
    •

  •             $return = "\$this->_reg_objects['$object'][0]->$obj_comp";
    •

  •         }
    •

  •
    •

  •         if($return != null) {
    •

  •             if($tag_modifier != '') {
    •

  •                 $this->_parse_modifiers($return, $tag_modifier);
    •

  •             }
    •

  •
    •

  •             if(!empty($_assign_var)) {
    •

  •                 $output = "\$this->assign('" . $this->_dequote($_assign_var) ."',  $return);";
    •

  •             } else {
    •

  •                 $output = 'echo ' . $return . ';';
    •

  •                 $newline = $this->_additional_newline;
    •

  •             }
    •

  •         } else {
    •

  •             $output = '';
    •

  •         }
    •

  •
    •

  •         return '<?php ' . $prefix . $output . $postfix . "?>" . $newline;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Compile {insert ...} tag
    •

  •      *
    •

  •      * @param string $tag_args
    •

  •      * @return string
    •

  •      */
    •

  •     function _compile_insert_tag($tag_args)
    •

  •     {
    •

  •         $attrs = $this->_parse_attrs($tag_args);
    •

  •         $name = $this->_dequote($attrs['name']);
    •

  •
    •

  •         if (empty($name)) {
    •

  •             return $this->_syntax_error("missing insert name", E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •
    •

  •         if (!preg_match('~^\w+$~', $name)) {
    •

  •             return $this->_syntax_error("'insert: 'name' must be an insert function name", E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •
    •

  •         if (!empty($attrs['script'])) {
    •

  •             $delayed_loading = true;
    •

  •         } else {
    •

  •             $delayed_loading = false;
    •

  •         }
    •

  •
    •

  •         foreach ($attrs as $arg_name => $arg_value) {
    •

  •             if (is_bool($arg_value))
    •

  •                 $arg_value = $arg_value ? 'true' : 'false';
    •

  •             $arg_list[] = "'$arg_name' => $arg_value";
    •

  •         }
    •

  •
    •

  •         $this->_add_plugin('insert', $name, $delayed_loading);
    •

  •
    •

  •         $_params = "array('args' => array(".implode(', ', (array)$arg_list)."))";
    •

  •
    •

  •         return "<?php require_once(SMARTY_CORE_DIR . 'core.run_insert_handler.php');\necho smarty_core_run_insert_handler($_params, \$this); ?>" . $this->_additional_newline;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Compile {include ...} tag
    •

  •      *
    •

  •      * @param string $tag_args
    •

  •      * @return string
    •

  •      */
    •

  •     function _compile_include_tag($tag_args)
    •

  •     {
    •

  •         $attrs = $this->_parse_attrs($tag_args);
    •

  •         $arg_list = array();
    •

  •
    •

  •         if (empty($attrs['file'])) {
    •

  •             $this->_syntax_error("missing 'file' attribute in include tag", E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •
    •

  •         foreach ($attrs as $arg_name => $arg_value) {
    •

  •             if ($arg_name == 'file') {
    •

  •                 $include_file = $arg_value;
    •

  •                 continue;
    •

  •             } else if ($arg_name == 'assign') {
    •

  •                 $assign_var = $arg_value;
    •

  •                 continue;
    •

  •             }
    •

  •             if (is_bool($arg_value))
    •

  •                 $arg_value = $arg_value ? 'true' : 'false';
    •

  •             $arg_list[] = "'$arg_name' => $arg_value";
    •

  •         }
    •

  •
    •

  •         $output = '<?php ';
    •

  •
    •

  •         if (isset($assign_var)) {
    •

  •             $output .= "ob_start();\n";
    •

  •         }
    •

  •
    •

  •         $output .=
    •

  •             "\$_smarty_tpl_vars = \$this->_tpl_vars;\n";
    •

  •
    •

  •
    •

  •         $_params = "array('smarty_include_tpl_file' => " . $include_file . ", 'smarty_include_vars' => array(".implode(',', (array)$arg_list)."))";
    •

  •         $output .= "\$this->_smarty_include($_params);\n" .
    •

  •         "\$this->_tpl_vars = \$_smarty_tpl_vars;\n" .
    •

  •         "unset(\$_smarty_tpl_vars);\n";
    •

  •
    •

  •         if (isset($assign_var)) {
    •

  •             $output .= "\$this->assign(" . $assign_var . ", ob_get_contents()); ob_end_clean();\n";
    •

  •         }
    •

  •
    •

  •         $output .= ' ?>';
    •

  •
    •

  •         return $output;
    •

  •
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Compile {include ...} tag
    •

  •      *
    •

  •      * @param string $tag_args
    •

  •      * @return string
    •

  •      */
    •

  •     function _compile_include_php_tag($tag_args)
    •

  •     {
    •

  •         $attrs = $this->_parse_attrs($tag_args);
    •

  •
    •

  •         if (empty($attrs['file'])) {
    •

  •             $this->_syntax_error("missing 'file' attribute in include_php tag", E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •
    •

  •         $assign_var = (empty($attrs['assign'])) ? '' : $this->_dequote($attrs['assign']);
    •

  •         $once_var = (empty($attrs['once']) || $attrs['once']=='false') ? 'false' : 'true';
    •

  •
    •

  •         $arg_list = array();
    •

  •         foreach($attrs as $arg_name => $arg_value) {
    •

  •             if($arg_name != 'file' AND $arg_name != 'once' AND $arg_name != 'assign') {
    •

  •                 if(is_bool($arg_value))
    •

  •                     $arg_value = $arg_value ? 'true' : 'false';
    •

  •                 $arg_list[] = "'$arg_name' => $arg_value";
    •

  •             }
    •

  •         }
    •

  •
    •

  •         $_params = "array('smarty_file' => " . $attrs['file'] . ", 'smarty_assign' => '$assign_var', 'smarty_once' => $once_var, 'smarty_include_vars' => array(".implode(',', $arg_list)."))";
    •

  •
    •

  •         return "<?php require_once(SMARTY_CORE_DIR . 'core.smarty_include_php.php');\nsmarty_core_smarty_include_php($_params, \$this); ?>" . $this->_additional_newline;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Compile {section ...} tag
    •

  •      *
    •

  •      * @param string $tag_args
    •

  •      * @return string
    •

  •      */
    •

  •     function _compile_section_start($tag_args)
    •

  •     {
    •

  •         $attrs = $this->_parse_attrs($tag_args);
    •

  •         $arg_list = array();
    •

  •
    •

  •         $output = '<?php ';
    •

  •         $section_name = $attrs['name'];
    •

  •         if (empty($section_name)) {
    •

  •             $this->_syntax_error("missing section name", E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •
    •

  •         $output .= "unset(\$this->_sections[$section_name]);\n";
    •

  •         $section_props = "\$this->_sections[$section_name]";
    •

  •
    •

  •         foreach ($attrs as $attr_name => $attr_value) {
    •

  •             switch ($attr_name) {
    •

  •                 case 'loop':
    •

  •                     $output .= "{$section_props}['loop'] = is_array(\$_loop=$attr_value) ? count(\$_loop) : max(0, (int)\$_loop); unset(\$_loop);\n";
    •

  •                     break;
    •

  •
    •

  •                 case 'show':
    •

  •                     if (is_bool($attr_value))
    •

  •                         $show_attr_value = $attr_value ? 'true' : 'false';
    •

  •                     else
    •

  •                         $show_attr_value = "(bool)$attr_value";
    •

  •                     $output .= "{$section_props}['show'] = $show_attr_value;\n";
    •

  •                     break;
    •

  •
    •

  •                 case 'name':
    •

  •                     $output .= "{$section_props}['$attr_name'] = $attr_value;\n";
    •

  •                     break;
    •

  •
    •

  •                 case 'max':
    •

  •                 case 'start':
    •

  •                     $output .= "{$section_props}['$attr_name'] = (int)$attr_value;\n";
    •

  •                     break;
    •

  •
    •

  •                 case 'step':
    •

  •                     $output .= "{$section_props}['$attr_name'] = ((int)$attr_value) == 0 ? 1 : (int)$attr_value;\n";
    •

  •                     break;
    •

  •
    •

  •                 default:
    •

  •                     $this->_syntax_error("unknown section attribute - '$attr_name'", E_USER_ERROR, __FILE__, __LINE__);
    •

  •                     break;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if (!isset($attrs['show']))
    •

  •             $output .= "{$section_props}['show'] = true;\n";
    •

  •
    •

  •         if (!isset($attrs['loop']))
    •

  •             $output .= "{$section_props}['loop'] = 1;\n";
    •

  •
    •

  •         if (!isset($attrs['max']))
    •

  •             $output .= "{$section_props}['max'] = {$section_props}['loop'];\n";
    •

  •         else
    •

  •             $output .= "if ({$section_props}['max'] < 0)\n" .
    •

  •                        "    {$section_props}['max'] = {$section_props}['loop'];\n";
    •

  •
    •

  •         if (!isset($attrs['step']))
    •

  •             $output .= "{$section_props}['step'] = 1;\n";
    •

  •
    •

  •         if (!isset($attrs['start']))
    •

  •             $output .= "{$section_props}['start'] = {$section_props}['step'] > 0 ? 0 : {$section_props}['loop']-1;\n";
    •

  •         else {
    •

  •             $output .= "if ({$section_props}['start'] < 0)\n" .
    •

  •                        "    {$section_props}['start'] = max({$section_props}['step'] > 0 ? 0 : -1, {$section_props}['loop'] + {$section_props}['start']);\n" .
    •

  •                        "else\n" .
    •

  •                        "    {$section_props}['start'] = min({$section_props}['start'], {$section_props}['step'] > 0 ? {$section_props}['loop'] : {$section_props}['loop']-1);\n";
    •

  •         }
    •

  •
    •

  •         $output .= "if ({$section_props}['show']) {\n";
    •

  •         if (!isset($attrs['start']) && !isset($attrs['step']) && !isset($attrs['max'])) {
    •

  •             $output .= "    {$section_props}['total'] = {$section_props}['loop'];\n";
    •

  •         } else {
    •

  •             $output .= "    {$section_props}['total'] = min(ceil(({$section_props}['step'] > 0 ? {$section_props}['loop'] - {$section_props}['start'] : {$section_props}['start']+1)/abs({$section_props}['step'])), {$section_props}['max']);\n";
    •

  •         }
    •

  •         $output .= "    if ({$section_props}['total'] == 0)\n" .
    •

  •                    "        {$section_props}['show'] = false;\n" .
    •

  •                    "} else\n" .
    •

  •                    "    {$section_props}['total'] = 0;\n";
    •

  •
    •

  •         $output .= "if ({$section_props}['show']):\n";
    •

  •         $output .= "
    •

  •             for ({$section_props}['index'] = {$section_props}['start'], {$section_props}['iteration'] = 1;
    •

  •                  {$section_props}['iteration'] <= {$section_props}['total'];
    •

  •                  {$section_props}['index'] += {$section_props}['step'], {$section_props}['iteration']++):\n";
    •

  •         $output .= "{$section_props}['rownum'] = {$section_props}['iteration'];\n";
    •

  •         $output .= "{$section_props}['index_prev'] = {$section_props}['index'] - {$section_props}['step'];\n";
    •

  •         $output .= "{$section_props}['index_next'] = {$section_props}['index'] + {$section_props}['step'];\n";
    •

  •         $output .= "{$section_props}['first']      = ({$section_props}['iteration'] == 1);\n";
    •

  •         $output .= "{$section_props}['last']       = ({$section_props}['iteration'] == {$section_props}['total']);\n";
    •

  •
    •

  •         $output .= "?>";
    •

  •
    •

  •         return $output;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Compile {foreach ...} tag.
    •

  •      *
    •

  •      * @param string $tag_args
    •

  •      * @return string
    •

  •      */
    •

  •     function _compile_foreach_start($tag_args)
    •

  •     {
    •

  •         $attrs = $this->_parse_attrs($tag_args);
    •

  •         $arg_list = array();
    •

  •
    •

  •         if (empty($attrs['from'])) {
    •

  •             return $this->_syntax_error("foreach: missing 'from' attribute", E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •         $from = $attrs['from'];
    •

  •
    •

  •         if (empty($attrs['item'])) {
    •

  •             return $this->_syntax_error("foreach: missing 'item' attribute", E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •         $item = $this->_dequote($attrs['item']);
    •

  •         if (!preg_match('~^\w+$~', $item)) {
    •

  •             return $this->_syntax_error("'foreach: 'item' must be a variable name (literal string)", E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •
    •

  •         if (isset($attrs['key'])) {
    •

  •             $key  = $this->_dequote($attrs['key']);
    •

  •             if (!preg_match('~^\w+$~', $key)) {
    •

  •                 return $this->_syntax_error("foreach: 'key' must to be a variable name (literal string)", E_USER_ERROR, __FILE__, __LINE__);
    •

  •             }
    •

  •             $key_part = "\$this->_tpl_vars['$key'] => ";
    •

  •         } else {
    •

  •             $key = null;
    •

  •             $key_part = '';
    •

  •         }
    •

  •
    •

  •         if (isset($attrs['name'])) {
    •

  •             $name = $attrs['name'];
    •

  •         } else {
    •

  •             $name = null;
    •

  •         }
    •

  •
    •

  •         $output = '<?php ';
    •

  •         $output .= "\$_from = $from; if (!is_array(\$_from) && !is_object(\$_from)) { settype(\$_from, 'array'); }";
    •

  •         if (isset($name)) {
    •

  •             $foreach_props = "\$this->_foreach[$name]";
    •

  •             $output .= "{$foreach_props} = array('total' => count(\$_from), 'iteration' => 0);\n";
    •

  •             $output .= "if ({$foreach_props}['total'] > 0):\n";
    •

  •             $output .= "    foreach (\$_from as $key_part\$this->_tpl_vars['$item']):\n";
    •

  •             $output .= "        {$foreach_props}['iteration']++;\n";
    •

  •         } else {
    •

  •             $output .= "if (count(\$_from)):\n";
    •

  •             $output .= "    foreach (\$_from as $key_part\$this->_tpl_vars['$item']):\n";
    •

  •         }
    •

  •         $output .= '?>';
    •

  •
    •

  •         return $output;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Compile {capture} .. {/capture} tags
    •

  •      *
    •

  •      * @param boolean $start true if this is the {capture} tag
    •

  •      * @param string $tag_args
    •

  •      * @return string
    •

  •      */
    •

  •
    •

  •     function _compile_capture_tag($start, $tag_args = '')
    •

  •     {
    •

  •         $attrs = $this->_parse_attrs($tag_args);
    •

  •
    •

  •         if ($start) {
    •

  •             if (isset($attrs['name']))
    •

  •                 $buffer = $attrs['name'];
    •

  •             else
    •

  •                 $buffer = "'default'";
    •

  •
    •

  •             if (isset($attrs['assign']))
    •

  •                 $assign = $attrs['assign'];
    •

  •             else
    •

  •                 $assign = null;
    •

  •             $output = "<?php ob_start(); ?>";
    •

  •             $this->_capture_stack[] = array($buffer, $assign);
    •

  •         } else {
    •

  •             list($buffer, $assign) = array_pop($this->_capture_stack);
    •

  •             $output = "<?php \$this->_smarty_vars['capture'][$buffer] = ob_get_contents(); ";
    •

  •             if (isset($assign)) {
    •

  •                 $output .= " \$this->assign($assign, ob_get_contents());";
    •

  •             }
    •

  •             $output .= "ob_end_clean(); ?>";
    •

  •         }
    •

  •
    •

  •         return $output;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Compile {if ...} tag
    •

  •      *
    •

  •      * @param string $tag_args
    •

  •      * @param boolean $elseif if true, uses elseif instead of if
    •

  •      * @return string
    •

  •      */
    •

  •     function _compile_if_tag($tag_args, $elseif = false)
    •

  •     {
    •

  •
    •

  •         /* Tokenize args for 'if' tag. */
    •

  •         preg_match_all('~(?>
    •

  •                 ' . $this->_obj_call_regexp . '(?:' . $this->_mod_regexp . '*)? | # valid object call
    •

  •                 ' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*)?    | # var or quoted string
    •

  •                 \-?0[xX][0-9a-fA-F]+|\-?\d+(?:\.\d+)?|\.\d+|!==|===|==|!=|<>|<<|>>|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|\&|\~|<|>|\||\%|\+|\-|\/|\*|\@    | # valid non-word token
    •

  •                 \b\w+\b                                                        | # valid word token
    •

  •                 \S+                                                           # anything else
    •

  •                 )~x', $tag_args, $match);
    •

  •
    •

  •         $tokens = $match[0];
    •

  •
    •

  •         if(empty($tokens)) {
    •

  •             $_error_msg = $elseif ? "'elseif'" : "'if'";
    •

  •             $_error_msg .= ' statement requires arguments';
    •

  •             $this->_syntax_error($_error_msg, E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •
    •

  •
    •

  •         // make sure we have balanced parenthesis
    •

  •         $token_count = array_count_values($tokens);
    •

  •         if(isset($token_count['(']) && $token_count['('] != $token_count[')']) {
    •

  •             $this->_syntax_error("unbalanced parenthesis in if statement", E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •
    •

  •         $is_arg_stack = array();
    •

  •
    •

  •         for ($i = 0; $i < count($tokens); $i++) {
    •

  •
    •

  •             $token = &$tokens[$i];
    •

  •
    •

  •             switch (strtolower($token)) {
    •

  •                 case '!':
    •

  •                 case '%':
    •

  •                 case '!==':
    •

  •                 case '==':
    •

  •                 case '===':
    •

  •                 case '>':
    •

  •                 case '<':
    •

  •                 case '!=':
    •

  •                 case '<>':
    •

  •                 case '<<':
    •

  •                 case '>>':
    •

  •                 case '<=':
    •

  •                 case '>=':
    •

  •                 case '&&':
    •

  •                 case '||':
    •

  •                 case '|':
    •

  •                 case '^':
    •

  •                 case '&':
    •

  •                 case '~':
    •

  •                 case ')':
    •

  •                 case ',':
    •

  •                 case '+':
    •

  •                 case '-':
    •

  •                 case '*':
    •

  •                 case '/':
    •

  •                 case '@':
    •

  •                     break;
    •

  •
    •

  •                 case 'eq':
    •

  •                     $token = '==';
    •

  •                     break;
    •

  •
    •

  •                 case 'ne':
    •

  •                 case 'neq':
    •

  •                     $token = '!=';
    •

  •                     break;
    •

  •
    •

  •                 case 'lt':
    •

  •                     $token = '<';
    •

  •                     break;
    •

  •
    •

  •                 case 'le':
    •

  •                 case 'lte':
    •

  •                     $token = '<=';
    •

  •                     break;
    •

  •
    •

  •                 case 'gt':
    •

  •                     $token = '>';
    •

  •                     break;
    •

  •
    •

  •                 case 'ge':
    •

  •                 case 'gte':
    •

  •                     $token = '>=';
    •

  •                     break;
    •

  •
    •

  •                 case 'and':
    •

  •                     $token = '&&';
    •

  •                     break;
    •

  •
    •

  •                 case 'or':
    •

  •                     $token = '||';
    •

  •                     break;
    •

  •
    •

  •                 case 'not':
    •

  •                     $token = '!';
    •

  •                     break;
    •

  •
    •

  •                 case 'mod':
    •

  •                     $token = '%';
    •

  •                     break;
    •

  •
    •

  •                 case '(':
    •

  •                     array_push($is_arg_stack, $i);
    •

  •                     break;
    •

  •
    •

  •                 case 'is':
    •

  •                     /* If last token was a ')', we operate on the parenthesized
    •

  •                        expression. The start of the expression is on the stack.
    •

  •                        Otherwise, we operate on the last encountered token. */
    •

  •                     if ($tokens[$i-1] == ')')
    •

  •                         $is_arg_start = array_pop($is_arg_stack);
    •

  •                     else
    •

  •                         $is_arg_start = $i-1;
    •

  •                     /* Construct the argument for 'is' expression, so it knows
    •

  •                        what to operate on. */
    •

  •                     $is_arg = implode(' ', array_slice($tokens, $is_arg_start, $i - $is_arg_start));
    •

  •
    •

  •                     /* Pass all tokens from next one until the end to the
    •

  •                        'is' expression parsing function. The function will
    •

  •                        return modified tokens, where the first one is the result
    •

  •                        of the 'is' expression and the rest are the tokens it
    •

  •                        didn't touch. */
    •

  •                     $new_tokens = $this->_parse_is_expr($is_arg, array_slice($tokens, $i+1));
    •

  •
    •

  •                     /* Replace the old tokens with the new ones. */
    •

  •                     array_splice($tokens, $is_arg_start, count($tokens), $new_tokens);
    •

  •
    •

  •                     /* Adjust argument start so that it won't change from the
    •

  •                        current position for the next iteration. */
    •

  •                     $i = $is_arg_start;
    •

  •                     break;
    •

  •
    •

  •                 default:
    •

  •                     if(preg_match('~^' . $this->_func_regexp . '$~', $token) ) {
    •

  •                             // function call
    •

  •                             if($this->security &&
    •

  •                                !in_array($token, $this->security_settings['IF_FUNCS'])) {
    •

  •                                 $this->_syntax_error("(secure mode) '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__);
    •

  •                             }
    •

  •                     } elseif(preg_match('~^' . $this->_var_regexp . '$~', $token) && (strpos('+-*/^%&|', substr($token, -1)) === false) && isset($tokens[$i+1]) && $tokens[$i+1] == '(') {
    •

  •                         // variable function call
    •

  •                         $this->_syntax_error("variable function call '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__);
    •

  •                     } elseif(preg_match('~^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*)$~', $token)) {
    •

  •                         // object or variable
    •

  •                         $token = $this->_parse_var_props($token);
    •

  •                     } elseif(is_numeric($token)) {
    •

  •                         // number, skip it
    •

  •                     } else {
    •

  •                         $this->_syntax_error("unidentified token '$token'", E_USER_ERROR, __FILE__, __LINE__);
    •

  •                     }
    •

  •                     break;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if ($elseif)
    •

  •             return '<?php elseif ('.implode(' ', $tokens).'): ?>';
    •

  •         else
    •

  •             return '<?php if ('.implode(' ', $tokens).'): ?>';
    •

  •     }
    •

  •
    •

  •
    •

  •     function _compile_arg_list($type, $name, $attrs, &$cache_code) {
    •

  •         $arg_list = array();
    •

  •
    •

  •         if (isset($type) && isset($name)
    •

  •             && isset($this->_plugins[$type])
    •

  •             && isset($this->_plugins[$type][$name])
    •

  •             && empty($this->_plugins[$type][$name][4])
    •

  •             && is_array($this->_plugins[$type][$name][5])
    •

  •             ) {
    •

  •             /* we have a list of parameters that should be cached */
    •

  •             $_cache_attrs = $this->_plugins[$type][$name][5];
    •

  •             $_count = $this->_cache_attrs_count++;
    •

  •             $cache_code = "\$_cache_attrs =& \$this->_smarty_cache_attrs('$this->_cache_serial','$_count');";
    •

  •
    •

  •         } else {
    •

  •             /* no parameters are cached */
    •

  •             $_cache_attrs = null;
    •

  •         }
    •

  •
    •

  •         foreach ($attrs as $arg_name => $arg_value) {
    •

  •             if (is_bool($arg_value))
    •

  •                 $arg_value = $arg_value ? 'true' : 'false';
    •

  •             if (is_null($arg_value))
    •

  •                 $arg_value = 'null';
    •

  •             if ($_cache_attrs && in_array($arg_name, $_cache_attrs)) {
    •

  •                 $arg_list[] = "'$arg_name' => (\$this->_cache_including) ? \$_cache_attrs['$arg_name'] : (\$_cache_attrs['$arg_name']=$arg_value)";
    •

  •             } else {
    •

  •                 $arg_list[] = "'$arg_name' => $arg_value";
    •

  •             }
    •

  •         }
    •

  •         return $arg_list;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Parse is expression
    •

  •      *
    •

  •      * @param string $is_arg
    •

  •      * @param array $tokens
    •

  •      * @return array
    •

  •      */
    •

  •     function _parse_is_expr($is_arg, $tokens)
    •

  •     {
    •

  •         $expr_end = 0;
    •

  •         $negate_expr = false;
    •

  •
    •

  •         if (($first_token = array_shift($tokens)) == 'not') {
    •

  •             $negate_expr = true;
    •

  •             $expr_type = array_shift($tokens);
    •

  •         } else
    •

  •             $expr_type = $first_token;
    •

  •
    •

  •         switch ($expr_type) {
    •

  •             case 'even':
    •

  •                 if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') {
    •

  •                     $expr_end++;
    •

  •                     $expr_arg = $tokens[$expr_end++];
    •

  •                     $expr = "!(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
    •

  •                 } else
    •

  •                     $expr = "!(1 & $is_arg)";
    •

  •                 break;
    •

  •
    •

  •             case 'odd':
    •

  •                 if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') {
    •

  •                     $expr_end++;
    •

  •                     $expr_arg = $tokens[$expr_end++];
    •

  •                     $expr = "(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
    •

  •                 } else
    •

  •                     $expr = "(1 & $is_arg)";
    •

  •                 break;
    •

  •
    •

  •             case 'div':
    •

  •                 if (@$tokens[$expr_end] == 'by') {
    •

  •                     $expr_end++;
    •

  •                     $expr_arg = $tokens[$expr_end++];
    •

  •                     $expr = "!($is_arg % " . $this->_parse_var_props($expr_arg) . ")";
    •

  •                 } else {
    •

  •                     $this->_syntax_error("expecting 'by' after 'div'", E_USER_ERROR, __FILE__, __LINE__);
    •

  •                 }
    •

  •                 break;
    •

  •
    •

  •             default:
    •

  •                 $this->_syntax_error("unknown 'is' expression - '$expr_type'", E_USER_ERROR, __FILE__, __LINE__);
    •

  •                 break;
    •

  •         }
    •

  •
    •

  •         if ($negate_expr) {
    •

  •             $expr = "!($expr)";
    •

  •         }
    •

  •
    •

  •         array_splice($tokens, 0, $expr_end, $expr);
    •

  •
    •

  •         return $tokens;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Parse attribute string
    •

  •      *
    •

  •      * @param string $tag_args
    •

  •      * @return array
    •

  •      */
    •

  •     function _parse_attrs($tag_args)
    •

  •     {
    •

  •
    •

  •         /* Tokenize tag attributes. */
    •

  •         preg_match_all('~(?:' . $this->_obj_call_regexp . '|' . $this->_qstr_regexp . ' | (?>[^"\'=\s]+)
    •

  •                          )+ |
    •

  •                          [=]
    •

  •                         ~x', $tag_args, $match);
    •

  •         $tokens       = $match[0];
    •

  •
    •

  •         $attrs = array();
    •

  •         /* Parse state:
    •

  •             0 - expecting attribute name
    •

  •             1 - expecting '='
    •

  •             2 - expecting attribute value (not '=') */
    •

  •         $state = 0;
    •

  •
    •

  •         foreach ($tokens as $token) {
    •

  •             switch ($state) {
    •

  •                 case 0:
    •

  •                     /* If the token is a valid identifier, we set attribute name
    •

  •                        and go to state 1. */
    •

  •                     if (preg_match('~^\w+$~', $token)) {
    •

  •                         $attr_name = $token;
    •

  •                         $state = 1;
    •

  •                     } else
    •

  •                         $this->_syntax_error("invalid attribute name: '$token'", E_USER_ERROR, __FILE__, __LINE__);
    •

  •                     break;
    •

  •
    •

  •                 case 1:
    •

  •                     /* If the token is '=', then we go to state 2. */
    •

  •                     if ($token == '=') {
    •

  •                         $state = 2;
    •

  •                     } else
    •

  •                         $this->_syntax_error("expecting '=' after attribute name '$last_token'", E_USER_ERROR, __FILE__, __LINE__);
    •

  •                     break;
    •

  •
    •

  •                 case 2:
    •

  •                     /* If token is not '=', we set the attribute value and go to
    •

  •                        state 0. */
    •

  •                     if ($token != '=') {
    •

  •                         /* We booleanize the token if it's a non-quoted possible
    •

  •                            boolean value. */
    •

  •                         if (preg_match('~^(on|yes|true)$~', $token)) {
    •

  •                             $token = 'true';
    •

  •                         } else if (preg_match('~^(off|no|false)$~', $token)) {
    •

  •                             $token = 'false';
    •

  •                         } else if ($token == 'null') {
    •

  •                             $token = 'null';
    •

  •                         } else if (preg_match('~^' . $this->_num_const_regexp . '|0[xX][0-9a-fA-F]+$~', $token)) {
    •

  •                             /* treat integer literally */
    •

  •                         } else if (!preg_match('~^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '(?:' . $this->_mod_regexp . ')*$~', $token)) {
    •

  •                             /* treat as a string, double-quote it escaping quotes */
    •

  •                             $token = '"'.addslashes($token).'"';
    •

  •                         }
    •

  •
    •

  •                         $attrs[$attr_name] = $token;
    •

  •                         $state = 0;
    •

  •                     } else
    •

  •                         $this->_syntax_error("'=' cannot be an attribute value", E_USER_ERROR, __FILE__, __LINE__);
    •

  •                     break;
    •

  •             }
    •

  •             $last_token = $token;
    •

  •         }
    •

  •
    •

  •         if($state != 0) {
    •

  •             if($state == 1) {
    •

  •                 $this->_syntax_error("expecting '=' after attribute name '$last_token'", E_USER_ERROR, __FILE__, __LINE__);
    •

  •             } else {
    •

  •                 $this->_syntax_error("missing attribute value", E_USER_ERROR, __FILE__, __LINE__);
    •

  •             }
    •

  •         }
    •

  •
    •

  •         $this->_parse_vars_props($attrs);
    •

  •
    •

  •         return $attrs;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * compile multiple variables and section properties tokens into
    •

  •      * PHP code
    •

  •      *
    •

  •      * @param array $tokens
    •

  •      */
    •

  •     function _parse_vars_props(&$tokens)
    •

  •     {
    •

  •         foreach($tokens as $key => $val) {
    •

  •             $tokens[$key] = $this->_parse_var_props($val);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * compile single variable and section properties token into
    •

  •      * PHP code
    •

  •      *
    •

  •      * @param string $val
    •

  •      * @param string $tag_attrs
    •

  •      * @return string
    •

  •      */
    •

  •     function _parse_var_props($val)
    •

  •     {
    •

  •         $val = trim($val);
    •

  •
    •

  •         if(preg_match('~^(' . $this->_obj_call_regexp . '|' . $this->_dvar_regexp . ')(' . $this->_mod_regexp . '*)$~', $val, $match)) {
    •

  •             // $ variable or object
    •

  •             $return = $this->_parse_var($match[1]);
    •

  •             $modifiers = $match[2];
    •

  •             if (!empty($this->default_modifiers) && !preg_match('~(^|\|)smarty:nodefaults($|\|)~',$modifiers)) {
    •

  •                 $_default_mod_string = implode('|',(array)$this->default_modifiers);
    •

  •                 $modifiers = empty($modifiers) ? $_default_mod_string : $_default_mod_string . '|' . $modifiers;
    •

  •             }
    •

  •             $this->_parse_modifiers($return, $modifiers);
    •

  •             return $return;
    •

  •         } elseif (preg_match('~^' . $this->_db_qstr_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
    •

  •                 // double quoted text
    •

  •                 preg_match('~^(' . $this->_db_qstr_regexp . ')('. $this->_mod_regexp . '*)$~', $val, $match);
    •

  •                 $return = $this->_expand_quoted_text($match[1]);
    •

  •                 if($match[2] != '') {
    •

  •                     $this->_parse_modifiers($return, $match[2]);
    •

  •                 }
    •

  •                 return $return;
    •

  •             }
    •

  •         elseif(preg_match('~^' . $this->_num_const_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
    •

  •                 // numerical constant
    •

  •                 preg_match('~^(' . $this->_num_const_regexp . ')('. $this->_mod_regexp . '*)$~', $val, $match);
    •

  •                 if($match[2] != '') {
    •

  •                     $this->_parse_modifiers($match[1], $match[2]);
    •

  •                     return $match[1];
    •

  •                 }
    •

  •             }
    •

  •         elseif(preg_match('~^' . $this->_si_qstr_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
    •

  •                 // single quoted text
    •

  •                 preg_match('~^(' . $this->_si_qstr_regexp . ')('. $this->_mod_regexp . '*)$~', $val, $match);
    •

  •                 if($match[2] != '') {
    •

  •                     $this->_parse_modifiers($match[1], $match[2]);
    •

  •                     return $match[1];
    •

  •                 }
    •

  •             }
    •

  •         elseif(preg_match('~^' . $this->_cvar_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
    •

  •                 // config var
    •

  •                 return $this->_parse_conf_var($val);
    •

  •             }
    •

  •         elseif(preg_match('~^' . $this->_svar_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
    •

  •                 // section var
    •

  •                 return $this->_parse_section_prop($val);
    •

  •             }
    •

  •         elseif(!in_array($val, $this->_permitted_tokens) && !is_numeric($val)) {
    •

  •             // literal string
    •

  •             return $this->_expand_quoted_text('"' . strtr($val, array('\\' => '\\\\', '"' => '\\"')) .'"');
    •

  •         }
    •

  •         return $val;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * expand quoted text with embedded variables
    •

  •      *
    •

  •      * @param string $var_expr
    •

  •      * @return string
    •

  •      */
    •

  •     function _expand_quoted_text($var_expr)
    •

  •     {
    •

  •         // if contains unescaped $, expand it
    •

  •         if(preg_match_all('~(?:\`(?<!\\\\)\$' . $this->_dvar_guts_regexp . '(?:' . $this->_obj_ext_regexp . ')*\`)|(?:(?<!\\\\)\$\w+(\[[a-zA-Z0-9]+\])*)~', $var_expr, $_match)) {
    •

  •             $_match = $_match[0];
    •

  •             $_replace = array();
    •

  •             foreach($_match as $_var) {
    •

  •                 $_replace[$_var] = '".(' . $this->_parse_var(str_replace('`','',$_var)) . ')."';
    •

  •             }
    •

  •             $var_expr = strtr($var_expr, $_replace);
    •

  •             $_return = preg_replace('~\.""|(?<!\\\\)""\.~', '', $var_expr);
    •

  •         } else {
    •

  •             $_return = $var_expr;
    •

  •         }
    •

  •         // replace double quoted literal string with single quotes
    •

  •         $_return = preg_replace('~^"([\s\w]+)"$~',"'\\1'",$_return);
    •

  •         return $_return;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * parse variable expression into PHP code
    •

  •      *
    •

  •      * @param string $var_expr
    •

  •      * @param string $output
    •

  •      * @return string
    •

  •      */
    •

  •     function _parse_var($var_expr)
    •

  •     {
    •

  •         $_has_math = false;
    •

  •         $_math_vars = preg_split('~('.$this->_dvar_math_regexp.'|'.$this->_qstr_regexp.')~', $var_expr, -1, PREG_SPLIT_DELIM_CAPTURE);
    •

  •
    •

  •         if(count($_math_vars) > 1) {
    •

  •             $_first_var = "";
    •

  •             $_complete_var = "";
    •

  •             $_output = "";
    •

  •             // simple check if there is any math, to stop recursion (due to modifiers with "xx % yy" as parameter)
    •

  •             foreach($_math_vars as $_k => $_math_var) {
    •

  •                 $_math_var = $_math_vars[$_k];
    •

  •
    •

  •                 if(!empty($_math_var) || is_numeric($_math_var)) {
    •

  •                     // hit a math operator, so process the stuff which came before it
    •

  •                     if(preg_match('~^' . $this->_dvar_math_regexp . '$~', $_math_var)) {
    •

  •                         $_has_math = true;
    •

  •                         if(!empty($_complete_var) || is_numeric($_complete_var)) {
    •

  •                             $_output .= $this->_parse_var($_complete_var);
    •

  •                         }
    •

  •
    •

  •                         // just output the math operator to php
    •

  •                         $_output .= $_math_var;
    •

  •
    •

  •                         if(empty($_first_var))
    •

  •                             $_first_var = $_complete_var;
    •

  •
    •

  •                         $_complete_var = "";
    •

  •                     } else {
    •

  •                         $_complete_var .= $_math_var;
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •             if($_has_math) {
    •

  •                 if(!empty($_complete_var) || is_numeric($_complete_var))
    •

  •                     $_output .= $this->_parse_var($_complete_var);
    •

  •
    •

  •                 // get the modifiers working (only the last var from math + modifier is left)
    •

  •                 $var_expr = $_complete_var;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         // prevent cutting of first digit in the number (we _definitly_ got a number if the first char is a digit)
    •

  •         if(is_numeric(substr($var_expr, 0, 1)))
    •

  •             $_var_ref = $var_expr;
    •

  •         else
    •

  •             $_var_ref = substr($var_expr, 1);
    •

  •
    •

  •         if(!$_has_math) {
    •

  •
    •

  •             // get [foo] and .foo and ->foo and (...) pieces
    •

  •             preg_match_all('~(?:^\w+)|' . $this->_obj_params_regexp . '|(?:' . $this->_var_bracket_regexp . ')|->\$?\w+|\.\$?\w+|\S+~', $_var_ref, $match);
    •

  •
    •

  •             $_indexes = $match[0];
    •

  •             $_var_name = array_shift($_indexes);
    •

  •
    •

  •             /* Handle $smarty.* variable references as a special case. */
    •

  •             if ($_var_name == 'smarty') {
    •

  •                 /*
    •

  •                  * If the reference could be compiled, use the compiled output;
    •

  •                  * otherwise, fall back on the $smarty variable generated at
    •

  •                  * run-time.
    •

  •                  */
    •

  •                 if (($smarty_ref = $this->_compile_smarty_ref($_indexes)) !== null) {
    •

  •                     $_output = $smarty_ref;
    •

  •                 } else {
    •

  •                     $_var_name = substr(array_shift($_indexes), 1);
    •

  •                     $_output = "\$this->_smarty_vars['$_var_name']";
    •

  •                 }
    •

  •             } elseif(is_numeric($_var_name) && is_numeric(substr($var_expr, 0, 1))) {
    •

  •                 // because . is the operator for accessing arrays thru inidizes we need to put it together again for floating point numbers
    •

  •                 if(count($_indexes) > 0)
    •

  •                 {
    •

  •                     $_var_name .= implode("", $_indexes);
    •

  •                     $_indexes = array();
    •

  •                 }
    •

  •                 $_output = $_var_name;
    •

  •             } else {
    •

  •                 $_output = "\$this->_tpl_vars['$_var_name']";
    •

  •             }
    •

  •
    •

  •             foreach ($_indexes as $_index) {
    •

  •                 if (substr($_index, 0, 1) == '[') {
    •

  •                     $_index = substr($_index, 1, -1);
    •

  •                     if (is_numeric($_index)) {
    •

  •                         $_output .= "[$_index]";
    •

  •                     } elseif (substr($_index, 0, 1) == '$') {
    •

  •                         if (strpos($_index, '.') !== false) {
    •

  •                             $_output .= '[' . $this->_parse_var($_index) . ']';
    •

  •                         } else {
    •

  •                             $_output .= "[\$this->_tpl_vars['" . substr($_index, 1) . "']]";
    •

  •                         }
    •

  •                     } else {
    •

  •                         $_var_parts = explode('.', $_index);
    •

  •                         $_var_section = $_var_parts[0];
    •

  •                         $_var_section_prop = isset($_var_parts[1]) ? $_var_parts[1] : 'index';
    •

  •                         $_output .= "[\$this->_sections['$_var_section']['$_var_section_prop']]";
    •

  •                     }
    •

  •                 } else if (substr($_index, 0, 1) == '.') {
    •

  •                     if (substr($_index, 1, 1) == '$')
    •

  •                         $_output .= "[\$this->_tpl_vars['" . substr($_index, 2) . "']]";
    •

  •                     else
    •

  •                         $_output .= "['" . substr($_index, 1) . "']";
    •

  •                 } else if (substr($_index,0,2) == '->') {
    •

  •                     if(substr($_index,2,2) == '__') {
    •

  •                         $this->_syntax_error('call to internal object members is not allowed', E_USER_ERROR, __FILE__, __LINE__);
    •

  •                     } elseif($this->security && substr($_index, 2, 1) == '_') {
    •

  •                         $this->_syntax_error('(secure) call to private object member is not allowed', E_USER_ERROR, __FILE__, __LINE__);
    •

  •                     } elseif (substr($_index, 2, 1) == '$') {
    •

  •                         if ($this->security) {
    •

  •                             $this->_syntax_error('(secure) call to dynamic object member is not allowed', E_USER_ERROR, __FILE__, __LINE__);
    •

  •                         } else {
    •

  •                             $_output .= '->{(($_var=$this->_tpl_vars[\''.substr($_index,3).'\']) && substr($_var,0,2)!=\'__\') ? $_var : $this->trigger_error("cannot access property \\"$_var\\"")}';
    •

  •                         }
    •

  •                     } else {
    •

  •                         $_output .= $_index;
    •

  •                     }
    •

  •                 } elseif (substr($_index, 0, 1) == '(') {
    •

  •                     $_index = $this->_parse_parenth_args($_index);
    •

  •                     $_output .= $_index;
    •

  •                 } else {
    •

  •                     $_output .= $_index;
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •
    •

  •         return $_output;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * parse arguments in function call parenthesis
    •

  •      *
    •

  •      * @param string $parenth_args
    •

  •      * @return string
    •

  •      */
    •

  •     function _parse_parenth_args($parenth_args)
    •

  •     {
    •

  •         preg_match_all('~' . $this->_param_regexp . '~',$parenth_args, $match);
    •

  •         $orig_vals = $match = $match[0];
    •

  •         $this->_parse_vars_props($match);
    •

  •         $replace = array();
    •

  •         for ($i = 0, $count = count($match); $i < $count; $i++) {
    •

  •             $replace[$orig_vals[$i]] = $match[$i];
    •

  •         }
    •

  •         return strtr($parenth_args, $replace);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * parse configuration variable expression into PHP code
    •

  •      *
    •

  •      * @param string $conf_var_expr
    •

  •      */
    •

  •     function _parse_conf_var($conf_var_expr)
    •

  •     {
    •

  •         $parts = explode('|', $conf_var_expr, 2);
    •

  •         $var_ref = $parts[0];
    •

  •         $modifiers = isset($parts[1]) ? $parts[1] : '';
    •

  •
    •

  •         $var_name = substr($var_ref, 1, -1);
    •

  •
    •

  •         $output = "\$this->_config[0]['vars']['$var_name']";
    •

  •
    •

  •         $this->_parse_modifiers($output, $modifiers);
    •

  •
    •

  •         return $output;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * parse section property expression into PHP code
    •

  •      *
    •

  •      * @param string $section_prop_expr
    •

  •      * @return string
    •

  •      */
    •

  •     function _parse_section_prop($section_prop_expr)
    •

  •     {
    •

  •         $parts = explode('|', $section_prop_expr, 2);
    •

  •         $var_ref = $parts[0];
    •

  •         $modifiers = isset($parts[1]) ? $parts[1] : '';
    •

  •
    •

  •         preg_match('!%(\w+)\.(\w+)%!', $var_ref, $match);
    •

  •         $section_name = $match[1];
    •

  •         $prop_name = $match[2];
    •

  •
    •

  •         $output = "\$this->_sections['$section_name']['$prop_name']";
    •

  •
    •

  •         $this->_parse_modifiers($output, $modifiers);
    •

  •
    •

  •         return $output;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * parse modifier chain into PHP code
    •

  •      *
    •

  •      * sets $output to parsed modified chain
    •

  •      * @param string $output
    •

  •      * @param string $modifier_string
    •

  •      */
    •

  •     function _parse_modifiers(&$output, $modifier_string)
    •

  •     {
    •

  •         preg_match_all('~\|(@?\w+)((?>:(?:'. $this->_qstr_regexp . '|[^|]+))*)~', '|' . $modifier_string, $_match);
    •

  •         list(, $_modifiers, $modifier_arg_strings) = $_match;
    •

  •
    •

  •         for ($_i = 0, $_for_max = count($_modifiers); $_i < $_for_max; $_i++) {
    •

  •             $_modifier_name = $_modifiers[$_i];
    •

  •
    •

  •             if($_modifier_name == 'smarty') {
    •

  •                 // skip smarty modifier
    •

  •                 continue;
    •

  •             }
    •

  •
    •

  •             preg_match_all('~:(' . $this->_qstr_regexp . '|[^:]+)~', $modifier_arg_strings[$_i], $_match);
    •

  •             $_modifier_args = $_match[1];
    •

  •
    •

  •             if (substr($_modifier_name, 0, 1) == '@') {
    •

  •                 $_map_array = false;
    •

  •                 $_modifier_name = substr($_modifier_name, 1);
    •

  •             } else {
    •

  •                 $_map_array = true;
    •

  •             }
    •

  •
    •

  •             if (empty($this->_plugins['modifier'][$_modifier_name])
    •

  •                 && !$this->_get_plugin_filepath('modifier', $_modifier_name)
    •

  •                 && function_exists($_modifier_name)) {
    •

  •                 if ($this->security && !in_array($_modifier_name, $this->security_settings['MODIFIER_FUNCS'])) {
    •

  •                     $this->_trigger_fatal_error("[plugin] (secure mode) modifier '$_modifier_name' is not allowed" , $this->_current_file, $this->_current_line_no, __FILE__, __LINE__);
    •

  •                 } else {
    •

  •                     $this->_plugins['modifier'][$_modifier_name] = array($_modifier_name,  null, null, false);
    •

  •                 }
    •

  •             }
    •

  •             $this->_add_plugin('modifier', $_modifier_name);
    •

  •
    •

  •             $this->_parse_vars_props($_modifier_args);
    •

  •
    •

  •             if($_modifier_name == 'default') {
    •

  •                 // supress notifications of default modifier vars and args
    •

  •                 if(substr($output, 0, 1) == '$') {
    •

  •                     $output = '@' . $output;
    •

  •                 }
    •

  •                 if(isset($_modifier_args[0]) && substr($_modifier_args[0], 0, 1) == '$') {
    •

  •                     $_modifier_args[0] = '@' . $_modifier_args[0];
    •

  •                 }
    •

  •             }
    •

  •             if (count($_modifier_args) > 0)
    •

  •                 $_modifier_args = ', '.implode(', ', $_modifier_args);
    •

  •             else
    •

  •                 $_modifier_args = '';
    •

  •
    •

  •             if ($_map_array) {
    •

  •                 $output = "((is_array(\$_tmp=$output)) ? \$this->_run_mod_handler('$_modifier_name', true, \$_tmp$_modifier_args) : " . $this->_compile_plugin_call('modifier', $_modifier_name) . "(\$_tmp$_modifier_args))";
    •

  •
    •

  •             } else {
    •

  •
    •

  •                 $output = $this->_compile_plugin_call('modifier', $_modifier_name)."($output$_modifier_args)";
    •

  •
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * add plugin
    •

  •      *
    •

  •      * @param string $type
    •

  •      * @param string $name
    •

  •      * @param boolean? $delayed_loading
    •

  •      */
    •

  •     function _add_plugin($type, $name, $delayed_loading = null)
    •

  •     {
    •

  •         if (!isset($this->_plugin_info[$type])) {
    •

  •             $this->_plugin_info[$type] = array();
    •

  •         }
    •

  •         if (!isset($this->_plugin_info[$type][$name])) {
    •

  •             $this->_plugin_info[$type][$name] = array($this->_current_file,
    •

  •                                                       $this->_current_line_no,
    •

  •                                                       $delayed_loading);
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Compiles references of type $smarty.foo
    •

  •      *
    •

  •      * @param string $indexes
    •

  •      * @return string
    •

  •      */
    •

  •     function _compile_smarty_ref(&$indexes)
    •

  •     {
    •

  •         /* Extract the reference name. */
    •

  •         $_ref = substr($indexes[0], 1);
    •

  •         foreach($indexes as $_index_no=>$_index) {
    •

  •             if (substr($_index, 0, 1) != '.' && $_index_no<2 || !preg_match('~^(\.|\[|->)~', $_index)) {
    •

  •                 $this->_syntax_error('$smarty' . implode('', array_slice($indexes, 0, 2)) . ' is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);
    •

  •             }
    •

  •         }
    •

  •
    •

  •         switch ($_ref) {
    •

  •             case 'now':
    •

  •                 $compiled_ref = 'time()';
    •

  •                 $_max_index = 1;
    •

  •                 break;
    •

  •
    •

  •             case 'foreach':
    •

  •                 array_shift($indexes);
    •

  •                 $_var = $this->_parse_var_props(substr($indexes[0], 1));
    •

  •                 $_propname = substr($indexes[1], 1);
    •

  •                 $_max_index = 1;
    •

  •                 switch ($_propname) {
    •

  •                     case 'index':
    •

  •                         array_shift($indexes);
    •

  •                         $compiled_ref = "(\$this->_foreach[$_var]['iteration']-1)";
    •

  •                         break;
    •

  •
    •

  •                     case 'first':
    •

  •                         array_shift($indexes);
    •

  •                         $compiled_ref = "(\$this->_foreach[$_var]['iteration'] <= 1)";
    •

  •                         break;
    •

  •
    •

  •                     case 'last':
    •

  •                         array_shift($indexes);
    •

  •                         $compiled_ref = "(\$this->_foreach[$_var]['iteration'] == \$this->_foreach[$_var]['total'])";
    •

  •                         break;
    •

  •
    •

  •                     case 'show':
    •

  •                         array_shift($indexes);
    •

  •                         $compiled_ref = "(\$this->_foreach[$_var]['total'] > 0)";
    •

  •                         break;
    •

  •
    •

  •                     default:
    •

  •                         unset($_max_index);
    •

  •                         $compiled_ref = "\$this->_foreach[$_var]";
    •

  •                 }
    •

  •                 break;
    •

  •
    •

  •             case 'section':
    •

  •                 array_shift($indexes);
    •

  •                 $_var = $this->_parse_var_props(substr($indexes[0], 1));
    •

  •                 $compiled_ref = "\$this->_sections[$_var]";
    •

  •                 break;
    •

  •
    •

  •             case 'get':
    •

  •                 $compiled_ref = ($this->request_use_auto_globals) ? '$_GET' : "\$GLOBALS['HTTP_GET_VARS']";
    •

  •                 break;
    •

  •
    •

  •             case 'post':
    •

  •                 $compiled_ref = ($this->request_use_auto_globals) ? '$_POST' : "\$GLOBALS['HTTP_POST_VARS']";
    •

  •                 break;
    •

  •
    •

  •             case 'cookies':
    •

  •                 $compiled_ref = ($this->request_use_auto_globals) ? '$_COOKIE' : "\$GLOBALS['HTTP_COOKIE_VARS']";
    •

  •                 break;
    •

  •
    •

  •             case 'env':
    •

  •                 $compiled_ref = ($this->request_use_auto_globals) ? '$_ENV' : "\$GLOBALS['HTTP_ENV_VARS']";
    •

  •                 break;
    •

  •
    •

  •             case 'server':
    •

  •                 $compiled_ref = ($this->request_use_auto_globals) ? '$_SERVER' : "\$GLOBALS['HTTP_SERVER_VARS']";
    •

  •                 break;
    •

  •
    •

  •             case 'session':
    •

  •                 $compiled_ref = ($this->request_use_auto_globals) ? '$_SESSION' : "\$GLOBALS['HTTP_SESSION_VARS']";
    •

  •                 break;
    •

  •
    •

  •             /*
    •

  •              * These cases are handled either at run-time or elsewhere in the
    •

  •              * compiler.
    •

  •              */
    •

  •             case 'request':
    •

  •                 if ($this->request_use_auto_globals) {
    •

  •                     $compiled_ref = '$_REQUEST';
    •

  •                     break;
    •

  •                 } else {
    •

  •                     $this->_init_smarty_vars = true;
    •

  •                 }
    •

  •                 return null;
    •

  •
    •

  •             case 'capture':
    •

  •                 return null;
    •

  •
    •

  •             case 'template':
    •

  •                 $compiled_ref = "'$this->_current_file'";
    •

  •                 $_max_index = 1;
    •

  •                 break;
    •

  •
    •

  •             case 'version':
    •

  •                 $compiled_ref = "'$this->_version'";
    •

  •                 $_max_index = 1;
    •

  •                 break;
    •

  •
    •

  •             case 'const':
    •

  •                 if ($this->security && !$this->security_settings['ALLOW_CONSTANTS']) {
    •

  •                     $this->_syntax_error("(secure mode) constants not permitted",
    •

  •                                          E_USER_WARNING, __FILE__, __LINE__);
    •

  •                     return;
    •

  •                 }
    •

  •                 array_shift($indexes);
    •

  •                 if (preg_match('!^\.\w+$!', $indexes[0])) {
    •

  •                     $compiled_ref = '@' . substr($indexes[0], 1);
    •

  •                 } else {
    •

  •                     $_val = $this->_parse_var_props(substr($indexes[0], 1));
    •

  •                     $compiled_ref = '@constant(' . $_val . ')';
    •

  •                 }
    •

  •                 $_max_index = 1;
    •

  •                 break;
    •

  •
    •

  •             case 'config':
    •

  •                 $compiled_ref = "\$this->_config[0]['vars']";
    •

  •                 $_max_index = 3;
    •

  •                 break;
    •

  •
    •

  •             case 'ldelim':
    •

  •                 $compiled_ref = "'$this->left_delimiter'";
    •

  •                 break;
    •

  •
    •

  •             case 'rdelim':
    •

  •                 $compiled_ref = "'$this->right_delimiter'";
    •

  •                 break;
    •

  •
    •

  •             default:
    •

  •                 $this->_syntax_error('$smarty.' . $_ref . ' is an unknown reference', E_USER_ERROR, __FILE__, __LINE__);
    •

  •                 break;
    •

  •         }
    •

  •
    •

  •         if (isset($_max_index) && count($indexes) > $_max_index) {
    •

  •             $this->_syntax_error('$smarty' . implode('', $indexes) .' is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •
    •

  •         array_shift($indexes);
    •

  •         return $compiled_ref;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * compiles call to plugin of type $type with name $name
    •

  •      * returns a string containing the function-name or method call
    •

  •      * without the paramter-list that would have follow to make the
    •

  •      * call valid php-syntax
    •

  •      *
    •

  •      * @param string $type
    •

  •      * @param string $name
    •

  •      * @return string
    •

  •      */
    •

  •     function _compile_plugin_call($type, $name) {
    •

  •         if (isset($this->_plugins[$type][$name])) {
    •

  •             /* plugin loaded */
    •

  •             if (is_array($this->_plugins[$type][$name][0])) {
    •

  •                 return ((is_object($this->_plugins[$type][$name][0][0])) ?
    •

  •                         "\$this->_plugins['$type']['$name'][0][0]->"    /* method callback */
    •

  •                         : (string)($this->_plugins[$type][$name][0][0]).'::'    /* class callback */
    •

  •                        ). $this->_plugins[$type][$name][0][1];
    •

  •
    •

  •             } else {
    •

  •                 /* function callback */
    •

  •                 return $this->_plugins[$type][$name][0];
    •

  •
    •

  •             }
    •

  •         } else {
    •

  •             /* plugin not loaded -> auto-loadable-plugin */
    •

  •             return 'smarty_'.$type.'_'.$name;
    •

  •
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * load pre- and post-filters
    •

  •      */
    •

  •     function _load_filters()
    •

  •     {
    •

  •         if (count($this->_plugins['prefilter']) > 0) {
    •

  •             foreach ($this->_plugins['prefilter'] as $filter_name => $prefilter) {
    •

  •                 if ($prefilter === false) {
    •

  •                     unset($this->_plugins['prefilter'][$filter_name]);
    •

  •                     $_params = array('plugins' => array(array('prefilter', $filter_name, null, null, false)));
    •

  •                     require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
    •

  •                     smarty_core_load_plugins($_params, $this);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         if (count($this->_plugins['postfilter']) > 0) {
    •

  •             foreach ($this->_plugins['postfilter'] as $filter_name => $postfilter) {
    •

  •                 if ($postfilter === false) {
    •

  •                     unset($this->_plugins['postfilter'][$filter_name]);
    •

  •                     $_params = array('plugins' => array(array('postfilter', $filter_name, null, null, false)));
    •

  •                     require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
    •

  •                     smarty_core_load_plugins($_params, $this);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Quote subpattern references
    •

  •      *
    •

  •      * @param string $string
    •

  •      * @return string
    •

  •      */
    •

  •     function _quote_replace($string)
    •

  •     {
    •

  •         return strtr($string, array('\\' => '\\\\', '$' => '\\$'));
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * display Smarty syntax error
    •

  •      *
    •

  •      * @param string $error_msg
    •

  •      * @param integer $error_type
    •

  •      * @param string $file
    •

  •      * @param integer $line
    •

  •      */
    •

  •     function _syntax_error($error_msg, $error_type = E_USER_ERROR, $file=null, $line=null)
    •

  •     {
    •

  •         $this->_trigger_fatal_error("syntax error: $error_msg", $this->_current_file, $this->_current_line_no, $file, $line, $error_type);
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * check if the compilation changes from cacheable to
    •

  •      * non-cacheable state with the beginning of the current
    •

  •      * plugin. return php-code to reflect the transition.
    •

  •      * @return string
    •

  •      */
    •

  •     function _push_cacheable_state($type, $name) {
    •

  •         $_cacheable = !isset($this->_plugins[$type][$name]) || $this->_plugins[$type][$name][4];
    •

  •         if ($_cacheable
    •

  •             || 0<$this->_cacheable_state++) return '';
    •

  •         if (!isset($this->_cache_serial)) $this->_cache_serial = md5(uniqid('Smarty'));
    •

  •         $_ret = 'if ($this->caching && !$this->_cache_including): echo \'{nocache:'
    •

  •             . $this->_cache_serial . '#' . $this->_nocache_count
    •

  •             . '}\'; endif;';
    •

  •         return $_ret;
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * check if the compilation changes from non-cacheable to
    •

  •      * cacheable state with the end of the current plugin return
    •

  •      * php-code to reflect the transition.
    •

  •      * @return string
    •

  •      */
    •

  •     function _pop_cacheable_state($type, $name) {
    •

  •         $_cacheable = !isset($this->_plugins[$type][$name]) || $this->_plugins[$type][$name][4];
    •

  •         if ($_cacheable
    •

  •             || --$this->_cacheable_state>0) return '';
    •

  •         return 'if ($this->caching && !$this->_cache_including): echo \'{/nocache:'
    •

  •             . $this->_cache_serial . '#' . ($this->_nocache_count++)
    •

  •             . '}\'; endif;';
    •

  •     }
    •

  •
    •

  •
    •

  •     /**
    •

  •      * push opening tag-name, file-name and line-number on the tag-stack
    •

  •      * @param string the opening tag's name
    •

  •      */
    •

  •     function _push_tag($open_tag)
    •

  •     {
    •

  •         array_push($this->_tag_stack, array($open_tag, $this->_current_line_no));
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * pop closing tag-name
    •

  •      * raise an error if this stack-top doesn't match with the closing tag
    •

  •      * @param string the closing tag's name
    •

  •      * @return string the opening tag's name
    •

  •      */
    •

  •     function _pop_tag($close_tag)
    •

  •     {
    •

  •         $message = '';
    •

  •         if (count($this->_tag_stack)>0) {
    •

  •             list($_open_tag, $_line_no) = array_pop($this->_tag_stack);
    •

  •             if ($close_tag == $_open_tag) {
    •

  •                 return $_open_tag;
    •

  •             }
    •

  •             if ($close_tag == 'if' && ($_open_tag == 'else' || $_open_tag == 'elseif' )) {
    •

  •                 return $this->_pop_tag($close_tag);
    •

  •             }
    •

  •             if ($close_tag == 'section' && $_open_tag == 'sectionelse') {
    •

  •                 $this->_pop_tag($close_tag);
    •

  •                 return $_open_tag;
    •

  •             }
    •

  •             if ($close_tag == 'foreach' && $_open_tag == 'foreachelse') {
    •

  •                 $this->_pop_tag($close_tag);
    •

  •                 return $_open_tag;
    •

  •             }
    •

  •             if ($_open_tag == 'else' || $_open_tag == 'elseif') {
    •

  •                 $_open_tag = 'if';
    •

  •             } elseif ($_open_tag == 'sectionelse') {
    •

  •                 $_open_tag = 'section';
    •

  •             } elseif ($_open_tag == 'foreachelse') {
    •

  •                 $_open_tag = 'foreach';
    •

  •             }
    •

  •             $message = " expected {/$_open_tag} (opened line $_line_no).";
    •

  •         }
    •

  •         $this->_syntax_error("mismatched tag {/$close_tag}.$message",
    •

  •                              E_USER_ERROR, __FILE__, __LINE__);
    •

  •     }
    •

  •
    •

  • }
    •

  •
    •

  • /**
    •

  •  * compare to values by their string length
    •

  •  *
    •

  •  * @access private
    •

  •  * @param string $a
    •

  •  * @param string $b
    •

  •  * @return 0|-1|1
    •

  •  */
    •

  • function _smarty_sort_length($a, $b)
    •

  • {
    •

  •     if($a == $b)
    •

  •         return 0;
    •

  •
    •

  •     if(strlen($a) == strlen($b))
    •

  •         return ($a > $b) ? -1 : 1;
    •

  •
    •

  •     return (strlen($a) > strlen($b)) ? -1 : 1;
    •

  • }
    •

  •
    •

  •
    •

  • /* vim: set et: */
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:52 +0200 by phpDocumentor 1.4.0a2


Docs For Class Config_File

Class Config_File

[line 34]

Location: /smarty/Config_File.class.php

Remarks

Config file reading class

Class Variable Summary

  • $booleanize =     true

        Controls whether config values of on/true/yes and off/false/no get  converted to boolean values automatically.

  • $fix_newlines =     true

        Controls whether or not to fix mac or dos formatted newlines.

  • $overwrite =     true

        Controls whether variables with the same name overwrite each other.

  • $read_hidden =     true

        Controls whether hidden config sections/vars are read from the file.

  • $_config_data = array()

  • $_config_path =  ""

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    Config_File::Config_File

Config_File(
[string
$config_path = NULL] );

    Parameters

    $config_path

    (optional) path to the config files

    Remarks

    Constructs a new config file class.

    [ Top ]

    Config_File::clear

clear(
[string
$file_name = NULL] );

    Parameters

    $file_name

    file to clear config data for

    Remarks

    Clear loaded config data for a certain file or all files.

    [ Top ]

    Config_File::get

get(
string
$file_name, [string
$section_name = NULL], [string
$var_name = NULL] );

    Parameters

    $file_name

    config file to get info for

    $section_name

    (optional) section to get info for

    $var_name

    (optional) variable to get info for

    Returns

    a value or array of values

    Remarks

    Retrieves config info based on the file, section, and variable name.

    usedby

    Config_File::get_key() - retrieves information from config file and returns it

    [ Top ]

    Config_File::get_file_names

get_file_names(
 );

    Returns

    an array of loaded config file names

    Remarks

    Get all loaded config file names.

    [ Top ]

    Config_File::get_key

&get_key(
$file_name
$config_key );

    Parameters

    $config_key

    string config key (filename/section/var)

    Returns

    same as get()

    Remarks

    Retrieves config info based on the key.

    uses

    Config_File::get() - retrieves information from config file and returns it

    [ Top ]

    Config_File::get_section_names

get_section_names(
string
$file_name );

    Parameters

    $file_name

    config file to get section names from

    Returns

    an array of section names from the specified file

    Remarks

    Get all section names from a loaded file.

    [ Top ]

    Config_File::get_var_names

get_var_names(
string
$file_name, [
$section = NULL], string
$section_name );

    Parameters

    $file_name

    config file to get info for

    $section_name

    (optional) section to get info for

    $section

    Returns

    an array of variables names from the specified file/section

    Remarks

    Get all global or section variable names.

    [ Top ]

    Config_File::load_file

load_file(
string
$file_name, [boolean
$prepend_path = true] );

    Parameters

    $file_name

    file name to load

    $prepend_path

    whether current config path should be                               prepended to the filename

    Remarks

    Load a configuration file manually.

    [ Top ]

    Config_File::parse_contents

parse_contents(
string
$contents );

    Parameters

    $contents

    the file-contents to parse

    Remarks

    parse the source of a configuration file manually.

    [ Top ]

    Config_File::set_file_contents

set_file_contents(
string
$config_file, string
$contents );

    Parameters

    $config_file

    file name of the related contents

    $contents

    the file-contents to parse

    Remarks

    Store the contents of a file manually.

    [ Top ]

    Config_File::set_path

set_path(
string
$config_path );

    Parameters

    $config_path

    path to the config files

    Remarks

    Set the path where configuration files can be found.

    [ Top ]

    Config_File::_set_config_var

_set_config_var(
array
&$container, string
$var_name, mixed
$var_value, boolean
$booleanize );

    Parameters

    &$container

    $var_name

    $var_value

    $booleanize

    determines whether $var_value is converted to                             to true/false

    access

    private

    [ Top ]

    Config_File::_trigger_error_msg

_trigger_error_msg(
string
$error_msg, [integer
$error_type = E_USER_WARNING] );

    Parameters

    $error_msg

    $error_type

    one of

    access

    private

    uses

    trigger_error() - creates a PHP warning/error

    [ Top ]

Variable Detail

  • $booleanize =     true [line 48]
    •

  • Data type: boolean
    •

    Remarks

    Controls whether config values of on/true/yes and off/false/no get  converted to boolean values automatically.

    Options

  • $fix_newlines =     true [line 59]
    •

  • Data type: boolean
    •

    Remarks

    Controls whether or not to fix mac or dos formatted newlines.

    Options  If set to true, \r or \r\n will be changed to \n.

  • $overwrite =     true [line 42]
    •

  • Data type: boolean
    •

    Remarks

    Controls whether variables with the same name overwrite each other.

    Options

  • $read_hidden =     true [line 53]
    •

  • Data type: boolean
    •

    Remarks

    Controls whether hidden config sections/vars are read from the file.

    Options

  • $_config_data = array() [line 64]
    •

  • Data type: mixed
    •

  • $_config_path =  "" [line 63]
    •

  • Data type: mixed
    •

    access

    private

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:57:27 +0200 by phpDocumentor 1.4.0a2


Docs For Class Smarty

Class Smarty

[line 64]

Classes extended from Smarty:

Smarty_Compiler

Template compiling class

XoopsTpl

Template engine

Location: /smarty/Smarty.class.php

Class Variable Summary

  • $autoload_filters = array()

        This indicates which filters are automatically loaded into Smarty.

  • $cache_dir =   'cache'

        The name of the directory for cache files.

  • $cache_handler_func =  null

        The function used for cache file handling. If not set, built-in caching is used.

  • $cache_lifetime =   3600

        This is the number of seconds cached content will persist.

  • $cache_modified_check =  false

        Only used when $caching is enabled. If true, then If-Modified-Since headers  are respected with cached content, and appropriate HTTP headers are sent.

  • $caching =   0

        This enables template caching.

  • $compiler_class =    'Smarty_Compiler'

        The class used for compiling templates.

  • $compiler_file =     'Smarty_Compiler.class.php'

        The file that contains the compiler class. This can a full  pathname, or relative to the php_include path.

  • $compile_check =   true

        This tells Smarty whether to check for recompiling or not. Recompiling  does not need to happen unless a template or config file is changed.

  • $compile_dir =   'templates_c'

        The directory where compiled templates are located.

  • $compile_id =  null

        Set this if you want different sets of compiled files for the same  templates. This is useful for things like different languages.

  • $config_booleanize =  true

        This tells whether or not to automatically booleanize config file variables.

  • $config_class =    'Config_File'

        The class used to load config vars.

  • $config_dir =   'configs'

        The directory where config files are located.

  • $config_fix_newlines =  true

        This tells whether or not automatically fix newlines in config files.

  • $config_overwrite =  true

        This tells if config file vars of the same name overwrite each other or not.

  • $config_read_hidden =  false

        This tells whether hidden sections [.foobar] are readable from the  tempalates or not. Normally you would never allow this since that is  the point behind hidden sections: the application can access them, but  the templates cannot.

  • $debugging =   false

        If debugging is enabled, a debug console window will display  when the page loads (make sure your browser allows unrequested  popup windows)

  • $debugging_ctrl =   'NONE'

        This determines if debugging is enable-able from the browser.

  • $debug_tpl =   ''

        This is the path to the debug console template. If not set,  the default one will be used.

  • $default_modifiers = array()

        This is a list of the modifiers to apply to all template variables.

  • $default_resource_type =  'file'

        This is the resource type to be used when not specified

  • $default_template_handler_func =  ''

        If a template cannot be found, this PHP function will be executed.

  • $error_reporting =   null

        When set, smarty does uses this value as error_reporting-level.

  • $force_compile =   false

        This forces templates to compile every time. Useful for development  or debugging.

  • $left_delimiter =   '{'

        The left delimiter used for the template tags.

  • $php_handling =   SMARTY_PHP_PASSTHRU

        This determines how Smarty handles "<?php ... ?>" tags in templates.

  • $plugins_dir = array('plugins')

        An array of directories searched for plugins.

  • $request_use_auto_globals =  true

        Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false)

  • $request_vars_order =  'EGPCS'

        The order in which request variables are registered, similar to  variables_order in php.ini E = Environment, G = GET, P = POST,  C = Cookies, S = Server

  • $right_delimiter =   '}'

        The right delimiter used for the template tags.

  • $secure_dir = array()

        This is the list of template directories that are considered secure. This  is used only if $security is enabled. One directory per array  element.  $template_dir is in this list implicitly.

  • $security =    false

        This enables template security. When enabled, many things are restricted

  • $security_settings = array(

                                    'PHP_HANDLING'    => false,

                                    'IF_FUNCS'        => array('array', 'list',

                                                               'isset', 'empty',

                                                               'count', 'sizeof',

                                                               'in_array', 'is_array',

                                                               'true', 'false', 'null'),'INCLUDE_ANY'=>false,'PHP_TAGS'=>false,'MODIFIER_FUNCS'=>array('count'),'ALLOW_CONSTANTS'=>false)

        These are the security settings for Smarty. They are used only when  $security is enabled.

  • $template_dir =   'templates'

        The name of the directory where templates are located.

  • $trusted_dir = array()

        This is an array of directories where trusted php scripts reside.

  • $use_sub_dirs =  false

        This tells Smarty whether or not to use sub dirs in the cache/ and  templates_c/ directories. sub directories better organized, but  may not work well with PHP safe mode enabled.

  • $_cache_include =  null

        name of optional cache include file

  • $_cache_including =  false

        indicate if the current code is used in a compiled  include

  • $_cache_info = array()

        info that makes up a cache file

  • $_cache_serials = array()

        cache serials

  • $_compile_id =  null

        for different compiled templates

  • $_config = array(array('vars'  => array(),'files'=>array()))

        loaded configuration settings

  • $_conf_obj =  null

        configuration object

  • $_dir_perms =  0771

        default dir permissions

  • $_file_perms =  0644

        default file permissions

  • $_foreach = array()

        keeps track of foreach blocks

  • $_inclusion_depth =  0

        current template inclusion depth

  • $_plugins = array(

                                       'modifier'      => array(),'function'=>array(),'block'=>array(),'compiler'=>array(),'prefilter'=>array(),'postfilter'=>array(),'outputfilter'=>array(),'resource'=>array(),'insert'=>array())

        table keeping track of plugins

  • $_reg_objects = array()

        registered objects

  • $_sections = array()

        keeps track of sections

  • $_smarty_debug_id =  'SMARTY_DEBUG'

        text in URL to enable debug mode

  • $_smarty_debug_info = array()

        debugging information for debug console

  • $_smarty_md5 =  'f8d698aea36fcbead2b9d5359ffca76f'

        md5 checksum of the string 'Smarty'

  • $_smarty_vars =  null

        stores run-time $smarty.* vars

  • $_tag_stack = array()

        keeps track of tag hierarchy

  • $_tpl_vars = array()

        where assigned template vars are kept

  • $_version =  '2.6.18'

        Smarty version number

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    Smarty::Smarty

Smarty(
 );

    Remarks

    The class constructor.

    [ Top ]

    Smarty::append

append(
array|string
$tpl_var, [mixed
$value = null], [
$merge = false] );

    Parameters

    $tpl_var

    the template variable name(s)

    $value

    the value to append

    $merge

    Remarks

    appends values to template variables

    [ Top ]

    Smarty::append_by_ref

append_by_ref(
string
$tpl_var,
&$value, [
$merge = false], mixed
$value );

    Parameters

    $tpl_var

    the template variable name

    $value

    the referenced value to append

    &$value

    $merge

    Remarks

    appends values to template variables by reference

    [ Top ]

    Smarty::assign

assign(
array|string
$tpl_var, [mixed
$value = null] );

    Parameters

    $tpl_var

    the template variable name(s)

    $value

    the value to assign

    Remarks

    assigns values to template variables

    [ Top ]

    Smarty::assign_by_ref

assign_by_ref(
string
$tpl_var,
&$value, mixed
$value );

    Parameters

    $tpl_var

    the template variable name

    $value

    the referenced value to assign

    &$value

    Remarks

    assigns values to template variables by reference

    [ Top ]

    Smarty::clear_all_assign

clear_all_assign(
 );

    Remarks

    clear all the assigned template variables.

    [ Top ]

    Smarty::clear_all_cache

clear_all_cache(
[string
$exp_time = null] );

    Parameters

    $exp_time

    expire time

    Returns

    results of smarty_core_rm_auto()

    Remarks

    clear the entire contents of cache (all templates)

    [ Top ]

    Smarty::clear_assign

clear_assign(
string
$tpl_var );

    Parameters

    $tpl_var

    the template variable to clear

    Remarks

    clear the given assigned template variable.

    [ Top ]

    Smarty::clear_cache

    clear_cache(
[string
$tpl_file = null], [string
$cache_id = null], [string
$compile_id = null], [string
$exp_time = null] );

    Parameters

    $tpl_file

    name of template file

    $cache_id

    name of cache_id

    $compile_id

    name of compile_id

    $exp_time

    expiration time

    Remarks

    clear cached content for the given template and cache id

    [ Top ]

    Smarty::clear_compiled_tpl

    clear_compiled_tpl(
[string
$tpl_file = null], [string
$compile_id = null], [string
$exp_time = null] );

    Parameters

    $tpl_file

    $compile_id

    $exp_time

    Returns

    results of smarty_core_rm_auto()

    Remarks

    clears compiled version of specified template resource,  or all compiled template files if one is not specified.

    This function is for advanced use only, not normally needed.

    [ Top ]

    Smarty::clear_config

clear_config(
[string
$var = null] );

    Parameters

    $var

    Remarks

    clear configuration values

    [ Top ]

    Smarty::config_load

config_load(
string
$file, [string
$section = null], [string
$scope = 'global'] );

    Parameters

    $file

    $section

    $scope

    Remarks

    load configuration values

    [ Top ]

    Smarty::display

display(
string
$resource_name, [string
$cache_id = null], [string
$compile_id = null] );

    Parameters

    $resource_name

    $cache_id

    $compile_id

    Remarks

    executes & displays the template results

    [ Top ]

    Smarty::fetch

fetch(
string
$resource_name, [string
$cache_id = null], [string
$compile_id = null], [boolean
$display = false] );

    Parameters

    $resource_name

    $cache_id

    $compile_id

    $display

    Remarks

    executes & returns or displays the template results

    [ Top ]

    Smarty::get_config_vars

&get_config_vars(
[string
$name = null], string
$type );

    Parameters

    $name

    $type

    Remarks

    Returns an array containing config variables

    [ Top ]

    Smarty::get_registered_object

&get_registered_object(
string
$name );

    Parameters

    $name

    Remarks

    return a reference to a registered object

    [ Top ]

    Smarty::get_template_vars

&get_template_vars(
[string
$name = null], string
$type );

    Parameters

    $name

    $type

    Remarks

    Returns an array containing template variables

    [ Top ]

    Smarty::is_cached

is_cached(
string
$tpl_file, [string
$cache_id = null], [string
$compile_id = null] );

    Parameters

    $tpl_file

    name of template file

    $cache_id

    $compile_id

    Returns

    results of _read_cache_file()

    Remarks

    test to see if valid cache exists for this template

    [ Top ]

    Smarty::load_filter

load_filter(
string
$type, string
$name );

    Parameters

    $type

    filter type

    $name

    filter name

    Remarks

    load a filter of specified type and name

    [ Top ]

    Smarty::register_block

register_block(
string
$block, string
$block_impl, [
$cacheable = true], [
$cache_attrs = null] );

    Parameters

    $block

    name of template block

    $block_impl

    PHP function to register

    $cacheable

    $cache_attrs

    Remarks

    Registers block function to be used in templates

    [ Top ]

    Smarty::register_compiler_function

register_compiler_function(
string
$function, string
$function_impl, [
$cacheable = true] );

    Parameters

    $function

    name of template function

    $function_impl

    name of PHP function to register

    $cacheable

    Remarks

    Registers compiler function

    [ Top ]

    Smarty::register_function

register_function(
string
$function, string
$function_impl, [
$cacheable = true], [
$cache_attrs = null] );

    Parameters

    $function

    the name of the template function

    $function_impl

    the name of the PHP function to register

    $cacheable

    $cache_attrs

    Remarks

    Registers custom function to be used in templates

    [ Top ]

    Smarty::register_modifier

register_modifier(
string
$modifier, string
$modifier_impl );

    Parameters

    $modifier

    name of template modifier

    $modifier_impl

    name of PHP function to register

    Remarks

    Registers modifier to be used in templates

    [ Top ]

    Smarty::register_object

register_object(
string
$object, object
&$object_impl, [null|array
$allowed = array()], [boolean
$smarty_args = true], [
$block_methods = array()], null|array
$block_functs );

    Parameters

    $object

    name of template object

    &$object_impl

    the referenced PHP object to register

    $allowed

    list of allowed methods (empty = all)

    $smarty_args

    smarty argument format, else traditional

    $block_functs

    list of methods that are block format

    $block_methods

    Remarks

    Registers object to be used in templates

    [ Top ]

    Smarty::register_outputfilter

register_outputfilter(
string
$function );

    Parameters

    $function

    name of PHP function

    Remarks

    Registers an output filter function to apply  to a template output

    [ Top ]

    Smarty::register_postfilter

register_postfilter(
string
$function );

    Parameters

    $function

    name of PHP function to register

    Remarks

    Registers a postfilter function to apply  to a compiled template after compilation

    [ Top ]

    Smarty::register_prefilter

register_prefilter(
string
$function );

    Parameters

    $function

    name of PHP function to register

    Remarks

    Registers a prefilter function to apply  to a template before compiling

    [ Top ]

    Smarty::register_resource

register_resource(
string
$type, array
$functions );

    Parameters

    $type

    name of resource

    $functions

    array of functions to handle resource

    Remarks

    Registers a resource to fetch a template

    [ Top ]

    Smarty::template_exists

template_exists(
string
$tpl_file );

    Parameters

    $tpl_file

    Remarks

    Checks whether requested template exists.

    [ Top ]

    Smarty::trigger_error

trigger_error(
string
$error_msg, [integer
$error_type = E_USER_WARNING] );

    Parameters

    $error_msg

    $error_type

    Remarks

    trigger Smarty error

    [ Top ]

    Smarty::unregister_block

unregister_block(
string
$block );

    Parameters

    $block

    name of template function

    Remarks

    Unregisters block function

    [ Top ]

    Smarty::unregister_compiler_function

unregister_compiler_function(
string
$function );

    Parameters

    $function

    name of template function

    Remarks

    Unregisters compiler function

    [ Top ]

    Smarty::unregister_function

unregister_function(
string
$function );

    Parameters

    $function

    name of template function

    Remarks

    Unregisters custom function

    [ Top ]

    Smarty::unregister_modifier

unregister_modifier(
string
$modifier );

    Parameters

    $modifier

    name of template modifier

    Remarks

    Unregisters modifier

    [ Top ]

    Smarty::unregister_object

unregister_object(
string
$object );

    Parameters

    $object

    name of template object

    Remarks

    Unregisters object

    [ Top ]

    Smarty::unregister_outputfilter

unregister_outputfilter(
string
$function );

    Parameters

    $function

    name of PHP function

    Remarks

    Unregisters an outputfilter function

    [ Top ]

    Smarty::unregister_postfilter

unregister_postfilter(
string
$function );

    Parameters

    $function

    name of PHP function

    Remarks

    Unregisters a postfilter function

    [ Top ]

    Smarty::unregister_prefilter

unregister_prefilter(
string
$function );

    Parameters

    $function

    name of PHP function

    Remarks

    Unregisters a prefilter function

    [ Top ]

    Smarty::unregister_resource

unregister_resource(
string
$type );

    Parameters

    $type

    name of resource

    Remarks

    Unregisters a resource

    [ Top ]

    Smarty::_compile_resource

_compile_resource(
string
$resource_name, string
$compile_path );

    Parameters

    $resource_name

    $compile_path

    Remarks

    compile the template

    [ Top ]

    Smarty::_compile_source

_compile_source(
string
$resource_name,
&$source_content,
&$compiled_content, [
$cache_include_path = null], string
$source_content, string
$compiled_content );

    Parameters

    $resource_name

    $source_content

    $compiled_content

    &$source_content

    &$compiled_content

    $cache_include_path

    Remarks

    compile the given source

    [ Top ]

    Smarty::_dequote

_dequote(
string
$string );

    Parameters

    $string

    Remarks

    Remove starting and ending quotes from the string

    [ Top ]

    Smarty::_eval

_eval(

$code, [
$params = null] );

    Parameters

    $code

    $params

    Remarks

    wrapper for eval() retaining $this

    [ Top ]

    Smarty::_fetch_resource_info

_fetch_resource_info(

&$params, string
$resource_name, string
$source_content, integer
$resource_timestamp, boolean
$get_source, boolean
$quiet );

    Parameters

    $resource_name

    $source_content

    $resource_timestamp

    $get_source

    $quiet

    &$params

    Remarks

    fetch the template info. Gets timestamp, and source  if get_source is true

    sets $source_content to the source of the template, and  $resource_timestamp to its time stamp

    [ Top ]

    Smarty::_get_auto_filename

_get_auto_filename(
string
$auto_base, [string
$auto_source = null], [string
$auto_id = null] );

    Parameters

    $auto_base

    $auto_source

    $auto_id

    Remarks

    get a concrete filename for automagically created content

    staticvar

    string|null 1:

    staticvar

    string|null $_cache_info:

    [ Top ]

    Smarty::_get_auto_id

_get_auto_id(
[string
$cache_id = null], [string
$compile_id = null] );

    Parameters

    $cache_id

    $compile_id

    Remarks

    returns an auto_id for auto-file-functions

    [ Top ]

    Smarty::_get_compile_path

_get_compile_path(
string
$resource_name );

    Parameters

    $resource_name

    Returns

    results of _get_auto_filename()

    Remarks

    Get the compile path for this resource

    [ Top ]

    Smarty::_get_plugin_filepath

_get_plugin_filepath(
string
$type, string
$name );

    Parameters

    $type

    $name

    Remarks

    get filepath of requested plugin

    [ Top ]

    Smarty::_include

_include(

$filename, [
$once = false], [
$params = null] );

    Parameters

    $filename

    $once

    $params

    Remarks

    wrapper for include() retaining $this

    [ Top ]

    Smarty::_is_compiled

_is_compiled(
string
$resource_name, string
$compile_path );

    Parameters

    $resource_name

    $compile_path

    Remarks

    test if resource needs compiling

    [ Top ]

    Smarty::_parse_resource_name

_parse_resource_name(

&$params, string
$resource_base_path, string
$resource_name, string
$resource_type );

    Parameters

    $resource_base_path

    $resource_name

    $resource_type

    &$params

    Remarks

    parse out the type and name from the resource

    [ Top ]

    Smarty::_process_compiled_include_callback

_process_compiled_include_callback(

$match );

    Parameters

    $match

    Remarks

    callback function for preg_replace, to call a non-cacheable block

    [ Top ]

    Smarty::_read_file

_read_file(
string
$filename );

    Parameters

    $filename

    Remarks

    read in a file

    [ Top ]

    Smarty::_run_mod_handler

_run_mod_handler(
string|null
$modifier_name, array|null
$map_array );

    Parameters

    $modifier_name

    $map_array

    Returns

    result of modifiers

    Remarks

    Handle modifiers

    [ Top ]

    Smarty::_smarty_cache_attrs

&_smarty_cache_attrs(

$cache_serial,
$count );

    Parameters

    $cache_serial

    $count

    Remarks

    get or set an array of cached attributes for function that is

    not cacheable

    [ Top ]

    Smarty::_smarty_include

_smarty_include(

$params, string
$_smarty_include_tpl_file, string
$_smarty_include_vars );

    Parameters

    $_smarty_include_tpl_file

    $_smarty_include_vars

    $params

    Remarks

    called for included templates

    [ Top ]

    Smarty::_trigger_fatal_error

    _trigger_fatal_error(
string
$error_msg, [string
$tpl_file = null], [integer
$tpl_line = null], [string
$file = null], [integer
$line = null], [integer
$error_type = E_USER_ERROR] );

    Parameters

    $error_msg

    $tpl_file

    $tpl_line

    $file

    $line

    $error_type

    Remarks

    trigger Smarty plugin error

    [ Top ]

    Smarty::_unlink

_unlink(
string
$resource, [integer
$exp_time = null] );

    Parameters

    $resource

    $exp_time

    Remarks

    unlink a file, possibly using expiration time

    [ Top ]

Variable Detail

  • $autoload_filters = array() [line 338]
    •

  • Data type: array
    •

    Remarks

    This indicates which filters are automatically loaded into Smarty.

    Smarty Configuration Section

    var

    array of filter names

  • $cache_dir =   'cache' [line 167]
    •

  • Data type: string
    •

    Remarks

    The name of the directory for cache files.

    Smarty Configuration Section

  • $cache_handler_func =  null [line 331]
    •

  • Data type: null|string
    •

    Remarks

    The function used for cache file handling. If not set, built-in caching is used.

    Smarty Configuration Section

    var

    function name

  • $cache_lifetime =   3600 [line 178]
    •

  • Data type: integer
    •

    Remarks

    This is the number of seconds cached content will persist.

    Smarty Configuration Section
    • 0 = always regenerate cache
    • -1 = never expires

  • $cache_modified_check =  false [line 188]
    •

  • Data type: boolean
    •

    Remarks

    Only used when $caching is enabled. If true, then If-Modified-Since headers  are respected with cached content, and appropriate HTTP headers are sent.

    Smarty Configuration Section  This way repeated hits to a cached page do not send the entire page to the  client every time.

  • $caching =   0 [line 160]
    •

  • Data type: integer
    •

    Remarks

    This enables template caching.

    Smarty Configuration Section
    • 0 = no caching
    • 1 = use class cache_lifetime value
    • 2 = use cache_lifetime in cache file

  • $compiler_class =    'Smarty_Compiler' [line 392]
    •

  • Data type: string
    •

    Remarks

    The class used for compiling templates.

  • $compiler_file =     'Smarty_Compiler.class.php' [line 385]
    •

  • Data type: string
    •

    Remarks

    The file that contains the compiler class. This can a full  pathname, or relative to the php_include path.

  • $compile_check =   true [line 141]
    •

  • Data type: boolean
    •

    Remarks

    This tells Smarty whether to check for recompiling or not. Recompiling  does not need to happen unless a template or config file is changed.

    Smarty Configuration Section  Typically you enable this during development, and disable for  production.

  • $compile_dir =   'templates_c' [line 82]
    •

  • Data type: string
    •

    Remarks

    The directory where compiled templates are located.

    Smarty Configuration Section

  • $compile_id =  null [line 291]
    •

  • Data type: string
    •

    Remarks

    Set this if you want different sets of compiled files for the same  templates. This is useful for things like different languages.

    Smarty Configuration Section  Instead of creating separate sets of templates per language, you  set different compile_ids like 'en' and 'de'.

  • $config_booleanize =  true [line 354]
    •

  • Data type: boolean
    •

    Remarks

    This tells whether or not to automatically booleanize config file variables.

    If enabled, then the strings "on", "true", and "yes" are treated as boolean  true, and "off", "false" and "no" are treated as boolean false.

  • $config_class =    'Config_File' [line 399]
    •

  • Data type: string
    •

    Remarks

    The class used to load config vars.

  • $config_dir =   'configs' [line 89]
    •

  • Data type: string
    •

    Remarks

    The directory where config files are located.

    Smarty Configuration Section

  • $config_fix_newlines =  true [line 368]
    •

  • Data type: boolean
    •

    Remarks

    This tells whether or not automatically fix newlines in config files.

    It basically converts \r (mac) or \r\n (dos) to \n

  • $config_overwrite =  true [line 347]
    •

  • Data type: boolean
    •

    Remarks

    This tells if config file vars of the same name overwrite each other or not.

    if disabled, same name variables are accumulated in an array.

  • $config_read_hidden =  false [line 362]
    •

  • Data type: boolean
    •

    Remarks

    This tells whether hidden sections [.foobar] are readable from the  tempalates or not. Normally you would never allow this since that is  the point behind hidden sections: the application can access them, but  the templates cannot.

  • $debugging =   false [line 105]
    •

  • Data type: boolean
    •

    Remarks

    If debugging is enabled, a debug console window will display  when the page loads (make sure your browser allows unrequested  popup windows)

    Smarty Configuration Section

  • $debugging_ctrl =   'NONE' [line 131]
    •

  • Data type: string
    •

    Remarks

    This determines if debugging is enable-able from the browser.

    Smarty Configuration Section
    • NONE => no debugging control allowed
    • URL => enable debugging when SMARTY_DEBUG is found in the URL.

    link

    http://www.foo.dom/index.php?SMARTY_DEBUG

  • $debug_tpl =   '' [line 120]
    •

  • Data type: string
    •

    Remarks

    This is the path to the debug console template. If not set,  the default one will be used.

    Smarty Configuration Section

  • $default_modifiers = array() [line 310]
    •

  • Data type: array
    •

    Remarks

    This is a list of the modifiers to apply to all template variables.

    Smarty Configuration Section  Put each modifier in a separate array element in the order you want  them applied. example:
  • array('escape:"htmlall"');
    •

  • $default_resource_type =  'file' [line 324]
    •

  • Data type: array
    •

    Remarks

    This is the resource type to be used when not specified

    Smarty Configuration Section  at the beginning of the resource path. examples:  $smarty->display('file:index.tpl');  $smarty->display('db:index.tpl');  $smarty->display('index.tpl'); // will use default resource type  {include file="file:index.tpl"}  {include file="db:index.tpl"}  {include file="index.tpl"} {* will use default resource type *}

  • $default_template_handler_func =  '' [line 377]
    •

  • Data type: string
    •

    Remarks

    If a template cannot be found, this PHP function will be executed.

    Useful for creating templates on-the-fly or other special action.

    var

    function name

  • $error_reporting =   null [line 112]
    •

  • Data type: boolean
    •

    Remarks

    When set, smarty does uses this value as error_reporting-level.

    Smarty Configuration Section

  • $force_compile =   false [line 149]
    •

  • Data type: boolean
    •

    Remarks

    This forces templates to compile every time. Useful for development  or debugging.

    Smarty Configuration Section

  • $left_delimiter =   '{' [line 255]
    •

  • Data type: string
    •

    Remarks

    The left delimiter used for the template tags.

    Smarty Configuration Section

  • $php_handling =   SMARTY_PHP_PASSTHRU [line 202]
    •

  • Data type: integer
    •

    Remarks

    This determines how Smarty handles "<?php ... ?>" tags in templates.

    Smarty Configuration Section  possible values:
    • SMARTY_PHP_PASSTHRU -> print tags as plain text
    • SMARTY_PHP_QUOTE    -> escape tags as entities
    • SMARTY_PHP_REMOVE   -> remove php tags
    • SMARTY_PHP_ALLOW    -> execute php tags

  • $plugins_dir = array('plugins') [line 96]
    •

  • Data type: array
    •

    Remarks

    An array of directories searched for plugins.

    Smarty Configuration Section

  • $request_use_auto_globals =  true [line 281]
    •

  • Data type: boolean
    •

    Remarks

    Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false)

    Smarty Configuration Section  are uses as request-vars or $_*[]-vars. note: if  request_use_auto_globals is true, then $request_vars_order has  no effect, but the php-ini-value "gpc_order"

  • $request_vars_order =  'EGPCS' [line 271]
    •

  • Data type: string
    •

    Remarks

    The order in which request variables are registered, similar to  variables_order in php.ini E = Environment, G = GET, P = POST,  C = Cookies, S = Server

    Smarty Configuration Section

  • $right_delimiter =   '}' [line 262]
    •

  • Data type: string
    •

    Remarks

    The right delimiter used for the template tags.

    Smarty Configuration Section

  • $secure_dir = array() [line 221]
    •

  • Data type: array
    •

    Remarks

    This is the list of template directories that are considered secure. This  is used only if $security is enabled. One directory per array  element.  $template_dir is in this list implicitly.

    Smarty Configuration Section

  • $security =    false [line 212]
    •

  • Data type: boolean
    •

    Remarks

    This enables template security. When enabled, many things are restricted

    Smarty Configuration Section  in the templates that normally would go unchecked. This is useful when  untrusted parties are editing templates and you want a reasonable level  of security. (no direct execution of PHP in templates for example)

  • $security_settings = array(

                                    'PHP_HANDLING'    => false,

                                    'IF_FUNCS'        => array('array', 'list',

                                                               'isset', 'empty',

                                                               'count', 'sizeof',

                                                               'in_array', 'is_array',

                                                               'true', 'false', 'null'),'INCLUDE_ANY'=>false,'PHP_TAGS'=>false,'MODIFIER_FUNCS'=>array('count'),'ALLOW_CONSTANTS'=>false)     [line 229]
    •

  • Data type: array
    •

    Remarks

    These are the security settings for Smarty. They are used only when  $security is enabled.

    Smarty Configuration Section

  • $template_dir =   'templates' [line 75]
    •

  • Data type: string
    •

    Remarks

    The name of the directory where templates are located.

    Smarty Configuration Section

  • $trusted_dir = array() [line 248]
    •

  • Data type: array
    •

    Remarks

    This is an array of directories where trusted php scripts reside.

    Smarty Configuration Section  $security is disabled during their inclusion/execution.

  • $use_sub_dirs =  false [line 301]
    •

  • Data type: boolean
    •

    Remarks

    This tells Smarty whether or not to use sub dirs in the cache/ and  templates_c/ directories. sub directories better organized, but  may not work well with PHP safe mode enabled.

    Smarty Configuration Section

  • $_cache_include =  null [line 554]
    •

  • Data type: string
    •

    Remarks

    name of optional cache include file

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_cache_including =  false [line 562]
    •

  • Data type: string
    •

    Remarks

    indicate if the current code is used in a compiled  include

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_cache_info = array() [line 502]
    •

  • Data type: array
    •

    Remarks

    info that makes up a cache file

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_cache_serials = array() [line 547]
    •

  • Data type: array
    •

    Remarks

    cache serials

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_compile_id =  null [line 481]
    •

  • Data type: string
    •

    Remarks

    for different compiled templates

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_config = array(array('vars'  => array(),'files'=>array())) [line 453]
    •

  • Data type: array
    •

    Remarks

    loaded configuration settings

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_conf_obj =  null [line 446]
    •

  • Data type: Config_file
    •

    Remarks

    configuration object

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_dir_perms =  0771 [line 516]
    •

  • Data type: integer
    •

    Remarks

    default dir permissions

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_file_perms =  0644 [line 509]
    •

  • Data type: integer
    •

    Remarks

    default file permissions

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_foreach = array() [line 432]
    •

  • Data type: array
    •

    Remarks

    keeps track of foreach blocks

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_inclusion_depth =  0 [line 474]
    •

  • Data type: integer
    •

    Remarks

    current template inclusion depth

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_plugins = array(

                                       'modifier'      => array(),'function'=>array(),'block'=>array(),'compiler'=>array(),'prefilter'=>array(),'postfilter'=>array(),'outputfilter'=>array(),'resource'=>array(),'insert'=>array())     [line 530]
    •

  • Data type: array
    •

    Remarks

    table keeping track of plugins

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_reg_objects = array() [line 523]
    •

  • Data type: array
    •

    Remarks

    registered objects

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_sections = array() [line 425]
    •

  • Data type: array
    •

    Remarks

    keeps track of sections

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_smarty_debug_id =  'SMARTY_DEBUG' [line 488]
    •

  • Data type: string
    •

    Remarks

    text in URL to enable debug mode

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_smarty_debug_info = array() [line 495]
    •

  • Data type: array
    •

    Remarks

    debugging information for debug console

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_smarty_md5 =  'f8d698aea36fcbead2b9d5359ffca76f' [line 460]
    •

  • Data type: string
    •

    Remarks

    md5 checksum of the string 'Smarty'

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_smarty_vars =  null [line 418]
    •

  • Data type: null|array
    •

    Remarks

    stores run-time $smarty.* vars

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_tag_stack = array() [line 439]
    •

  • Data type: array
    •

    Remarks

    keeps track of tag hierarchy

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_tpl_vars = array() [line 411]
    •

  • Data type: array
    •

    Remarks

    where assigned template vars are kept

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

  • $_version =  '2.6.18' [line 467]
    •

  • Data type: string
    •

    Remarks

    Smarty version number

    END Smarty Configuration Section  There should be no need to touch anything below this line.

    access

    private

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:59:33 +0200 by phpDocumentor 1.4.0a2


Docs For Class Smarty_Compiler

Class Smarty_Compiler

[line 35]
Smarty
   |
   --Smarty_Compiler
Location: /smarty/Smarty_Compiler.class.php

Remarks

Template compiling class

Class Variable Summary

  • $_additional_newline =    "\n"
  • $_avar_regexp =    null
  • $_cacheable_state =    0
  • $_cache_attrs_count =    0
  • $_cache_include =    null
  • $_cache_serial =    null
  • $_capture_stack = array()
  • $_current_file =    null
  • $_current_line_no =    1
  • $_cvar_regexp =    null
  • $_db_qstr_regexp =    null
  • $_dvar_guts_regexp =    null
  • $_dvar_regexp =    null
  • $_folded_blocks = array()
  • $_func_call_regexp =    null
  • $_func_regexp =    null
  • $_init_smarty_vars =    false
  • $_mod_regexp =    null
  • $_nocache_count =    0
  • $_num_const_regexp =    null
  • $_obj_call_regexp =    null
  • $_obj_ext_regexp =    null
  • $_obj_params_regexp =    null
  • $_obj_start_regexp =    null
  • $_parenth_param_regexp =    null
  • $_permitted_tokens = array('true','false','yes','no','on','off','null')
  • $_plugin_info = array()
  • $_qstr_regexp =    null
  • $_reg_obj_regexp =    null
  • $_si_qstr_regexp =    null
  • $_strip_depth =    0
  • $_svar_regexp =    null
  • $_var_bracket_regexp =    null
  • $_var_regexp =    null

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class Smarty

  • Smarty::$autoload_filters = array()
    This indicates which filters are automatically loaded into Smarty.
  • Smarty::$cache_dir = 'cache'
    The name of the directory for cache files.
  • Smarty::$cache_handler_func = null
    The function used for cache file handling. If not set, built-in caching is used.
  • Smarty::$cache_lifetime = 3600
    This is the number of seconds cached content will persist.
  • Smarty::$cache_modified_check = false
    Only used when $caching is enabled. If true, then If-Modified-Since headers are respected with cached content, and appropriate HTTP headers are sent.
  • Smarty::$caching = 0
    This enables template caching.
  • Smarty::$compiler_class = 'Smarty_Compiler'
    The class used for compiling templates.
  • Smarty::$compiler_file = 'Smarty_Compiler.class.php'
    The file that contains the compiler class. This can a full pathname, or relative to the php_include path.
  • Smarty::$compile_check = true
    This tells Smarty whether to check for recompiling or not. Recompiling does not need to happen unless a template or config file is changed.
  • Smarty::$compile_dir = 'templates_c'
    The directory where compiled templates are located.
  • Smarty::$compile_id = null
    Set this if you want different sets of compiled files for the same templates. This is useful for things like different languages.
  • Smarty::$config_booleanize = true
    This tells whether or not to automatically booleanize config file variables.
  • Smarty::$config_class = 'Config_File'
    The class used to load config vars.
  • Smarty::$config_dir = 'configs'
    The directory where config files are located.
  • Smarty::$config_fix_newlines = true
    This tells whether or not automatically fix newlines in config files.
  • Smarty::$config_overwrite = true
    This tells if config file vars of the same name overwrite each other or not.
  • Smarty::$config_read_hidden = false
    This tells whether hidden sections [.foobar] are readable from the tempalates or not. Normally you would never allow this since that is the point behind hidden sections: the application can access them, but the templates cannot.
  • Smarty::$debugging = false
    If debugging is enabled, a debug console window will display when the page loads (make sure your browser allows unrequested popup windows)
  • Smarty::$debugging_ctrl = 'NONE'
    This determines if debugging is enable-able from the browser.
  • Smarty::$debug_tpl = ''
    This is the path to the debug console template. If not set, the default one will be used.
  • Smarty::$default_modifiers = array()
    This is a list of the modifiers to apply to all template variables.
  • Smarty::$default_resource_type = 'file'
    This is the resource type to be used when not specified
  • Smarty::$default_template_handler_func = ''
    If a template cannot be found, this PHP function will be executed.
  • Smarty::$error_reporting = null
    When set, smarty does uses this value as error_reporting-level.
  • Smarty::$force_compile = false
    This forces templates to compile every time. Useful for development or debugging.
  • Smarty::$left_delimiter = '{'
    The left delimiter used for the template tags.
  • Smarty::$php_handling = SMARTY_PHP_PASSTHRU
    This determines how Smarty handles "<?php ... ?>" tags in templates.
  • Smarty::$plugins_dir = array('plugins')
    An array of directories searched for plugins.
  • Smarty::$request_use_auto_globals = true
    Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false)
  • Smarty::$request_vars_order = 'EGPCS'
    The order in which request variables are registered, similar to variables_order in php.ini E = Environment, G = GET, P = POST, C = Cookies, S = Server
  • Smarty::$right_delimiter = '}'
    The right delimiter used for the template tags.
  • Smarty::$secure_dir = array()
    This is the list of template directories that are considered secure. This is used only if $security is enabled. One directory per array element. $template_dir is in this list implicitly.
  • Smarty::$security = false
    This enables template security. When enabled, many things are restricted
  • Smarty::$security_settings = array( 'PHP_HANDLING' => false, 'IF_FUNCS' => array('array', 'list', 'isset', 'empty', 'count', 'sizeof', 'in_array', 'is_array', 'true', 'false', 'null'),'INCLUDE_ANY'=>false,'PHP_TAGS'=>false,'MODIFIER_FUNCS'=>array('count'),'ALLOW_CONSTANTS'=>false)
    These are the security settings for Smarty. They are used only when $security is enabled.
  • Smarty::$template_dir = 'templates'
    The name of the directory where templates are located.
  • Smarty::$trusted_dir = array()
    This is an array of directories where trusted php scripts reside.
  • Smarty::$use_sub_dirs = false
    This tells Smarty whether or not to use sub dirs in the cache/ and templates_c/ directories. sub directories better organized, but may not work well with PHP safe mode enabled.
  • Smarty::$_cache_including = false
    indicate if the current code is used in a compiled include
  • Smarty::$_cache_info = array()
    info that makes up a cache file
  • Smarty::$_cache_serials = array()
    cache serials
  • Smarty::$_compile_id = null
    for different compiled templates
  • Smarty::$_config = array(array('vars' => array(),'files'=>array()))
    loaded configuration settings
  • Smarty::$_conf_obj = null
    configuration object
  • Smarty::$_dir_perms = 0771
    default dir permissions
  • Smarty::$_file_perms = 0644
    default file permissions
  • Smarty::$_foreach = array()
    keeps track of foreach blocks
  • Smarty::$_inclusion_depth = 0
    current template inclusion depth
  • Smarty::$_plugins = array( 'modifier' => array(),'function'=>array(),'block'=>array(),'compiler'=>array(),'prefilter'=>array(),'postfilter'=>array(),'outputfilter'=>array(),'resource'=>array(),'insert'=>array())
    table keeping track of plugins
  • Smarty::$_reg_objects = array()
    registered objects
  • Smarty::$_sections = array()
    keeps track of sections
  • Smarty::$_smarty_debug_id = 'SMARTY_DEBUG'
    text in URL to enable debug mode
  • Smarty::$_smarty_debug_info = array()
    debugging information for debug console
  • Smarty::$_smarty_md5 = 'f8d698aea36fcbead2b9d5359ffca76f'
    md5 checksum of the string 'Smarty'
  • Smarty::$_smarty_vars = null
    stores run-time $smarty.* vars
  • Smarty::$_tag_stack = array()
    keeps track of tag hierarchy
  • Smarty::$_tpl_vars = array()
    where assigned template vars are kept
  • Smarty::$_version = '2.6.18'
    Smarty version number

Method Summary

Inherited Method Summary

Inherited From Class Smarty

  • Smarty::Smarty()
    The class constructor.
  • Smarty::append()
    appends values to template variables
  • Smarty::append_by_ref()
    appends values to template variables by reference
  • Smarty::assign()
    assigns values to template variables
  • Smarty::assign_by_ref()
    assigns values to template variables by reference
  • Smarty::clear_all_assign()
    clear all the assigned template variables.
  • Smarty::clear_all_cache()
    clear the entire contents of cache (all templates)
  • Smarty::clear_assign()
    clear the given assigned template variable.
  • Smarty::clear_cache()
    clear cached content for the given template and cache id
  • Smarty::clear_compiled_tpl()
    clears compiled version of specified template resource, or all compiled template files if one is not specified.
  • Smarty::clear_config()
    clear configuration values
  • Smarty::config_load()
    load configuration values
  • Smarty::display()
    executes & displays the template results
  • Smarty::fetch()
    executes & returns or displays the template results
  • Smarty::get_config_vars()
    Returns an array containing config variables
  • Smarty::get_registered_object()
    return a reference to a registered object
  • Smarty::get_template_vars()
    Returns an array containing template variables
  • Smarty::is_cached()
    test to see if valid cache exists for this template
  • Smarty::load_filter()
    load a filter of specified type and name
  • Smarty::register_block()
    Registers block function to be used in templates
  • Smarty::register_compiler_function()
    Registers compiler function
  • Smarty::register_function()
    Registers custom function to be used in templates
  • Smarty::register_modifier()
    Registers modifier to be used in templates
  • Smarty::register_object()
    Registers object to be used in templates
  • Smarty::register_outputfilter()
    Registers an output filter function to apply to a template output
  • Smarty::register_postfilter()
    Registers a postfilter function to apply to a compiled template after compilation
  • Smarty::register_prefilter()
    Registers a prefilter function to apply to a template before compiling
  • Smarty::register_resource()
    Registers a resource to fetch a template
  • Smarty::template_exists()
    Checks whether requested template exists.
  • Smarty::trigger_error()
    trigger Smarty error
  • Smarty::unregister_block()
    Unregisters block function
  • Smarty::unregister_compiler_function()
    Unregisters compiler function
  • Smarty::unregister_function()
    Unregisters custom function
  • Smarty::unregister_modifier()
    Unregisters modifier
  • Smarty::unregister_object()
    Unregisters object
  • Smarty::unregister_outputfilter()
    Unregisters an outputfilter function
  • Smarty::unregister_postfilter()
    Unregisters a postfilter function
  • Smarty::unregister_prefilter()
    Unregisters a prefilter function
  • Smarty::unregister_resource()
    Unregisters a resource
  • Smarty::_compile_resource()
    compile the template
  • Smarty::_compile_source()
    compile the given source
  • Smarty::_dequote()
    Remove starting and ending quotes from the string
  • Smarty::_eval()
    wrapper for eval() retaining $this
  • Smarty::_fetch_resource_info()
    fetch the template info. Gets timestamp, and source if get_source is true
  • Smarty::_get_auto_filename()
    get a concrete filename for automagically created content
  • Smarty::_get_auto_id()
    returns an auto_id for auto-file-functions
  • Smarty::_get_compile_path()
    Get the compile path for this resource
  • Smarty::_get_plugin_filepath()
    get filepath of requested plugin
  • Smarty::_include()
    wrapper for include() retaining $this
  • Smarty::_is_compiled()
    test if resource needs compiling
  • Smarty::_parse_resource_name()
    parse out the type and name from the resource
  • Smarty::_process_compiled_include_callback()
    callback function for preg_replace, to call a non-cacheable block
  • Smarty::_read_file()
    read in a file
  • Smarty::_run_mod_handler()
    Handle modifiers
  • Smarty::_smarty_cache_attrs()
    get or set an array of cached attributes for function that is
  • Smarty::_smarty_include()
    called for included templates
  • Smarty::_trigger_fatal_error()
    trigger Smarty plugin error
  • Smarty::_unlink()
    unlink a file, possibly using expiration time

Method Detail

    Smarty_Compiler::Smarty_Compiler

    Smarty_Compiler( );

    Remarks

    The class constructor.

    [ Top ]

    Smarty_Compiler::_add_plugin

    _add_plugin( string $type, string $name, [boolean? $delayed_loading = null] );

    Parameters

    $type

    $name

    $delayed_loading

    Remarks

    add plugin

    [ Top ]

    Smarty_Compiler::_compile_arg_list

    _compile_arg_list( $type, $name, $attrs, &$cache_code );

    Parameters

    $type

    $name

    $attrs

    &$cache_code

    [ Top ]

    Smarty_Compiler::_compile_block_tag

    _compile_block_tag( string $tag_command, string $tag_args, string $tag_modifier, &$output, string $output );

    Parameters

    $tag_command

    $tag_args

    $tag_modifier

    $output

    &$output

    Remarks

    compile block function tag

    sets $output to compiled block function tag

    [ Top ]

    Smarty_Compiler::_compile_capture_tag

    _compile_capture_tag( boolean $start, [string $tag_args = ''] );

    Parameters

    $start

    true if this is the {capture} tag

    $tag_args

    Remarks

    Compile {capture} .. {/capture} tags

    [ Top ]

    Smarty_Compiler::_compile_compiler_tag

    _compile_compiler_tag( string $tag_command, string $tag_args, &$output, string $output );

    Parameters

    $tag_command

    $tag_args

    $output

    &$output

    Remarks

    compile the custom compiler tag

    sets $output to the compiled custom compiler tag

    [ Top ]

    Smarty_Compiler::_compile_custom_tag

    _compile_custom_tag( string $tag_command, string $tag_args, string $tag_modifier, &$output );

    Parameters

    $tag_command

    $tag_args

    $tag_modifier

    &$output

    Remarks

    compile custom function tag

    [ Top ]

    Smarty_Compiler::_compile_file

    _compile_file( string $resource_name, string $source_content, &$compiled_content, string $compiled_content );

    Parameters

    $resource_name

    $source_content

    $compiled_content

    &$compiled_content

    Remarks

    compile a resource

    sets $compiled_content to the compiled source

    [ Top ]

    Smarty_Compiler::_compile_foreach_start

    _compile_foreach_start( string $tag_args );

    Parameters

    $tag_args

    Remarks

    Compile {foreach ...} tag.

    [ Top ]

    Smarty_Compiler::_compile_if_tag

    _compile_if_tag( string $tag_args, [boolean $elseif = false] );

    Parameters

    $tag_args

    $elseif

    if true, uses elseif instead of if

    Remarks

    Compile {if ...} tag

    [ Top ]

    Smarty_Compiler::_compile_include_php_tag

    _compile_include_php_tag( string $tag_args );

    Parameters

    $tag_args

    Remarks

    Compile {include ...} tag

    [ Top ]

    Smarty_Compiler::_compile_include_tag

    _compile_include_tag( string $tag_args );

    Parameters

    $tag_args

    Remarks

    Compile {include ...} tag

    [ Top ]

    Smarty_Compiler::_compile_insert_tag

    _compile_insert_tag( string $tag_args );

    Parameters

    $tag_args

    Remarks

    Compile {insert ...} tag

    [ Top ]

    Smarty_Compiler::_compile_plugin_call

    _compile_plugin_call( string $type, string $name );

    Parameters

    $type

    $name

    Remarks

    compiles call to plugin of type $type with name $name

    returns a string containing the function-name or method call without the paramter-list that would have follow to make the call valid php-syntax

    [ Top ]

    Smarty_Compiler::_compile_registered_object_tag

    _compile_registered_object_tag( string $tag_command, array $attrs, string $tag_modifier );

    Parameters

    $tag_command

    $attrs

    $tag_modifier

    Remarks

    compile a registered object tag

    [ Top ]

    Smarty_Compiler::_compile_section_start

    _compile_section_start( string $tag_args );

    Parameters

    $tag_args

    Remarks

    Compile {section ...} tag

    [ Top ]

    Smarty_Compiler::_compile_smarty_ref

    _compile_smarty_ref( &$indexes, string $indexes );

    Parameters

    $indexes

    &$indexes

    Remarks

    Compiles references of type $smarty.foo

    [ Top ]

    Smarty_Compiler::_compile_tag

    _compile_tag( string $template_tag );

    Parameters

    $template_tag

    Remarks

    Compile a template tag

    [ Top ]

    Smarty_Compiler::_expand_quoted_text

    _expand_quoted_text( string $var_expr );

    Parameters

    $var_expr

    Remarks

    expand quoted text with embedded variables

    [ Top ]

    Smarty_Compiler::_load_filters

    _load_filters( );

    Remarks

    load pre- and post-filters

    [ Top ]

    Smarty_Compiler::_parse_attrs

    _parse_attrs( string $tag_args );

    Parameters

    $tag_args

    Remarks

    Parse attribute string

    [ Top ]

    Smarty_Compiler::_parse_conf_var

    _parse_conf_var( string $conf_var_expr );

    Parameters

    $conf_var_expr

    Remarks

    parse configuration variable expression into PHP code

    [ Top ]

    Smarty_Compiler::_parse_is_expr

    _parse_is_expr( string $is_arg, array $tokens );

    Parameters

    $is_arg

    $tokens

    Remarks

    Parse is expression

    [ Top ]

    Smarty_Compiler::_parse_modifiers

    _parse_modifiers( &$output, string $modifier_string, string $output );

    Parameters

    $output

    $modifier_string

    &$output

    Remarks

    parse modifier chain into PHP code

    sets $output to parsed modified chain

    [ Top ]

    Smarty_Compiler::_parse_parenth_args

    _parse_parenth_args( string $parenth_args );

    Parameters

    $parenth_args

    Remarks

    parse arguments in function call parenthesis

    [ Top ]

    Smarty_Compiler::_parse_section_prop

    _parse_section_prop( string $section_prop_expr );

    Parameters

    $section_prop_expr

    Remarks

    parse section property expression into PHP code

    [ Top ]

    Smarty_Compiler::_parse_var

    _parse_var( string $var_expr, string $output );

    Parameters

    $var_expr

    $output

    Remarks

    parse variable expression into PHP code

    [ Top ]

    Smarty_Compiler::_parse_vars_props

    _parse_vars_props( &$tokens, array $tokens );

    Parameters

    $tokens

    &$tokens

    Remarks

    compile multiple variables and section properties tokens into PHP code

    [ Top ]

    Smarty_Compiler::_parse_var_props

    _parse_var_props( string $val, string $tag_attrs );

    Parameters

    $val

    $tag_attrs

    Remarks

    compile single variable and section properties token into PHP code

    [ Top ]

    Smarty_Compiler::_pop_cacheable_state

    _pop_cacheable_state( $type, $name );

    Parameters

    $type

    $name

    Remarks

    check if the compilation changes from non-cacheable to cacheable state with the end of the current plugin return php-code to reflect the transition.

    [ Top ]

    Smarty_Compiler::_pop_tag

    _pop_tag( string $close_tag );

    Parameters

    $close_tag

    the closing tag's name

    Returns

    the opening tag's name

    Remarks

    pop closing tag-name

    raise an error if this stack-top doesn't match with the closing tag

    [ Top ]

    Smarty_Compiler::_push_cacheable_state

    _push_cacheable_state( $type, $name );

    Parameters

    $type

    $name

    Remarks

    check if the compilation changes from cacheable to non-cacheable state with the beginning of the current plugin. return php-code to reflect the transition.

    [ Top ]

    Smarty_Compiler::_push_tag

    _push_tag( string $open_tag );

    Parameters

    $open_tag

    the opening tag's name

    Remarks

    push opening tag-name, file-name and line-number on the tag-stack

    [ Top ]

    Smarty_Compiler::_quote_replace

    _quote_replace( string $string );

    Parameters

    $string

    Remarks

    Quote subpattern references

    [ Top ]

    Smarty_Compiler::_syntax_error

    _syntax_error( string $error_msg, [integer $error_type = E_USER_ERROR], [string $file = null], [integer $line = null] );

    Parameters

    $error_msg

    $error_type

    $file

    $line

    Remarks

    display Smarty syntax error

    [ Top ]

Variable Detail

  • $_additional_newline =    "\n" [line 75]
  • Data type: mixed

    • access

    private

  • $_avar_regexp =    null [line 59]
  • Data type: mixed

    • access

    private

  • $_cacheable_state =    0 [line 68]
  • Data type: mixed

    • access

    private

  • $_cache_attrs_count =    0 [line 69]
  • Data type: mixed

    • access

    private

  • $_cache_include =    null [line 72]
  • Data type: mixed Overrides: Array

    • access

    private

  • $_cache_serial =    null [line 71]
  • Data type: mixed

    • access

    private

  • $_capture_stack = array() [line 44]
  • Data type: mixed

    • access

    private

  • $_current_file =    null [line 42]
  • Data type: mixed

    • access

    private

  • $_current_line_no =    1 [line 43]
  • Data type: mixed

    • access

    private

  • $_cvar_regexp =    null [line 57]
  • Data type: mixed

    • access

    private

  • $_db_qstr_regexp =    null [line 48]
  • Data type: mixed

    • access

    private

  • $_dvar_guts_regexp =    null [line 55]
  • Data type: mixed

    • access

    private

  • $_dvar_regexp =    null [line 56]
  • Data type: mixed

    • access

    private

  • $_folded_blocks = array() [line 41]
  • Data type: mixed

    • access

    private

  • $_func_call_regexp =    null [line 63]
  • Data type: mixed

    • access

    private

  • $_func_regexp =    null [line 51]
  • Data type: mixed

    • access

    private

  • $_init_smarty_vars =    false [line 46]
  • Data type: mixed

    • access

    private

  • $_mod_regexp =    null [line 60]
  • Data type: mixed

    • access

    private

  • $_nocache_count =    0 [line 70]
  • Data type: mixed

    • access

    private

  • $_num_const_regexp =    null [line 54]
  • Data type: mixed

    • access

    private

  • $_obj_call_regexp =    null [line 67]
  • Data type: mixed

    • access

    private

  • $_obj_ext_regexp =    null [line 64]
  • Data type: mixed

    • access

    private

  • $_obj_params_regexp =    null [line 66]
  • Data type: mixed

    • access

    private

  • $_obj_start_regexp =    null [line 65]
  • Data type: mixed

    • access

    private

  • $_parenth_param_regexp =    null [line 62]
  • Data type: mixed

    • access

    private

  • $_permitted_tokens = array('true','false','yes','no','on','off','null') [line 47]
  • Data type: mixed

    • access

    private

  • $_plugin_info = array() [line 45]
  • Data type: mixed

    • access

    private

  • $_qstr_regexp =    null [line 50]
  • Data type: mixed

    • access

    private

  • $_reg_obj_regexp =    null [line 52]
  • Data type: mixed

    • access

    private

  • $_si_qstr_regexp =    null [line 49]
  • Data type: mixed

    • access

    private

  • $_strip_depth =    0 [line 74]
  • Data type: mixed

    • access

    private

  • $_svar_regexp =    null [line 58]
  • Data type: mixed

    • access

    private

  • $_var_bracket_regexp =    null [line 53]
  • Data type: mixed

    • access

    private

  • $_var_regexp =    null [line 61]
  • Data type: mixed

    • access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:59:52 +0200 by phpDocumentor 1.4.0a2


Package default Element Index

Element index for package default

Indexes by package:
kernel
xos_kernel
PHPMailer
class
Smarty
xos_opal
xos_logos
XOOPS
xoops20
kernal

Index of all elements
a b c d e f g h i l m n o p r s t u v x z _
top
_
$_channelData | in file xmlrss2parser.php, variable XoopsXmlRss2Parser::$_channelData
$_code | in file xmlrpctag.php, variable XoopsXmlRpcFault::$_code
$_extra | in file xmlrpctag.php, variable XoopsXmlRpcFault::$_extra
$_fault | in file xmlrpctag.php, variable XoopsXmlRpcTag::$_fault
$_fp_timeout | in file snoopy.php, variable Snoopy::$_fp_timeout
$_framedepth | in file snoopy.php, variable Snoopy::$_framedepth
$_frameurls | in file snoopy.php, variable Snoopy::$_frameurls
$_httpmethod | in file snoopy.php, variable Snoopy::$_httpmethod
$_httpversion | in file snoopy.php, variable Snoopy::$_httpversion
$_imageData | in file xmlrss2parser.php, variable XoopsXmlRss2Parser::$_imageData
$_isproxy | in file snoopy.php, variable Snoopy::$_isproxy
$_items | in file xmlrss2parser.php, variable XoopsXmlRss2Parser::$_items
$_maxlinelen in file snoopy.php, variable Snoopy::$_maxlinelen
** Private variables ***
$_mime_boundary | in file snoopy.php, variable Snoopy::$_mime_boundary
$_redirectaddr | in file snoopy.php, variable Snoopy::$_redirectaddr
$_redirectdepth | in file snoopy.php, variable Snoopy::$_redirectdepth
$_submit_method | in file snoopy.php, variable Snoopy::$_submit_method
$_submit_type | in file snoopy.php, variable Snoopy::$_submit_type
$_tags | in file xmlrpctag.php, variable XoopsXmlRpcStruct::$_tags
$_tags | in file xmlrpctag.php, variable XoopsXmlRpcArray::$_tags
$_tags | in file xmlrpctag.php, variable XoopsXmlRpcDocument::$_tags
$_tempArr | in file xmlrss2parser.php, variable XoopsXmlRss2Parser::$_tempArr
$_value | in file xmlrpctag.php, variable XoopsXmlRpcBoolean::$_value
$_value | in file xmlrpctag.php, variable XoopsXmlRpcBase64::$_value
$_value | in file xmlrpctag.php, variable XoopsXmlRpcDatetime::$_value
$_value | in file xmlrpctag.php, variable XoopsXmlRpcInt::$_value
$_value | in file xmlrpctag.php, variable XoopsXmlRpcString::$_value
$_value | in file xmlrpctag.php, variable XoopsXmlRpcDouble::$_value
_checkAdmin | in file xmlrpcapi.php, method XoopsXmlRpcApi::_checkAdmin()
_checkUser | in file xmlrpcapi.php, method XoopsXmlRpcApi::_checkUser()
_check_timeout | in file snoopy.php, method Snoopy::_check_timeout()
_connect | in file snoopy.php, method Snoopy::_connect()
_disconnect | in file snoopy.php, method Snoopy::_disconnect()
_expandlinks | in file snoopy.php, method Snoopy::_expandlinks()
_getPostFields | in file xmlrpcapi.php, method XoopsXmlRpcApi::_getPostFields()
_getTagCdata | in file xmlrpcapi.php, method XoopsXmlRpcApi::_getTagCdata()
_getXoopsApi | in file xmlrpcapi.php, method XoopsXmlRpcApi::_getXoopsApi()
_getXoopsTagMap | in file xmlrpcapi.php, method XoopsXmlRpcApi::_getXoopsTagMap()
_httprequest | in file snoopy.php, method Snoopy::_httprequest()
_httpsrequest | in file snoopy.php, method Snoopy::_httpsrequest()
_prepare_post_body | in file snoopy.php, method Snoopy::_prepare_post_body()
_setUser | in file xmlrpcapi.php, method XoopsXmlRpcApi::_setUser()
_setXoopsTagMap | in file xmlrpcapi.php, method XoopsXmlRpcApi::_setXoopsTagMap()
_stripform | in file snoopy.php, method Snoopy::_stripform()
_striplinks | in file snoopy.php, method Snoopy::_striplinks()
_striptext | in file snoopy.php, method Snoopy::_striptext()
top
a
$accept | in file snoopy.php, variable Snoopy::$accept
$agent | in file snoopy.php, variable Snoopy::$agent
$approved | in file xoopsstory.php, variable XoopsStory::$approved
add | in file xmlrpctag.php, method XoopsXmlRpcStruct::add()
add | in file xmlrpctag.php, method XoopsXmlRpcDocument::add()
add | in file xmlrpctag.php, method XoopsXmlRpcArray::add()
addFile in file class.zipfile.php, method zipfile::addFile()
Adds "file" to archive
addTagHandler in file saxparser.php, method SaxParser::addTagHandler()
**************************************************************************
top
b
$bodytext | in file xoopsstory.php, variable XoopsStory::$bodytext
BloggerApi | in file bloggerapi.php, method BloggerApi::BloggerApi()
BloggerApi | in file bloggerapi.php, class BloggerApi
bodytext | in file xoopsstory.php, method XoopsStory::bodytext()
buildBlock | in file xoopsblock.php, method XoopsBlock::buildBlock()
buildContent | in file xoopsblock.php, method XoopsBlock::buildContent()
buildTitle | in file xoopsblock.php, method XoopsBlock::buildTitle()
bloggerapi.php | procedural page bloggerapi.php
top
c
$comments | in file xoopsstory.php, variable XoopsStory::$comments
$cookies | in file snoopy.php, variable Snoopy::$cookies
$counter | in file xoopsstory.php, variable XoopsStory::$counter
$created | in file xoopsstory.php, variable XoopsStory::$created
$ctable | in file xoopscomments.php, variable XoopsComments::$ctable
$ctrl_dir in file class.zipfile.php, variable zipfile::$ctrl_dir
Central directory
$curl_path | in file snoopy.php, variable Snoopy::$curl_path
check in file xoopssecurity.php, method XoopsSecurity::check()
Check if there is a valid token in $_REQUEST['XOOPS_TOKEN_REQUEST'] - can be expanded for more wide use, later (Mith)
checkBadips in file xoopssecurity.php, method XoopsSecurity::checkBadips()
Check if visitor's IP address is banned Should be changed to return bool and let the action be up to the calling script
checkReferer in file xoopssecurity.php, method XoopsSecurity::checkReferer()
Check the user agent's HTTP REFERER against XOOPS_URL
checkSuperglobals in file xoopssecurity.php, method XoopsSecurity::checkSuperglobals()
Check superglobals for contamination
class.zipfile.php | procedural page class.zipfile.php
clearTokens in file xoopssecurity.php, method XoopsSecurity::clearTokens()
Clear all token values from user's session
comments | in file xoopsstory.php, method XoopsStory::comments()
counter | in file xoopsstory.php, method XoopsStory::counter()
countSimilarBlocks | in file xoopsblock.php, method XoopsBlock::countSimilarBlocks()
created | in file xoopsstory.php, method XoopsStory::created()
createToken in file xoopssecurity.php, method XoopsSecurity::createToken()
Create a token in the user's session
top
d
$datasec in file class.zipfile.php, variable zipfile::$datasec
Array to store compressed data
$db | in file xoopscomments.php, variable XoopsComments::$db
$db | in file xoopsblock.php, variable XoopsBlock::$db
$db | in file xoopstree.php, variable XoopsTree::$db
$db | in file xoopsstory.php, variable XoopsStory::$db
databasefactory.php | procedural page databasefactory.php
delete | in file xoopsstory.php, method XoopsStory::delete()
delete | in file xoopstopic.php, method XoopsTopic::delete()
delete | in file xoopsblock.php, method XoopsBlock::delete()
delete | in file xoopscomments.php, method XoopsComments::delete()
deletePost | in file xoopsapi.php, method XoopsApi::deletePost()
deletePost | in file bloggerapi.php, method BloggerApi::deletePost()
top
e
$eof_ctrl_dir in file class.zipfile.php, variable zipfile::$eof_ctrl_dir
End of central directory record
$error | in file snoopy.php, variable Snoopy::$error
$errors | in file xoopssecurity.php, variable XoopsSecurity::$errors
$errors | in file saxparser.php, variable SaxParser::$errors
$expandlinks | in file snoopy.php, variable Snoopy::$expandlinks
$expired | in file xoopsstory.php, variable XoopsStory::$expired
editPost | in file metaweblogapi.php, method MetaWeblogApi::editPost()
editPost | in file bloggerapi.php, method BloggerApi::editPost()
editPost | in file xoopsapi.php, method XoopsApi::editPost()
encode | in file xmlrpctag.php, method XoopsXmlRpcTag::encode()
errorhandler.php | procedural page errorhandler.php
expired | in file xoopsstory.php, method XoopsStory::expired()
top
f
fetch | in file snoopy.php, method Snoopy::fetch()
fetchform | in file snoopy.php, method Snoopy::fetchform()
fetchlinks | in file snoopy.php, method Snoopy::fetchlinks()
fetchtext | in file snoopy.php, method Snoopy::fetchtext()
file in file class.zipfile.php, method zipfile::file()
Dumps out file
filterToken in file xoopssecurity.php, method XoopsSecurity::filterToken()
Check whether a token value is expired or not
free in file saxparser.php, method SaxParser::free()
**************************************************************************
function.xoInboxCount.php | procedural page function.xoInboxCount.php
function.xoops_link.php | procedural page function.xoops_link.php
formhiddentoken.php | procedural page formhiddentoken.php
top
g
garbageCollection in file xoopssecurity.php, method XoopsSecurity::garbageCollection()
Perform garbage collection, clearing expired tokens
getAllAvatarsList | in file xoopslists.php, method XoopsLists::getAllAvatarsList()
getAllBlocks | in file xoopsblock.php, method XoopsBlock::getAllBlocks()
getAllBlocksByGroup in file xoopsblock.php, method XoopsBlock::getAllBlocksByGroup()
get all the blocks that match the supplied parameters
getAllByGroupModule | in file xoopsblock.php, method XoopsBlock::getAllByGroupModule()
getAllChild | in file xoopstree.php, method XoopsTree::getAllChild()
getAllChildId | in file xoopstree.php, method XoopsTree::getAllChildId()
getAllChildTopics | in file xoopstopic.php, method XoopsTopic::getAllChildTopics()
getAllChildTopicsId | in file xoopstopic.php, method XoopsTopic::getAllChildTopicsId()
getAllComments | in file xoopscomments.php, method XoopsComments::getAllComments()
getAllParentId | in file xoopstree.php, method XoopsTree::getAllParentId()
getAvatarsList | in file xoopslists.php, method XoopsLists::getAvatarsList()
getByModule | in file xoopsblock.php, method XoopsBlock::getByModule()
getCategories | in file metaweblogapi.php, method MetaWeblogApi::getCategories()
getCategories | in file xoopsapi.php, method XoopsApi::getCategories()
getCategoryList | in file movabletypeapi.php, method MovableTypeApi::getCategoryList()
getChannelData | in file xmlrss2parser.php, method XoopsXmlRss2Parser::getChannelData()
getChildTopicsTreeArray | in file xoopstopic.php, method XoopsTopic::getChildTopicsTreeArray()
getChildTreeArray | in file xoopstree.php, method XoopsTree::getChildTreeArray()
getCommentTree | in file xoopscomments.php, method XoopsComments::getCommentTree()
getContent in file xoopsblock.php, method XoopsBlock::getContent()
do stripslashes/htmlspecialchars according to the needed output
getCountryList | in file xoopslists.php, method XoopsLists::getCountryList()
getCurrentLevel | in file saxparser.php, method SaxParser::getCurrentLevel()
getCurrentTag in file saxparser.php, method SaxParser::getCurrentTag()
**************************************************************************
getDatabase in file databasefactory.php, method XoopsDatabaseFactory::getDatabase()
Gets a reference to the only instance of database class. Currently only being used within the installer.
getDatabaseConnection in file databasefactory.php, method XoopsDatabaseFactory::getDatabaseConnection()
Get a reference to the only instance of database class and connects to DB
getDirListAsArray | in file xoopslists.php, method XoopsLists::getDirListAsArray()
getErrors in file xoopssecurity.php, method XoopsSecurity::getErrors()
Get generated errors
getErrors in file saxparser.php, method SaxParser::getErrors()
Gets all the error messages
getFileListAsArray | in file xoopslists.php, method XoopsLists::getFileListAsArray()
getFirstChild | in file xoopstree.php, method XoopsTree::getFirstChild()
getFirstChildId | in file xoopstree.php, method XoopsTree::getFirstChildId()
getFirstChildTopics | in file xoopstopic.php, method XoopsTopic::getFirstChildTopics()
getHtmlList | in file xoopslists.php, method XoopsLists::getHtmlList()
getHtmlListAsArray | in file xoopslists.php, method XoopsLists::getHtmlListAsArray()
getIdPathFromId | in file xoopstree.php, method XoopsTree::getIdPathFromId()
getImageData | in file xmlrss2parser.php, method XoopsXmlRss2Parser::getImageData()
getImagesData | in file themesetparser.php, method XoopsThemeSetParser::getImagesData()
getImgListAsArray | in file xoopslists.php, method XoopsLists::getImgListAsArray()
getItems | in file xmlrss2parser.php, method XoopsXmlRss2Parser::getItems()
getLangList | in file xoopslists.php, method XoopsLists::getLangList()
getModulesList | in file xoopslists.php, method XoopsLists::getModulesList()
getName | in file xmlrss2parser.php, method RssPubDateHandler::getName()
getName | in file xmlrss2parser.php, method RssSourceHandler::getName()
getName | in file xmlrss2parser.php, method RssNameHandler::getName()
getName | in file xmlrss2parser.php, method RssLastBuildDateHandler::getName()
getName | in file xmlrss2parser.php, method RssLanguageHandler::getName()
getName | in file xmlrss2parser.php, method RssTextInputHandler::getName()
getName | in file xmlrss2parser.php, method RssLinkHandler::getName()
getName | in file xmlrss2parser.php, method RssTtlHandler::getName()
getName | in file xmlrss2parser.php, method RssWidthHandler::getName()
getName | in file xmlrss2parser.php, method RssItemHandler::getName()
getName | in file xmlrss2parser.php, method RssWebMasterHandler::getName()
getName | in file xmlrss2parser.php, method RssUrlHandler::getName()
getName in file xmltaghandler.php, method XmlTagHandler::getName()
**************************************************************************
getName | in file xmlrss2parser.php, method RssTitleHandler::getName()
getName | in file xmlrss2parser.php, method RssManagingEditorHandler::getName()
getName | in file themesetparser.php, method ThemeSetTemplateHandler::getName()
getName | in file themesetparser.php, method ThemeSetTagHandler::getName()
getName | in file themesetparser.php, method ThemeSetNameHandler::getName()
getName | in file xmlrss2parser.php, method RssImageHandler::getName()
getName in file xmlrpcparser.php, method RpcArrayHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName in file xmlrpcparser.php, method RpcDoubleHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName in file xmlrpcparser.php, method RpcDateTimeHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName in file xmlrpcparser.php, method RpcBase64Handler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName | in file themesetparser.php, method ThemeSetModuleHandler::getName()
getName | in file themesetparser.php, method ThemeSetLinkHandler::getName()
getName | in file themesetparser.php, method ThemeSetDescriptionHandler::getName()
getName | in file themesetparser.php, method ThemeSetDateCreatedHandler::getName()
getName | in file themesetparser.php, method ThemeSetAuthorHandler::getName()
getName | in file themesetparser.php, method ThemeSetEmailHandler::getName()
getName | in file themesetparser.php, method ThemeSetFileTypeHandler::getName()
getName | in file themesetparser.php, method ThemeSetImageHandler::getName()
getName | in file themesetparser.php, method ThemeSetGeneratorHandler::getName()
getName in file xmlrpcparser.php, method RpcIntHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName in file xmlrpcparser.php, method RpcBooleanHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName | in file xmlrss2parser.php, method RssCommentsHandler::getName()
getName | in file xmlrss2parser.php, method RssChannelHandler::getName()
getName | in file xmlrss2parser.php, method RssAuthorHandler::getName()
getName in file xmlrpcparser.php, method RpcValueHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName | in file xmlrss2parser.php, method RssCopyrightHandler::getName()
getName | in file xmlrss2parser.php, method RssDescriptionHandler::getName()
getName | in file xmlrss2parser.php, method RssHeightHandler::getName()
getName | in file xmlrss2parser.php, method RssGuidHandler::getName()
getName | in file xmlrss2parser.php, method RssGeneratorHandler::getName()
getName | in file xmlrss2parser.php, method RssDocsHandler::getName()
getName | in file xmlrpcparser.php, method RpcStructHandler::getName()
getName | in file xmlrss2parser.php, method RssCategoryHandler::getName()
getName in file xmlrpcparser.php, method RpcNameHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName in file xmlrpcparser.php, method RpcMethodNameHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName in file xmlrpcparser.php, method RpcMemberHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName in file xmlrpcparser.php, method RpcStringHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getNicePathFromId | in file xoopstree.php, method XoopsTree::getNicePathFromId()
getNiceTopicPathFromId | in file xoopstopic.php, method XoopsTopic::getNiceTopicPathFromId()
getNonGroupedBlocks | in file xoopsblock.php, method XoopsBlock::getNonGroupedBlocks()
getOptions in file xoopsblock.php, method XoopsBlock::getOptions()
gets html form for editting block options
getParentTag | in file saxparser.php, method SaxParser::getParentTag()
getPathFromId | in file xoopstree.php, method XoopsTree::getPathFromId()
getPost | in file bloggerapi.php, method BloggerApi::getPost()
getPost | in file xoopsapi.php, method XoopsApi::getPost()
getPost | in file metaweblogapi.php, method MetaWeblogApi::getPost()
getPostCategories | in file movabletypeapi.php, method MovableTypeApi::getPostCategories()
getRecentPosts | in file xoopsapi.php, method XoopsApi::getRecentPosts()
getRecentPosts | in file bloggerapi.php, method BloggerApi::getRecentPosts()
getRecentPosts | in file metaweblogapi.php, method MetaWeblogApi::getRecentPosts()
getStory | in file xoopsstory.php, method XoopsStory::getStory()
getSubjectsList | in file xoopslists.php, method XoopsLists::getSubjectsList()
getTempArr | in file themesetparser.php, method XoopsThemeSetParser::getTempArr()
getTempArr | in file xmlrss2parser.php, method XoopsXmlRss2Parser::getTempArr()
getTemplate | in file bloggerapi.php, method BloggerApi::getTemplate()
getTemplatesData | in file themesetparser.php, method XoopsThemeSetParser::getTemplatesData()
getThemeSetData | in file themesetparser.php, method XoopsThemeSetParser::getThemeSetData()
getThemesList | in file xoopslists.php, method XoopsLists::getThemesList()
getTimeZoneList | in file xoopslists.php, method XoopsLists::getTimeZoneList()
getTokenHTML in file xoopssecurity.php, method XoopsSecurity::getTokenHTML()
Get the HTML code for a XoopsFormHiddenToken object - used in forms that do not use XoopsForm elements
getTopic | in file xoopstopic.php, method XoopsTopic::getTopic()
getTopicsList | in file xoopstopic.php, method XoopsTopic::getTopicsList()
getUserInfo | in file bloggerapi.php, method BloggerApi::getUserInfo()
getUserRankList | in file xoopslists.php, method XoopsLists::getUserRankList()
getUsersBlogs | in file bloggerapi.php, method BloggerApi::getUsersBlogs()
getXmlError in file saxparser.php, method SaxParser::getXmlError()
**************************************************************************
top
h
$headers | in file snoopy.php, variable Snoopy::$headers
$hometext | in file xoopsstory.php, variable XoopsStory::$hometext
$host in file snoopy.php, variable Snoopy::$host
** Public variables ***
$hostname | in file xoopsstory.php, variable XoopsStory::$hostname
handleBeginElement | in file xmlrss2parser.php, method RssSourceHandler::handleBeginElement()
handleBeginElement | in file themesetparser.php, method ThemeSetAuthorHandler::handleBeginElement()
handleBeginElement | in file xmlrpcparser.php, method RpcStructHandler::handleBeginElement()
handleBeginElement | in file themesetparser.php, method ThemeSetImageHandler::handleBeginElement()
handleBeginElement | in file xmlrss2parser.php, method RssItemHandler::handleBeginElement()
handleBeginElement in file xmlrpcparser.php, method RpcArrayHandler::handleBeginElement()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleBeginElement | in file themesetparser.php, method ThemeSetTemplateHandler::handleBeginElement()
handleBeginElement | in file xmlrss2parser.php, method RssTextInputHandler::handleBeginElement()
handleBeginElement in file xmltaghandler.php, method XmlTagHandler::handleBeginElement()
**************************************************************************
handleBeginElement in file saxparser.php, method SaxParser::handleBeginElement()
**************************************************************************
handleBeginElement in file xmlrpcparser.php, method RpcValueHandler::handleBeginElement()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleBeginElement in file xmlrpcparser.php, method RpcMemberHandler::handleBeginElement()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleBeginElementDefault in file saxparser.php, method SaxParser::handleBeginElementDefault()
The default tag handler method for a tag with no handler
handleCharacterData | in file xmlrss2parser.php, method RssDocsHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssGeneratorHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssGuidHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssDescriptionHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssCategoryHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssCommentsHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssAuthorHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssCopyrightHandler::handleCharacterData()
handleCharacterData in file xmlrpcparser.php, method RpcValueHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData | in file xmlrss2parser.php, method RssManagingEditorHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssUrlHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssTtlHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssWebMasterHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssWidthHandler::handleCharacterData()
handleCharacterData in file xmltaghandler.php, method XmlTagHandler::handleCharacterData()
**************************************************************************
handleCharacterData | in file xmlrss2parser.php, method RssTitleHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssSourceHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssLastBuildDateHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssLanguageHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssLinkHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssNameHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssPubDateHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssHeightHandler::handleCharacterData()
handleCharacterData in file xmlrpcparser.php, method RpcNameHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData | in file themesetparser.php, method ThemeSetLinkHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetModuleHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetNameHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetFileTypeHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetEmailHandler::handleCharacterData()
handleCharacterData in file saxparser.php, method SaxParser::handleCharacterData()
**************************************************************************
handleCharacterData | in file themesetparser.php, method ThemeSetDateCreatedHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetDescriptionHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetTagHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetGeneratorHandler::handleCharacterData()
handleCharacterData in file xmlrpcparser.php, method RpcIntHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData in file xmlrpcparser.php, method RpcMethodNameHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData in file xmlrpcparser.php, method RpcDateTimeHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData in file xmlrpcparser.php, method RpcDoubleHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData in file xmlrpcparser.php, method RpcBase64Handler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData in file xmlrpcparser.php, method RpcStringHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData in file xmlrpcparser.php, method RpcBooleanHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterDataDefault in file saxparser.php, method SaxParser::handleCharacterDataDefault()
The default tag handler method for a tag with no handler
handleDefault in file saxparser.php, method SaxParser::handleDefault()
**************************************************************************
handleEndElement in file xmlrpcparser.php, method RpcArrayHandler::handleEndElement()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleEndElement | in file xmlrss2parser.php, method RssTextInputHandler::handleEndElement()
handleEndElement in file saxparser.php, method SaxParser::handleEndElement()
**************************************************************************
handleEndElement in file xmltaghandler.php, method XmlTagHandler::handleEndElement()
**************************************************************************
handleEndElement | in file themesetparser.php, method ThemeSetAuthorHandler::handleEndElement()
handleEndElement | in file xmlrpcparser.php, method RpcStructHandler::handleEndElement()
handleEndElement | in file themesetparser.php, method ThemeSetImageHandler::handleEndElement()
handleEndElement | in file xmlrss2parser.php, method RssItemHandler::handleEndElement()
handleEndElement | in file themesetparser.php, method ThemeSetTemplateHandler::handleEndElement()
handleEndElement in file xmlrpcparser.php, method RpcValueHandler::handleEndElement()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleEndElement in file xmlrpcparser.php, method RpcMemberHandler::handleEndElement()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleEndElementDefault in file saxparser.php, method SaxParser::handleEndElementDefault()
The default tag handler method for a tag with no handler
handleExternalEntityRef in file saxparser.php, method SaxParser::handleExternalEntityRef()
**************************************************************************
handleNotationDecl in file saxparser.php, method SaxParser::handleNotationDecl()
**************************************************************************
handleProcessingInstruction in file saxparser.php, method SaxParser::handleProcessingInstruction()
**************************************************************************
handleUnparsedEntityDecl in file saxparser.php, method SaxParser::handleUnparsedEntityDecl()
**************************************************************************
hometext | in file xoopsstory.php, method XoopsStory::hometext()
hostname | in file xoopsstory.php, method XoopsStory::hostname()
top
i
$id | in file xoopstree.php, variable XoopsTree::$id
$ihome | in file xoopsstory.php, variable XoopsStory::$ihome
$imagesData | in file themesetparser.php, variable XoopsThemeSetParser::$imagesData
$isadmin | in file xmlrpcapi.php, variable XoopsXmlRpcApi::$isadmin
$isCaseFolding | in file saxparser.php, variable SaxParser::$isCaseFolding
ihome | in file xoopsstory.php, method XoopsStory::ihome()
isCustom | in file xoopsblock.php, method XoopsBlock::isCustom()
isFault | in file xmlrpctag.php, method XoopsXmlRpcTag::isFault()
top
l
$lastredirectaddr | in file snoopy.php, variable Snoopy::$lastredirectaddr
$level | in file saxparser.php, variable SaxParser::$level
load | in file xoopsblock.php, method XoopsBlock::load()
load | in file xoopscomments.php, method XoopsComments::load()
logger_render.php | procedural page logger_render.php
top
m
$maxframes | in file snoopy.php, variable Snoopy::$maxframes
$maxlength | in file snoopy.php, variable Snoopy::$maxlength
$maxredirs | in file snoopy.php, variable Snoopy::$maxredirs
$methodName | in file xmlrpctag.php, variable XoopsXmlRpcRequest::$methodName
$mid | in file xoopstopic.php, variable XoopsTopic::$mid
$module | in file xmlrpcapi.php, variable XoopsXmlRpcApi::$module
makeMySelBox | in file xoopstree.php, method XoopsTree::makeMySelBox()
makeStory | in file xoopsstory.php, method XoopsStory::makeStory()
makeTopic | in file xoopstopic.php, method XoopsTopic::makeTopic()
makeTopicSelBox | in file xoopstopic.php, method XoopsTopic::makeTopicSelBox()
MetaWeblogApi | in file metaweblogapi.php, method MetaWeblogApi::MetaWeblogApi()
MetaWeblogApi | in file metaweblogapi.php, class MetaWeblogApi
mimetypes.inc.php | procedural page mimetypes.inc.php
MovableTypeApi | in file movabletypeapi.php, class MovableTypeApi
MovableTypeApi | in file movabletypeapi.php, method MovableTypeApi::MovableTypeApi()
metaweblogapi.php | procedural page metaweblogapi.php
movabletypeapi.php | procedural page movabletypeapi.php
top
n
$nohtml | in file xoopsstory.php, variable XoopsStory::$nohtml
$nosmiley | in file xoopsstory.php, variable XoopsStory::$nosmiley
$notifypub | in file xoopsstory.php, variable XoopsStory::$notifypub
newPost | in file metaweblogapi.php, method MetaWeblogApi::newPost()
newPost | in file xoopsapi.php, method XoopsApi::newPost()
newPost | in file bloggerapi.php, method BloggerApi::newPost()
nohtml | in file xoopsstory.php, method XoopsStory::nohtml()
nosmiley | in file xoopsstory.php, method XoopsStory::nosmiley()
notifypub | in file xoopsstory.php, method XoopsStory::notifypub()
top
o
$offsiteok | in file snoopy.php, variable Snoopy::$offsiteok
$old_offset in file class.zipfile.php, variable zipfile::$old_offset
Last offset position
$order | in file xoopstree.php, variable XoopsTree::$order
top
p
$params | in file xmlrpcapi.php, variable XoopsXmlRpcApi::$params
$parser | in file saxparser.php, variable SaxParser::$parser
$pass | in file snoopy.php, variable Snoopy::$pass
$passcookies | in file snoopy.php, variable Snoopy::$passcookies
$pid | in file xoopstree.php, variable XoopsTree::$pid
$port | in file snoopy.php, variable Snoopy::$port
$prefix | in file xoopstopic.php, variable XoopsTopic::$prefix
$proxy_host | in file snoopy.php, variable Snoopy::$proxy_host
$proxy_pass | in file snoopy.php, variable Snoopy::$proxy_pass
$proxy_port | in file snoopy.php, variable Snoopy::$proxy_port
$proxy_user | in file snoopy.php, variable Snoopy::$proxy_user
$published | in file xoopsstory.php, variable XoopsStory::$published
phpmailer.lang-en.php | procedural page phpmailer.lang-en.php
parse in file saxparser.php, method SaxParser::parse()
**************************************************************************
prefix | in file xoopstopic.php, method XoopsTopic::prefix()
printNavBar | in file xoopscomments.php, method XoopsComments::printNavBar()
published | in file xoopsstory.php, method XoopsStory::published()
top
r
$rawheaders | in file snoopy.php, variable Snoopy::$rawheaders
$read_timeout | in file snoopy.php, variable Snoopy::$read_timeout
$referer | in file snoopy.php, variable Snoopy::$referer
$response | in file xmlrpcapi.php, variable XoopsXmlRpcApi::$response
$response_code | in file snoopy.php, variable Snoopy::$response_code
$results | in file snoopy.php, variable Snoopy::$results
render | in file xmlrpctag.php, method XoopsXmlRpcDouble::render()
render | in file xmlrpctag.php, method XoopsXmlRpcFault::render()
render | in file xmlrpctag.php, method XoopsXmlRpcDocument::render()
render | in file xmlrpctag.php, method XoopsXmlRpcBoolean::render()
render | in file xmlrpctag.php, method XoopsXmlRpcDatetime::render()
render | in file xmlrpctag.php, method XoopsXmlRpcInt::render()
render | in file xmlrpctag.php, method XoopsXmlRpcTag::render()
render | in file xmlrpctag.php, method XoopsXmlRpcString::render()
render | in file xmlrpctag.php, method XoopsXmlRpcStruct::render()
render | in file xmlrpctag.php, method XoopsXmlRpcArray::render()
render | in file xmlrpctag.php, method XoopsXmlRpcRequest::render()
render | in file xmlrpctag.php, method XoopsXmlRpcResponse::render()
render | in file xmlrpctag.php, method XoopsXmlRpcBase64::render()
resetTempArr | in file xmlrss2parser.php, method XoopsXmlRss2Parser::resetTempArr()
resetTempArr | in file themesetparser.php, method XoopsThemeSetParser::resetTempArr()
RpcArrayHandler in file xmlrpcparser.php, class RpcArrayHandler
*****************************************************************************
RpcBase64Handler in file xmlrpcparser.php, class RpcBase64Handler
*****************************************************************************
RpcBooleanHandler in file xmlrpcparser.php, class RpcBooleanHandler
*****************************************************************************
RpcDateTimeHandler in file xmlrpcparser.php, class RpcDateTimeHandler
*****************************************************************************
RpcDoubleHandler in file xmlrpcparser.php, class RpcDoubleHandler
*****************************************************************************
RpcIntHandler in file xmlrpcparser.php, class RpcIntHandler
*****************************************************************************
RpcMemberHandler in file xmlrpcparser.php, class RpcMemberHandler
*****************************************************************************
RpcMethodNameHandler in file xmlrpcparser.php, class RpcMethodNameHandler
*****************************************************************************
RpcNameHandler in file xmlrpcparser.php, class RpcNameHandler
*****************************************************************************
RpcStringHandler in file xmlrpcparser.php, class RpcStringHandler
*****************************************************************************
RpcStructHandler in file xmlrpcparser.php, class RpcStructHandler
*****************************************************************************
RpcValueHandler in file xmlrpcparser.php, class RpcValueHandler
*****************************************************************************
RssAuthorHandler in file xmlrss2parser.php, class RssAuthorHandler
*****************************************************************************
RssCategoryHandler | in file xmlrss2parser.php, method RssCategoryHandler::RssCategoryHandler()
RssCategoryHandler in file xmlrss2parser.php, class RssCategoryHandler
*****************************************************************************
RssChannelHandler | in file xmlrss2parser.php, method RssChannelHandler::RssChannelHandler()
RssChannelHandler in file xmlrss2parser.php, class RssChannelHandler
*****************************************************************************
RssCommentsHandler in file xmlrss2parser.php, class RssCommentsHandler
*****************************************************************************
RssCommentsHandler | in file xmlrss2parser.php, method RssCommentsHandler::RssCommentsHandler()
RssCopyrightHandler in file xmlrss2parser.php, class RssCopyrightHandler
*****************************************************************************
RssCopyrightHandler | in file xmlrss2parser.php, method RssCopyrightHandler::RssCopyrightHandler()
RssDescriptionHandler | in file xmlrss2parser.php, method RssDescriptionHandler::RssDescriptionHandler()
RssDescriptionHandler in file xmlrss2parser.php, class RssDescriptionHandler
*****************************************************************************
RssDocsHandler | in file xmlrss2parser.php, method RssDocsHandler::RssDocsHandler()
RssDocsHandler in file xmlrss2parser.php, class RssDocsHandler
*****************************************************************************
RssGeneratorHandler in file xmlrss2parser.php, class RssGeneratorHandler
*****************************************************************************
RssGeneratorHandler | in file xmlrss2parser.php, method RssGeneratorHandler::RssGeneratorHandler()
RssGuidHandler | in file xmlrss2parser.php, method RssAuthorHandler::RssGuidHandler()
RssGuidHandler | in file xmlrss2parser.php, method RssGuidHandler::RssGuidHandler()
RssGuidHandler in file xmlrss2parser.php, class RssGuidHandler
*****************************************************************************
RssHeightHandler in file xmlrss2parser.php, class RssHeightHandler
*****************************************************************************
RssHeightHandler | in file xmlrss2parser.php, method RssHeightHandler::RssHeightHandler()
RssImageHandler in file xmlrss2parser.php, class RssImageHandler
*****************************************************************************
RssImageHandler | in file xmlrss2parser.php, method RssImageHandler::RssImageHandler()
RssItemHandler in file xmlrss2parser.php, class RssItemHandler
*****************************************************************************
RssItemHandler | in file xmlrss2parser.php, method RssItemHandler::RssItemHandler()
RssLanguageHandler | in file xmlrss2parser.php, method RssLanguageHandler::RssLanguageHandler()
RssLanguageHandler in file xmlrss2parser.php, class RssLanguageHandler
*****************************************************************************
RssLastBuildDateHandler | in file xmlrss2parser.php, method RssLastBuildDateHandler::RssLastBuildDateHandler()
RssLastBuildDateHandler in file xmlrss2parser.php, class RssLastBuildDateHandler
*****************************************************************************
RssLinkHandler in file xmlrss2parser.php, class RssLinkHandler
*****************************************************************************
RssLinkHandler | in file xmlrss2parser.php, method RssLinkHandler::RssLinkHandler()
RssManagingEditorHandler in file xmlrss2parser.php, class RssManagingEditorHandler
*****************************************************************************
RssManagingEditorHandler | in file xmlrss2parser.php, method RssManagingEditorHandler::RssManagingEditorHandler()
RssNameHandler | in file xmlrss2parser.php, method RssNameHandler::RssNameHandler()
RssNameHandler in file xmlrss2parser.php, class RssNameHandler
*****************************************************************************
RssPubDateHandler in file xmlrss2parser.php, class RssPubDateHandler
*****************************************************************************
RssPubDateHandler | in file xmlrss2parser.php, method RssPubDateHandler::RssPubDateHandler()
RssSourceHandler in file xmlrss2parser.php, class RssSourceHandler
*****************************************************************************
RssSourceHandler | in file xmlrss2parser.php, method RssSourceHandler::RssSourceHandler()
RssTextInputHandler in file xmlrss2parser.php, class RssTextInputHandler
*****************************************************************************
RssTitleHandler in file xmlrss2parser.php, class RssTitleHandler
*****************************************************************************
RssTitleHandler | in file xmlrss2parser.php, method RssTitleHandler::RssTitleHandler()
RssTtlHandler | in file xmlrss2parser.php, method RssTtlHandler::RssTtlHandler()
RssTtlHandler in file xmlrss2parser.php, class RssTtlHandler
*****************************************************************************
RssUrlHandler in file xmlrss2parser.php, class RssUrlHandler
*****************************************************************************
RssUrlHandler | in file xmlrss2parser.php, method RssUrlHandler::RssUrlHandler()
RssWebMasterHandler | in file xmlrss2parser.php, method RssWebMasterHandler::RssWebMasterHandler()
RssWebMasterHandler in file xmlrss2parser.php, class RssWebMasterHandler
*****************************************************************************
RssWebMasterHandler | in file xmlrss2parser.php, method RssTextInputHandler::RssWebMasterHandler()
RssWidthHandler in file xmlrss2parser.php, class RssWidthHandler
*****************************************************************************
RssWidthHandler | in file xmlrss2parser.php, method RssWidthHandler::RssWidthHandler()
resource.db.php | procedural page resource.db.php
top
s
$status | in file snoopy.php, variable Snoopy::$status
$storyid | in file xoopsstory.php, variable XoopsStory::$storyid
SaxParser in file saxparser.php, method SaxParser::SaxParser()
**************************************************************************
SaxParser in file saxparser.php, class SaxParser
*****************************************************************************
setApproved | in file xoopsstory.php, method XoopsStory::setApproved()
setBodytext | in file xoopsstory.php, method XoopsStory::setBodytext()
setCaseFolding in file saxparser.php, method SaxParser::setCaseFolding()
**************************************************************************
setChannelData | in file xmlrss2parser.php, method XoopsXmlRss2Parser::setChannelData()
setComments | in file xoopsstory.php, method XoopsStory::setComments()
setcookies | in file snoopy.php, method Snoopy::setcookies()
setErrors in file xoopssecurity.php, method XoopsSecurity::setErrors()
Add an error
setErrors in file saxparser.php, method SaxParser::setErrors()
Sets error messages
setExpired | in file xoopsstory.php, method XoopsStory::setExpired()
setFault | in file xmlrpctag.php, method XoopsXmlRpcTag::setFault()
setHometext | in file xoopsstory.php, method XoopsStory::setHometext()
setHostname | in file xoopsstory.php, method XoopsStory::setHostname()
setIhome | in file xoopsstory.php, method XoopsStory::setIhome()
setImageData | in file xmlrss2parser.php, method XoopsXmlRss2Parser::setImageData()
setImagesData | in file themesetparser.php, method XoopsThemeSetParser::setImagesData()
setItems | in file xmlrss2parser.php, method XoopsXmlRss2Parser::setItems()
setNohtml | in file xoopsstory.php, method XoopsStory::setNohtml()
setNosmiley | in file xoopsstory.php, method XoopsStory::setNosmiley()
setNotifyPub | in file xoopsstory.php, method XoopsStory::setNotifyPub()
setPostCategories | in file movabletypeapi.php, method MovableTypeApi::setPostCategories()
setPublished | in file xoopsstory.php, method XoopsStory::setPublished()
setStoryId | in file xoopsstory.php, method XoopsStory::setStoryId()
setTempArr | in file themesetparser.php, method XoopsThemeSetParser::setTempArr()
setTempArr | in file xmlrss2parser.php, method XoopsXmlRss2Parser::setTempArr()
setTemplate | in file bloggerapi.php, method BloggerApi::setTemplate()
setTemplatesData | in file themesetparser.php, method XoopsThemeSetParser::setTemplatesData()
setThemeSetData | in file themesetparser.php, method XoopsThemeSetParser::setThemeSetData()
setTitle | in file xoopsstory.php, method XoopsStory::setTitle()
setTopicalign | in file xoopsstory.php, method XoopsStory::setTopicalign()
setTopicdisplay | in file xoopsstory.php, method XoopsStory::setTopicdisplay()
setTopicId | in file xoopsstory.php, method XoopsStory::setTopicId()
setTopicImgurl | in file xoopstopic.php, method XoopsTopic::setTopicImgurl()
setTopicPid | in file xoopstopic.php, method XoopsTopic::setTopicPid()
setTopicTitle | in file xoopstopic.php, method XoopsTopic::setTopicTitle()
setType | in file xoopsstory.php, method XoopsStory::setType()
setUid | in file xoopsstory.php, method XoopsStory::setUid()
set_submit_multipart | in file snoopy.php, method Snoopy::set_submit_multipart()
set_submit_normal | in file snoopy.php, method Snoopy::set_submit_normal()
set_submit_xml | in file snoopy.php, method Snoopy::set_submit_xml()
showThreadFoot | in file xoopscomments.php, method XoopsComments::showThreadFoot()
showThreadHead | in file xoopscomments.php, method XoopsComments::showThreadHead()
showThreadPost | in file xoopscomments.php, method XoopsComments::showThreadPost()
showTreeFoot | in file xoopscomments.php, method XoopsComments::showTreeFoot()
showTreeHead | in file xoopscomments.php, method XoopsComments::showTreeHead()
showTreeItem | in file xoopscomments.php, method XoopsComments::showTreeItem()
smarty_function_xoInboxCount | in file function.xoInboxCount.php, function smarty_function_xoInboxCount()
smarty_function_xoops_link | in file function.xoops_link.php, function smarty_function_xoops_link()
smarty_resource_db_secure | in file resource.db.php, function smarty_resource_db_secure()
smarty_resource_db_source | in file resource.db.php, function smarty_resource_db_source()
smarty_resource_db_timestamp | in file resource.db.php, function smarty_resource_db_timestamp()
smarty_resource_db_tplinfo | in file resource.db.php, function smarty_resource_db_tplinfo()
smarty_resource_db_trusted | in file resource.db.php, function smarty_resource_db_trusted()
Snoopy in file snoopy.php, class Snoopy
***********************************************
snoopy.php | procedural page snoopy.php
store | in file xoopsstory.php, method XoopsStory::store()
store | in file xoopstopic.php, method XoopsTopic::store()
store | in file xoopsblock.php, method XoopsBlock::store()
store | in file xoopscomments.php, method XoopsComments::store()
Story | in file xoopsstory.php, method XoopsStory::Story()
storyid | in file xoopsstory.php, method XoopsStory::storyid()
submit | in file snoopy.php, method Snoopy::submit()
submitlinks | in file snoopy.php, method Snoopy::submitlinks()
submittext | in file snoopy.php, method Snoopy::submittext()
supportedMethods | in file movabletypeapi.php, method MovableTypeApi::supportedMethods()
saxparser.php | procedural page saxparser.php
top
t
$table | in file xoopsstory.php, variable XoopsStory::$table
$table | in file xoopstopic.php, variable XoopsTopic::$table
$table | in file xoopstree.php, variable XoopsTree::$table
$tagHandlers | in file saxparser.php, variable SaxParser::$tagHandlers
$tags | in file saxparser.php, variable SaxParser::$tags
$targetEncoding | in file saxparser.php, variable SaxParser::$targetEncoding
$tempArr | in file themesetparser.php, variable XoopsThemeSetParser::$tempArr
$templatesData | in file themesetparser.php, variable XoopsThemeSetParser::$templatesData
$temp_dir | in file snoopy.php, variable Snoopy::$temp_dir
$themeSetData | in file themesetparser.php, variable XoopsThemeSetParser::$themeSetData
$timed_out | in file snoopy.php, variable Snoopy::$timed_out
$title | in file xoopstree.php, variable XoopsTree::$title
$title | in file xoopsstory.php, variable XoopsStory::$title
$topicalign | in file xoopsstory.php, variable XoopsStory::$topicalign
$topicdisplay | in file xoopsstory.php, variable XoopsStory::$topicdisplay
$topicid | in file xoopsstory.php, variable XoopsStory::$topicid
$topicstable | in file xoopsstory.php, variable XoopsStory::$topicstable
$topic_id | in file xoopstopic.php, variable XoopsTopic::$topic_id
$topic_imgurl | in file xoopstopic.php, variable XoopsTopic::$topic_imgurl
$topic_pid | in file xoopstopic.php, variable XoopsTopic::$topic_pid
$topic_title | in file xoopstopic.php, variable XoopsTopic::$topic_title
$type | in file xoopsstory.php, variable XoopsStory::$type
ThemeSetAuthorHandler in file themesetparser.php, class ThemeSetAuthorHandler
*****************************************************************************
ThemeSetAuthorHandler | in file themesetparser.php, method ThemeSetAuthorHandler::ThemeSetAuthorHandler()
ThemeSetDateCreatedHandler | in file themesetparser.php, method ThemeSetDateCreatedHandler::ThemeSetDateCreatedHandler()
ThemeSetDateCreatedHandler in file themesetparser.php, class ThemeSetDateCreatedHandler
*****************************************************************************
ThemeSetDescriptionHandler in file themesetparser.php, class ThemeSetDescriptionHandler
*****************************************************************************
ThemeSetDescriptionHandler | in file themesetparser.php, method ThemeSetDescriptionHandler::ThemeSetDescriptionHandler()
ThemeSetEmailHandler in file themesetparser.php, class ThemeSetEmailHandler
*****************************************************************************
ThemeSetEmailHandler | in file themesetparser.php, method ThemeSetEmailHandler::ThemeSetEmailHandler()
ThemeSetFileTypeHandler | in file themesetparser.php, method ThemeSetFileTypeHandler::ThemeSetFileTypeHandler()
ThemeSetFileTypeHandler in file themesetparser.php, class ThemeSetFileTypeHandler
*****************************************************************************
ThemeSetGeneratorHandler | in file themesetparser.php, method ThemeSetGeneratorHandler::ThemeSetGeneratorHandler()
ThemeSetGeneratorHandler in file themesetparser.php, class ThemeSetGeneratorHandler
*****************************************************************************
ThemeSetImageHandler in file themesetparser.php, class ThemeSetImageHandler
*****************************************************************************
ThemeSetImageHandler | in file themesetparser.php, method ThemeSetImageHandler::ThemeSetImageHandler()
ThemeSetLinkHandler | in file themesetparser.php, method ThemeSetLinkHandler::ThemeSetLinkHandler()
ThemeSetLinkHandler in file themesetparser.php, class ThemeSetLinkHandler
*****************************************************************************
ThemeSetModuleHandler in file themesetparser.php, class ThemeSetModuleHandler
*****************************************************************************
ThemeSetModuleHandler | in file themesetparser.php, method ThemeSetModuleHandler::ThemeSetModuleHandler()
ThemeSetNameHandler in file themesetparser.php, class ThemeSetNameHandler
*****************************************************************************
ThemeSetNameHandler | in file themesetparser.php, method ThemeSetNameHandler::ThemeSetNameHandler()
ThemeSetTagHandler in file themesetparser.php, class ThemeSetTagHandler
*****************************************************************************
ThemeSetTagHandler | in file themesetparser.php, method ThemeSetTagHandler::ThemeSetTagHandler()
ThemeSetTemplateHandler in file themesetparser.php, class ThemeSetTemplateHandler
*****************************************************************************
ThemeSetTemplateHandler | in file themesetparser.php, method ThemeSetTemplateHandler::ThemeSetTemplateHandler()
title | in file xoopsstory.php, method XoopsStory::title()
topic | in file xoopsstory.php, method XoopsStory::topic()
topicalign | in file xoopsstory.php, method XoopsStory::topicalign()
topicdisplay | in file xoopsstory.php, method XoopsStory::topicdisplay()
topicExists | in file xoopstopic.php, method XoopsTopic::topicExists()
topicid | in file xoopsstory.php, method XoopsStory::topicid()
topic_id | in file xoopstopic.php, method XoopsTopic::topic_id()
topic_imgurl | in file xoopstopic.php, method XoopsTopic::topic_imgurl()
topic_pid | in file xoopstopic.php, method XoopsTopic::topic_pid()
topic_title | in file xoopstopic.php, method XoopsTopic::topic_title()
type | in file xoopsstory.php, method XoopsStory::type()
themesetparser.php | procedural page themesetparser.php
top
u
$uid | in file xoopsstory.php, variable XoopsStory::$uid
$user | in file xmlrpcapi.php, variable XoopsXmlRpcApi::$user
$user | in file snoopy.php, variable Snoopy::$user
$use_permission | in file xoopstopic.php, variable XoopsTopic::$use_permission
uid | in file xoopsstory.php, method XoopsStory::uid()
uname | in file xoopsstory.php, method XoopsStory::uname()
unix2DosTime in file class.zipfile.php, method zipfile::unix2DosTime()
Converts an Unix timestamp to a four byte DOS date and time format (date in high two bytes, time in low two bytes allowing magnitude comparison).
updateComments | in file xoopsstory.php, method XoopsStory::updateComments()
updateCounter | in file xoopsstory.php, method XoopsStory::updateCounter()
useAsciiEncoding in file saxparser.php, method SaxParser::useAsciiEncoding()
**************************************************************************
useIsoEncoding in file saxparser.php, method SaxParser::useIsoEncoding()
**************************************************************************
usePermission | in file xoopstopic.php, method XoopsTopic::usePermission()
useUtfEncoding in file saxparser.php, method SaxParser::useUtfEncoding()
**************************************************************************
top
v
validateToken in file xoopssecurity.php, method XoopsSecurity::validateToken()
Check if a token is valid. If no token is specified, $_REQUEST['XOOPS_TOKEN_REQUEST'] is checked
top
x
$xmlInput | in file saxparser.php, variable SaxParser::$xmlInput
$xoopsTagMap | in file xmlrpcapi.php, variable XoopsXmlRpcApi::$xoopsTagMap
xmlrpcapi.php | procedural page xmlrpcapi.php
xmlrpctag.php | procedural page xmlrpctag.php
xoopsapi.php | procedural page xoopsapi.php
xmlrss2parser.php | procedural page xmlrss2parser.php
xmltaghandler.php | procedural page xmltaghandler.php
XmlTagHandler in file xmltaghandler.php, method XmlTagHandler::XmlTagHandler()
**************************************************************************
XmlTagHandler in file xmltaghandler.php, class XmlTagHandler
*****************************************************************************
XoopsApi | in file xoopsapi.php, method XoopsApi::XoopsApi()
XoopsApi | in file xoopsapi.php, class XoopsApi
XoopsBlock | in file xoopsblock.php, method XoopsBlock::XoopsBlock()
XoopsBlock | in file xoopsblock.php, class XoopsBlock
xoopsblock.php | procedural page xoopsblock.php
XoopsComments | in file xoopscomments.php, class XoopsComments
XoopsComments | in file xoopscomments.php, method XoopsComments::XoopsComments()
xoopscomments.php | procedural page xoopscomments.php
XoopsDatabaseFactory | in file databasefactory.php, class XoopsDatabaseFactory
XoopsDatabaseFactory | in file databasefactory.php, method XoopsDatabaseFactory::XoopsDatabaseFactory()
xoopsformloader.php | procedural page xoopsformloader.php
XoopsLists | in file xoopslists.php, class XoopsLists
xoopslists.php | procedural page xoopslists.php
xoopsmodule.php | procedural page xoopsmodule.php
XoopsSecurity in file xoopssecurity.php, method XoopsSecurity::XoopsSecurity()
Constructor
XoopsSecurity | in file xoopssecurity.php, class XoopsSecurity
xoopssecurity.php | procedural page xoopssecurity.php
XoopsStory | in file xoopsstory.php, class XoopsStory
xoopsstory.php | procedural page xoopsstory.php
XoopsThemeSetParser | in file themesetparser.php, method XoopsThemeSetParser::XoopsThemeSetParser()
XoopsThemeSetParser in file themesetparser.php, class XoopsThemeSetParser
*****************************************************************************
XoopsTopic | in file xoopstopic.php, method XoopsTopic::XoopsTopic()
XoopsTopic | in file xoopstopic.php, class XoopsTopic
xoopstopic.php | procedural page xoopstopic.php
XoopsTree | in file xoopstree.php, method XoopsTree::XoopsTree()
XoopsTree | in file xoopstree.php, class XoopsTree
xoopstree.php | procedural page xoopstree.php
xoopsuser.php | procedural page xoopsuser.php
XoopsXmlRpcApi | in file xmlrpcapi.php, method XoopsXmlRpcApi::XoopsXmlRpcApi()
XoopsXmlRpcApi | in file xmlrpcapi.php, class XoopsXmlRpcApi
XoopsXmlRpcArray | in file xmlrpctag.php, method XoopsXmlRpcArray::XoopsXmlRpcArray()
XoopsXmlRpcArray | in file xmlrpctag.php, class XoopsXmlRpcArray
XoopsXmlRpcBase64 | in file xmlrpctag.php, class XoopsXmlRpcBase64
XoopsXmlRpcBase64 | in file xmlrpctag.php, method XoopsXmlRpcBase64::XoopsXmlRpcBase64()
XoopsXmlRpcBoolean | in file xmlrpctag.php, class XoopsXmlRpcBoolean
XoopsXmlRpcBoolean | in file xmlrpctag.php, method XoopsXmlRpcBoolean::XoopsXmlRpcBoolean()
XoopsXmlRpcDatetime | in file xmlrpctag.php, method XoopsXmlRpcDatetime::XoopsXmlRpcDatetime()
XoopsXmlRpcDatetime | in file xmlrpctag.php, class XoopsXmlRpcDatetime
XoopsXmlRpcDocument | in file xmlrpctag.php, method XoopsXmlRpcDocument::XoopsXmlRpcDocument()
XoopsXmlRpcDocument | in file xmlrpctag.php, class XoopsXmlRpcDocument
XoopsXmlRpcDouble | in file xmlrpctag.php, class XoopsXmlRpcDouble
XoopsXmlRpcDouble | in file xmlrpctag.php, method XoopsXmlRpcDouble::XoopsXmlRpcDouble()
XoopsXmlRpcFault | in file xmlrpctag.php, method XoopsXmlRpcFault::XoopsXmlRpcFault()
XoopsXmlRpcFault | in file xmlrpctag.php, class XoopsXmlRpcFault
XoopsXmlRpcInt | in file xmlrpctag.php, method XoopsXmlRpcInt::XoopsXmlRpcInt()
XoopsXmlRpcInt | in file xmlrpctag.php, class XoopsXmlRpcInt
XoopsXmlRpcRequest | in file xmlrpctag.php, class XoopsXmlRpcRequest
XoopsXmlRpcRequest | in file xmlrpctag.php, method XoopsXmlRpcRequest::XoopsXmlRpcRequest()
XoopsXmlRpcResponse | in file xmlrpctag.php, class XoopsXmlRpcResponse
XoopsXmlRpcString | in file xmlrpctag.php, method XoopsXmlRpcString::XoopsXmlRpcString()
XoopsXmlRpcString | in file xmlrpctag.php, class XoopsXmlRpcString
XoopsXmlRpcStruct | in file xmlrpctag.php, class XoopsXmlRpcStruct
XoopsXmlRpcStruct | in file xmlrpctag.php, method XoopsXmlRpcStruct::XoopsXmlRpcStruct()
XoopsXmlRpcTag | in file xmlrpctag.php, class XoopsXmlRpcTag
XoopsXmlRpcTag | in file xmlrpctag.php, method XoopsXmlRpcTag::XoopsXmlRpcTag()
XoopsXmlRss2Parser in file xmlrss2parser.php, class XoopsXmlRss2Parser
*****************************************************************************
XoopsXmlRss2Parser | in file xmlrss2parser.php, method XoopsXmlRss2Parser::XoopsXmlRss2Parser()
XOOPS_LISTS_INCLUDED | in file xoopslists.php, constant XOOPS_LISTS_INCLUDED
top
z
zipdownloader.php | procedural page zipdownloader.php
zipfile | in file class.zipfile.php, class zipfile


Class Trees for Package default

Documentation generated on Tue, 28 Aug 2007 22:56:21 +0200 by phpDocumentor 1.4.0a2


Docs for page bloggerapi.php

File: /xml/rpc/bloggerapi.php

filesource

Source Code for this file

Classes in this file:
BloggerApi

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php' [line 34]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:56:40 +0200 by phpDocumentor 1.4.0a2


Docs for page class.zipfile.php

File: /class.zipfile.php

filesource

Source Code for this file

Classes in this file:
zipfile

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:15 +0200 by phpDocumentor 1.4.0a2


Docs for page databasefactory.php

File: /database/databasefactory.php

filesource

Source Code for this file

Classes in this file:
XoopsDatabaseFactory

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:48 +0200 by phpDocumentor 1.4.0a2


Docs for page errorhandler.php

File: /errorhandler.php

filesource

Source Code for this file

Classes in this file:
XoopsErrorHandler
Backward compatibility code, do not use this class directly

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH.'/class/logger.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH.'/class/logger.php' [line 30]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:50 +0200 by phpDocumentor 1.4.0a2


Docs for page formhiddentoken.php

File: /xoopsform/formhiddentoken.php

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2005 XOOPS.org

filesource

Source Code for this file

Classes in this file:
XoopsFormHiddenToken
A hidden token field

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:06 +0200 by phpDocumentor 1.4.0a2


Docs for page function.xoInboxCount.php

File: /smarty/xoops_plugins/function.xoInboxCount.php

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_function_xoInboxCount()

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_function_xoInboxCount() [line 5]

    Usage: smarty_function_xoInboxCount( $params, &$smarty)

    Parameters

    $params

    &$smarty

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:40 +0200 by phpDocumentor 1.4.0a2


Docs for page function.xoops_link.php

File: /smarty/xoops_plugins/function.xoops_link.php

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_function_xoops_link()

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_function_xoops_link() [line 51]

    Usage: smarty_function_xoops_link( $params, $smarty)

    Parameters

    $params

    $smarty

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:41 +0200 by phpDocumentor 1.4.0a2


Docs for page logger_render.php

File: /logger_render.php

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:47 +0200 by phpDocumentor 1.4.0a2


Docs for page metaweblogapi.php

File: /xml/rpc/metaweblogapi.php

filesource

Source Code for this file

Classes in this file:
MetaWeblogApi

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php' [line 34]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:49 +0200 by phpDocumentor 1.4.0a2


Docs for page mimetypes.inc.php

File: /mimetypes.inc.php

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:53 +0200 by phpDocumentor 1.4.0a2


Docs for page movabletypeapi.php

File: /xml/rpc/movabletypeapi.php

filesource

Source Code for this file

Classes in this file:
MovableTypeApi

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php' [line 34]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:59:07 +0200 by phpDocumentor 1.4.0a2


Docs for page phpmailer.lang-en.php

File: /mail/phpmailer/language/phpmailer.lang-en.php

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:59:14 +0200 by phpDocumentor 1.4.0a2


Docs for page resource.db.php

File: /smarty/xoops_plugins/resource.db.php

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_resource_db_secure()
  • void smarty_resource_db_source()
  • void smarty_resource_db_timestamp()
  • void smarty_resource_db_tplinfo()
  • void smarty_resource_db_trusted()

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_resource_db_secure() [line 37]

    Usage: smarty_resource_db_secure( $tpl_name, &$smarty)

    Parameters

    $tpl_name

    &$smarty

    [ Top ]

  • void smarty_resource_db_source() [line 11]

    Usage: smarty_resource_db_source( $tpl_name, &$tpl_source, &$smarty)

    Parameters

    $tpl_name

    &$tpl_source

    &$smarty

    [ Top ]

  • void smarty_resource_db_timestamp() [line 25]

    Usage: smarty_resource_db_timestamp( $tpl_name, &$tpl_timestamp, &$smarty)

    Parameters

    $tpl_name

    &$tpl_timestamp

    &$smarty

    [ Top ]

  • void smarty_resource_db_tplinfo() [line 48]

    Usage: smarty_resource_db_tplinfo( $tpl_name)

    Parameters

    $tpl_name

    [ Top ]

  • void smarty_resource_db_trusted() [line 43]

    Usage: smarty_resource_db_trusted( $tpl_name, &$smarty)

    Parameters

    $tpl_name

    &$smarty

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:59:15 +0200 by phpDocumentor 1.4.0a2


Docs for page saxparser.php

File: /xml/saxparser.php

filesource

Source Code for this file

Classes in this file:
SaxParser
*****************************************************************************

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:59:17 +0200 by phpDocumentor 1.4.0a2


Docs for page snoopy.php

File: /snoopy.php

filesource

Source Code for this file

Classes in this file:
Snoopy
***********************************************

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:59:55 +0200 by phpDocumentor 1.4.0a2


Docs for page themesetparser.php

File: /xml/themesetparser.php

filesource

Source Code for this file

Classes in this file:
XoopsThemeSetParser
*****************************************************************************
ThemeSetDateCreatedHandler
*****************************************************************************
ThemeSetAuthorHandler
*****************************************************************************
ThemeSetDescriptionHandler
*****************************************************************************
ThemeSetGeneratorHandler
*****************************************************************************
ThemeSetNameHandler
*****************************************************************************
ThemeSetEmailHandler
*****************************************************************************
ThemeSetLinkHandler
*****************************************************************************
ThemeSetTemplateHandler
*****************************************************************************
ThemeSetImageHandler
*****************************************************************************
ThemeSetModuleHandler
*****************************************************************************
ThemeSetFileTypeHandler
*****************************************************************************
ThemeSetTagHandler
*****************************************************************************

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH.'/class/xml/saxparser.php'
  • include_once = XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH.'/class/xml/saxparser.php' [line 35]

  • include_once file: = XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php' [line 36]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:16 +0200 by phpDocumentor 1.4.0a2


Docs for page xmlrpcapi.php

File: /xml/rpc/xmlrpcapi.php

filesource

Source Code for this file

Classes in this file:
XoopsXmlRpcApi

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:27 +0200 by phpDocumentor 1.4.0a2


Docs for page xmlrpctag.php

File: /xml/rpc/xmlrpctag.php

filesource

Source Code for this file

Classes in this file:
XoopsXmlRpcDocument
XoopsXmlRpcResponse
XoopsXmlRpcRequest
XoopsXmlRpcTag
XoopsXmlRpcFault
XoopsXmlRpcInt
XoopsXmlRpcDouble
XoopsXmlRpcBoolean
XoopsXmlRpcString
XoopsXmlRpcDatetime
XoopsXmlRpcBase64
XoopsXmlRpcArray
XoopsXmlRpcStruct

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:35 +0200 by phpDocumentor 1.4.0a2


Docs for page xmlrss2parser.php

File: /xml/rss/xmlrss2parser.php

filesource

Source Code for this file

Classes in this file:
XoopsXmlRss2Parser
*****************************************************************************
RssChannelHandler
*****************************************************************************
RssTitleHandler
*****************************************************************************
RssLinkHandler
*****************************************************************************
RssDescriptionHandler
*****************************************************************************
RssGeneratorHandler
*****************************************************************************
RssCopyrightHandler
*****************************************************************************
RssNameHandler
*****************************************************************************
RssManagingEditorHandler
*****************************************************************************
RssLanguageHandler
*****************************************************************************
RssWebMasterHandler
*****************************************************************************
RssDocsHandler
*****************************************************************************
RssTtlHandler
*****************************************************************************
RssTextInputHandler
*****************************************************************************
RssLastBuildDateHandler
*****************************************************************************
RssImageHandler
*****************************************************************************
RssUrlHandler
*****************************************************************************
RssWidthHandler
*****************************************************************************
RssHeightHandler
*****************************************************************************
RssItemHandler
*****************************************************************************
RssCategoryHandler
*****************************************************************************
RssCommentsHandler
*****************************************************************************
RssPubDateHandler
*****************************************************************************
RssGuidHandler
*****************************************************************************
RssAuthorHandler
*****************************************************************************
RssSourceHandler
*****************************************************************************

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH.'/class/xml/saxparser.php'
  • require_once = XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH.'/class/xml/saxparser.php' [line 34]

  • require_once file: = XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php' [line 35]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:39 +0200 by phpDocumentor 1.4.0a2


Docs for page xmltaghandler.php

File: /xml/xmltaghandler.php

filesource

Source Code for this file

Classes in this file:
XmlTagHandler
*****************************************************************************

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:47 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopsapi.php

File: /xml/rpc/xoopsapi.php

filesource

Source Code for this file

Classes in this file:
XoopsApi

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php' [line 34]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:47 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopsblock.php

File: /xoopsblock.php

filesource

Source Code for this file

Classes in this file:
XoopsBlock

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH."/kernel/object.php"

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH."/kernel/object.php" [line 35]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:51 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopscomments.php

File: /xoopscomments.php

filesource

Source Code for this file

Classes in this file:
XoopsComments

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopstree.php"
  • include_once = XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/comment.php'
  • require_once = XOOPS_ROOT_PATH.'/class/xoopsobject.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopstree.php" [line 34]

  • include_once file: = XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/comment.php' [line 36]

  • require_once file: = XOOPS_ROOT_PATH.'/class/xoopsobject.php' [line 35]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:58 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopsformloader.php

File: /xoopsformloader.php

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/form.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formcheckbox.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formlabel.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formpassword.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formbutton.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formhidden.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselectcountry.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formfile.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formelement.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formradio.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formradioyn.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselecttimezone.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselectlang.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselectgroup.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselectuser.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselecttheme.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselectmatchoption.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formtext.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formdhtmltextarea.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formelementtray.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/themeform.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formtextdateselect.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/simpleform.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formdatetime.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formcolorpicker.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formhiddentoken.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formtextarea.php"

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/form.php" [line 7]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formcheckbox.php" [line 12]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formlabel.php" [line 8]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php" [line 9]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formpassword.php" [line 10]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formbutton.php" [line 11]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formhidden.php" [line 13]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselectcountry.php" [line 18]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formfile.php" [line 14]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formelement.php" [line 6]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formradio.php" [line 15]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formradioyn.php" [line 16]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselecttimezone.php" [line 19]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselectlang.php" [line 20]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselectgroup.php" [line 21]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselectuser.php" [line 23]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselecttheme.php" [line 24]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselectmatchoption.php" [line 25]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formtext.php" [line 26]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formdhtmltextarea.php" [line 28]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formelementtray.php" [line 29]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/themeform.php" [line 30]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formtextdateselect.php" [line 32]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/simpleform.php" [line 31]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formdatetime.php" [line 33]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formcolorpicker.php" [line 36]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formhiddentoken.php" [line 34]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formtextarea.php" [line 27]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:01:04 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopslists.php

File: /xoopslists.php

filesource

Source Code for this file

Classes in this file:
XoopsLists

Include Statements Summary

Global Variable Summary

Constant Summary

  • XOOPS_LISTS_INCLUDED = 1

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

  • XOOPS_LISTS_INCLUDED = 1 [line 34]

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:01:05 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopsmodule.php

File: /xoopsmodule.php

Remarks

this file is for backward compatibility only

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH.'/kernel/module.php'
    load the new module class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH.'/kernel/module.php' [line 13]

    Remarks

    load the new module class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:01:18 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopssecurity.php

File: /xoopssecurity.php

filesource

Source Code for this file

Classes in this file:
XoopsSecurity

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:01:21 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopsstory.php

File: /xoopsstory.php

filesource

Source Code for this file

Classes in this file:
XoopsStory

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopstopic.php"
  • include_once = XOOPS_ROOT_PATH."/class/xoopsuser.php"

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopstopic.php" [line 34]

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsuser.php" [line 35]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:01:22 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopstopic.php

File: /xoopstopic.php

filesource

Source Code for this file

Classes in this file:
XoopsTopic

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopstree.php"

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopstree.php" [line 34]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:01:25 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopstree.php

File: /xoopstree.php

filesource

Source Code for this file

Classes in this file:
XoopsTree

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:01:28 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopsuser.php

File: /xoopsuser.php

filesource

Source Code for this file

Classes in this file:

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH.'/kernel/user.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH.'/kernel/user.php' [line 7]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:01:30 +0200 by phpDocumentor 1.4.0a2


Docs for page zipdownloader.php

File: /zipdownloader.php

filesource

Source Code for this file

Classes in this file:
XoopsZipDownloader
Sends non HTML files through a http socket

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH.'/class/downloader.php'
  • include_once = XOOPS_ROOT_PATH.'/class/class.zipfile.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH.'/class/downloader.php' [line 34]

  • include_once file: = XOOPS_ROOT_PATH.'/class/class.zipfile.php' [line 35]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:01:30 +0200 by phpDocumentor 1.4.0a2


File Source for bloggerapi.php

Source for file bloggerapi.php

Documentation is available at bloggerapi.php

  • <?php
    •

  • // $Id: bloggerapi.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • require_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php';
    •

  •
    •

  • class BloggerApi extends XoopsXmlRpcApi
    •

  • {
    •

  •
    •

  •     function BloggerApi(&$params, &$response, &$module)
    •

  •     {
    •

  •         $this->XoopsXmlRpcApi($params, $response, $module);
    •

  •         $this->_setXoopsTagMap('storyid', 'postid');
    •

  •         $this->_setXoopsTagMap('published', 'dateCreated');
    •

  •         $this->_setXoopsTagMap('uid', 'userid');
    •

  •     }
    •

  •
    •

  •     function newPost()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[2], $this->params[3])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             if (!$fields =& $this->_getPostFields(null, $this->params[1])) {
    •

  •                 $this->response->add(new XoopsXmlRpcFault(106));
    •

  •             } else {
    •

  •                 $missing = array();
    •

  •                 $post = array();
    •

  •                 foreach ($fields as $tag => $detail) {
    •

  •                     $maptag = $this->_getXoopsTagMap($tag);
    •

  •                     $data = $this->_getTagCdata($this->params[4], $maptag, true);
    •

  •                     if (trim($data) == ''){
    •

  •                         if ($detail['required']) {
    •

  •                             $missing[] = $maptag;
    •

  •                         }
    •

  •                     } else {
    •

  •                         $post[$tag] = $data;
    •

  •                     }
    •

  •                 }
    •

  •                 if (count($missing) > 0) {
    •

  •                     $msg = '';
    •

  •                     foreach ($missing as $m) {
    •

  •                         $msg .= '<'.$m.'> ';
    •

  •                     }
    •

  •                     $this->response->add(new XoopsXmlRpcFault(109, $msg));
    •

  •                 } else {
    •

  •                     $newparams = array();
    •

  •                     // Xoops Api ignores App key
    •

  •                     $newparams[0] = $this->params[1];
    •

  •                     $newparams[1] = $this->params[2];
    •

  •                     $newparams[2] = $this->params[3];
    •

  •                     foreach ($post as $key => $value) {
    •

  •                         $newparams[3][$key] =& $value;
    •

  •                         unset($value);
    •

  •                     }
    •

  •                     $newparams[3]['xoops_text'] =& $this->params[4];
    •

  •                     $newparams[4] = $this->params[5];
    •

  •                     $xoopsapi =& $this->_getXoopsApi($newparams);
    •

  •                     $xoopsapi->_setUser($this->user, $this->isadmin);
    •

  •                     $xoopsapi->newPost();
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function editPost()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[2], $this->params[3])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             if (!$fields =& $this->_getPostFields($this->params[1])) {
    •

  •             } else {
    •

  •                 $missing = array();
    •

  •                 $post = array();
    •

  •                 foreach ($fields as $tag => $detail) {
    •

  •                     $data = $this->_getTagCdata($this->params[4], $tag, true);
    •

  •                     if (trim($data) == ''){
    •

  •                         if ($detail['required']) {
    •

  •                             $missing[] = $tag;
    •

  •                         }
    •

  •                     } else {
    •

  •                         $post[$tag] = $data;
    •

  •                     }
    •

  •                 }
    •

  •                 if (count($missing) > 0) {
    •

  •                     $msg = '';
    •

  •                     foreach ($missing as $m) {
    •

  •                         $msg .= '<'.$m.'> ';
    •

  •                     }
    •

  •                     $this->response->add(new XoopsXmlRpcFault(109, $msg));
    •

  •                 } else {
    •

  •                     $newparams = array();
    •

  •                     // XOOPS API ignores App key (index 0 of params)
    •

  •                     $newparams[0] = $this->params[1];
    •

  •                     $newparams[1] = $this->params[2];
    •

  •                     $newparams[2] = $this->params[3];
    •

  •                     foreach ($post as $key => $value) {
    •

  •                         $newparams[3][$key] =& $value;
    •

  •                         unset($value);
    •

  •                     }
    •

  •                     $newparams[3]['xoops_text'] =& $this->params[4];
    •

  •                     $newparams[4] = $this->params[5];
    •

  •                     $xoopsapi =& $this->_getXoopsApi($newparams);
    •

  •                     $xoopsapi->_setUser($this->user, $this->isadmin);
    •

  •                     $xoopsapi->editPost();
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function deletePost()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[2], $this->params[3])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             // XOOPS API ignores App key (index 0 of params)
    •

  •             array_shift($this->params);
    •

  •             $xoopsapi =& $this->_getXoopsApi($this->params);
    •

  •             $xoopsapi->_setUser($this->user, $this->isadmin);
    •

  •             $xoopsapi->deletePost();
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function getPost()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[2], $this->params[3])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             // XOOPS API ignores App key (index 0 of params)
    •

  •             array_shift($this->params);
    •

  •             $xoopsapi =& $this->_getXoopsApi($this->params);
    •

  •             $xoopsapi->_setUser($this->user, $this->isadmin);
    •

  •             $ret =& $xoopsapi->getPost(false);
    •

  •             if (is_array($ret)) {
    •

  •                 $struct = new XoopsXmlRpcStruct();
    •

  •                 $content = '';
    •

  •                 foreach ($ret as $key => $value) {
    •

  •                     $maptag = $this->_getXoopsTagMap($key);
    •

  •                     switch($maptag) {
    •

  •                     case 'userid':
    •

  •                         $struct->add('userid', new XoopsXmlRpcString($value));
    •

  •                         break;
    •

  •                     case 'dateCreated':
    •

  •                         $struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
    •

  •                         break;
    •

  •                     case 'postid':
    •

  •                         $struct->add('postid', new XoopsXmlRpcString($value));
    •

  •                         break;
    •

  •                     default :
    •

  •                         $content .= '<'.$key.'>'.trim($value).'</'.$key.'>';
    •

  •                         break;
    •

  •                     }
    •

  •                 }
    •

  •                 $struct->add('content', new XoopsXmlRpcString($content));
    •

  •                 $this->response->add($struct);
    •

  •             } else {
    •

  •                 $this->response->add(new XoopsXmlRpcFault(106));
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function getRecentPosts()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[2], $this->params[3])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             // XOOPS API ignores App key (index 0 of params)
    •

  •             array_shift($this->params);
    •

  •             $xoopsapi =& $this->_getXoopsApi($this->params);
    •

  •             $xoopsapi->_setUser($this->user, $this->isadmin);
    •

  •             $ret =& $xoopsapi->getRecentPosts(false);
    •

  •             if (is_array($ret)) {
    •

  •                 $arr = new XoopsXmlRpcArray();
    •

  •                 $count = count($ret);
    •

  •                 if ($count == 0) {
    •

  •                     $this->response->add(new XoopsXmlRpcFault(106, 'Found 0 Entries'));
    •

  •                 } else {
    •

  •                     for ($i = 0; $i < $count; $i++) {
    •

  •                         $struct = new XoopsXmlRpcStruct();
    •

  •                         $content = '';
    •

  •                         foreach($ret[$i] as $key => $value) {
    •

  •                             $maptag = $this->_getXoopsTagMap($key);
    •

  •                             switch($maptag) {
    •

  •                             case 'userid':
    •

  •                                 $struct->add('userid', new XoopsXmlRpcString($value));
    •

  •                                 break;
    •

  •                             case 'dateCreated':
    •

  •                                 $struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
    •

  •                                 break;
    •

  •                             case 'postid':
    •

  •                                 $struct->add('postid', new XoopsXmlRpcString($value));
    •

  •                                 break;
    •

  •                             default :
    •

  •                                 $content .= '<'.$key.'>'.trim($value).'</'.$key.'>';
    •

  •                                 break;
    •

  •                             }
    •

  •                         }
    •

  •                         $struct->add('content', new XoopsXmlRpcString($content));
    •

  •                         $arr->add($struct);
    •

  •                         unset($struct);
    •

  •                     }
    •

  •                     $this->response->add($arr);
    •

  •                 }
    •

  •             } else {
    •

  •                 $this->response->add(new XoopsXmlRpcFault(106));
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function getUsersBlogs()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             $arr = new XoopsXmlRpcArray();
    •

  •             $struct = new XoopsXmlRpcStruct();
    •

  •             $struct->add('url', new XoopsXmlRpcString(XOOPS_URL.'/modules/'.$this->module->getVar('dirname').'/'));
    •

  •             $struct->add('blogid', new XoopsXmlRpcString($this->module->getVar('mid')));
    •

  •             $struct->add('blogName', new XoopsXmlRpcString('XOOPS Blog'));
    •

  •             $arr->add($struct);
    •

  •             $this->response->add($arr);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function getUserInfo()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             $struct = new XoopsXmlRpcStruct();
    •

  •             $struct->add('nickname', new XoopsXmlRpcString($this->user->getVar('uname')));
    •

  •             $struct->add('userid', new XoopsXmlRpcString($this->user->getVar('uid')));
    •

  •             $struct->add('url', new XoopsXmlRpcString($this->user->getVar('url')));
    •

  •             $struct->add('email', new XoopsXmlRpcString($this->user->getVar('email')));
    •

  •             $struct->add('lastname', new XoopsXmlRpcString(''));
    •

  •             $struct->add('firstname', new XoopsXmlRpcString($this->user->getVar('name')));
    •

  •             $this->response->add($struct);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function getTemplate()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[2], $this->params[3])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             switch ($this->params[5]) {
    •

  •             case 'main':
    •

  •                 $this->response->add(new XoopsXmlRpcFault(107));
    •

  •                 break;
    •

  •             case 'archiveIndex':
    •

  •                 $this->response->add(new XoopsXmlRpcFault(107));
    •

  •                 break;
    •

  •             default:
    •

  •                 $this->response->add(new XoopsXmlRpcFault(107));
    •

  •                 break;
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function setTemplate()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[2], $this->params[3])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             $this->response->add(new XoopsXmlRpcFault(107));
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:56:45 +0200 by phpDocumentor 1.4.0a2


File Source for class.zipfile.php

Source for file class.zipfile.php

Documentation is available at class.zipfile.php

  • <?php
    •

  • // $Id: class.zipfile.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • /*
    •

  •     package::i.tools
    •

  •
    •

  •     php-downloader    v1.0    -    www.ipunkt.biz
    •

  •
    •

  •     (c)    2002 - www.ipunkt.biz (rok)
    •

  •
    •

  •  * Zip file creation class.
    •

  •  * Makes zip files.
    •

  •  *
    •

  •  * Based on :
    •

  •  *
    •

  •  *  http://www.zend.com/codex.php?id=535&single=1
    •

  •  *  By Eric Mueller <eric@themepark.com>
    •

  •  *
    •

  •  *  http://www.zend.com/codex.php?id=470&single=1
    •

  •  *  by Denis125 <webmaster@atlant.ru>
    •

  •  *
    •

  •  *  a patch from Peter Listiak <mlady@users.sourceforge.net> for last modified
    •

  •  *  date and time of the compressed file
    •

  •  *
    •

  •  * Official ZIP file format: http://www.pkware.com/appnote.txt
    •

  •  *
    •

  •  * @copyright    (c)    2002 - www.ipunkt.biz (rok)
    •

  •  * @access  public
    •

  •  *
    •

  •  * @package     kernel
    •

  •  * @subpackage  core
    •

  •  */
    •

  • class zipfile
    •

  • {
    •

  •     /**
    •

  •      * Array to store compressed data
    •

  •      *
    •

  •      * @var  array    $datasec
    •

  •      */
    •

  •     var $datasec      = array();
    •

  •
    •

  •     /**
    •

  •      * Central directory
    •

  •      *
    •

  •      * @var  array    $ctrl_dir
    •

  •      */
    •

  •     var $ctrl_dir     = array();
    •

  •
    •

  •     /**
    •

  •      * End of central directory record
    •

  •      *
    •

  •      * @var  string   $eof_ctrl_dir
    •

  •      */
    •

  •     var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
    •

  •
    •

  •     /**
    •

  •      * Last offset position
    •

  •      *
    •

  •      * @var  integer  $old_offset
    •

  •      */
    •

  •     var $old_offset   = 0;
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Converts an Unix timestamp to a four byte DOS date and time format (date
    •

  •      * in high two bytes, time in low two bytes allowing magnitude comparison).
    •

  •      *
    •

  •      * @param  integer  the current Unix timestamp
    •

  •      *
    •

  •      * @return integer  the current date in a four byte DOS format
    •

  •      *
    •

  •      * @access private
    •

  •      */
    •

  •     function unix2DosTime($unixtime = 0)
    •

  •     {
    •

  •         $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);
    •

  •
    •

  •         if ($timearray['year'] < 1980) {
    •

  •             $timearray['year']    = 1980;
    •

  •             $timearray['mon']     = 1;
    •

  •             $timearray['mday']    = 1;
    •

  •             $timearray['hours']   = 0;
    •

  •             $timearray['minutes'] = 0;
    •

  •             $timearray['seconds'] = 0;
    •

  •         } // end if
    •

  •
    •

  •         return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) |
    •

  •                 ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);
    •

  •     } // end of the 'unix2DosTime()' method
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Adds "file" to archive
    •

  •      *
    •

  •      * @param  string   file contents
    •

  •      * @param  string   name of the file in the archive (may contains the path)
    •

  •      * @param  integer  the current timestamp
    •

  •      *
    •

  •      * @access public
    •

  •      */
    •

  •     function addFile($data, $name, $time = 0)
    •

  •     {
    •

  •         $name     = str_replace('\\', '/', $name);
    •

  •
    •

  •         $dtime    = dechex($this->unix2DosTime($time));
    •

  •         $hexdtime = '\x' . $dtime[6] . $dtime[7]
    •

  •                   . '\x' . $dtime[4] . $dtime[5]
    •

  •                   . '\x' . $dtime[2] . $dtime[3]
    •

  •                   . '\x' . $dtime[0] . $dtime[1];
    •

  •         eval('$hexdtime = "' . $hexdtime . '";');
    •

  •
    •

  •         $fr   = "\x50\x4b\x03\x04";
    •

  •         $fr   .= "\x14\x00";            // ver needed to extract
    •

  •         $fr   .= "\x00\x00";            // gen purpose bit flag
    •

  •         $fr   .= "\x08\x00";            // compression method
    •

  •         $fr   .= $hexdtime;             // last mod time and date
    •

  •
    •

  •         // "local file header" segment
    •

  •         $unc_len = strlen($data);
    •

  •         $crc     = crc32($data);
    •

  •         $zdata   = gzcompress($data);
    •

  •         $zdata   = substr(substr($zdata, 0, strlen($zdata) - 4), 2); // fix crc bug
    •

  •         $c_len   = strlen($zdata);
    •

  •         $fr      .= pack('V', $crc);             // crc32
    •

  •         $fr      .= pack('V', $c_len);           // compressed filesize
    •

  •         $fr      .= pack('V', $unc_len);         // uncompressed filesize
    •

  •         $fr      .= pack('v', strlen($name));    // length of filename
    •

  •         $fr      .= pack('v', 0);                // extra field length
    •

  •         $fr      .= $name;
    •

  •
    •

  •         // "file data" segment
    •

  •         $fr .= $zdata;
    •

  •
    •

  •         // "data descriptor" segment (optional but necessary if archive is not
    •

  •         // served as file)
    •

  •         $fr .= pack('V', $crc);                 // crc32
    •

  •         $fr .= pack('V', $c_len);               // compressed filesize
    •

  •         $fr .= pack('V', $unc_len);             // uncompressed filesize
    •

  •
    •

  •         // add this entry to array
    •

  •         $this -> datasec[] = $fr;
    •

  •         $new_offset        = strlen(implode('', $this->datasec));
    •

  •
    •

  •         // now add to central directory record
    •

  •         $cdrec = "\x50\x4b\x01\x02";
    •

  •         $cdrec .= "\x00\x00";                // version made by
    •

  •         $cdrec .= "\x14\x00";                // version needed to extract
    •

  •         $cdrec .= "\x00\x00";                // gen purpose bit flag
    •

  •         $cdrec .= "\x08\x00";                // compression method
    •

  •         $cdrec .= $hexdtime;                 // last mod time & date
    •

  •         $cdrec .= pack('V', $crc);           // crc32
    •

  •         $cdrec .= pack('V', $c_len);         // compressed filesize
    •

  •         $cdrec .= pack('V', $unc_len);       // uncompressed filesize
    •

  •         $cdrec .= pack('v', strlen($name) ); // length of filename
    •

  •         $cdrec .= pack('v', 0 );             // extra field length
    •

  •         $cdrec .= pack('v', 0 );             // file comment length
    •

  •         $cdrec .= pack('v', 0 );             // disk number start
    •

  •         $cdrec .= pack('v', 0 );             // internal file attributes
    •

  •         $cdrec .= pack('V', 32 );            // external file attributes - 'archive' bit set
    •

  •
    •

  •         $cdrec .= pack('V', $this -> old_offset ); // relative offset of local header
    •

  •         $this -> old_offset = $new_offset;
    •

  •
    •

  •         $cdrec .= $name;
    •

  •
    •

  •         // optional extra field, file comment goes here
    •

  •         // save to central directory
    •

  •         $this -> ctrl_dir[] = $cdrec;
    •

  •     } // end of the 'addFile()' method
    •

  •
    •

  •
    •

  •     /**
    •

  •      * Dumps out file
    •

  •      *
    •

  •      * @return  string  the zipped file
    •

  •      *
    •

  •      * @access public
    •

  •      */
    •

  •     function file()
    •

  •     {
    •

  •         $data    = implode('', $this -> datasec);
    •

  •         $ctrldir = implode('', $this -> ctrl_dir);
    •

  •
    •

  •         return
    •

  •             $data .
    •

  •             $ctrldir .
    •

  •             $this -> eof_ctrl_dir .
    •

  •             pack('v', count($this -> ctrl_dir)) .  // total # of entries "on this disk"
    •

  •             pack('v', count($this -> ctrl_dir)) .  // total # of entries overall
    •

  •             pack('V', strlen($ctrldir)) .           // size of central dir
    •

  •             pack('V', strlen($data)) .              // offset to start of central dir
    •

  •             "\x00\x00";                             // .zip file comment length
    •

  •     } // end of the 'file()' method
    •

  •
    •

  • } // end of the 'zipfile' class
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:16 +0200 by phpDocumentor 1.4.0a2


File Source for databasefactory.php

Source for file databasefactory.php

Documentation is available at databasefactory.php

  • <?php
    •

  • class XoopsDatabaseFactory
    •

  • {
    •

  •
    •

  •     function XoopsDatabaseFactory()
    •

  •     {
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get a reference to the only instance of database class and connects to DB
    •

  •      *
    •

  •      * if the class has not been instantiated yet, this will also take
    •

  •      * care of that
    •

  •      *
    •

  •      * @static
    •

  •      * @staticvar   object  The only instance of database class
    •

  •      * @return      object  Reference to the only instance of database class
    •

  •      */
    •

  •     function &getDatabaseConnection()
    •

  •     {
    •

  •         static $instance;
    •

  •         if (!isset($instance)) {
    •

  •             $file = XOOPS_ROOT_PATH.'/class/database/'.XOOPS_DB_TYPE.'database.php';
    •

  •             require_once $file;
    •

  •             if (!defined('XOOPS_DB_PROXY')) {
    •

  •                 $class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseSafe';
    •

  •             } else {
    •

  •                 $class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseProxy';
    •

  •             }
    •

  •             $instance =& new $class();
    •

  •             $instance->setLogger(XoopsLogger::instance());
    •

  •             $instance->setPrefix(XOOPS_DB_PREFIX);
    •

  •             if (!$instance->connect()) {
    •

  •                 trigger_error("notrace:Unable to connect to database", E_USER_ERROR);
    •

  •             }
    •

  •         }
    •

  •         return $instance;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Gets a reference to the only instance of database class. Currently
    •

  •      * only being used within the installer.
    •

  •      *
    •

  •      * @static
    •

  •      * @staticvar   object  The only instance of database class
    •

  •      * @return      object  Reference to the only instance of database class
    •

  •      */
    •

  •     function &getDatabase()
    •

  •     {
    •

  •         static $database;
    •

  •         if (!isset($database)) {
    •

  •             $file = XOOPS_ROOT_PATH.'/class/database/'.XOOPS_DB_TYPE.'database.php';
    •

  •             require_once $file;
    •

  •             if (!defined('XOOPS_DB_PROXY')) {
    •

  •                 $class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseSafe';
    •

  •             } else {
    •

  •                 $class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseProxy';
    •

  •             }
    •

  •             $database =& new $class();
    •

  •         }
    •

  •         return $database;
    •

  •     }
    •

  •
    •

  •
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:48 +0200 by phpDocumentor 1.4.0a2


File Source for errorhandler.php

Source for file errorhandler.php

Documentation is available at errorhandler.php

  • <?php
    •

  • // $Id: errorhandler.php 506 2006-05-26 23:10:37Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  •
    •

  • defined( 'XOOPS_ROOT_PATH' ) or die();
    •

  •
    •

  • require_once XOOPS_ROOT_PATH . '/class/logger.php';
    •

  •
    •

  • /**
    •

  •  * Backward compatibility code, do not use this class directly
    •

  •  */
    •

  • class XoopsErrorHandler extends XoopsLogger {
    •

  •     /**
    •

  •      * Activate the error handler
    •

  •      */
    •

  •     function activate( $showErrors = false ) {
    •

  •         $this->activated = $showErrors;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Render the list of errors
    •

  •      */
    •

  •     function renderErrors() {
    •

  •         return $this->dump( 'errors' );
    •

  •     }
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:50 +0200 by phpDocumentor 1.4.0a2


File Source for formhiddentoken.php

Source for file formhiddentoken.php

Documentation is available at formhiddentoken.php

  • <?php
    •

  • // $Id: formhiddentoken.php 2 2005-11-02 18:23:29Z skalpa $ //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 // //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  *
    •

  •  * @author      Kazumi Ono  <onokazu@xoops.org>
    •

  •  * @copyright   copyright (c) 2000-2005 XOOPS.org
    •

  •  */
    •

  • /**
    •

  •  * A hidden token field
    •

  •  *
    •

  •  *
    •

  •  * @author      Kazumi Ono  <onokazu@xoops.org>
    •

  •  * @copyright   copyright (c) 2000-2005 XOOPS.org
    •

  •  */
    •

  • class XoopsFormHiddenToken extends XoopsFormHidden {
    •

  •
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param   string  $name   "name" attribute
    •

  •      */
    •

  •     function XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 0){
    •

  •         $this->XoopsFormHidden($name, $GLOBALS['xoopsSecurity']->createToken($timeout));
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:06 +0200 by phpDocumentor 1.4.0a2


File Source for function.xoInboxCount.php

Source for file function.xoInboxCount.php

Documentation is available at function.xoInboxCount.php

  • <?php
    •

  •
    •

  •
    •

  •
    •

  • function smarty_function_xoInboxCount( $params, &$smarty ) {
    •

  •     global $xoopsUser;
    •

  •
    •

  •     if ( !isset($xoopsUser) || !is_object($xoopsUser) ) {
    •

  •         return;
    •

  •     }
    •

  •     $time = time();
    •

  •     if ( isset( $_SESSION['xoops_inbox_count'] ) && @$_SESSION['xoops_inbox_count_expire'] > $time ) {
    •

  •         $count = intval( $_SESSION['xoops_inbox_count'] );
    •

  •     } else {
    •

  •         $pm_handler =& xoops_gethandler( 'privmessage' );
    •

  •         $criteria = new CriteriaCompo( new Criteria('read_msg', 0) );
    •

  •         $criteria->add( new Criteria( 'to_userid', $xoopsUser->getVar('uid') ) );
    •

  •         $count = intval( $pm_handler->getCount($criteria) );
    •

  •         $_SESSION['xoops_inbox_count'] = $count;
    •

  •         $_SESSION['xoops_inbox_count_expire'] = $time + 60;
    •

  •     }
    •

  •     if ( !@empty( $params['assign'] ) ) {
    •

  •         $smarty->assign( $params['assign'], $count );
    •

  •     } else {
    •

  •         echo $count;
    •

  •     }
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:41 +0200 by phpDocumentor 1.4.0a2


File Source for function.xoops_link.php

Source for file function.xoops_link.php

Documentation is available at function.xoops_link.php

  • <?php
    •

  • // $Id: function.xoops_link.php 506 2006-05-26 23:10:37Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  •
    •

  • /*
    •

  •  * Smarty plugin
    •

  •  * -------------------------------------------------------------
    •

  •  * Type:     function
    •

  •  * Name:     xoops_link
    •

  •  * Version:  1.0
    •

  •  * Author:     Skalpa Keo <skalpa@xoops.org>
    •

  •  * Purpose:  format URL for linking to specific Xoops page
    •

  •  * Input:    module    = module to link to (optional, default to current module)
    •

  •  *           page    = page to link to (optional, default to current page)
    •

  •  *           params    = query string parameters (optional, default to empty)
    •

  •  *                    ex: urlparm1=,urlparm2,urlparm3=val3, etc.....
    •

  •  *                        urlparm3 value will be set to val3
    •

  •  *                        urlparm2 value will keep current one (no = sign)
    •

  •  *                        urlparm1 value will be set to empty ( = sign, but nothing after)
    •

  •  *
    •

  •  *            I.e: The template called by 'index.php?cid=5' calls this function with
    •

  •  *                {xoops_link page="viewcat.php" urlvars="cid,orderby=titleA"}>
    •

  •  *            Then the generated URL will be:
    •

  •  *                XOOPS_URL/modules/MODULENAME/viewcat.php?cid=5&orderby=titleA
    •

  •  * -------------------------------------------------------------
    •

  •  */
    •

  •
    •

  • function smarty_function_xoops_link($params, $smarty) {
    •

  •     $urlstr='';
    •

  •     if (isset($params['urlvars'])) {
    •

  •         $szvars=explode( '&', $params['urlvars'] );
    •

  •         $vars=array();
    •

  •         // Split the string making an array from the ('name','value') pairs
    •

  •         foreach ($szvars as $szvar) {
    •

  •             $pos=strpos($szvar,'=');
    •

  •             if ( $pos != false ) {            // If a value is specified, use it
    •

  •                 $vars[] = array( 'name' => substr($szvar,0,$pos), 'value' => substr($szvar,$pos+1) );
    •

  •             } else {                        // Otherwise use current one (if any)
    •

  •                 if ( isset($_POST[$szvar]) ) {
    •

  •                     $vars[] = array( 'name' => $szvar, 'value' => $_POST[$szvar] );
    •

  •                 } elseif ( isset($_GET[$szvar]) ) {
    •

  •                     $vars[] = array( 'name' => $szvar, 'value' => $_GET[$szvar] );
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         // Now reconstruct query string from specified variables
    •

  •         foreach ($vars as $var) {
    •

  •             $urlstr = "$urlstr&{$var['name']}={$var['value']}";
    •

  •         }
    •

  •         if ( strlen($urlstr) > 0 ) {
    •

  •             $urlstr = '?' . substr( $urlstr, 1 );
    •

  •         }
    •

  •     }
    •

  •
    •

  •     // Get default module/page from current ones if necessary
    •

  •     $module='';
    •

  •     $page='';
    •

  •     if ( !isset($params['module']) ) {
    •

  •         if ( isset($GLOBALS['xoopsModule']) && is_object($GLOBALS['xoopsModule']) ) {
    •

  •             $module = $GLOBALS['xoopsModule']->getVar('dirname');
    •

  •         }
    •

  •     } else {
    •

  •         $module = $params['module'];
    •

  •     }
    •

  •     if ( !isset($params['page']) ) {
    •

  •         $cur = $_SERVER['PHP_SELF'];
    •

  •         $page = substr( $cur, strrpos( $cur, '/' ) + 1 );
    •

  •     } else {
    •

  •         $page = $params['page'];
    •

  •     }
    •

  •     // Now, return entire link URL :-)
    •

  •     if ( empty($module) ) {
    •

  •         echo XOOPS_URL . "/$page" . $urlstr;
    •

  •     } else {
    •

  •         echo XOOPS_URL . "/modules/$module/$page" . $urlstr;
    •

  •     }
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:41 +0200 by phpDocumentor 1.4.0a2


File Source for logger_render.php

Source for file logger_render.php

Documentation is available at logger_render.php

  • <?php
    •

  •
    •

  • defined( 'XOOPS_ROOT_PATH' ) or die();
    •

  •
    •

  • $ret = '';
    •

  •
    •

  • if ( $mode == 'popup' ) {
    •

  •     $dump = $this->dump( '' );
    •

  •     $content = '
    •

  • <html>
    •

  • <head>
    •

  •     <meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />
    •

  •     <meta http-equiv="content-language" content="'._LANGCODE.'" />
    •

  •     <title>'.$xoopsConfig['sitename'].'</title>
    •

  •     <link rel="stylesheet" type="text/css" media="all" href="'.getcss($xoopsConfig['theme_set']).'" />
    •

  • </head>
    •

  • <body>' . $dump . '
    •

  •     <div style="text-align:center;">
    •

  •         <input class="formButton" value="'._CLOSE.'" type="button" onclick="javascript:window.close();" />
    •

  •     </div>
    •

  • </body>
    •

  • </html>';
    •

  •     $ret .= '
    •

  • <script type="text/javascript">
    •

  •     debug_window = openWithSelfMain("about:blank", "popup", 680, 450, true);
    •

  •     debug_window.document.clear();
    •

  • ';
    •

  •     $lines = preg_split("/(\r\n|\r|\n)( *)/", $content);
    •

  •     foreach ($lines as $line) {
    •

  •         $ret .= "\n" . 'debug_window.document.writeln("'.str_replace( array( '"', '</' ), array( '\"', '<\/' ), $line).'");';
    •

  •     }
    •

  •     $ret .= '
    •

  •     debug_window.focus();
    •

  •     debug_window.document.close();
    •

  • </script>';
    •

  • }
    •

  •
    •

  • if ( empty( $mode ) ) {
    •

  •     $views = array( 'errors', 'queries', 'blocks', 'extra' );
    •

  •     $ret .= "\n<div id=\"xo-logger-output\">\n<div id='xo-logger-tabs'>\n";
    •

  •     $ret .= "<a href='javascript:xoSetLoggerView(\"\")'>All</a>\n";
    •

  •     foreach ( $views as $view ) {
    •

  •         $count = count( $this->$view );
    •

  •         $ret .= "<a href='javascript:xoSetLoggerView(\"$view\")'>$view ($count)</a>\n";
    •

  •     }
    •

  •     $count = count( $this->logstart );
    •

  •     $ret .= "<a href='javascript:xoSetLoggerView(\"timers\")'>timers ($count)</a>\n";
    •

  •     $ret .= "</div>\n";
    •

  • }
    •

  •
    •

  • if ( empty($mode) || $mode == 'errors' ) {
    •

  •     $types = array(
    •

  •         E_USER_NOTICE => 'Notice',
    •

  •         E_USER_WARNING => 'Warning',
    •

  •         E_USER_ERROR => 'Error',
    •

  •         E_NOTICE => 'Notice',
    •

  •         E_WARNING => 'Warning',
    •

  •         E_STRICT => 'Strict',
    •

  •     );
    •

  •     $class = 'even';
    •

  •     $ret .= '<table id="xo-logger-errors" class="outer"><tr><th>Errors</th></tr>';
    •

  •     foreach ( $this->errors as $error ) {
    •

  •         $ret .= "\n<tr><td class='$class'>";
    •

  •         $ret .= isset( $types[ $error['errno'] ] ) ? $types[ $error['errno'] ] : 'Unknown';
    •

  •         $ret .= sprintf( ": %s in file %s line %s<br />\n", $error['errstr'], $error['errfile'], $error['errline'] );
    •

  •         $ret .= "</td></tr>";
    •

  •         $class = ($class == 'odd') ? 'even' : 'odd';
    •

  •     }
    •

  •     $ret .= "\n</table>\n";
    •

  • }
    •

  •
    •

  • if ( empty($mode) || $mode == 'queries' ) {
    •

  •     $class = 'even';
    •

  •     $ret .= '<table id="xo-logger-queries" class="outer"><tr><th>Queries</th></tr>';
    •

  •     foreach ($this->queries as $q) {
    •

  •         if (isset($q['error'])) {
    •

  •             $ret .= '<tr class="'.$class.'"><td><span style="color:#ff0000;">'.htmlentities($q['sql']).'<br /><b>Error number:</b> '.$q['errno'].'<br /><b>Error message:</b> '.$q['error'].'</span></td></tr>';
    •

  •         } else {
    •

  •             $ret .= '<tr class="'.$class.'"><td>'.htmlentities($q['sql']).'</td></tr>';
    •

  •         }
    •

  •         $class = ($class == 'odd') ? 'even' : 'odd';
    •

  •     }
    •

  •     $ret .= '<tr class="foot"><td>Total: <span style="color:#ff0000;">'.count($this->queries).'</span> queries</td></tr></table>';
    •

  • }
    •

  • if ( empty($mode) || $mode == 'blocks' ) {
    •

  •     $class = 'even';
    •

  •     $ret .= '<table id="xo-logger-blocks" class="outer"><tr><th colspan="2">Blocks</th></tr>';
    •

  •     foreach ($this->blocks as $b) {
    •

  •         if ($b['cached']) {
    •

  •             $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($b['name']).':</b> Cached (regenerates every '.intval($b['cachetime']).' seconds)</td></tr>';
    •

  •         } else {
    •

  •             $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($b['name']).':</b> No Cache</td></tr>';
    •

  •         }
    •

  •         $class = ($class == 'odd') ? 'even' : 'odd';
    •

  •     }
    •

  •     $ret .= '<tr class="foot"><td>Total: <span style="color:#ff0000;">'.count($this->blocks).'</span> blocks</td></tr></table>';
    •

  • }
    •

  • if ( empty($mode) || $mode == 'extra' ) {
    •

  •     $this->addExtra( 'Included files', count ( get_included_files() ) . ' files' );
    •

  •     $memory = 0;
    •

  •     if ( function_exists( 'memory_get_usage' ) ) {
    •

  •         $memory = memory_get_usage() . ' bytes';
    •

  •     } else {
    •

  •         $os = isset( $_ENV['OS'] ) ? $_ENV['OS'] : $_SERVER['OS'];
    •

  •         if ( strpos( strtolower( $os ), 'windows') !== false ) {
    •

  •             $out = array();
    •

  •             exec('tasklist /FI "PID eq ' . getmypid() . '" /FO LIST', $out );
    •

  •             $memory = substr( $out[5], strpos( $out[5], ':') + 1) . ' [Estimated]';
    •

  •         }
    •

  •     }
    •

  •     if ( $memory ) {
    •

  •         $this->addExtra( 'Memory usage', $memory );
    •

  •     }
    •

  •
    •

  •     $class = 'even';
    •

  •     $ret .= '<table id="xo-logger-extra" class="outer"><tr><th colspan="2">Extra</th></tr>';
    •

  •     foreach ($this->extra as $ex) {
    •

  •         $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($ex['name']).':</b> '.htmlspecialchars($ex['msg']).'</td></tr>';
    •

  •         $class = ($class == 'odd') ? 'even' : 'odd';
    •

  •     }
    •

  •     $ret .= '</table>';
    •

  • }
    •

  • if ( empty($mode) || $mode == 'timers' ) {
    •

  •     $class = 'even';
    •

  •     $ret .= '<table id="xo-logger-timers" class="outer"><tr><th colspan="2">Timers</th></tr>';
    •

  •     foreach ( $this->logstart as $k => $v ) {
    •

  •         $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($k).'</b> took <span style="color:#ff0000;">' . sprintf( "%.03f", $this->dumpTime($k) ) . '</span> seconds to load.</td></tr>';
    •

  •         $class = ($class == 'odd') ? 'even' : 'odd';
    •

  •     }
    •

  •     $ret .= '</table>';
    •

  • }
    •

  •
    •

  • if ( empty( $mode ) ) {
    •

  •     $ret .= <<<EOT
    •

  • </div>
    •

  • <script type="text/javascript">
    •

  •     function xoLogCreateCookie(name,value,days) {
    •

  •         if (days) {
    •

  •             var date = new Date();
    •

  •             date.setTime(date.getTime()+(days*24*60*60*1000));
    •

  •             var expires = "; expires="+date.toGMTString();
    •

  •         }
    •

  •         else var expires = "";
    •

  •         document.cookie = name+"="+value+expires+"; path=/";
    •

  •     }
    •

  •     function xoLogReadCookie(name) {
    •

  •         var nameEQ = name + "=";
    •

  •         var ca = document.cookie.split(';');
    •

  •         for(var i=0;i < ca.length;i++) {
    •

  •             var c = ca[i];
    •

  •             while (c.charAt(0)==' ') c = c.substring(1,c.length);
    •

  •             if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    •

  •         }
    •

  •         return null;
    •

  •     }
    •

  •     function xoLogEraseCookie(name) {
    •

  •         createCookie(name,"",-1);
    •

  •     }
    •

  •     function xoSetLoggerView( name ) {
    •

  •         var log = document.getElementById( "xo-logger-output" );
    •

  •         if ( !log ) return;
    •

  •         var i, elt;
    •

  •         for ( i=0; i!=log.childNodes.length; i++ ) {
    •

  •             elt = log.childNodes[i];
    •

  •             if ( elt.tagName && elt.tagName.toLowerCase() != 'script' && elt.id != "xo-logger-tabs" ) {
    •

  •                 elt.style.display = ( !name || elt.id == "xo-logger-" + name ) ? "block" : "none";
    •

  •             }
    •

  •         }
    •

  •         xoLogCreateCookie( 'XOLOGGERVIEW', name, 1 );
    •

  •     }
    •

  •     xoSetLoggerView( xoLogReadCookie( 'XOLOGGERVIEW' ) );
    •

  • </script>
    •

  •
    •

  • EOT;
    •

  • }
    •

  •
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:49 +0200 by phpDocumentor 1.4.0a2


File Source for metaweblogapi.php

Source for file metaweblogapi.php

Documentation is available at metaweblogapi.php

  • <?php
    •

  • // $Id: metaweblogapi.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • require_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php';
    •

  •
    •

  • class MetaWeblogApi extends XoopsXmlRpcApi
    •

  • {
    •

  •     function MetaWeblogApi(&$params, &$response, &$module)
    •

  •     {
    •

  •         $this->XoopsXmlRpcApi($params, $response, $module);
    •

  •         $this->_setXoopsTagMap('storyid', 'postid');
    •

  •         $this->_setXoopsTagMap('published', 'dateCreated');
    •

  •         $this->_setXoopsTagMap('uid', 'userid');
    •

  •         //$this->_setXoopsTagMap('hometext', 'description');
    •

  •     }
    •

  •
    •

  •     function newPost()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             if (!$fields =& $this->_getPostFields(null, $this->params[0])) {
    •

  •                 $this->response->add(new XoopsXmlRpcFault(106));
    •

  •             } else {
    •

  •                 $missing = array();
    •

  •                 $post = array();
    •

  •                 foreach ($fields as $tag => $detail) {
    •

  •                     $maptag = $this->_getXoopsTagMap($tag);
    •

  •                     if (!isset($this->params[3][$maptag])) {
    •

  •                         $data = $this->_getTagCdata($this->params[3]['description'], $maptag, true);
    •

  •                         if (trim($data) == ''){
    •

  •                             if ($detail['required']) {
    •

  •                                 $missing[] = $maptag;
    •

  •                             }
    •

  •                         } else {
    •

  •                             $post[$tag] = $data;
    •

  •                         }
    •

  •                     } else {
    •

  •                         $post[$tag] = $this->params[3][$maptag];
    •

  •                     }
    •

  •                 }
    •

  •                 if (count($missing) > 0) {
    •

  •                     $msg = '';
    •

  •                     foreach ($missing as $m) {
    •

  •                         $msg .= '<'.$m.'> ';echo $m;
    •

  •                     }
    •

  •                     $this->response->add(new XoopsXmlRpcFault(109, $msg));
    •

  •                 } else {
    •

  •                     $newparams = array();
    •

  •                     $newparams[0] = $this->params[0];
    •

  •                     $newparams[1] = $this->params[1];
    •

  •                     $newparams[2] = $this->params[2];
    •

  •                     foreach ($post as $key => $value) {
    •

  •                         $newparams[3][$key] =& $value;
    •

  •                         unset($value);
    •

  •                     }
    •

  •                     $newparams[3]['xoops_text'] = $this->params[3]['description'];
    •

  •                     if (isset($this->params[3]['categories']) && is_array($this->params[3]['categories'])) {
    •

  •                         foreach ($this->params[3]['categories'] as $k => $v) {
    •

  •                             $newparams[3]['categories'][$k] = $v;
    •

  •                         }
    •

  •                     }
    •

  •                     $newparams[4] = $this->params[4];
    •

  •                     $xoopsapi =& $this->_getXoopsApi($newparams);
    •

  •                     $xoopsapi->_setUser($this->user, $this->isadmin);
    •

  •                     $xoopsapi->newPost();
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function editPost()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             if (!$fields =& $this->_getPostFields($this->params[0])) {
    •

  •             } else {
    •

  •                 $missing = array();
    •

  •                 $post = array();
    •

  •                 foreach ($fields as $tag => $detail) {
    •

  •                     $maptag = $this->_getXoopsTagMap($tag);
    •

  •                     if (!isset($this->params[3][$maptag])) {
    •

  •                         $data = $this->_getTagCdata($this->params[3]['description'], $maptag, true);
    •

  •                         if (trim($data) == ''){
    •

  •                             if ($detail['required']) {
    •

  •                                 $missing[] = $tag;
    •

  •                             }
    •

  •                         } else {
    •

  •                             $post[$tag] = $data;
    •

  •                         }
    •

  •                     } else {
    •

  •                         $post[$tag] =& $this->params[3][$maptag];
    •

  •                     }
    •

  •                 }
    •

  •                 if (count($missing) > 0) {
    •

  •                     $msg = '';
    •

  •                     foreach ($missing as $m) {
    •

  •                         $msg .= '<'.$m.'> ';
    •

  •                     }
    •

  •                     $this->response->add(new XoopsXmlRpcFault(109, $msg));
    •

  •                 } else {
    •

  •                     $newparams = array();
    •

  •                     $newparams[0] = $this->params[0];
    •

  •                     $newparams[1] = $this->params[1];
    •

  •                     $newparams[2] = $this->params[2];
    •

  •                     foreach ($post as $key => $value) {
    •

  •                         $newparams[3][$key] =& $value;
    •

  •                         unset($value);
    •

  •                     }
    •

  •                     if (isset($this->params[3]['categories']) && is_array($this->params[3]['categories'])) {
    •

  •                         foreach ($this->params[3]['categories'] as $k => $v) {
    •

  •                             $newparams[3]['categories'][$k] = $v;
    •

  •                         }
    •

  •                     }
    •

  •                     $newparams[3]['xoops_text'] = $this->params[3]['description'];
    •

  •                     $newparams[4] = $this->params[4];
    •

  •                     $xoopsapi =& $this->_getXoopsApi($newparams);
    •

  •                     $xoopsapi->_setUser($this->user, $this->isadmin);
    •

  •                     $xoopsapi->editPost();
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function getPost()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             $xoopsapi =& $this->_getXoopsApi($this->params);
    •

  •             $xoopsapi->_setUser($this->user, $this->isadmin);
    •

  •             $ret =& $xoopsapi->getPost(false);
    •

  •             if (is_array($ret)) {
    •

  •                 $struct = new XoopsXmlRpcStruct();
    •

  •                 $content = '';
    •

  •                 foreach ($ret as $key => $value) {
    •

  •                     $maptag = $this->_getXoopsTagMap($key);
    •

  •                     switch($maptag) {
    •

  •                     case 'userid':
    •

  •                         $struct->add('userid', new XoopsXmlRpcString($value));
    •

  •                         break;
    •

  •                     case 'dateCreated':
    •

  •                         $struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
    •

  •                         break;
    •

  •                     case 'postid':
    •

  •                         $struct->add('postid', new XoopsXmlRpcString($value));
    •

  •                         $struct->add('link', new XoopsXmlRpcString(XOOPS_URL.'/modules/xoopssections/item.php?item='.$value));
    •

  •                         $struct->add('permaLink', new XoopsXmlRpcString(XOOPS_URL.'/modules/xoopssections/item.php?item='.$value));
    •

  •                         break;
    •

  •                     case 'title':
    •

  •                         $struct->add('title', new XoopsXmlRpcString($value));
    •

  •                         break;
    •

  •                     default :
    •

  •                         $content .= '<'.$key.'>'.trim($value).'</'.$key.'>';
    •

  •                         break;
    •

  •                     }
    •

  •                 }
    •

  •                 $struct->add('description', new XoopsXmlRpcString($content));
    •

  •                 $this->response->add($struct);
    •

  •             } else {
    •

  •                 $this->response->add(new XoopsXmlRpcFault(106));
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function getRecentPosts()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             $xoopsapi =& $this->_getXoopsApi($this->params);
    •

  •             $xoopsapi->_setUser($this->user, $this->isadmin);
    •

  •             $ret =& $xoopsapi->getRecentPosts(false);
    •

  •             if (is_array($ret)) {
    •

  •                 $arr = new XoopsXmlRpcArray();
    •

  •                 $count = count($ret);
    •

  •                 if ($count == 0) {
    •

  •                     $this->response->add(new XoopsXmlRpcFault(106, 'Found 0 Entries'));
    •

  •                 } else {
    •

  •                     for ($i = 0; $i < $count; $i++) {
    •

  •                         $struct = new XoopsXmlRpcStruct();
    •

  •                         $content = '';
    •

  •                         foreach($ret[$i] as $key => $value) {
    •

  •                             $maptag = $this->_getXoopsTagMap($key);
    •

  •                             switch($maptag) {
    •

  •                             case 'userid':
    •

  •                                 $struct->add('userid', new XoopsXmlRpcString($value));
    •

  •                                 break;
    •

  •                             case 'dateCreated':
    •

  •                                 $struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
    •

  •                                 break;
    •

  •                             case 'postid':
    •

  •                                 $struct->add('postid', new XoopsXmlRpcString($value));
    •

  •                                 $struct->add('link', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/article.php?item_id='.$value));
    •

  •                                 $struct->add('permaLink', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/article.php?item_id='.$value));
    •

  •                                 break;
    •

  •                             case 'title':
    •

  •                                 $struct->add('title', new XoopsXmlRpcString($value));
    •

  •                                 break;
    •

  •                             default :
    •

  •                                 $content .= '<'.$key.'>'.trim($value).'</'.$key.'>';
    •

  •                                 break;
    •

  •                             }
    •

  •                         }
    •

  •                         $struct->add('description', new XoopsXmlRpcString($content));
    •

  •                         $arr->add($struct);
    •

  •                         unset($struct);
    •

  •                     }
    •

  •                     $this->response->add($arr);
    •

  •                 }
    •

  •             } else {
    •

  •                 $this->response->add(new XoopsXmlRpcFault(106));
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function getCategories()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             $xoopsapi =& $this->_getXoopsApi($this->params);
    •

  •             $xoopsapi->_setUser($this->user, $this->isadmin);
    •

  •             $ret =& $xoopsapi->getCategories(false);
    •

  •             if (is_array($ret)) {
    •

  •                 $arr = new XoopsXmlRpcArray();
    •

  •                 foreach ($ret as $id => $detail) {
    •

  •                     $struct = new XoopsXmlRpcStruct();
    •

  •                     $struct->add('description', new XoopsXmlRpcString($detail));
    •

  •                     $struct->add('htmlUrl', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/index.php?storytopic='.$id));
    •

  •                     $struct->add('rssUrl', new XoopsXmlRpcString(''));
    •

  •                     $catstruct = new XoopsXmlRpcStruct();
    •

  •                     $catstruct->add($detail['title'], $struct);
    •

  •                     $arr->add($catstruct);
    •

  •                     unset($struct);
    •

  •                     unset($catstruct);
    •

  •                 }
    •

  •                 $this->response->add($arr);
    •

  •             } else {
    •

  •                 $this->response->add(new XoopsXmlRpcFault(106));
    •

  •             }
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:52 +0200 by phpDocumentor 1.4.0a2


File Source for mimetypes.inc.php

Source for file mimetypes.inc.php

Documentation is available at mimetypes.inc.php

  • <?php
    •

  •
    •

  • // $Id: mimetypes.inc.php 2 2005-11-02 18:23:29Z skalpa $
    •

  •
    •

  • /**
    •

  •
    •

  • * Extension to mimetype lookup table
    •

  •
    •

  • *
    •

  •
    •

  • * This file is provided as an helper for objects who need to perform filename to mimetype translations.
    •

  •
    •

  • * Common types have been provided, but feel free to add your own one if you need it.
    •

  •
    •

  • * <br /><br />
    •

  •
    •

  • * See the enclosed file LICENSE for licensing information.
    •

  •
    •

  • * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html
    •

  •
    •

  • *
    •

  •
    •

  • * @copyright    The Xoops project http://www.xoops.org/
    •

  •
    •

  • * @license      http://www.fsf.org/copyleft/gpl.html GNU public license
    •

  •
    •

  • * @author       Skalpa Keo <skalpa@xoops.org>
    •

  •
    •

  • * @since        2.0.9.3
    •

  •
    •

  • */
    •

  •
    •

  • return array(
    •

  •
    •

  •      "hqx"        => "application/mac-binhex40",
    •

  •
    •

  •      "doc"        => "application/msword",
    •

  •
    •

  •      "dot"        => "application/msword",
    •

  •
    •

  •      "bin"        => "application/octet-stream",
    •

  •
    •

  •      "lha"        => "application/octet-stream",
    •

  •
    •

  •      "lzh"        => "application/octet-stream",
    •

  •
    •

  •      "exe"        => "application/octet-stream",
    •

  •
    •

  •      "class"    => "application/octet-stream",
    •

  •
    •

  •      "so"        => "application/octet-stream",
    •

  •
    •

  •      "dll"        => "application/octet-stream",
    •

  •
    •

  •      "pdf"        => "application/pdf",
    •

  •
    •

  •      "ai"        => "application/postscript",
    •

  •
    •

  •      "eps"        => "application/postscript",
    •

  •
    •

  •      "ps"        => "application/postscript",
    •

  •
    •

  •      "smi"        => "application/smil",
    •

  •
    •

  •      "smil"        => "application/smil",
    •

  •
    •

  •      "wbxml"    => "application/vnd.wap.wbxml",
    •

  •
    •

  •      "wmlc"        => "application/vnd.wap.wmlc",
    •

  •
    •

  •      "wmlsc"    => "application/vnd.wap.wmlscriptc",
    •

  •
    •

  •      "xla"        => "application/vnd.ms-excel",
    •

  •
    •

  •      "xls"        => "application/vnd.ms-excel",
    •

  •
    •

  •      "xlt"        => "application/vnd.ms-excel",
    •

  •
    •

  •      "ppt"        => "application/vnd.ms-powerpoint",
    •

  •
    •

  •      "csh"        => "application/x-csh",
    •

  •
    •

  •      "dcr"        => "application/x-director",
    •

  •
    •

  •      "dir"        => "application/x-director",
    •

  •
    •

  •      "dxr"        => "application/x-director",
    •

  •
    •

  •      "spl"        => "application/x-futuresplash",
    •

  •
    •

  •      "gtar"        => "application/x-gtar",
    •

  •
    •

  •      "php"        => "application/x-httpd-php",
    •

  •
    •

  •      "php3"        => "application/x-httpd-php",
    •

  •
    •

  •      "php5"        => "application/x-httpd-php",
    •

  •
    •

  •      "phtml"    => "application/x-httpd-php",
    •

  •
    •

  •      "js"        => "application/x-javascript",
    •

  •
    •

  •      "sh"        => "application/x-sh",
    •

  •
    •

  •      "swf"        => "application/x-shockwave-flash",
    •

  •
    •

  •      "sit"        => "application/x-stuffit",
    •

  •
    •

  •      "tar"        => "application/x-tar",
    •

  •
    •

  •      "tcl"        => "application/x-tcl",
    •

  •
    •

  •      "xhtml"    => "application/xhtml+xml",
    •

  •
    •

  •      "xht"        => "application/xhtml+xml",
    •

  •
    •

  •      "xhtml"    => "application/xml",
    •

  •
    •

  •      "ent"        => "application/xml-external-parsed-entity",
    •

  •
    •

  •      "dtd"        => "application/xml-dtd",
    •

  •
    •

  •      "mod"        => "application/xml-dtd",
    •

  •
    •

  •      "gz"        => "application/x-gzip",
    •

  •
    •

  •      "zip"        => "application/zip",
    •

  •
    •

  •      "au"        => "audio/basic",
    •

  •
    •

  •      "snd"        => "audio/basic",
    •

  •
    •

  •      "mid"        => "audio/midi",
    •

  •
    •

  •      "midi"        => "audio/midi",
    •

  •
    •

  •      "kar"        => "audio/midi",
    •

  •
    •

  •      "mp1"        => "audio/mpeg",
    •

  •
    •

  •      "mp2"        => "audio/mpeg",
    •

  •
    •

  •      "mp3"        => "audio/mpeg",
    •

  •
    •

  •      "aif"        => "audio/x-aiff",
    •

  •
    •

  •      "aiff"        => "audio/x-aiff",
    •

  •
    •

  •      "m3u"        => "audio/x-mpegurl",
    •

  •
    •

  •      "ram"        => "audio/x-pn-realaudio",
    •

  •
    •

  •      "rm"        => "audio/x-pn-realaudio",
    •

  •
    •

  •      "rpm"        => "audio/x-pn-realaudio-plugin",
    •

  •
    •

  •      "ra"        => "audio/x-realaudio",
    •

  •
    •

  •      "wav"        => "audio/x-wav",
    •

  •
    •

  •      "bmp"        => "image/bmp",
    •

  •
    •

  •      "gif"        => "image/gif",
    •

  •
    •

  •      "jpeg"        => "image/jpeg",
    •

  •
    •

  •      "jpg"        => "image/jpeg",
    •

  •
    •

  •      "jpe"        => "image/jpeg",
    •

  •
    •

  •      "png"        => "image/png",
    •

  •
    •

  •      "tiff"        => "image/tiff",
    •

  •
    •

  •      "tif"        => "image/tif",
    •

  •
    •

  •      "wbmp"        => "image/vnd.wap.wbmp",
    •

  •
    •

  •      "pnm"        => "image/x-portable-anymap",
    •

  •
    •

  •      "pbm"        => "image/x-portable-bitmap",
    •

  •
    •

  •      "pgm"        => "image/x-portable-graymap",
    •

  •
    •

  •      "ppm"        => "image/x-portable-pixmap",
    •

  •
    •

  •      "xbm"        => "image/x-xbitmap",
    •

  •
    •

  •      "xpm"        => "image/x-xpixmap",
    •

  •
    •

  •      "ics"        => "text/calendar",
    •

  •
    •

  •      "ifb"        => "text/calendar",
    •

  •
    •

  •      "css"        => "text/css",
    •

  •
    •

  •      "html"        => "text/html",
    •

  •
    •

  •      "htm"        => "text/html",
    •

  •
    •

  •      "asc"        => "text/plain",
    •

  •
    •

  •      "txt"        => "text/plain",
    •

  •
    •

  •      "rtf"        => "text/rtf",
    •

  •
    •

  •      "sgml"        => "text/x-sgml",
    •

  •
    •

  •      "sgm"        => "text/x-sgml",
    •

  •
    •

  •      "tsv"        => "text/tab-seperated-values",
    •

  •
    •

  •      "wml"        => "text/vnd.wap.wml",
    •

  •
    •

  •      "wmls"        => "text/vnd.wap.wmlscript",
    •

  •
    •

  •      "xsl"        => "text/xml",
    •

  •
    •

  •      "mpeg"        => "video/mpeg",
    •

  •
    •

  •      "mpg"        => "video/mpeg",
    •

  •
    •

  •      "mpe"        => "video/mpeg",
    •

  •
    •

  •      "qt"        => "video/quicktime",
    •

  •
    •

  •      "mov"        => "video/quicktime",
    •

  •
    •

  •      "avi"        => "video/x-msvideo",
    •

  •
    •

  • );
    •

  •
    •

  •
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:53 +0200 by phpDocumentor 1.4.0a2


File Source for movabletypeapi.php

Source for file movabletypeapi.php

Documentation is available at movabletypeapi.php

  • <?php
    •

  • // $Id: movabletypeapi.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • require_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php';
    •

  •
    •

  • class MovableTypeApi extends XoopsXmlRpcApi
    •

  • {
    •

  •     function MovableTypeApi(&$params, &$response, &$module)
    •

  •     {
    •

  •         $this->XoopsXmlRpcApi($params, $response, $module);
    •

  •     }
    •

  •
    •

  •     function getCategoryList()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             $xoopsapi =& $this->_getXoopsApi($this->params);
    •

  •             $xoopsapi->_setUser($this->user, $this->isadmin);
    •

  •             $ret =& $xoopsapi->getCategories(false);
    •

  •             if (is_array($ret)) {
    •

  •                 $arr = new XoopsXmlRpcArray();
    •

  •                 foreach ($ret as $id => $name) {
    •

  •                     $struct = new XoopsXmlRpcStruct();
    •

  •                     $struct->add('categoryId', new XoopsXmlRpcString($id));
    •

  •                     $struct->add('categoryName', new XoopsXmlRpcString($name['title']));
    •

  •                     $arr->add($struct);
    •

  •                     unset($struct);
    •

  •                 }
    •

  •                 $this->response->add($arr);
    •

  •             } else {
    •

  •                 $this->response->add(new XoopsXmlRpcFault(106));
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function getPostCategories()
    •

  •     {
    •

  •         $this->response->add(new XoopsXmlRpcFault(107));
    •

  •     }
    •

  •
    •

  •     function setPostCategories()
    •

  •     {
    •

  •         $this->response->add(new XoopsXmlRpcFault(107));
    •

  •     }
    •

  •
    •

  •     function supportedMethods()
    •

  •     {
    •

  •         $this->response->add(new XoopsXmlRpcFault(107));
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:07 +0200 by phpDocumentor 1.4.0a2


File Source for phpmailer.lang-en.php

Source for file phpmailer.lang-en.php

Documentation is available at phpmailer.lang-en.php

  • <?php
    •

  • /**
    •

  •  * PHPMailer language file.
    •

  •  * English Version
    •

  •  */
    •

  •
    •

  • $PHPMAILER_LANG = array();
    •

  •
    •

  • $PHPMAILER_LANG["provide_address"] = 'You must provide at least one ' .
    •

  •                                      'recipient email address.';
    •

  • $PHPMAILER_LANG["mailer_not_supported"] = ' mailer is not supported.';
    •

  • $PHPMAILER_LANG["execute"] = 'Could not execute: ';
    •

  • $PHPMAILER_LANG["instantiate"] = 'Could not instantiate mail function.';
    •

  • $PHPMAILER_LANG["authenticate"] = 'SMTP Error: Could not authenticate.';
    •

  • $PHPMAILER_LANG["from_failed"] = 'The following From address failed: ';
    •

  • $PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: The following ' .
    •

  •                                        'recipients failed: ';
    •

  • $PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data not accepted.';
    •

  • $PHPMAILER_LANG["connect_host"] = 'SMTP Error: Could not connect to SMTP host.';
    •

  • $PHPMAILER_LANG["file_access"] = 'Could not access file: ';
    •

  • $PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: ';
    •

  • $PHPMAILER_LANG["encoding"] = 'Unknown encoding: ';
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:14 +0200 by phpDocumentor 1.4.0a2


File Source for resource.db.php

Source for file resource.db.php

Documentation is available at resource.db.php

  • <?php
    •

  • /*
    •

  •  * Smarty plugin
    •

  •  * -------------------------------------------------------------
    •

  •  * File:     resource.db.php
    •

  •  * Type:     resource
    •

  •  * Name:     db
    •

  •  * Purpose:  Fetches templates from a database
    •

  •  * -------------------------------------------------------------
    •

  •  */
    •

  • function smarty_resource_db_source($tpl_name, &$tpl_source, &$smarty) {
    •

  •     if ( !$tpl = smarty_resource_db_tplinfo( $tpl_name ) ) {
    •

  •         return false;
    •

  •     }
    •

  •     if ( is_object( $tpl ) ) {
    •

  •         $tpl_source = $tpl->getVar( 'tpl_source', 'n' );
    •

  •     } else {
    •

  •         $fp = fopen( $tpl, 'r' );
    •

  •         $tpl_source = fread( $fp, filesize( $tpl ) );
    •

  •         fclose( $fp );
    •

  •     }
    •

  •     return true;
    •

  • }
    •

  •
    •

  • function smarty_resource_db_timestamp($tpl_name, &$tpl_timestamp, &$smarty) {
    •

  •     if ( !$tpl = smarty_resource_db_tplinfo( $tpl_name ) ) {
    •

  •         return false;
    •

  •     }
    •

  •     if ( is_object( $tpl ) ) {
    •

  •         $tpl_timestamp = $tpl->getVar( 'tpl_lastmodified', 'n' );
    •

  •     } else {
    •

  •         $tpl_timestamp = filemtime( $tpl );
    •

  •     }
    •

  •     return true;
    •

  • }
    •

  •
    •

  • function smarty_resource_db_secure($tpl_name, &$smarty)
    •

  • {
    •

  •     // assume all templates are secure
    •

  •     return true;
    •

  • }
    •

  •
    •

  • function smarty_resource_db_trusted($tpl_name, &$smarty)
    •

  • {
    •

  •     // not used for templates
    •

  • }
    •

  •
    •

  • function smarty_resource_db_tplinfo( $tpl_name ) {
    •

  •     static $cache = array();
    •

  •     global $xoopsConfig;
    •

  •
    •

  •     if ( isset( $cache[$tpl_name] ) ) {
    •

  •         return $cache[$tpl_name];
    •

  •     }
    •

  •     $tplset = $xoopsConfig['template_set'];
    •

  •     $theme = isset( $xoopsConfig['theme_set'] ) ? $xoopsConfig['theme_set'] : 'default';
    •

  •
    •

  •     $tplfile_handler =& xoops_gethandler('tplfile');
    •

  •     // If we're not using the "default" template set, then get the templates from the DB
    •

  •     if ( $tplset != "default" ) {
    •

  •         $tplobj = $tplfile_handler->find( $tplset, null, null, null, $tpl_name, true);
    •

  •         if ( count( $tplobj ) ) {
    •

  •             return $cache[$tpl_name] = $tplobj[0];
    •

  •         }
    •

  •     }
    •

  •     // If we'using the default tplset, get the template from the filesystem
    •

  •     $tplobj = $tplfile_handler->find( "default", null, null, null, $tpl_name);
    •

  •
    •

  •     if ( !count( $tplobj ) ) {
    •

  •         return $cache[$tpl_name] = false;
    •

  •     }
    •

  •     $tplobj = $tplobj[0];
    •

  •     $module = $tplobj->getVar( 'tpl_module', 'n' );
    •

  •     $type = $tplobj->getVar( 'tpl_type', 'n' );
    •

  •     $blockpath = ( $type == 'block' ) ? 'blocks/' : '';
    •

  •     // First, check for an overloaded version within the theme folder
    •

  •     $filepath = XOOPS_THEME_PATH . "/$theme/modules/$module/$blockpath$tpl_name";
    •

  •     if ( !file_exists( $filepath ) ) {
    •

  •         // If no custom version exists, get the tpl from its default location
    •

  •         $filepath = XOOPS_ROOT_PATH . "/modules/$module/templates/$blockpath$tpl_name";
    •

  •     }
    •

  •     return $cache[$tpl_name] = $filepath;
    •

  • }
    •

  •
    •

  •
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:17 +0200 by phpDocumentor 1.4.0a2


File Source for saxparser.php

Source for file saxparser.php

Documentation is available at saxparser.php

  • <?php
    •

  • // $Id: saxparser.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • /*******************************************************************************
    •

  •     Location: <b>xml/SaxParser.class</b><br>
    •

  •      <br>
    •

  •     Provides basic functionality to read and parse XML documents.  Subclasses
    •

  •     must implement all the their custom handlers by using add* function methods.
    •

  •     They may also use the handle*() methods to parse a specific XML begin and end
    •

  •     tags, but this is not recommended as it is more difficult.<br>
    •

  •     <br>
    •

  •     Copyright &copy; 2001 eXtremePHP.  All rights reserved.<br>
    •

  •     <br>
    •

  •     @author Ken Egervari<br>
    •

  • *******************************************************************************/
    •

  •
    •

  • class SaxParser
    •

  • {
    •

  •     var $level;
    •

  •     var $parser;
    •

  •
    •

  •     var $isCaseFolding;
    •

  •     var $targetEncoding;
    •

  •
    •

  •     /* Custom Handler Variables */
    •

  •     var $tagHandlers = array();
    •

  •
    •

  •     /* Tag stack */
    •

  •     var $tags = array();
    •

  •
    •

  •     /* Xml Source Input */
    •

  •     var $xmlInput;
    •

  •
    •

  •     var $errors = array();
    •

  •
    •

  •     /****************************************************************************
    •

  •         Creates a SaxParser object using a FileInput to represent the stream
    •

  •         of XML data to parse.  Use the static methods createFileInput or
    •

  •         createStringInput to construct xml input source objects to supply
    •

  •         to the constructor, or the implementor can construct them individually.
    •

  •     ****************************************************************************/
    •

  •     function SaxParser(&$input)
    •

  •     {
    •

  •         $this->level = 0;
    •

  •         $this->parser = xml_parser_create('UTF-8');
    •

  •         xml_set_object($this->parser, $this);
    •

  •         $this->input =& $input;
    •

  •         $this->setCaseFolding(false);
    •

  •         $this->useUtfEncoding();
    •

  •         xml_set_element_handler($this->parser, 'handleBeginElement','handleEndElement');
    •

  •         xml_set_character_data_handler($this->parser, 'handleCharacterData');
    •

  •         xml_set_processing_instruction_handler($this->parser, 'handleProcessingInstruction');
    •

  •         xml_set_default_handler($this->parser, 'handleDefault');
    •

  •         xml_set_unparsed_entity_decl_handler($this->parser, 'handleUnparsedEntityDecl');
    •

  •         xml_set_notation_decl_handler($this->parser, 'handleNotationDecl');
    •

  •         xml_set_external_entity_ref_handler($this->parser, 'handleExternalEntityRef');
    •

  •     }
    •

  •
    •

  •     /*---------------------------------------------------------------------------
    •

  •         Property Methods
    •

  •     ---------------------------------------------------------------------------*/
    •

  •
    •

  •     function getCurrentLevel()
    •

  •     {
    •

  •         return $this->level;
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         * @param $isCaseFolding
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function setCaseFolding($isCaseFolding)
    •

  •     {
    •

  •         assert(is_bool($isCaseFolding));
    •

  •
    •

  •         $this->isCaseFolding = $isCaseFolding;
    •

  •         xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, $this->isCaseFolding);
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function useIsoEncoding()
    •

  •     {
    •

  •         $this->targetEncoding = 'ISO-8859-1';
    •

  •         xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->targetEncoding);
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function useAsciiEncoding()
    •

  •     {
    •

  •         $this->targetEncoding = 'US-ASCII';
    •

  •         xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->targetEncoding);
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function useUtfEncoding()
    •

  •     {
    •

  •         $this->targetEncoding = 'UTF-8';
    •

  •         xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->targetEncoding);
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         Returns the name of the xml tag being parsed
    •

  •         * @returns string
    •

  •     ****************************************************************************/
    •

  •     function getCurrentTag()
    •

  •     {
    •

  •         return $this->tags[count($this->tags) - 1];
    •

  •     }
    •

  •
    •

  •     function getParentTag()
    •

  •     {
    •

  •         if (isset($this->tags[count($this->tags) - 2])) {
    •

  •             return $this->tags[count($this->tags) - 2];
    •

  •         }
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •
    •

  •
    •

  •     /*---------------------------------------------------------------------------
    •

  •         Parser methods
    •

  •     ---------------------------------------------------------------------------*/
    •

  •
    •

  •     /****************************************************************************
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function parse()
    •

  •     {
    •

  •         if (!is_resource($this->input)) {
    •

  •             if (!xml_parse($this->parser, $this->input)) {
    •

  •                 $this->setErrors($this->getXmlError());
    •

  •                 return false;
    •

  •             }
    •

  •             //if (!$fp = fopen($this->input, 'r')) {
    •

  •             //    $this->setErrors('Could not open file: '.$this->input);
    •

  •             //    return false;
    •

  •             //}
    •

  •         } else {
    •

  •             while ($data = fread($this->input, 4096)) {
    •

  •                 if (!xml_parse($this->parser, str_replace("'", "&apos;", $data), feof($this->input))) {
    •

  •                     $this->setErrors($this->getXmlError());
    •

  •                     fclose($this->input);
    •

  •                     return false;
    •

  •                 }
    •

  •             }
    •

  •             fclose($this->input);
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function free()
    •

  •     {
    •

  •         xml_parser_free($this->parser);
    •

  •
    •

  •         if (!method_exists($this, '__destruct')) {
    •

  •             unset($this);
    •

  •         }
    •

  •         else {
    •

  •             $this->__destruct();
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         * @private
    •

  •         * @returns string
    •

  •     ****************************************************************************/
    •

  •     function getXmlError()
    •

  •     {
    •

  •         return sprintf("XmlParse error: %s at line %d", xml_error_string(xml_get_error_code($this->parser)), xml_get_current_line_number($this->parser));
    •

  •     }
    •

  •
    •

  •     /*---------------------------------------------------------------------------
    •

  •         Custom Handler Methods
    •

  •     ---------------------------------------------------------------------------*/
    •

  •
    •

  •     /****************************************************************************
    •

  •         Adds a callback function to be called when a tag is encountered.<br>
    •

  •         Functions that are added must be of the form:<br>
    •

  •         <b>functionName( $attributes )</b>
    •

  •         * @param $tagName string.  The name of the tag currently being parsed.
    •

  •         * @param $functionName string.  The name of the function in XmlDocument's
    •

  •         subclass.
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function addTagHandler(&$tagHandler)
    •

  •     {
    •

  •         $name = $tagHandler->getName();
    •

  •         if (is_array($name)) {
    •

  •             foreach ($name as $n) {
    •

  •                 $this->tagHandlers[$n] =& $tagHandler;
    •

  •             }
    •

  •         } else {
    •

  •             $this->tagHandlers[$name] =& $tagHandler;
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /*---------------------------------------------------------------------------
    •

  •         Private Handler Methods
    •

  •     ---------------------------------------------------------------------------*/
    •

  •
    •

  •     /****************************************************************************
    •

  •         Callback function that executes whenever a the start of a tag
    •

  •         occurs when being parsed.
    •

  •         * @param $parser int.  The handle to the parser.
    •

  •         * @param $tagName string.  The name of the tag currently being parsed.
    •

  •         * @param $attributesArray attay.  The list of attributes associated with
    •

  •         the tag.
    •

  •         * @private
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function handleBeginElement($parser, $tagName, $attributesArray)
    •

  •     {
    •

  •         array_push($this->tags, $tagName);
    •

  •         $this->level++;
    •

  •         if (isset($this->tagHandlers[$tagName]) && is_subclass_of($this->tagHandlers[$tagName], 'xmltaghandler')) {
    •

  •             $this->tagHandlers[$tagName]->handleBeginElement($this, $attributesArray);
    •

  •         } else {
    •

  •             $this->handleBeginElementDefault($parser, $tagName, $attributesArray);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         Callback function that executes whenever the end of a tag
    •

  •         occurs when being parsed.
    •

  •         * @param $parser int.  The handle to the parser.
    •

  •         * @param $tagName string.  The name of the tag currently being parsed.
    •

  •         * @private
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function handleEndElement($parser, $tagName)
    •

  •     {
    •

  •         array_pop($this->tags);
    •

  •         if (isset($this->tagHandlers[$tagName]) && is_subclass_of($this->tagHandlers[$tagName], 'xmltaghandler')) {
    •

  •             $this->tagHandlers[$tagName]->handleEndElement($this);
    •

  •         } else {
    •

  •             $this->handleEndElementDefault($parser, $tagName);
    •

  •         }
    •

  •         $this->level--;
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         Callback function that executes whenever character data is encountered
    •

  •         while being parsed.
    •

  •         * @param $parser int.  The handle to the parser.
    •

  •         * @param $data string.  Character data inside the tag
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function handleCharacterData($parser, $data)
    •

  •     {
    •

  •         $tagHandler =& $this->tagHandlers[$this->getCurrentTag()];
    •

  •         if (isset($tagHandler) && is_subclass_of($tagHandler, 'xmltaghandler')) {
    •

  •             $tagHandler->handleCharacterData($this, $data);
    •

  •         } else {
    •

  •             $this->handleCharacterDataDefault($parser, $data);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         * @param $parser int.  The handle to the parser.
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function handleProcessingInstruction($parser, &$target, &$data)
    •

  •     {
    •

  • //        if($target == 'php') {
    •

  • //            eval($data);
    •

  • //        }
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         * @param $parser int.  The handle to the parser.
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function handleDefault($parser, $data)
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         * @param $parser int.  The handle to the parser.
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function handleUnparsedEntityDecl($parser, $entityName, $base, $systemId, $publicId, $notationName)
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         * @param $parser int.  The handle to the parser.
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function handleNotationDecl($parser, $notationName, $base, $systemId, $publicId)
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •         * @param $parser int.  The handle to the parser.
    •

  •         * @returns void
    •

  •     ****************************************************************************/
    •

  •     function handleExternalEntityRef($parser, $openEntityNames, $base, $systemId, $publicId)
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * The default tag handler method for a tag with no handler
    •

  •      *
    •

  •      * @abstract
    •

  •      */
    •

  •     function handleBeginElementDefault($parser, $tagName, $attributesArray)
    •

  •     {
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * The default tag handler method for a tag with no handler
    •

  •      *
    •

  •      * @abstract
    •

  •      */
    •

  •     function handleEndElementDefault($parser, $tagName)
    •

  •     {
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * The default tag handler method for a tag with no handler
    •

  •      *
    •

  •      * @abstract
    •

  •      */
    •

  •     function handleCharacterDataDefault($parser, $data)
    •

  •     {
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sets error messages
    •

  •      *
    •

  •      * @param    $error    string    an error message
    •

  •      */
    •

  •     function setErrors($error)
    •

  •     {
    •

  •         $this->errors[] = trim($error);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Gets all the error messages
    •

  •      *
    •

  •      * @param    $ashtml    bool    return as html?
    •

  •      * @return    mixed
    •

  •      */
    •

  •     function &getErrors($ashtml = true)
    •

  •     {
    •

  •         if (!$ashtml) {
    •

  •             return $this->errors;
    •

  •         } else {
    •

  •             $ret = '';
    •

  •             if (count($this->errors) > 0) {
    •

  •                 foreach ($this->errors as $error) {
    •

  •                     $ret .= $error.'<br />';
    •

  •                 }
    •

  •             }
    •

  •             return $ret;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:59:19 +0200 by phpDocumentor 1.4.0a2


File Source for snoopy.php

Source for file snoopy.php

Documentation is available at snoopy.php

  • <?php
    •

  •
    •

  • /*************************************************
    •

  •
    •

  • Snoopy - the PHP net client
    •

  • Author: Monte Ohrt <monte@ispi.net>
    •

  • Copyright (c): 1999-2000 ispi, all rights reserved
    •

  • Version: 1.01
    •

  •
    •

  •  * 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 (at your option) 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
    •

  •
    •

  • You may contact the author of Snoopy by e-mail at:
    •

  • monte@ispi.net
    •

  •
    •

  • Or, write to:
    •

  • Monte Ohrt
    •

  • CTO, ispi
    •

  • 237 S. 70th suite 220
    •

  • Lincoln, NE 68510
    •

  •
    •

  • The latest version of Snoopy can be obtained from:
    •

  • http://snoopy.sourceforge.net/
    •

  •
    •

  • *************************************************/
    •

  •
    •

  • class Snoopy
    •

  • {
    •

  •     /**** Public variables ****/
    •

  •
    •

  •     /* user definable vars */
    •

  •
    •

  •     var $host            =    "www.php.net";        // host name we are connecting to
    •

  •     var $port            =    80;                    // port we are connecting to
    •

  •     var $proxy_host        =    "";                    // proxy host to use
    •

  •     var $proxy_port        =    "";                    // proxy port to use
    •

  •     var $proxy_user        =    "";                    // proxy user to use
    •

  •     var $proxy_pass        =    "";                    // proxy password to use
    •

  •
    •

  •     var $agent            =    "Snoopy v1.2.3";    // agent we masquerade as
    •

  •     var    $referer        =    "";                    // referer info to pass
    •

  •     var $cookies        =    array();            // array of cookies to pass
    •

  •                                                 // $cookies["username"]="joe";
    •

  •     var    $rawheaders        =    array();            // array of raw headers to send
    •

  •                                                 // $rawheaders["Content-type"]="text/html";
    •

  •
    •

  •     var $maxredirs        =    5;                    // http redirection depth maximum. 0 = disallow
    •

  •     var $lastredirectaddr    =    "";                // contains address of last redirected address
    •

  •     var    $offsiteok        =    true;                // allows redirection off-site
    •

  •     var $maxframes        =    0;                    // frame content depth maximum. 0 = disallow
    •

  •     var $expandlinks    =    true;                // expand links to fully qualified URLs.
    •

  •                                                 // this only applies to fetchlinks()
    •

  •                                                 // submitlinks(), and submittext()
    •

  •     var $passcookies    =    true;                // pass set cookies back through redirects
    •

  •                                                 // NOTE: this currently does not respect
    •

  •                                                 // dates, domains or paths.
    •

  •
    •

  •     var    $user            =    "";                    // user for http authentication
    •

  •     var    $pass            =    "";                    // password for http authentication
    •

  •
    •

  •     // http accept types
    •

  •     var $accept            =    "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
    •

  •
    •

  •     var $results        =    "";                    // where the content is put
    •

  •
    •

  •     var $error            =    "";                    // error messages sent here
    •

  •     var    $response_code    =    "";                    // response code returned from server
    •

  •     var    $headers        =    array();            // headers returned from server sent here
    •

  •     var    $maxlength        =    500000;                // max return data length (body)
    •

  •     var $read_timeout    =    0;                    // timeout on read operations, in seconds
    •

  •                                                 // supported only since PHP 4 Beta 4
    •

  •                                                 // set to 0 to disallow timeouts
    •

  •     var $timed_out        =    false;                // if a read operation timed out
    •

  •     var    $status            =    0;                    // http request status
    •

  •
    •

  •     var $temp_dir        =    "/tmp";                // temporary directory that the webserver
    •

  •                                                 // has permission to write to.
    •

  •                                                 // under Windows, this should be C:\temp
    •

  •
    •

  •     var    $curl_path        =    "/usr/local/bin/curl";
    •

  •                                                 // Snoopy will use cURL for fetching
    •

  •                                                 // SSL content if a full system path to
    •

  •                                                 // the cURL binary is supplied here.
    •

  •                                                 // set to false if you do not have
    •

  •                                                 // cURL installed. See http://curl.haxx.se
    •

  •                                                 // for details on installing cURL.
    •

  •                                                 // Snoopy does *not* use the cURL
    •

  •                                                 // library functions built into php,
    •

  •                                                 // as these functions are not stable
    •

  •                                                 // as of this Snoopy release.
    •

  •
    •

  •     /**** Private variables ****/
    •

  •
    •

  •     var    $_maxlinelen    =    4096;                // max line length (headers)
    •

  •
    •

  •     var $_httpmethod    =    "GET";                // default http request method
    •

  •     var $_httpversion    =    "HTTP/1.0";            // default http request version
    •

  •     var $_submit_method    =    "POST";                // default submit method
    •

  •     var $_submit_type    =    "application/x-www-form-urlencoded";    // default submit type
    •

  •     var $_mime_boundary    =   "";                    // MIME boundary for multipart/form-data submit type
    •

  •     var $_redirectaddr    =    false;                // will be set if page fetched is a redirect
    •

  •     var $_redirectdepth    =    0;                    // increments on an http redirect
    •

  •     var $_frameurls        =     array();            // frame src urls
    •

  •     var $_framedepth    =    0;                    // increments on frame depth
    •

  •
    •

  •     var $_isproxy        =    false;                // set if using a proxy server
    •

  •     var $_fp_timeout    =    30;                    // timeout for socket connection
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    fetch
    •

  •     Purpose:    fetch the contents of a web page
    •

  •                 (and possibly other protocols in the
    •

  •                 future like ftp, nntp, gopher, etc.)
    •

  •     Input:        $URI    the location of the page to fetch
    •

  •     Output:        $this->results    the output text from the fetch
    •

  • \*======================================================================*/
    •

  •
    •

  •     function fetch($URI)
    •

  •     {
    •

  •
    •

  •         //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS);
    •

  •         $URI_PARTS = parse_url($URI);
    •

  •         if (!empty($URI_PARTS["user"]))
    •

  •             $this->user = $URI_PARTS["user"];
    •

  •         if (!empty($URI_PARTS["pass"]))
    •

  •             $this->pass = $URI_PARTS["pass"];
    •

  •         if (empty($URI_PARTS["query"]))
    •

  •             $URI_PARTS["query"] = '';
    •

  •         if (empty($URI_PARTS["path"]))
    •

  •             $URI_PARTS["path"] = '';
    •

  •
    •

  •         switch(strtolower($URI_PARTS["scheme"]))
    •

  •         {
    •

  •             case "http":
    •

  •                 $this->host = $URI_PARTS["host"];
    •

  •                 if(!empty($URI_PARTS["port"]))
    •

  •                     $this->port = $URI_PARTS["port"];
    •

  •                 if($this->_connect($fp))
    •

  •                 {
    •

  •                     if($this->_isproxy)
    •

  •                     {
    •

  •                         // using proxy, send entire URI
    •

  •                         $this->_httprequest($URI,$fp,$URI,$this->_httpmethod);
    •

  •                     }
    •

  •                     else
    •

  •                     {
    •

  •                         $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
    •

  •                         // no proxy, send only the path
    •

  •                         $this->_httprequest($path, $fp, $URI, $this->_httpmethod);
    •

  •                     }
    •

  •
    •

  •                     $this->_disconnect($fp);
    •

  •
    •

  •                     if($this->_redirectaddr)
    •

  •                     {
    •

  •                         /* url was redirected, check if we've hit the max depth */
    •

  •                         if($this->maxredirs > $this->_redirectdepth)
    •

  •                         {
    •

  •                             // only follow redirect if it's on this site, or offsiteok is true
    •

  •                             if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
    •

  •                             {
    •

  •                                 /* follow the redirect */
    •

  •                                 $this->_redirectdepth++;
    •

  •                                 $this->lastredirectaddr=$this->_redirectaddr;
    •

  •                                 $this->fetch($this->_redirectaddr);
    •

  •                             }
    •

  •                         }
    •

  •                     }
    •

  •
    •

  •                     if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
    •

  •                     {
    •

  •                         $frameurls = $this->_frameurls;
    •

  •                         $this->_frameurls = array();
    •

  •
    •

  •                         while(list(,$frameurl) = each($frameurls))
    •

  •                         {
    •

  •                             if($this->_framedepth < $this->maxframes)
    •

  •                             {
    •

  •                                 $this->fetch($frameurl);
    •

  •                                 $this->_framedepth++;
    •

  •                             }
    •

  •                             else
    •

  •                                 break;
    •

  •                         }
    •

  •                     }
    •

  •                 }
    •

  •                 else
    •

  •                 {
    •

  •                     return false;
    •

  •                 }
    •

  •                 return true;
    •

  •                 break;
    •

  •             case "https":
    •

  •                 if(!$this->curl_path)
    •

  •                     return false;
    •

  •                 if(function_exists("is_executable"))
    •

  •                     if (!is_executable($this->curl_path))
    •

  •                         return false;
    •

  •                 $this->host = $URI_PARTS["host"];
    •

  •                 if(!empty($URI_PARTS["port"]))
    •

  •                     $this->port = $URI_PARTS["port"];
    •

  •                 if($this->_isproxy)
    •

  •                 {
    •

  •                     // using proxy, send entire URI
    •

  •                     $this->_httpsrequest($URI,$URI,$this->_httpmethod);
    •

  •                 }
    •

  •                 else
    •

  •                 {
    •

  •                     $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
    •

  •                     // no proxy, send only the path
    •

  •                     $this->_httpsrequest($path, $URI, $this->_httpmethod);
    •

  •                 }
    •

  •
    •

  •                 if($this->_redirectaddr)
    •

  •                 {
    •

  •                     /* url was redirected, check if we've hit the max depth */
    •

  •                     if($this->maxredirs > $this->_redirectdepth)
    •

  •                     {
    •

  •                         // only follow redirect if it's on this site, or offsiteok is true
    •

  •                         if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
    •

  •                         {
    •

  •                             /* follow the redirect */
    •

  •                             $this->_redirectdepth++;
    •

  •                             $this->lastredirectaddr=$this->_redirectaddr;
    •

  •                             $this->fetch($this->_redirectaddr);
    •

  •                         }
    •

  •                     }
    •

  •                 }
    •

  •
    •

  •                 if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
    •

  •                 {
    •

  •                     $frameurls = $this->_frameurls;
    •

  •                     $this->_frameurls = array();
    •

  •
    •

  •                     while(list(,$frameurl) = each($frameurls))
    •

  •                     {
    •

  •                         if($this->_framedepth < $this->maxframes)
    •

  •                         {
    •

  •                             $this->fetch($frameurl);
    •

  •                             $this->_framedepth++;
    •

  •                         }
    •

  •                         else
    •

  •                             break;
    •

  •                     }
    •

  •                 }
    •

  •                 return true;
    •

  •                 break;
    •

  •             default:
    •

  •                 // not a valid protocol
    •

  •                 $this->error    =    'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
    •

  •                 return false;
    •

  •                 break;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    submit
    •

  •     Purpose:    submit an http form
    •

  •     Input:        $URI    the location to post the data
    •

  •                 $formvars    the formvars to use.
    •

  •                     format: $formvars["var"] = "val";
    •

  •                 $formfiles  an array of files to submit
    •

  •                     format: $formfiles["var"] = "/dir/filename.ext";
    •

  •     Output:        $this->results    the text output from the post
    •

  • \*======================================================================*/
    •

  •
    •

  •     function submit($URI, $formvars="", $formfiles="")
    •

  •     {
    •

  •         unset($postdata);
    •

  •
    •

  •         $postdata = $this->_prepare_post_body($formvars, $formfiles);
    •

  •
    •

  •         $URI_PARTS = parse_url($URI);
    •

  •         if (!empty($URI_PARTS["user"]))
    •

  •             $this->user = $URI_PARTS["user"];
    •

  •         if (!empty($URI_PARTS["pass"]))
    •

  •             $this->pass = $URI_PARTS["pass"];
    •

  •         if (empty($URI_PARTS["query"]))
    •

  •             $URI_PARTS["query"] = '';
    •

  •         if (empty($URI_PARTS["path"]))
    •

  •             $URI_PARTS["path"] = '';
    •

  •
    •

  •         switch(strtolower($URI_PARTS["scheme"]))
    •

  •         {
    •

  •             case "http":
    •

  •                 $this->host = $URI_PARTS["host"];
    •

  •                 if(!empty($URI_PARTS["port"]))
    •

  •                     $this->port = $URI_PARTS["port"];
    •

  •                 if($this->_connect($fp))
    •

  •                 {
    •

  •                     if($this->_isproxy)
    •

  •                     {
    •

  •                         // using proxy, send entire URI
    •

  •                         $this->_httprequest($URI,$fp,$URI,$this->_submit_method,$this->_submit_type,$postdata);
    •

  •                     }
    •

  •                     else
    •

  •                     {
    •

  •                         $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
    •

  •                         // no proxy, send only the path
    •

  •                         $this->_httprequest($path, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata);
    •

  •                     }
    •

  •
    •

  •                     $this->_disconnect($fp);
    •

  •
    •

  •                     if($this->_redirectaddr)
    •

  •                     {
    •

  •                         /* url was redirected, check if we've hit the max depth */
    •

  •                         if($this->maxredirs > $this->_redirectdepth)
    •

  •                         {
    •

  •                             if(!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr))
    •

  •                                 $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr,$URI_PARTS["scheme"]."://".$URI_PARTS["host"]);
    •

  •
    •

  •                             // only follow redirect if it's on this site, or offsiteok is true
    •

  •                             if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
    •

  •                             {
    •

  •                                 /* follow the redirect */
    •

  •                                 $this->_redirectdepth++;
    •

  •                                 $this->lastredirectaddr=$this->_redirectaddr;
    •

  •                                 if( strpos( $this->_redirectaddr, "?" ) > 0 )
    •

  •                                     $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get
    •

  •                                 else
    •

  •                                     $this->submit($this->_redirectaddr,$formvars, $formfiles);
    •

  •                             }
    •

  •                         }
    •

  •                     }
    •

  •
    •

  •                     if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
    •

  •                     {
    •

  •                         $frameurls = $this->_frameurls;
    •

  •                         $this->_frameurls = array();
    •

  •
    •

  •                         while(list(,$frameurl) = each($frameurls))
    •

  •                         {
    •

  •                             if($this->_framedepth < $this->maxframes)
    •

  •                             {
    •

  •                                 $this->fetch($frameurl);
    •

  •                                 $this->_framedepth++;
    •

  •                             }
    •

  •                             else
    •

  •                                 break;
    •

  •                         }
    •

  •                     }
    •

  •
    •

  •                 }
    •

  •                 else
    •

  •                 {
    •

  •                     return false;
    •

  •                 }
    •

  •                 return true;
    •

  •                 break;
    •

  •             case "https":
    •

  •                 if(!$this->curl_path)
    •

  •                     return false;
    •

  •                 if(function_exists("is_executable"))
    •

  •                     if (!is_executable($this->curl_path))
    •

  •                         return false;
    •

  •                 $this->host = $URI_PARTS["host"];
    •

  •                 if(!empty($URI_PARTS["port"]))
    •

  •                     $this->port = $URI_PARTS["port"];
    •

  •                 if($this->_isproxy)
    •

  •                 {
    •

  •                     // using proxy, send entire URI
    •

  •                     $this->_httpsrequest($URI, $URI, $this->_submit_method, $this->_submit_type, $postdata);
    •

  •                 }
    •

  •                 else
    •

  •                 {
    •

  •                     $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
    •

  •                     // no proxy, send only the path
    •

  •                     $this->_httpsrequest($path, $URI, $this->_submit_method, $this->_submit_type, $postdata);
    •

  •                 }
    •

  •
    •

  •                 if($this->_redirectaddr)
    •

  •                 {
    •

  •                     /* url was redirected, check if we've hit the max depth */
    •

  •                     if($this->maxredirs > $this->_redirectdepth)
    •

  •                     {
    •

  •                         if(!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr))
    •

  •                             $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr,$URI_PARTS["scheme"]."://".$URI_PARTS["host"]);
    •

  •
    •

  •                         // only follow redirect if it's on this site, or offsiteok is true
    •

  •                         if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
    •

  •                         {
    •

  •                             /* follow the redirect */
    •

  •                             $this->_redirectdepth++;
    •

  •                             $this->lastredirectaddr=$this->_redirectaddr;
    •

  •                             if( strpos( $this->_redirectaddr, "?" ) > 0 )
    •

  •                                 $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get
    •

  •                             else
    •

  •                                 $this->submit($this->_redirectaddr,$formvars, $formfiles);
    •

  •                         }
    •

  •                     }
    •

  •                 }
    •

  •
    •

  •                 if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
    •

  •                 {
    •

  •                     $frameurls = $this->_frameurls;
    •

  •                     $this->_frameurls = array();
    •

  •
    •

  •                     while(list(,$frameurl) = each($frameurls))
    •

  •                     {
    •

  •                         if($this->_framedepth < $this->maxframes)
    •

  •                         {
    •

  •                             $this->fetch($frameurl);
    •

  •                             $this->_framedepth++;
    •

  •                         }
    •

  •                         else
    •

  •                             break;
    •

  •                     }
    •

  •                 }
    •

  •                 return true;
    •

  •                 break;
    •

  •
    •

  •             default:
    •

  •                 // not a valid protocol
    •

  •                 $this->error    =    'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
    •

  •                 return false;
    •

  •                 break;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    fetchlinks
    •

  •     Purpose:    fetch the links from a web page
    •

  •     Input:        $URI    where you are fetching from
    •

  •     Output:        $this->results    an array of the URLs
    •

  • \*======================================================================*/
    •

  •
    •

  •     function fetchlinks($URI)
    •

  •     {
    •

  •         if ($this->fetch($URI))
    •

  •         {
    •

  •             if($this->lastredirectaddr)
    •

  •                 $URI = $this->lastredirectaddr;
    •

  •             if(is_array($this->results))
    •

  •             {
    •

  •                 for($x=0;$x<count($this->results);$x++)
    •

  •                     $this->results[$x] = $this->_striplinks($this->results[$x]);
    •

  •             }
    •

  •             else
    •

  •                 $this->results = $this->_striplinks($this->results);
    •

  •
    •

  •             if($this->expandlinks)
    •

  •                 $this->results = $this->_expandlinks($this->results, $URI);
    •

  •             return true;
    •

  •         }
    •

  •         else
    •

  •             return false;
    •

  •     }
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    fetchform
    •

  •     Purpose:    fetch the form elements from a web page
    •

  •     Input:        $URI    where you are fetching from
    •

  •     Output:        $this->results    the resulting html form
    •

  • \*======================================================================*/
    •

  •
    •

  •     function fetchform($URI)
    •

  •     {
    •

  •
    •

  •         if ($this->fetch($URI))
    •

  •         {
    •

  •
    •

  •             if(is_array($this->results))
    •

  •             {
    •

  •                 for($x=0;$x<count($this->results);$x++)
    •

  •                     $this->results[$x] = $this->_stripform($this->results[$x]);
    •

  •             }
    •

  •             else
    •

  •                 $this->results = $this->_stripform($this->results);
    •

  •
    •

  •             return true;
    •

  •         }
    •

  •         else
    •

  •             return false;
    •

  •     }
    •

  •
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    fetchtext
    •

  •     Purpose:    fetch the text from a web page, stripping the links
    •

  •     Input:        $URI    where you are fetching from
    •

  •     Output:        $this->results    the text from the web page
    •

  • \*======================================================================*/
    •

  •
    •

  •     function fetchtext($URI)
    •

  •     {
    •

  •         if($this->fetch($URI))
    •

  •         {
    •

  •             if(is_array($this->results))
    •

  •             {
    •

  •                 for($x=0;$x<count($this->results);$x++)
    •

  •                     $this->results[$x] = $this->_striptext($this->results[$x]);
    •

  •             }
    •

  •             else
    •

  •                 $this->results = $this->_striptext($this->results);
    •

  •             return true;
    •

  •         }
    •

  •         else
    •

  •             return false;
    •

  •     }
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    submitlinks
    •

  •     Purpose:    grab links from a form submission
    •

  •     Input:        $URI    where you are submitting from
    •

  •     Output:        $this->results    an array of the links from the post
    •

  • \*======================================================================*/
    •

  •
    •

  •     function submitlinks($URI, $formvars="", $formfiles="")
    •

  •     {
    •

  •         if($this->submit($URI,$formvars, $formfiles))
    •

  •         {
    •

  •             if($this->lastredirectaddr)
    •

  •                 $URI = $this->lastredirectaddr;
    •

  •             if(is_array($this->results))
    •

  •             {
    •

  •                 for($x=0;$x<count($this->results);$x++)
    •

  •                 {
    •

  •                     $this->results[$x] = $this->_striplinks($this->results[$x]);
    •

  •                     if($this->expandlinks)
    •

  •                         $this->results[$x] = $this->_expandlinks($this->results[$x],$URI);
    •

  •                 }
    •

  •             }
    •

  •             else
    •

  •             {
    •

  •                 $this->results = $this->_striplinks($this->results);
    •

  •                 if($this->expandlinks)
    •

  •                     $this->results = $this->_expandlinks($this->results,$URI);
    •

  •             }
    •

  •             return true;
    •

  •         }
    •

  •         else
    •

  •             return false;
    •

  •     }
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    submittext
    •

  •     Purpose:    grab text from a form submission
    •

  •     Input:        $URI    where you are submitting from
    •

  •     Output:        $this->results    the text from the web page
    •

  • \*======================================================================*/
    •

  •
    •

  •     function submittext($URI, $formvars = "", $formfiles = "")
    •

  •     {
    •

  •         if($this->submit($URI,$formvars, $formfiles))
    •

  •         {
    •

  •             if($this->lastredirectaddr)
    •

  •                 $URI = $this->lastredirectaddr;
    •

  •             if(is_array($this->results))
    •

  •             {
    •

  •                 for($x=0;$x<count($this->results);$x++)
    •

  •                 {
    •

  •                     $this->results[$x] = $this->_striptext($this->results[$x]);
    •

  •                     if($this->expandlinks)
    •

  •                         $this->results[$x] = $this->_expandlinks($this->results[$x],$URI);
    •

  •                 }
    •

  •             }
    •

  •             else
    •

  •             {
    •

  •                 $this->results = $this->_striptext($this->results);
    •

  •                 if($this->expandlinks)
    •

  •                     $this->results = $this->_expandlinks($this->results,$URI);
    •

  •             }
    •

  •             return true;
    •

  •         }
    •

  •         else
    •

  •             return false;
    •

  •     }
    •

  •
    •

  •
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    set_submit_multipart
    •

  •     Purpose:    Set the form submission content type to
    •

  •                 multipart/form-data
    •

  • \*======================================================================*/
    •

  •     function set_submit_multipart()
    •

  •     {
    •

  •         $this->_submit_type = "multipart/form-data";
    •

  •     }
    •

  •
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    set_submit_normal
    •

  •     Purpose:    Set the form submission content type to
    •

  •                 application/x-www-form-urlencoded
    •

  • \*======================================================================*/
    •

  •     function set_submit_normal()
    •

  •     {
    •

  •         $this->_submit_type = "application/x-www-form-urlencoded";
    •

  •     }
    •

  •
    •

  •
    •

  • // XOOPS2 Hack begin
    •

  • // Added on March 4, 2003 by onokazu@xoops.org
    •

  • /*======================================================================*\
    •

  •     Function:    set_submit_xml
    •

  •     Purpose:    Set the submission content type to
    •

  •                 text/xml
    •

  • \*======================================================================*/
    •

  •     function set_submit_xml()
    •

  •     {
    •

  •         $this->_submit_type = "text/xml";
    •

  •     }
    •

  • // XOOPS2 Hack end
    •

  •
    •

  •
    •

  • /*======================================================================*\
    •

  •     Private functions
    •

  • \*======================================================================*/
    •

  •
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    _striplinks
    •

  •     Purpose:    strip the hyperlinks from an html document
    •

  •     Input:        $document    document to strip.
    •

  •     Output:        $match        an array of the links
    •

  • \*======================================================================*/
    •

  •
    •

  •     function _striplinks($document)
    •

  •     {
    •

  •         preg_match_all("'<\s*a\s.*?href\s*=\s*            # find <a href=
    •

  •                         ([\"\'])?                    # find single or double quote
    •

  •                         (?(1) (.*?)\\1 | ([^\s\>]+))        # if quote found, match up to next matching
    •

  •                                                     # quote, otherwise match up to next space
    •

  •                         'isx",$document,$links);
    •

  •
    •

  •
    •

  •         // catenate the non-empty matches from the conditional subpattern
    •

  •
    •

  •         while(list($key,$val) = each($links[2]))
    •

  •         {
    •

  •             if(!empty($val))
    •

  •                 $match[] = $val;
    •

  •         }
    •

  •
    •

  •         while(list($key,$val) = each($links[3]))
    •

  •         {
    •

  •             if(!empty($val))
    •

  •                 $match[] = $val;
    •

  •         }
    •

  •
    •

  •         // return the links
    •

  •         return $match;
    •

  •     }
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    _stripform
    •

  •     Purpose:    strip the form elements from an html document
    •

  •     Input:        $document    document to strip.
    •

  •     Output:        $match        an array of the links
    •

  • \*======================================================================*/
    •

  •
    •

  •     function _stripform($document)
    •

  •     {
    •

  •         preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements);
    •

  •
    •

  •         // catenate the matches
    •

  •         $match = implode("\r\n",$elements[0]);
    •

  •
    •

  •         // return the links
    •

  •         return $match;
    •

  •     }
    •

  •
    •

  •
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    _striptext
    •

  •     Purpose:    strip the text from an html document
    •

  •     Input:        $document    document to strip.
    •

  •     Output:        $text        the resulting text
    •

  • \*======================================================================*/
    •

  •
    •

  •     function _striptext($document)
    •

  •     {
    •

  •
    •

  •         // I didn't use preg eval (//e) since that is only available in PHP 4.0.
    •

  •         // so, list your entities one by one here. I included some of the
    •

  •         // more common ones.
    •

  •
    •

  •         $search = array("'<script[^>]*?>.*?</script>'si",    // strip out javascript
    •

  •                         "'<[\/\!]*?[^<>]*?>'si",            // strip out html tags
    •

  •                         "'([\r\n])[\s]+'",                    // strip out white space
    •

  •                         "'&(quot|#34|#034|#x22);'i",        // replace html entities
    •

  •                         "'&(amp|#38|#038|#x26);'i",            // added hexadecimal values
    •

  •                         "'&(lt|#60|#060|#x3c);'i",
    •

  •                         "'&(gt|#62|#062|#x3e);'i",
    •

  •                         "'&(nbsp|#160|#xa0);'i",
    •

  •                         "'&(iexcl|#161);'i",
    •

  •                         "'&(cent|#162);'i",
    •

  •                         "'&(pound|#163);'i",
    •

  •                         "'&(copy|#169);'i",
    •

  •                         "'&(reg|#174);'i",
    •

  •                         "'&(deg|#176);'i",
    •

  •                         "'&(#39|#039|#x27);'",
    •

  •                         "'&(euro|#8364);'i",                // europe
    •

  •                         "'&a(uml|UML);'",                    // german
    •

  •                         "'&o(uml|UML);'",
    •

  •                         "'&u(uml|UML);'",
    •

  •                         "'&A(uml|UML);'",
    •

  •                         "'&O(uml|UML);'",
    •

  •                         "'&U(uml|UML);'",
    •

  •                         "'&szlig;'i",
    •

  •                         );
    •

  •         $replace = array(    "",
    •

  •                             "",
    •

  •                             "\\1",
    •

  •                             "\"",
    •

  •                             "&",
    •

  •                             "<",
    •

  •                             ">",
    •

  •                             " ",
    •

  •                             chr(161),
    •

  •                             chr(162),
    •

  •                             chr(163),
    •

  •                             chr(169),
    •

  •                             chr(174),
    •

  •                             chr(176),
    •

  •                             chr(39),
    •

  •                             chr(128),
    •

  •                             chr(228),
    •

  •                             chr(246),
    •

  •                             chr(252),
    •

  •                             chr(196),
    •

  •                             chr(214),
    •

  •                             chr(220),
    •

  •                             chr(223),
    •

  •                         );
    •

  •
    •

  •         $text = preg_replace($search,$replace,$document);
    •

  •
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    _expandlinks
    •

  •     Purpose:    expand each link into a fully qualified URL
    •

  •     Input:        $links            the links to qualify
    •

  •                 $URI            the full URI to get the base from
    •

  •     Output:        $expandedLinks    the expanded links
    •

  • \*======================================================================*/
    •

  •
    •

  •     function _expandlinks($links,$URI)
    •

  •     {
    •

  •
    •

  •         preg_match("/^[^\?]+/",$URI,$match);
    •

  •
    •

  •         $match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]);
    •

  •         $match = preg_replace("|/$|","",$match);
    •

  •         $match_part = parse_url($match);
    •

  •         $match_root =
    •

  •         $match_part["scheme"]."://".$match_part["host"];
    •

  •
    •

  •         $search = array(     "|^http://".preg_quote($this->host)."|i",
    •

  •                             "|^(\/)|i",
    •

  •                             "|^(?!http://)(?!mailto:)|i",
    •

  •                             "|/\./|",
    •

  •                             "|/[^\/]+/\.\./|"
    •

  •                         );
    •

  •
    •

  •         $replace = array(    "",
    •

  •                             $match_root."/",
    •

  •                             $match."/",
    •

  •                             "/",
    •

  •                             "/"
    •

  •                         );
    •

  •
    •

  •         $expandedLinks = preg_replace($search,$replace,$links);
    •

  •
    •

  •         return $expandedLinks;
    •

  •     }
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    _httprequest
    •

  •     Purpose:    go get the http data from the server
    •

  •     Input:        $url        the url to fetch
    •

  •                 $fp            the current open file pointer
    •

  •                 $URI        the full URI
    •

  •                 $body        body contents to send if any (POST)
    •

  •     Output:
    •

  • \*======================================================================*/
    •

  •
    •

  •     function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="")
    •

  •     {
    •

  •         $cookie_headers = '';
    •

  •         if($this->passcookies && $this->_redirectaddr)
    •

  •             $this->setcookies();
    •

  •
    •

  •         $URI_PARTS = parse_url($URI);
    •

  •         if(empty($url))
    •

  •             $url = "/";
    •

  •         $headers = $http_method." ".$url." ".$this->_httpversion."\r\n";
    •

  •         if(!empty($this->agent))
    •

  •             $headers .= "User-Agent: ".$this->agent."\r\n";
    •

  •         if(!empty($this->host) && !isset($this->rawheaders['Host'])) {
    •

  •             $headers .= "Host: ".$this->host;
    •

  •             if(!empty($this->port))
    •

  •                 $headers .= ":".$this->port;
    •

  •             $headers .= "\r\n";
    •

  •         }
    •

  •         if(!empty($this->accept))
    •

  •             $headers .= "Accept: ".$this->accept."\r\n";
    •

  •         if(!empty($this->referer))
    •

  •             $headers .= "Referer: ".$this->referer."\r\n";
    •

  •         if(!empty($this->cookies))
    •

  •         {
    •

  •             if(!is_array($this->cookies))
    •

  •                 $this->cookies = (array)$this->cookies;
    •

  •
    •

  •             reset($this->cookies);
    •

  •             if ( count($this->cookies) > 0 ) {
    •

  •                 $cookie_headers .= 'Cookie: ';
    •

  •                 foreach ( $this->cookies as $cookieKey => $cookieVal ) {
    •

  •                 $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; ";
    •

  •                 }
    •

  •                 $headers .= substr($cookie_headers,0,-2) . "\r\n";
    •

  •             }
    •

  •         }
    •

  •         if(!empty($this->rawheaders))
    •

  •         {
    •

  •             if(!is_array($this->rawheaders))
    •

  •                 $this->rawheaders = (array)$this->rawheaders;
    •

  •             while(list($headerKey,$headerVal) = each($this->rawheaders))
    •

  •                 $headers .= $headerKey.": ".$headerVal."\r\n";
    •

  •         }
    •

  •         if(!empty($content_type)) {
    •

  •             $headers .= "Content-type: $content_type";
    •

  •             if ($content_type == "multipart/form-data")
    •

  •                 $headers .= "; boundary=".$this->_mime_boundary;
    •

  •             $headers .= "\r\n";
    •

  •         }
    •

  •         if(!empty($body))
    •

  •             $headers .= "Content-length: ".strlen($body)."\r\n";
    •

  •         if(!empty($this->user) || !empty($this->pass))
    •

  •             $headers .= "Authorization: Basic ".base64_encode($this->user.":".$this->pass)."\r\n";
    •

  •
    •

  •         //add proxy auth headers
    •

  •         if(!empty($this->proxy_user))
    •

  •             $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($this->proxy_user . ':' . $this->proxy_pass)."\r\n";
    •

  •
    •

  •
    •

  •         $headers .= "\r\n";
    •

  •
    •

  •         // set the read timeout if needed
    •

  •         if ($this->read_timeout > 0)
    •

  •             socket_set_timeout($fp, $this->read_timeout);
    •

  •         $this->timed_out = false;
    •

  •
    •

  •         fwrite($fp,$headers.$body,strlen($headers.$body));
    •

  •
    •

  •         $this->_redirectaddr = false;
    •

  •         unset($this->headers);
    •

  •
    •

  •         while($currentHeader = fgets($fp,$this->_maxlinelen))
    •

  •         {
    •

  •             if ($this->read_timeout > 0 && $this->_check_timeout($fp))
    •

  •             {
    •

  •                 $this->status=-100;
    •

  •                 return false;
    •

  •             }
    •

  •
    •

  •             if($currentHeader == "\r\n")
    •

  •                 break;
    •

  •
    •

  •             // if a header begins with Location: or URI:, set the redirect
    •

  •             if(preg_match("/^(Location:|URI:)/i",$currentHeader))
    •

  •             {
    •

  •                 // get URL portion of the redirect
    •

  •                 preg_match("/^(Location:|URI:)[ ]+(.*)/i",chop($currentHeader),$matches);
    •

  •                 // look for :// in the Location header to see if hostname is included
    •

  •                 if(!preg_match("|\:\/\/|",$matches[2]))
    •

  •                 {
    •

  •                     // no host in the path, so prepend
    •

  •                     $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
    •

  •                     // eliminate double slash
    •

  •                     if(!preg_match("|^/|",$matches[2]))
    •

  •                             $this->_redirectaddr .= "/".$matches[2];
    •

  •                     else
    •

  •                             $this->_redirectaddr .= $matches[2];
    •

  •                 }
    •

  •                 else
    •

  •                     $this->_redirectaddr = $matches[2];
    •

  •             }
    •

  •
    •

  •             if(preg_match("|^HTTP/|",$currentHeader))
    •

  •             {
    •

  •                 if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader, $status))
    •

  •                 {
    •

  •                     $this->status= $status[1];
    •

  •                 }
    •

  •                 $this->response_code = $currentHeader;
    •

  •             }
    •

  •
    •

  •             $this->headers[] = $currentHeader;
    •

  •         }
    •

  •
    •

  •         $results = '';
    •

  •         do {
    •

  •             $_data = fread($fp, $this->maxlength);
    •

  •             if (strlen($_data) == 0) {
    •

  •                 break;
    •

  •             }
    •

  •             $results .= $_data;
    •

  •         } while(true);
    •

  •
    •

  •         if ($this->read_timeout > 0 && $this->_check_timeout($fp))
    •

  •         {
    •

  •             $this->status=-100;
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         // check if there is a a redirect meta tag
    •

  •
    •

  •         if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]*URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
    •

  •
    •

  •         {
    •

  •             $this->_redirectaddr = $this->_expandlinks($match[1],$URI);
    •

  •         }
    •

  •
    •

  •         // have we hit our frame depth and is there frame src to fetch?
    •

  •         if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
    •

  •         {
    •

  •             $this->results[] = $results;
    •

  •             for($x=0; $x<count($match[1]); $x++)
    •

  •                 $this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
    •

  •         }
    •

  •         // have we already fetched framed content?
    •

  •         elseif(is_array($this->results))
    •

  •             $this->results[] = $results;
    •

  •         // no framed content
    •

  •         else
    •

  •             $this->results = $results;
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    _httpsrequest
    •

  •     Purpose:    go get the https data from the server using curl
    •

  •     Input:        $url        the url to fetch
    •

  •                 $URI        the full URI
    •

  •                 $body        body contents to send if any (POST)
    •

  •     Output:
    •

  • \*======================================================================*/
    •

  •
    •

  •     function _httpsrequest($url,$URI,$http_method,$content_type="",$body="")
    •

  •     {
    •

  •         if($this->passcookies && $this->_redirectaddr)
    •

  •             $this->setcookies();
    •

  •
    •

  •         $headers = array();
    •

  •
    •

  •         $URI_PARTS = parse_url($URI);
    •

  •         if(empty($url))
    •

  •             $url = "/";
    •

  •         // GET ... header not needed for curl
    •

  •         //$headers[] = $http_method." ".$url." ".$this->_httpversion;
    •

  •         if(!empty($this->agent))
    •

  •             $headers[] = "User-Agent: ".$this->agent;
    •

  •         if(!empty($this->host))
    •

  •             if(!empty($this->port))
    •

  •                 $headers[] = "Host: ".$this->host.":".$this->port;
    •

  •             else
    •

  •                 $headers[] = "Host: ".$this->host;
    •

  •         if(!empty($this->accept))
    •

  •             $headers[] = "Accept: ".$this->accept;
    •

  •         if(!empty($this->referer))
    •

  •             $headers[] = "Referer: ".$this->referer;
    •

  •         if(!empty($this->cookies))
    •

  •         {
    •

  •             if(!is_array($this->cookies))
    •

  •                 $this->cookies = (array)$this->cookies;
    •

  •
    •

  •             reset($this->cookies);
    •

  •             if ( count($this->cookies) > 0 ) {
    •

  •                 $cookie_str = 'Cookie: ';
    •

  •                 foreach ( $this->cookies as $cookieKey => $cookieVal ) {
    •

  •                 $cookie_str .= $cookieKey."=".urlencode($cookieVal)."; ";
    •

  •                 }
    •

  •                 $headers[] = substr($cookie_str,0,-2);
    •

  •             }
    •

  •         }
    •

  •         if(!empty($this->rawheaders))
    •

  •         {
    •

  •             if(!is_array($this->rawheaders))
    •

  •                 $this->rawheaders = (array)$this->rawheaders;
    •

  •             while(list($headerKey,$headerVal) = each($this->rawheaders))
    •

  •                 $headers[] = $headerKey.": ".$headerVal;
    •

  •         }
    •

  •         if(!empty($content_type)) {
    •

  •             if ($content_type == "multipart/form-data")
    •

  •                 $headers[] = "Content-type: $content_type; boundary=".$this->_mime_boundary;
    •

  •             else
    •

  •                 $headers[] = "Content-type: $content_type";
    •

  •         }
    •

  •         if(!empty($body))
    •

  •             $headers[] = "Content-length: ".strlen($body);
    •

  •         if(!empty($this->user) || !empty($this->pass))
    •

  •             $headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass);
    •

  •
    •

  •         for($curr_header = 0; $curr_header < count($headers); $curr_header++) {
    •

  •             $safer_header = strtr( $headers[$curr_header], "\"", " " );
    •

  •             $cmdline_params .= " -H \"".$safer_header."\"";
    •

  •         }
    •

  •
    •

  •         if(!empty($body))
    •

  •             $cmdline_params .= " -d \"$body\"";
    •

  •
    •

  •         if($this->read_timeout > 0)
    •

  •             $cmdline_params .= " -m ".$this->read_timeout;
    •

  •
    •

  •         $headerfile = tempnam($temp_dir, "sno");
    •

  •
    •

  •         $safer_URI = strtr( $URI, "\"", " " ); // strip quotes from the URI to avoid shell access
    •

  •         exec($this->curl_path." -D \"$headerfile\"".$cmdline_params." \"".$safer_URI."\"",$results,$return);
    •

  •
    •

  •         if($return)
    •

  •         {
    •

  •             $this->error = "Error: cURL could not retrieve the document, error $return.";
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •
    •

  •         $results = implode("\r\n",$results);
    •

  •
    •

  •         $result_headers = file("$headerfile");
    •

  •
    •

  •         $this->_redirectaddr = false;
    •

  •         unset($this->headers);
    •

  •
    •

  •         for($currentHeader = 0; $currentHeader < count($result_headers); $currentHeader++)
    •

  •         {
    •

  •
    •

  •             // if a header begins with Location: or URI:, set the redirect
    •

  •             if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader]))
    •

  •             {
    •

  •                 // get URL portion of the redirect
    •

  •                 preg_match("/^(Location: |URI:)\s+(.*)/",chop($result_headers[$currentHeader]),$matches);
    •

  •                 // look for :// in the Location header to see if hostname is included
    •

  •                 if(!preg_match("|\:\/\/|",$matches[2]))
    •

  •                 {
    •

  •                     // no host in the path, so prepend
    •

  •                     $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
    •

  •                     // eliminate double slash
    •

  •                     if(!preg_match("|^/|",$matches[2]))
    •

  •                             $this->_redirectaddr .= "/".$matches[2];
    •

  •                     else
    •

  •                             $this->_redirectaddr .= $matches[2];
    •

  •                 }
    •

  •                 else
    •

  •                     $this->_redirectaddr = $matches[2];
    •

  •             }
    •

  •
    •

  •             if(preg_match("|^HTTP/|",$result_headers[$currentHeader]))
    •

  •                 $this->response_code = $result_headers[$currentHeader];
    •

  •
    •

  •             $this->headers[] = $result_headers[$currentHeader];
    •

  •         }
    •

  •
    •

  •         // check if there is a a redirect meta tag
    •

  •
    •

  •         if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]*URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
    •

  •         {
    •

  •             $this->_redirectaddr = $this->_expandlinks($match[1],$URI);
    •

  •         }
    •

  •
    •

  •         // have we hit our frame depth and is there frame src to fetch?
    •

  •         if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
    •

  •         {
    •

  •             $this->results[] = $results;
    •

  •             for($x=0; $x<count($match[1]); $x++)
    •

  •                 $this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
    •

  •         }
    •

  •         // have we already fetched framed content?
    •

  •         elseif(is_array($this->results))
    •

  •             $this->results[] = $results;
    •

  •         // no framed content
    •

  •         else
    •

  •             $this->results = $results;
    •

  •
    •

  •         unlink("$headerfile");
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    setcookies()
    •

  •     Purpose:    set cookies for a redirection
    •

  • \*======================================================================*/
    •

  •
    •

  •     function setcookies()
    •

  •     {
    •

  •         for($x=0; $x<count($this->headers); $x++)
    •

  •         {
    •

  •         if(preg_match('/^set-cookie:[\s]+([^=]+)=([^;]+)/i', $this->headers[$x],$match))
    •

  •             $this->cookies[$match[1]] = urldecode($match[2]);
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    _check_timeout
    •

  •     Purpose:    checks whether timeout has occurred
    •

  •     Input:        $fp    file pointer
    •

  • \*======================================================================*/
    •

  •
    •

  •     function _check_timeout($fp)
    •

  •     {
    •

  •         if ($this->read_timeout > 0) {
    •

  •             $fp_status = socket_get_status($fp);
    •

  •             if ($fp_status["timed_out"]) {
    •

  •                 $this->timed_out = true;
    •

  •                 return true;
    •

  •             }
    •

  •         }
    •

  •         return false;
    •

  •     }
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    _connect
    •

  •     Purpose:    make a socket connection
    •

  •     Input:        $fp    file pointer
    •

  • \*======================================================================*/
    •

  •
    •

  •     function _connect(&$fp)
    •

  •     {
    •

  •         if(!empty($this->proxy_host) && !empty($this->proxy_port))
    •

  •             {
    •

  •                 $this->_isproxy = true;
    •

  •
    •

  •                 $host = $this->proxy_host;
    •

  •                 $port = $this->proxy_port;
    •

  •             }
    •

  •         else
    •

  •         {
    •

  •             $host = $this->host;
    •

  •             $port = $this->port;
    •

  •         }
    •

  •
    •

  •         $this->status = 0;
    •

  •
    •

  •         if($fp = fsockopen(
    •

  •                     $host,
    •

  •                     $port,
    •

  •                     $errno,
    •

  •                     $errstr,
    •

  •                     $this->_fp_timeout
    •

  •                     ))
    •

  •         {
    •

  •             // socket connection succeeded
    •

  •
    •

  •             return true;
    •

  •         }
    •

  •         else
    •

  •         {
    •

  •             // socket connection failed
    •

  •             $this->status = $errno;
    •

  •             switch($errno)
    •

  •             {
    •

  •                 case -3:
    •

  •                     $this->error="socket creation failed (-3)";
    •

  •                 case -4:
    •

  •                     $this->error="dns lookup failure (-4)";
    •

  •                 case -5:
    •

  •                     $this->error="connection refused or timed out (-5)";
    •

  •                 default:
    •

  •                     $this->error="connection failed (".$errno.")";
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •     }
    •

  • /*======================================================================*\
    •

  •     Function:    _disconnect
    •

  •     Purpose:    disconnect a socket connection
    •

  •     Input:        $fp    file pointer
    •

  • \*======================================================================*/
    •

  •
    •

  •     function _disconnect($fp)
    •

  •     {
    •

  •         return(fclose($fp));
    •

  •     }
    •

  •
    •

  •
    •

  • /*======================================================================*\
    •

  •     Function:    _prepare_post_body
    •

  •     Purpose:    Prepare post body according to encoding type
    •

  •     Input:        $formvars  - form variables
    •

  •                 $formfiles - form upload files
    •

  •     Output:        post body
    •

  • \*======================================================================*/
    •

  •
    •

  •     function _prepare_post_body($formvars, $formfiles)
    •

  •     {
    •

  •         settype($formvars, "array");
    •

  •         settype($formfiles, "array");
    •

  •         $postdata = '';
    •

  •
    •

  •         if (count($formvars) == 0 && count($formfiles) == 0)
    •

  •             return;
    •

  •
    •

  •         switch ($this->_submit_type) {
    •

  •             case "application/x-www-form-urlencoded":
    •

  •                 reset($formvars);
    •

  •                 while(list($key,$val) = each($formvars)) {
    •

  •                     if (is_array($val) || is_object($val)) {
    •

  •                         while (list($cur_key, $cur_val) = each($val)) {
    •

  •                             $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&";
    •

  •                         }
    •

  •                     } else
    •

  •                         $postdata .= urlencode($key)."=".urlencode($val)."&";
    •

  •                 }
    •

  •                 break;
    •

  •
    •

  •             case "multipart/form-data":
    •

  •                 $this->_mime_boundary = "Snoopy".md5(uniqid(microtime()));
    •

  •
    •

  •                 reset($formvars);
    •

  •                 while(list($key,$val) = each($formvars)) {
    •

  •                     if (is_array($val) || is_object($val)) {
    •

  •                         while (list($cur_key, $cur_val) = each($val)) {
    •

  •                             $postdata .= "--".$this->_mime_boundary."\r\n";
    •

  •                             $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
    •

  •                             $postdata .= "$cur_val\r\n";
    •

  •                         }
    •

  •                     } else {
    •

  •                         $postdata .= "--".$this->_mime_boundary."\r\n";
    •

  •                         $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n";
    •

  •                         $postdata .= "$val\r\n";
    •

  •                     }
    •

  •                 }
    •

  •
    •

  •                 reset($formfiles);
    •

  •                 while (list($field_name, $file_names) = each($formfiles)) {
    •

  •                     settype($file_names, "array");
    •

  •                     while (list(, $file_name) = each($file_names)) {
    •

  •                         if (!is_readable($file_name)) continue;
    •

  •
    •

  •                         $fp = fopen($file_name, "r");
    •

  •                         $file_content = fread($fp, filesize($file_name));
    •

  •                         fclose($fp);
    •

  •                         $base_name = basename($file_name);
    •

  •
    •

  •                         $postdata .= "--".$this->_mime_boundary."\r\n";
    •

  •                         $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n";
    •

  •                         $postdata .= "$file_content\r\n";
    •

  •                     }
    •

  •                 }
    •

  •                 $postdata .= "--".$this->_mime_boundary."--\r\n";
    •

  •                 break;
    •

  •             // XOOPS2 Hack begin
    •

  •             // Added on March 4, 2003 by onokazu@xoops.org
    •

  •             case "text/xml":
    •

  •             default:
    •

  •                 $postdata = $formvars[0];
    •

  •                 break;
    •

  •             // XOOPS2 Hack end
    •

  •         }
    •

  •
    •

  •         return $postdata;
    •

  •     }
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:02 +0200 by phpDocumentor 1.4.0a2


File Source for themesetparser.php

Source for file themesetparser.php

Documentation is available at themesetparser.php

  • <?php
    •

  • // $Id: themesetparser.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  •
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • include_once XOOPS_ROOT_PATH.'/class/xml/saxparser.php';
    •

  • include_once XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php';
    •

  •
    •

  • class XoopsThemeSetParser extends SaxParser
    •

  • {
    •

  •     var $tempArr = array();
    •

  •     var $themeSetData = array();
    •

  •     var $imagesData = array();
    •

  •     var $templatesData = array();
    •

  •
    •

  •     function XoopsThemeSetParser(&$input)
    •

  •     {
    •

  •         $this->SaxParser($input);
    •

  •         $this->addTagHandler(new ThemeSetThemeNameHandler());
    •

  •         $this->addTagHandler(new ThemeSetDateCreatedHandler());
    •

  •         $this->addTagHandler(new ThemeSetAuthorHandler());
    •

  •         $this->addTagHandler(new ThemeSetDescriptionHandler());
    •

  •         $this->addTagHandler(new ThemeSetGeneratorHandler());
    •

  •         $this->addTagHandler(new ThemeSetNameHandler());
    •

  •         $this->addTagHandler(new ThemeSetEmailHandler());
    •

  •         $this->addTagHandler(new ThemeSetLinkHandler());
    •

  •         $this->addTagHandler(new ThemeSetTemplateHandler());
    •

  •         $this->addTagHandler(new ThemeSetImageHandler());
    •

  •         $this->addTagHandler(new ThemeSetModuleHandler());
    •

  •         $this->addTagHandler(new ThemeSetFileTypeHandler());
    •

  •         $this->addTagHandler(new ThemeSetTagHandler());
    •

  •     }
    •

  •
    •

  •     function setThemeSetData($name, &$value)
    •

  •     {
    •

  •         $this->themeSetData[$name] =& $value;
    •

  •     }
    •

  •
    •

  •     function &getThemeSetData($name=null)
    •

  •     {
    •

  •         if (isset($name)) {
    •

  •             if (isset($this->themeSetData[$name])) {
    •

  •                 return $this->themeSetData[$name];
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •         return $this->themeSetData;
    •

  •     }
    •

  •
    •

  •     function setImagesData(&$imagearr)
    •

  •     {
    •

  •         $this->imagesData[] =& $imagearr;
    •

  •     }
    •

  •
    •

  •     function &getImagesData()
    •

  •     {
    •

  •         return $this->imagesData;
    •

  •     }
    •

  •
    •

  •     function setTemplatesData(&$tplarr)
    •

  •     {
    •

  •         $this->templatesData[] =& $tplarr;
    •

  •     }
    •

  •
    •

  •     function &getTemplatesData()
    •

  •     {
    •

  •         return $this->templatesData;
    •

  •     }
    •

  •
    •

  •     function setTempArr($name, &$value, $delim='')
    •

  •     {
    •

  •         if (!isset($this->tempArr[$name])) {
    •

  •             $this->tempArr[$name] =& $value;
    •

  •         } else {
    •

  •             $this->tempArr[$name] .= $delim.$value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function getTempArr()
    •

  •     {
    •

  •         return $this->tempArr;
    •

  •     }
    •

  •
    •

  •     function resetTempArr()
    •

  •     {
    •

  •         unset($this->tempArr);
    •

  •         $this->tempArr = array();
    •

  •     }
    •

  • }
    •

  •
    •

  •
    •

  • class ThemeSetDateCreatedHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function ThemeSetDateCreatedHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'dateCreated';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'themeset':
    •

  •             $parser->setThemeSetData('date', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class ThemeSetAuthorHandler extends XmlTagHandler
    •

  • {
    •

  •     function ThemeSetAuthorHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'author';
    •

  •     }
    •

  •
    •

  •     function handleBeginElement(&$parser, &$attributes)
    •

  •     {
    •

  •         $parser->resetTempArr();
    •

  •     }
    •

  •
    •

  •     function handleEndElement(&$parser)
    •

  •     {
    •

  •         $parser->setCreditsData($parser->getTempArr());
    •

  •     }
    •

  • }
    •

  •
    •

  • class ThemeSetDescriptionHandler extends XmlTagHandler
    •

  • {
    •

  •     function ThemeSetDescriptionHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'description';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'template':
    •

  •             $parser->setTempArr('description', $data);
    •

  •             break;
    •

  •         case 'image':
    •

  •             $parser->setTempArr('description', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class ThemeSetGeneratorHandler extends XmlTagHandler
    •

  • {
    •

  •     function ThemeSetGeneratorHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'generator';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'themeset':
    •

  •             $parser->setThemeSetData('generator', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class ThemeSetNameHandler extends XmlTagHandler
    •

  • {
    •

  •     function ThemeSetNameHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'name';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'themeset':
    •

  •             $parser->setThemeSetData('name', $data);
    •

  •             break;
    •

  •         case 'author':
    •

  •             $parser->setTempArr('name', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class ThemeSetEmailHandler extends XmlTagHandler
    •

  • {
    •

  •     function ThemeSetEmailHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'email';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'author':
    •

  •             $parser->setTempArr('email', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class ThemeSetLinkHandler extends XmlTagHandler
    •

  • {
    •

  •     function ThemeSetLinkHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'link';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'author':
    •

  •             $parser->setTempArr('link', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class ThemeSetTemplateHandler extends XmlTagHandler
    •

  • {
    •

  •     function ThemeSetTemplateHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'template';
    •

  •     }
    •

  •
    •

  •     function handleBeginElement(&$parser, &$attributes)
    •

  •     {
    •

  •         $parser->resetTempArr();
    •

  •         $parser->setTempArr('name', $attributes['name']);
    •

  •     }
    •

  •
    •

  •     function handleEndElement(&$parser)
    •

  •     {
    •

  •         $parser->setTemplatesData($parser->getTempArr());
    •

  •     }
    •

  • }
    •

  •
    •

  • class ThemeSetImageHandler extends XmlTagHandler
    •

  • {
    •

  •     function ThemeSetImageHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'image';
    •

  •     }
    •

  •
    •

  •     function handleBeginElement(&$parser, &$attributes)
    •

  •     {
    •

  •         $parser->resetTempArr();
    •

  •         $parser->setTempArr('name', $attributes[0]);
    •

  •     }
    •

  •
    •

  •     function handleEndElement(&$parser)
    •

  •     {
    •

  •         $parser->setImagesData($parser->getTempArr());
    •

  •     }
    •

  • }
    •

  •
    •

  • class ThemeSetModuleHandler extends XmlTagHandler
    •

  • {
    •

  •     function ThemeSetModuleHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'module';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'template':
    •

  •         case 'image':
    •

  •             $parser->setTempArr('module', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class ThemeSetFileTypeHandler extends XmlTagHandler
    •

  • {
    •

  •     function ThemeSetFileTypeHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'fileType';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'template':
    •

  •             $parser->setTempArr('type', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class ThemeSetTagHandler extends XmlTagHandler
    •

  • {
    •

  •     function ThemeSetTagHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'tag';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'image':
    •

  •             $parser->setTempArr('tag', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:17 +0200 by phpDocumentor 1.4.0a2


File Source for xmlrpcapi.php

Source for file xmlrpcapi.php

Documentation is available at xmlrpcapi.php

  • <?php
    •

  • // $Id: xmlrpcapi.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  •
    •

  •
    •

  • class XoopsXmlRpcApi
    •

  • {
    •

  •
    •

  •     // reference to method parameters
    •

  •     var $params;
    •

  •
    •

  •     // reference to xmlrpc document class object
    •

  •     var $response;
    •

  •
    •

  •     // reference to module class object
    •

  •     var $module;
    •

  •
    •

  •     // map between xoops tags and blogger specific tags
    •

  •     var $xoopsTagMap = array();
    •

  •
    •

  •     // user class object
    •

  •     var $user;
    •

  •
    •

  •     var $isadmin = false;
    •

  •
    •

  •
    •

  •
    •

  •     function XoopsXmlRpcApi(&$params, &$response, &$module)
    •

  •     {
    •

  •         $this->params =& $params;
    •

  •         $this->response =& $response;
    •

  •         $this->module =& $module;
    •

  •     }
    •

  •
    •

  •     function _setUser(&$user, $isadmin = false)
    •

  •     {
    •

  •         if (is_object($user)) {
    •

  •             $this->user =& $user;
    •

  •             $this->isadmin = $isadmin;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function _checkUser($username, $password)
    •

  •     {
    •

  •         if (isset($this->user)) {
    •

  •             return true;
    •

  •         }
    •

  •         $member_handler =& xoops_gethandler('member');
    •

  •         $this->user =& $member_handler->loginUser(addslashes($username), addslashes($password));
    •

  •         if (!is_object($this->user)) {
    •

  •             unset($this->user);
    •

  •             return false;
    •

  •         }
    •

  •         $moduleperm_handler =& xoops_gethandler('groupperm');
    •

  •         if (!$moduleperm_handler->checkRight('module_read', $this->module->getVar('mid'), $this->user->getGroups())) {
    •

  •             unset($this->user);
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     function _checkAdmin()
    •

  •     {
    •

  •         if ($this->isadmin) {
    •

  •             return true;
    •

  •         }
    •

  •         if (!isset($this->user)) {
    •

  •             return false;
    •

  •         }
    •

  •         if (!$this->user->isAdmin($this->module->getVar('mid'))) {
    •

  •             return false;
    •

  •         }
    •

  •         $this->isadmin = true;
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     function &_getPostFields($post_id = null, $blog_id = null)
    •

  •     {
    •

  •         $ret = array();
    •

  •         $ret['title'] = array('required' => true, 'form_type' => 'textbox', 'value_type' => 'text');
    •

  •         $ret['hometext'] = array('required' => false, 'form_type' => 'textarea', 'data_type' => 'textarea');
    •

  •         $ret['moretext'] = array('required' => false, 'form_type' => 'textarea', 'data_type' => 'textarea');
    •

  •         $ret['categories'] = array('required' => false, 'form_type' => 'select_multi', 'data_type' => 'array');
    •

  •         /*
    •

  •         if (!isset($blog_id)) {
    •

  •             if (!isset($post_id)) {
    •

  •                 return false;
    •

  •             }
    •

  •             $itemman =& $this->mf->get(MANAGER_ITEM);
    •

  •             $item =& $itemman->get($post_id);
    •

  •             $blog_id = $item->getVar('sect_id');
    •

  •         }
    •

  •         $sectman =& $this->mf->get(MANAGER_SECTION);
    •

  •         $this->section =& $sectman->get($blog_id);
    •

  •         $ret =& $this->section->getVar('sect_fields');
    •

  •         */
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function _setXoopsTagMap($xoopstag, $blogtag)
    •

  •     {
    •

  •         if (trim($blogtag) != '') {
    •

  •             $this->xoopsTagMap[$xoopstag] = $blogtag;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function _getXoopsTagMap($xoopstag)
    •

  •     {
    •

  •         if (isset($this->xoopsTagMap[$xoopstag])) {
    •

  •             return $this->xoopsTagMap[$xoopstag];
    •

  •         }
    •

  •         return $xoopstag;
    •

  •     }
    •

  •
    •

  •     function _getTagCdata(&$text, $tag, $remove = true)
    •

  •     {
    •

  •         $ret = '';
    •

  •         $match = array();
    •

  •         if (preg_match("/\<".$tag."\>(.*)\<\/".$tag."\>/is", $text, $match)) {
    •

  •             if ($remove) {
    •

  •                 $text = str_replace($match[0], '', $text);
    •

  •             }
    •

  •             $ret = $match[1];
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     // kind of dirty method to load XOOPS API and create a new object thereof
    •

  •     // returns itself if the calling object is XOOPS API
    •

  •     function &_getXoopsApi(&$params)
    •

  •     {
    •

  •         if (strtolower(get_class($this)) != 'xoopsapi') {
    •

  •             require_once(XOOPS_ROOT_PATH.'/class/xml/rpc/xoopsapi.php');
    •

  •             return new XoopsApi($params, $this->response, $this->module);
    •

  •         } else {
    •

  •             return $this;
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:28 +0200 by phpDocumentor 1.4.0a2


File Source for xmlrpctag.php

Source for file xmlrpctag.php

Documentation is available at xmlrpctag.php

  • <?php
    •

  • // $Id: xmlrpctag.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  •
    •

  • class XoopsXmlRpcDocument
    •

  • {
    •

  •
    •

  •     var $_tags = array();
    •

  •
    •

  •     function XoopsXmlRpcDocument()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function add(&$tagobj)
    •

  •     {
    •

  •         $this->_tags[] =& $tagobj;
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •     }
    •

  •
    •

  • }
    •

  •
    •

  • class XoopsXmlRpcResponse extends XoopsXmlRpcDocument
    •

  • {
    •

  •     function render()
    •

  •     {
    •

  •         $count = count($this->_tags);
    •

  •         $payload = '';
    •

  •         for ($i = 0; $i < $count; $i++) {
    •

  •             if (!$this->_tags[$i]->isFault()) {
    •

  •                 $payload .= $this->_tags[$i]->render();
    •

  •             } else {
    •

  •                 return '<?xml version="1.0"?><methodResponse>'.$this->_tags[$i]->render().'</methodResponse>';
    •

  •             }
    •

  •         }
    •

  •         return '<?xml version="1.0"?><methodResponse><params><param>'.$payload.'</param></params></methodResponse>';
    •

  •     }
    •

  • }
    •

  •
    •

  • class XoopsXmlRpcRequest extends XoopsXmlRpcDocument
    •

  • {
    •

  •
    •

  •     var $methodName;
    •

  •
    •

  •     function XoopsXmlRpcRequest($methodName)
    •

  •     {
    •

  •         $this->methodName = trim($methodName);
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •         $count = count($this->_tags);
    •

  •         $payload = '';
    •

  •         for ($i = 0; $i < $count; $i++) {
    •

  •             $payload .= '<param>'.$this->_tags[$i]->render().'</param>';
    •

  •         }
    •

  •         return '<?xml version="1.0"?><methodCall><methodName>'.$this->methodName.'</methodName><params>'.$payload.'</params></methodCall>';
    •

  •     }
    •

  • }
    •

  •
    •

  • class XoopsXmlRpcTag
    •

  • {
    •

  •
    •

  •     var $_fault = false;
    •

  •
    •

  •     function XoopsXmlRpcTag()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function &encode(&$text)
    •

  •     {
    •

  •         $text = preg_replace(array("/\&([a-z\d\#]+)\;/i", "/\&/", "/\#\|\|([a-z\d\#]+)\|\|\#/i"), array("#||\\1||#", "&amp;", "&\\1;"), str_replace(array("<", ">"), array("&lt;", "&gt;"), $text));
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     function setFault($fault = true){
    •

  •         $this->_fault = (intval($fault) > 0) ? true : false;
    •

  •     }
    •

  •
    •

  •     function isFault()
    •

  •     {
    •

  •         return $this->_fault;
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •     }
    •

  • }
    •

  •
    •

  • class XoopsXmlRpcFault extends XoopsXmlRpcTag
    •

  • {
    •

  •
    •

  •     var $_code;
    •

  •     var $_extra;
    •

  •
    •

  •     function XoopsXmlRpcFault($code, $extra = null)
    •

  •     {
    •

  •         $this->setFault(true);
    •

  •         $this->_code = intval($code);
    •

  •         $this->_extra = isset($extra) ? trim($extra) : '';
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •         switch ($this->_code) {
    •

  •         case 101:
    •

  •             $string = 'Invalid server URI';
    •

  •             break;
    •

  •         case 102:
    •

  •             $string = 'Parser parse error';
    •

  •             break;
    •

  •         case 103:
    •

  •             $string = 'Module not found';
    •

  •             break;
    •

  •         case 104:
    •

  •             $string = 'User authentication failed';
    •

  •             break;
    •

  •         case 105:
    •

  •             $string = 'Module API not found';
    •

  •             break;
    •

  •         case 106:
    •

  •             $string = 'Method response error';
    •

  •             break;
    •

  •         case 107:
    •

  •             $string = 'Method not supported';
    •

  •             break;
    •

  •         case 108:
    •

  •             $string = 'Invalid parameter';
    •

  •             break;
    •

  •         case 109:
    •

  •             $string = 'Missing parameters';
    •

  •             break;
    •

  •         case 110:
    •

  •             $string = 'Selected blog application does not exist';
    •

  •             break;
    •

  •         case 111:
    •

  •             $string = 'Method permission denied';
    •

  •             break;
    •

  •         default:
    •

  •             $string = 'Method response error';
    •

  •             break;
    •

  •         }
    •

  •         $string .= "\n".$this->_extra;
    •

  •         return '<fault><value><struct><member><name>faultCode</name><value>'.$this->_code.'</value></member><member><name>faultString</name><value>'.$this->encode($string).'</value></member></struct></value></fault>';
    •

  •     }
    •

  • }
    •

  •
    •

  • class XoopsXmlRpcInt extends XoopsXmlRpcTag
    •

  • {
    •

  •
    •

  •     var $_value;
    •

  •
    •

  •     function XoopsXmlRpcInt($value)
    •

  •     {
    •

  •         $this->_value = intval($value);
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •         return '<value><int>'.$this->_value.'</int></value>';
    •

  •     }
    •

  • }
    •

  •
    •

  • class XoopsXmlRpcDouble extends XoopsXmlRpcTag
    •

  • {
    •

  •
    •

  •     var $_value;
    •

  •
    •

  •     function XoopsXmlRpcDouble($value)
    •

  •     {
    •

  •         $this->_value = (float)$value;
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •         return '<value><double>'.$this->_value.'</double></value>';
    •

  •     }
    •

  • }
    •

  •
    •

  • class XoopsXmlRpcBoolean extends XoopsXmlRpcTag
    •

  • {
    •

  •
    •

  •     var $_value;
    •

  •
    •

  •     function XoopsXmlRpcBoolean($value)
    •

  •     {
    •

  •         $this->_value = (!empty($value) && $value != false) ? 1 : 0;
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •         return '<value><boolean>'.$this->_value.'</boolean></value>';
    •

  •     }
    •

  • }
    •

  •
    •

  • class XoopsXmlRpcString extends XoopsXmlRpcTag
    •

  • {
    •

  •
    •

  •     var $_value;
    •

  •
    •

  •     function XoopsXmlRpcString($value)
    •

  •     {
    •

  •         $this->_value = strval($value);
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •         return '<value><string>'.$this->encode($this->_value).'</string></value>';
    •

  •     }
    •

  • }
    •

  •
    •

  • class XoopsXmlRpcDatetime extends XoopsXmlRpcTag
    •

  • {
    •

  •
    •

  •     var $_value;
    •

  •
    •

  •     function XoopsXmlRpcDatetime($value)
    •

  •     {
    •

  •         if (!is_numeric($value)) {
    •

  •             $this->_value = strtotime($value);
    •

  •         } else {
    •

  •             $this->_value = intval($value);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •         return '<value><dateTime.iso8601>'.gmstrftime("%Y%m%dT%H:%M:%S", $this->_value).'</dateTime.iso8601></value>';
    •

  •     }
    •

  • }
    •

  •
    •

  • class XoopsXmlRpcBase64 extends XoopsXmlRpcTag
    •

  • {
    •

  •
    •

  •     var $_value;
    •

  •
    •

  •     function XoopsXmlRpcBase64($value)
    •

  •     {
    •

  •         $this->_value = base64_encode($value);
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •         return '<value><base64>'.$this->_value.'</base64></value>';
    •

  •     }
    •

  • }
    •

  •
    •

  • class XoopsXmlRpcArray extends XoopsXmlRpcTag
    •

  • {
    •

  •
    •

  •     var $_tags = array();
    •

  •
    •

  •     function XoopsXmlRpcArray()
    •

  •     {
    •

  •     }
    •

  •
    •

  •     function add(&$tagobj)
    •

  •     {
    •

  •         $this->_tags[] =& $tagobj;
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •         $count = count($this->_tags);
    •

  •         $ret = '<value><array><data>';
    •

  •         for ($i = 0; $i < $count; $i++) {
    •

  •             $ret .= $this->_tags[$i]->render();
    •

  •         }
    •

  •         $ret .= '</data></array></value>';
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  •
    •

  • class XoopsXmlRpcStruct extends XoopsXmlRpcTag{
    •

  •
    •

  •     var $_tags = array();
    •

  •
    •

  •     function XoopsXmlRpcStruct(){
    •

  •     }
    •

  •
    •

  •     function add($name, &$tagobj){
    •

  •         $this->_tags[] = array('name' => $name, 'value' => $tagobj);
    •

  •     }
    •

  •
    •

  •     function render(){
    •

  •         $count = count($this->_tags);
    •

  •         $ret = '<value><struct>';
    •

  •         for ($i = 0; $i < $count; $i++) {
    •

  •             $ret .= '<member><name>'.$this->encode($this->_tags[$i]['name']).'</name>'.$this->_tags[$i]['value']->render().'</member>';
    •

  •         }
    •

  •         $ret .= '</struct></value>';
    •

  •         return $ret;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:36 +0200 by phpDocumentor 1.4.0a2


File Source for xmlrss2parser.php

Source for file xmlrss2parser.php

Documentation is available at xmlrss2parser.php

  • <?php
    •

  • // $Id: xmlrss2parser.php 506 2006-05-26 23:10:37Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • require_once(XOOPS_ROOT_PATH.'/class/xml/saxparser.php');
    •

  • require_once(XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php');
    •

  •
    •

  • class XoopsXmlRss2Parser extends SaxParser
    •

  • {
    •

  •     var $_tempArr = array();
    •

  •     var $_channelData = array();
    •

  •     var $_imageData = array();
    •

  •     var $_items = array();
    •

  •
    •

  •     function XoopsXmlRss2Parser(&$input)
    •

  •     {
    •

  •         $this->SaxParser($input);
    •

  •         $this->useUtfEncoding();
    •

  •         $this->addTagHandler(new RssChannelHandler());
    •

  •         $this->addTagHandler(new RssTitleHandler());
    •

  •         $this->addTagHandler(new RssLinkHandler());
    •

  •         $this->addTagHandler(new RssGeneratorHandler());
    •

  •         $this->addTagHandler(new RssDescriptionHandler());
    •

  •         $this->addTagHandler(new RssCopyrightHandler());
    •

  •         $this->addTagHandler(new RssNameHandler());
    •

  •         $this->addTagHandler(new RssManagingEditorHandler());
    •

  •         $this->addTagHandler(new RssLanguageHandler());
    •

  •         $this->addTagHandler(new RssLastBuildDateHandler());
    •

  •         $this->addTagHandler(new RssWebMasterHandler());
    •

  •         $this->addTagHandler(new RssImageHandler());
    •

  •         $this->addTagHandler(new RssUrlHandler());
    •

  •         $this->addTagHandler(new RssWidthHandler());
    •

  •         $this->addTagHandler(new RssHeightHandler());
    •

  •         $this->addTagHandler(new RssItemHandler());
    •

  •         $this->addTagHandler(new RssCategoryHandler());
    •

  •         $this->addTagHandler(new RssPubDateHandler());
    •

  •         $this->addTagHandler(new RssCommentsHandler());
    •

  •         $this->addTagHandler(new RssSourceHandler());
    •

  •         $this->addTagHandler(new RssAuthorHandler());
    •

  •         $this->addTagHandler(new RssGuidHandler());
    •

  •         $this->addTagHandler(new RssTextInputHandler());
    •

  •     }
    •

  •
    •

  •     function setChannelData($name, &$value)
    •

  •     {
    •

  •         if (!isset($this->_channelData[$name])) {
    •

  •             $this->_channelData[$name] =& $value;
    •

  •         } else {
    •

  •             $this->_channelData[$name] .= $value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function &getChannelData($name = null)
    •

  •     {
    •

  •         if (isset($name)) {
    •

  •             if (isset($this->_channelData[$name])) {
    •

  •                 return $this->_channelData[$name];
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •         return $this->_channelData;
    •

  •     }
    •

  •
    •

  •     function setImageData($name, &$value)
    •

  •     {
    •

  •         $this->_imageData[$name] =& $value;
    •

  •     }
    •

  •
    •

  •     function &getImageData($name = null)
    •

  •     {
    •

  •         if (isset($name)) {
    •

  •             if (isset($this->_imageData[$name])) {
    •

  •                 return $this->_imageData[$name];
    •

  •             }
    •

  •             $return = false;
    •

  •             return $return;
    •

  •         }
    •

  •         return $this->_imageData;
    •

  •     }
    •

  •
    •

  •     function setItems(&$itemarr)
    •

  •     {
    •

  •         $this->_items[] =& $itemarr;
    •

  •     }
    •

  •
    •

  •     function &getItems()
    •

  •     {
    •

  •         return $this->_items;
    •

  •     }
    •

  •
    •

  •     function setTempArr($name, &$value, $delim = '')
    •

  •     {
    •

  •         if (!isset($this->_tempArr[$name])) {
    •

  •             $this->_tempArr[$name] =& $value;
    •

  •         } else {
    •

  •             $this->_tempArr[$name] .= $delim.$value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function getTempArr()
    •

  •     {
    •

  •         return $this->_tempArr;
    •

  •     }
    •

  •
    •

  •     function resetTempArr()
    •

  •     {
    •

  •         unset($this->_tempArr);
    •

  •         $this->_tempArr = array();
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssChannelHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssChannelHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'channel';
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssTitleHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssTitleHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'title';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('title', $data);
    •

  •             break;
    •

  •         case 'image':
    •

  •             $parser->setImageData('title', $data);
    •

  •             break;
    •

  •         case 'item':
    •

  •         case 'textInput':
    •

  •             $parser->setTempArr('title', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssLinkHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssLinkHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'link';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('link', $data);
    •

  •             break;
    •

  •         case 'image':
    •

  •             $parser->setImageData('link', $data);
    •

  •             break;
    •

  •         case 'item':
    •

  •         case 'textInput':
    •

  •             $parser->setTempArr('link', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssDescriptionHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssDescriptionHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'description';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('description', $data);
    •

  •             break;
    •

  •         case 'image':
    •

  •             $parser->setImageData('description', $data);
    •

  •             break;
    •

  •         case 'item':
    •

  •         case 'textInput':
    •

  •             $parser->setTempArr('description', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssGeneratorHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssGeneratorHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'generator';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('generator', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssCopyrightHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssCopyrightHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'copyright';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('copyright', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssNameHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssNameHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'name';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'textInput':
    •

  •             $parser->setTempArr('name', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssManagingEditorHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssManagingEditorHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'managingEditor';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('editor', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssLanguageHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssLanguageHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'language';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('language', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssWebMasterHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssWebMasterHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'webMaster';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('webmaster', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssDocsHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssDocsHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'docs';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('docs', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssTtlHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssTtlHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'ttl';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('ttl', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssTextInputHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssWebMasterHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'textInput';
    •

  •     }
    •

  •
    •

  •     function handleBeginElement(&$parser, &$attributes)
    •

  •     {
    •

  •         $parser->resetTempArr();
    •

  •     }
    •

  •
    •

  •     function handleEndElement(&$parser)
    •

  •     {
    •

  •         $parser->setChannelData('textinput', $parser->getTempArr());
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssLastBuildDateHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssLastBuildDateHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'lastBuildDate';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('lastbuilddate', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssImageHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssImageHandler()
    •

  •     {
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'image';
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssUrlHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssUrlHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'url';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         if ($parser->getParentTag() == 'image') {
    •

  •             $parser->setImageData('url', $data);
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssWidthHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssWidthHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'width';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         if ($parser->getParentTag() == 'image') {
    •

  •             $parser->setImageData('width', $data);
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssHeightHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssHeightHandler()
    •

  •     {
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'height';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         if ($parser->getParentTag() == 'image') {
    •

  •             $parser->setImageData('height', $data);
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssItemHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssItemHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'item';
    •

  •     }
    •

  •
    •

  •     function handleBeginElement(&$parser, &$attributes)
    •

  •     {
    •

  •         $parser->resetTempArr();
    •

  •     }
    •

  •
    •

  •     function handleEndElement(&$parser)
    •

  •     {
    •

  •         $items =& $parser->getTempArr();
    •

  •         $parser->setItems( $items );
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssCategoryHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssCategoryHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'category';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('category', $data);
    •

  •             break;
    •

  •         case 'item':
    •

  •             $parser->setTempArr('category', $data, ', ');
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssCommentsHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssCommentsHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'comments';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         if ($parser->getParentTag() == 'item') {
    •

  •             $parser->setTempArr('comments', $data);
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssPubDateHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssPubDateHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'pubDate';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'channel':
    •

  •             $parser->setChannelData('pubdate', $data);
    •

  •             break;
    •

  •         case 'item':
    •

  •             $parser->setTempArr('pubdate', $data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssGuidHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssGuidHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'guid';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         if ($parser->getParentTag() == 'item') {
    •

  •             $parser->setTempArr('guid', $data);
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssAuthorHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssGuidHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'author';
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         if ($parser->getParentTag() == 'item') {
    •

  •             $parser->setTempArr('author', $data);
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RssSourceHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     function RssSourceHandler()
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     function getName()
    •

  •     {
    •

  •         return 'source';
    •

  •     }
    •

  •
    •

  •     function handleBeginElement(&$parser, &$attributes)
    •

  •     {
    •

  •         if ($parser->getParentTag() == 'item') {
    •

  •             $parser->setTempArr('source_url', $attributes['url']);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         if ($parser->getParentTag() == 'item') {
    •

  •             $parser->setTempArr('source', $data);
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:41 +0200 by phpDocumentor 1.4.0a2


File Source for xmltaghandler.php

Source for file xmltaghandler.php

Documentation is available at xmltaghandler.php

  • <?php
    •

  • // $Id: xmltaghandler.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • /*******************************************************************************
    •

  •     Location: <b>xml/XmlTagHandler</b><br>
    •

  •      <br>
    •

  •     XmlTagHandler<br>
    •

  •     <br>
    •

  •     Copyright &copy; 2001 eXtremePHP.  All rights reserved.<br>
    •

  •     <br>
    •

  •     @author Ken Egervari, Remi Michalski<br>
    •

  • *******************************************************************************/
    •

  •
    •

  • class XmlTagHandler
    •

  • {
    •

  •
    •

  •     /****************************************************************************
    •

  •
    •

  •     ****************************************************************************/
    •

  •     function XmlTagHandler()
    •

  •     {
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •
    •

  •     ****************************************************************************/
    •

  •     function getName()
    •

  •     {
    •

  •         return '';
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •
    •

  •     ****************************************************************************/
    •

  •     function handleBeginElement(&$parser, &$attributes)
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •
    •

  •     ****************************************************************************/
    •

  •     function handleEndElement(&$parser)
    •

  •     {
    •

  •
    •

  •     }
    •

  •
    •

  •     /****************************************************************************
    •

  •
    •

  •     ****************************************************************************/
    •

  •     function handleCharacterData(&$parser,  &$data)
    •

  •     {
    •

  •
    •

  •     }
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:47 +0200 by phpDocumentor 1.4.0a2


File Source for xoopsapi.php

Source for file xoopsapi.php

Documentation is available at xoopsapi.php

  • <?php
    •

  • // $Id: xoopsapi.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • require_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php';
    •

  •
    •

  • class XoopsApi extends XoopsXmlRpcApi
    •

  • {
    •

  •
    •

  •     function XoopsApi(&$params, &$response, &$module)
    •

  •     {
    •

  •         $this->XoopsXmlRpcApi($params, $response, $module);
    •

  •     }
    •

  •
    •

  •     function newPost()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             if (!$fields =& $this->_getPostFields(null, $this->params[0])) {
    •

  •                 $this->response->add(new XoopsXmlRpcFault(106));
    •

  •             } else {
    •

  •                 $missing = array();
    •

  •                 foreach ($fields as $tag => $detail) {
    •

  •                     if (!isset($this->params[3][$tag])) {
    •

  •                         $data = $this->_getTagCdata($this->params[3]['xoops_text'], $tag, true);
    •

  •                         if (trim($data) == ''){
    •

  •                             if ($detail['required']) {
    •

  •                                 $missing[] = $tag;
    •

  •                             }
    •

  •                         } else {
    •

  •                             $post[$tag] =& $data;
    •

  •                         }
    •

  •                     } else {
    •

  •                         $post[$tag] =& $this->params[3][$tag];
    •

  •                     }
    •

  •                 }
    •

  •                 if (count($missing) > 0) {
    •

  •                     $msg = '';
    •

  •                     foreach ($missing as $m) {
    •

  •                         $msg .= '<'.$m.'> ';
    •

  •                     }
    •

  •                     $this->response->add(new XoopsXmlRpcFault(109, $msg));
    •

  •                 } else {
    •

  •                     // will be removed... don't worry if this looks bad
    •

  •                     include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
    •

  •                     $story = new NewsStory();
    •

  •                     $error = false;
    •

  •                     if (intval($this->params[4]) > 0) {
    •

  •                         if (!$this->_checkAdmin()) {
    •

  •                             // non admin users cannot publish
    •

  •                             $error = true;
    •

  •                             $this->response->add(new XoopsXmlRpcFault(111));
    •

  •                         } else {
    •

  •                             $story->setType('admin');
    •

  •                             $story->setApproved(true);
    •

  •                             $story->setPublished(time());
    •

  •                         }
    •

  •                     } else {
    •

  •                         if (!$this->_checkAdmin()) {
    •

  •                             $story->setType('user');
    •

  •                         } else {
    •

  •                             $story->setType('admin');
    •

  •                         }
    •

  •                     }
    •

  •                     if (!$error) {
    •

  •                         if (isset($post['categories']) && !empty($post['categories'][0])) {
    •

  •                             $story->setTopicId(intval($post['categories'][0]['categoryId']));
    •

  •                         } else {
    •

  •                             $story->setTopicId(1);
    •

  •                         }
    •

  •                         $story->setTitle(addslashes(trim($post['title'])));
    •

  •                         if (isset($post['moretext'])) {
    •

  •                             $story->setBodytext(addslashes(trim($post['moretext'])));
    •

  •                         }
    •

  •                         if (!isset($post['hometext'])) {
    •

  •                             $story->setHometext(addslashes(trim($this->params[3]['xoops_text'])));
    •

  •                         } else {
    •

  •                             $story->setHometext(addslashes(trim($post['hometext'])));
    •

  •                         }
    •

  •                         $story->setUid($this->user->getVar('uid'));
    •

  •                         $story->setHostname($_SERVER['REMOTE_ADDR']);
    •

  •                         if (!$this->_checkAdmin()) {
    •

  •                             $story->setNohtml(1);
    •

  •                         } else {
    •

  •                             $story->setNohtml(0);
    •

  •                         }
    •

  •                         $story->setNosmiley(0);
    •

  •                         $story->setNotifyPub(1);
    •

  •                         $story->setTopicalign('R');
    •

  •                         $ret = $story->store();
    •

  •                         if (!$ret) {
    •

  •                             $this->response->add(new XoopsXmlRpcFault(106));
    •

  •                         } else {
    •

  •                             $this->response->add(new XoopsXmlRpcString($ret));
    •

  •                         }
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function editPost()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             if (!$fields =& $this->_getPostFields($this->params[0])) {
    •

  •             } else {
    •

  •                 $missing = array();
    •

  •                 foreach ($fields as $tag => $detail) {
    •

  •                     if (!isset($this->params[3][$tag])) {
    •

  •                         $data = $this->_getTagCdata($this->params[3]['xoops_text'], $tag, true);
    •

  •                         if (trim($data) == ''){
    •

  •                             if ($detail['required']) {
    •

  •                                 $missing[] = $tag;
    •

  •                             }
    •

  •                         } else {
    •

  •                             $post[$tag] = $data;
    •

  •                         }
    •

  •                     } else {
    •

  •                         $post[$tag] = $this->params[3][$tag];
    •

  •                     }
    •

  •                 }
    •

  •                 if (count($missing) > 0) {
    •

  •                     $msg = '';
    •

  •                     foreach ($missing as $m) {
    •

  •                         $msg .= '<'.$m.'> ';
    •

  •                     }
    •

  •                     $this->response->add(new XoopsXmlRpcFault(109, $msg));
    •

  •                 } else {
    •

  •                     // will be removed... don't worry if this looks bad
    •

  •                     include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
    •

  •                     $story = new NewsStory($this->params[0]);
    •

  •                     $storyid = $story->storyid();
    •

  •                     if (empty($storyid)) {
    •

  •                         $this->response->add(new XoopsXmlRpcFault(106));
    •

  •                     } elseif (!$this->_checkAdmin()) {
    •

  •                         $this->response->add(new XoopsXmlRpcFault(111));
    •

  •                     } else {
    •

  •                         $story->setTitle(addslashes(trim($post['title'])));
    •

  •                         if (isset($post['moretext'])) {
    •

  •                             $story->setBodytext(addslashes(trim($post['moretext'])));
    •

  •                         }
    •

  •                         if (!isset($post['hometext'])) {
    •

  •                             $story->setHometext(addslashes(trim($this->params[3]['xoops_text'])));
    •

  •                         } else {
    •

  •                             $story->setHometext(addslashes(trim($post['hometext'])));
    •

  •                         }
    •

  •                         if ($this->params[4]) {
    •

  •                             $story->setApproved(true);
    •

  •                             $story->setPublished(time());
    •

  •                         }
    •

  •                         $story->setTopicalign('R');
    •

  •                         if (!$story->store()) {
    •

  •                             $this->response->add(new XoopsXmlRpcFault(106));
    •

  •                         } else {
    •

  •                             $this->response->add(new XoopsXmlRpcBoolean(true));
    •

  •                         }
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function deletePost()
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             if (!$this->_checkAdmin()) {
    •

  •                 $this->response->add(new XoopsXmlRpcFault(111));
    •

  •             } else {
    •

  •                 // will be removed... don't worry if this looks bad
    •

  •                 include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
    •

  •                 $story = new NewsStory($this->params[0]);
    •

  •                 if (!$story->delete()) {
    •

  •                     $this->response->add(new XoopsXmlRpcFault(106));
    •

  •                 } else {
    •

  •                     $this->response->add(new XoopsXmlRpcBoolean(true));
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     // currently returns the same struct as in metaWeblogApi
    •

  •     function &getPost($respond=true)
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             // will be removed... don't worry if this looks bad
    •

  •             include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
    •

  •             $story = new NewsStory($this->params[0]);
    •

  •             $ret = array('uid' => $story->uid(), 'published' => $story->published(), 'storyid' => $story->storyId(), 'title' => $story->title('Edit'), 'hometext' => $story->hometext('Edit'), 'moretext' => $story->bodytext('Edit'));
    •

  •             if (!$respond) {
    •

  •                 return $ret;
    •

  •             } else {
    •

  •                 if (!$ret) {
    •

  •                     $this->response->add(new XoopsXmlRpcFault(106));
    •

  •                 } else {
    •

  •                     $struct = new XoopsXmlRpcStruct();
    •

  •                     $content = '';
    •

  •                     foreach ($ret as $key => $value) {
    •

  •                         switch($key) {
    •

  •                         case 'uid':
    •

  •                             $struct->add('userid', new XoopsXmlRpcString($value));
    •

  •                             break;
    •

  •                         case 'published':
    •

  •                             $struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
    •

  •                             break;
    •

  •                         case 'storyid':
    •

  •                             $struct->add('postid', new XoopsXmlRpcString($value));
    •

  •                             $struct->add('link', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/article.php?item_id='.$value));
    •

  •                             $struct->add('permaLink', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/article.php?item_id='.$value));
    •

  •                             break;
    •

  •                         case 'title':
    •

  •                             $struct->add('title', new XoopsXmlRpcString($value));
    •

  •                             break;
    •

  •                         default :
    •

  •                             $content .= '<'.$key.'>'.trim($value).'</'.$key.'>';
    •

  •                             break;
    •

  •                         }
    •

  •                     }
    •

  •                     $struct->add('description', new XoopsXmlRpcString($content));
    •

  •                     $this->response->add($struct);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function &getRecentPosts($respond=true)
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
    •

  •             if (isset($this->params[4]) && intval($this->params[4]) > 0) {
    •

  •                 $stories =& NewsStory::getAllPublished(intval($this->params[3]), 0, $this->params[4]);
    •

  •             } else {
    •

  •                 $stories =& NewsStory::getAllPublished(intval($this->params[3]));
    •

  •             }
    •

  •             $scount = count($stories);
    •

  •             $ret = array();
    •

  •             for ($i = 0; $i < $scount; $i++) {
    •

  •                 $ret[] = array('uid' => $stories[$i]->uid(), 'published' => $stories[$i]->published(), 'storyid' => $stories[$i]->storyId(), 'title' => $stories[$i]->title('Edit'), 'hometext' => $stories[$i]->hometext('Edit'), 'moretext' => $stories[$i]->bodytext('Edit'));
    •

  •             }
    •

  •             if (!$respond) {
    •

  •                 return $ret;
    •

  •             } else {
    •

  •                 if (count($ret) == 0) {
    •

  •                     $this->response->add(new XoopsXmlRpcFault(106, 'Found 0 Entries'));
    •

  •                 } else {
    •

  •                     $arr = new XoopsXmlRpcArray();
    •

  •                     $count = count($ret);
    •

  •                     for ($i = 0; $i < $count; $i++) {
    •

  •                         $struct = new XoopsXmlRpcStruct();
    •

  •                         $content = '';
    •

  •                         foreach($ret[$i] as $key => $value) {
    •

  •                             switch($key) {
    •

  •                             case 'uid':
    •

  •                                 $struct->add('userid', new XoopsXmlRpcString($value));
    •

  •                                 break;
    •

  •                             case 'published':
    •

  •                                 $struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
    •

  •                                 break;
    •

  •                             case 'storyid':
    •

  •                                 $struct->add('postid', new XoopsXmlRpcString($value));
    •

  •                                 $struct->add('link', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/article.php?item_id='.$value));
    •

  •                                 $struct->add('permaLink', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/article.php?item_id='.$value));
    •

  •                                 break;
    •

  •                             case 'title':
    •

  •                                 $struct->add('title', new XoopsXmlRpcString($value));
    •

  •                                 break;
    •

  •                             default :
    •

  •                                 $content .= '<'.$key.'>'.trim($value).'</'.$key.'>';
    •

  •                                 break;
    •

  •                             }
    •

  •                         }
    •

  •                         $struct->add('description', new XoopsXmlRpcString($content));
    •

  •                         $arr->add($struct);
    •

  •                         unset($struct);
    •

  •                     }
    •

  •                     $this->response->add($arr);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function &getCategories($respond=true)
    •

  •     {
    •

  •         if (!$this->_checkUser($this->params[1], $this->params[2])) {
    •

  •             $this->response->add(new XoopsXmlRpcFault(104));
    •

  •         } else {
    •

  •             include_once XOOPS_ROOT_PATH.'/class/xoopstopic.php';
    •

  •             $db =& Database::getInstance();
    •

  •             $xt = new XoopsTopic($db->prefix('topics'));
    •

  •             $ret = $xt->getTopicsList();
    •

  •             if (!$respond) {
    •

  •                 return $ret;
    •

  •             } else {
    •

  •                 if (count($ret) == 0) {
    •

  •                     $this->response->add(new XoopsXmlRpcFault(106, 'Found 0 Entries'));
    •

  •                 } else {
    •

  •                     $arr = new XoopsXmlRpcArray();
    •

  •                     foreach ($ret as $topic_id => $topic_vars) {
    •

  •                         $struct = new XoopsXmlRpcStruct();
    •

  •                         $struct->add('categoryId', new XoopsXmlRpcString($topic_id));
    •

  •                         $struct->add('categoryName', new XoopsXmlRpcString($topic_vars['title']));
    •

  •                         $struct->add('categoryPid', new XoopsXmlRpcString($topic_vars['pid']));
    •

  •                         $arr->add($struct);
    •

  •                         unset($struct);
    •

  •                     }
    •

  •                     $this->response->add($arr);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:51 +0200 by phpDocumentor 1.4.0a2


File Source for xoopsblock.php

Source for file xoopsblock.php

Documentation is available at xoopsblock.php

  • <?php
    •

  • // $Id: xoopsblock.php 922 2007-08-04 07:06:50Z phppp $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  •
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     exit();
    •

  • }
    •

  • require_once XOOPS_ROOT_PATH."/kernel/object.php";
    •

  •
    •

  • class XoopsBlock extends XoopsObject
    •

  • {
    •

  •     var $db;
    •

  •
    •

  •     function XoopsBlock($id = null)
    •

  •     {
    •

  •         $this->db =& Database::getInstance();
    •

  •         $this->initVar('bid', XOBJ_DTYPE_INT, null, false);
    •

  •         $this->initVar('mid', XOBJ_DTYPE_INT, 0, false);
    •

  •         $this->initVar('func_num', XOBJ_DTYPE_INT, 0, false);
    •

  •         $this->initVar('options', XOBJ_DTYPE_TXTBOX, null, false, 255);
    •

  •         $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 150);
    •

  •         //$this->initVar('position', XOBJ_DTYPE_INT, 0, false);
    •

  •         $this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false, 150);
    •

  •         $this->initVar('content', XOBJ_DTYPE_TXTAREA, null, false);
    •

  •         $this->initVar('side', XOBJ_DTYPE_INT, 0, false);
    •

  •         $this->initVar('weight', XOBJ_DTYPE_INT, 0, false);
    •

  •         $this->initVar('visible', XOBJ_DTYPE_INT, 0, false);
    •

  •         $this->initVar('block_type', XOBJ_DTYPE_OTHER, null, false);
    •

  •         $this->initVar('c_type', XOBJ_DTYPE_OTHER, null, false);
    •

  •         $this->initVar('isactive', XOBJ_DTYPE_INT, null, false);
    •

  •
    •

  •         $this->initVar('dirname', XOBJ_DTYPE_TXTBOX, null, false, 50);
    •

  •         $this->initVar('func_file', XOBJ_DTYPE_TXTBOX, null, false, 50);
    •

  •         $this->initVar('show_func', XOBJ_DTYPE_TXTBOX, null, false, 50);
    •

  •         $this->initVar('edit_func', XOBJ_DTYPE_TXTBOX, null, false, 50);
    •

  •
    •

  •         $this->initVar('template', XOBJ_DTYPE_OTHER, null, false);
    •

  •         $this->initVar('bcachetime', XOBJ_DTYPE_INT, 0, false);
    •

  •         $this->initVar('last_modified', XOBJ_DTYPE_INT, 0, false);
    •

  •
    •

  •         if ( !empty($id) ) {
    •

  •             if ( is_array($id) ) {
    •

  •                 $this->assignVars($id);
    •

  •             } else {
    •

  •                 $this->load(intval($id));
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function load($id)
    •

  •     {
    •

  •         $sql = 'SELECT * FROM '.$this->db->prefix('newblocks').' WHERE bid = '.$id;
    •

  •         $arr = $this->db->fetchArray($this->db->query($sql));
    •

  •         $this->assignVars($arr);
    •

  •     }
    •

  •
    •

  •     function store()
    •

  •     {
    •

  •         if ( !$this->cleanVars() ) {
    •

  •             return false;
    •

  •         }
    •

  •         foreach ( $this->cleanVars as $k=>$v ) {
    •

  •             ${$k} = $v;
    •

  •         }
    •

  •         if ( empty($bid) ) {
    •

  •             $bid = $this->db->genId($this->db->prefix("newblocks")."_bid_seq");
    •

  •             $sql = sprintf("INSERT INTO %s (bid, mid, func_num, options, name, title, content, side, weight, visible, block_type, c_type, isactive, dirname, func_file, show_func, edit_func, template, bcachetime, last_modified) VALUES (%u, %u, %u, %s, %s, %s, %s, %u, %u, %u, %s, %s, %u, %s, %s, %s, %s, %s, %u, %u)", $this->db->prefix('newblocks'), $bid, $mid, $func_num, $this->db->quoteString($options), $this->db->quoteString($name), $this->db->quoteString($title), $this->db->quoteString($content), $side, $weight, $visible, $this->db->quoteString($block_type), $this->db->quoteString($c_type), 1, $this->db->quoteString($dirname), $this->db->quoteString($func_file), $this->db->quoteString($show_func), $this->db->quoteString($edit_func), $this->db->quoteString($template), $bcachetime, time());
    •

  •         } else {
    •

  •             $sql = "UPDATE ".$this->db->prefix("newblocks")." SET options=".$this->db->quoteString($options);
    •

  •             // a custom block needs its own name
    •

  •             if ( $block_type == "C" ) {
    •

  •                 $sql .= ", name=".$this->db->quoteString($name);
    •

  •             }
    •

  •             $sql .= ", isactive=".$isactive.", title=".$this->db->quoteString($title).", content=".$this->db->quoteString($content).", side=".$side.", weight=".$weight.", visible=".$visible.", c_type=".$this->db->quoteString($c_type).", template=".$this->db->quoteString($template).", bcachetime=".$bcachetime.", last_modified=".time()." WHERE bid=".$bid;
    •

  •         }
    •

  •         if ( !$this->db->query($sql) ) {
    •

  •             $this->setErrors("Could not save block data into database");
    •

  •             return false;
    •

  •         }
    •

  •         if ( empty($bid) ) {
    •

  •             $bid = $this->db->getInsertId();
    •

  •         }
    •

  •         return $bid;
    •

  •     }
    •

  •
    •

  •     function delete()
    •

  •     {
    •

  •         $sql = sprintf("DELETE FROM %s WHERE bid = %u", $this->db->prefix('newblocks'), $this->getVar('bid'));
    •

  •         if ( !$this->db->query($sql) ) {
    •

  •             return false;
    •

  •         }
    •

  •         $sql = sprintf("DELETE FROM %s WHERE gperm_name = 'block_read' AND gperm_itemid = %u AND gperm_modid = 1", $this->db->prefix('group_permission'), $this->getVar('bid'));
    •

  •         $this->db->query($sql);
    •

  •         $sql = sprintf("DELETE FROM %s WHERE block_id = %u", $this->db->prefix('block_module_link'), $this->getVar('bid'));
    •

  •         $this->db->query($sql);
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * do stripslashes/htmlspecialchars according to the needed output
    •

  •     *
    •

  •     * @param $format      output use: S for Show and E for Edit
    •

  •     * @param $c_type    type of block content
    •

  •     * @returns string
    •

  •     */
    •

  •     function getContent($format = 'S', $c_type = 'T')
    •

  •     {
    •

  •         switch ( $format ) {
    •

  •         case 'S':
    •

  •             // check the type of content
    •

  •             // H : custom HTML block
    •

  •             // P : custom PHP block
    •

  •             // S : use text sanitizater (smilies enabled)
    •

  •             // T : use text sanitizater (smilies disabled)
    •

  •             if ( $c_type == 'H' ) {
    •

  •                 return str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'N'));
    •

  •             } elseif ( $c_type == 'P' ) {
    •

  •                 ob_start();
    •

  •                 echo eval($this->getVar('content', 'N'));
    •

  •                     $content = ob_get_contents();
    •

  •                     ob_end_clean();
    •

  •                 return str_replace('{X_SITEURL}', XOOPS_URL.'/', $content);
    •

  •             } elseif ( $c_type == 'S' ) {
    •

  •                 $myts =& MyTextSanitizer::getInstance();
    •

  •                 $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'N'));
    •

  •                 return $myts->displayTarea($content, 1, 1);
    •

  •             } else {
    •

  •                 $myts =& MyTextSanitizer::getInstance();
    •

  •                 $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'N'));
    •

  •                 return $myts->displayTarea($content, 1, 0);
    •

  •             }
    •

  •             break;
    •

  •         case 'E':
    •

  •             return $this->getVar('content', 'E');
    •

  •             break;
    •

  •         default:
    •

  •             return $this->getVar('content', 'N');
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function buildBlock()
    •

  •     {
    •

  •         global $xoopsConfig, $xoopsOption;
    •

  •         $block = array();
    •

  •         // M for module block, S for system block C for Custom
    •

  •         if ( $this->getVar("block_type") != "C" ) {
    •

  •             // get block display function
    •

  •             $show_func = $this->getVar('show_func');
    •

  •             if ( !$show_func ) {
    •

  •                 return false;
    •

  •             }
    •

  •             // must get lang files b4 execution of the function
    •

  •             if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/blocks/".$this->getVar('func_file')) ) {
    •

  •                 if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/".$xoopsConfig['language']."/blocks.php") ) {
    •

  •                     include_once XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/".$xoopsConfig['language']."/blocks.php";
    •

  •                 } elseif ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/english/blocks.php") ) {
    •

  •                     include_once XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/english/blocks.php";
    •

  •                 }
    •

  •                 include_once XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/blocks/".$this->getVar('func_file');
    •

  •                 $options = explode("|", $this->getVar("options"));
    •

  •                 if ( function_exists($show_func) ) {
    •

  •                     // execute the function
    •

  •                     $block = $show_func($options);
    •

  •                     if ( !$block ) {
    •

  •                         return false;
    •

  •                     }
    •

  •                 } else {
    •

  •                     return false;
    •

  •                 }
    •

  •             } else {
    •

  •                 return false;
    •

  •             }
    •

  •         } else {
    •

  •             // it is a custom block, so just return the contents
    •

  •             $block['content'] = $this->getContent("S",$this->getVar("c_type"));
    •

  •             if (empty($block['content'])) {
    •

  •                 return false;
    •

  •             }
    •

  •         }
    •

  •         return $block;
    •

  •     }
    •

  •
    •

  •     /*
    •

  •     * Aligns the content of a block
    •

  •     * If position is 0, content in DB is positioned
    •

  •     * before the original content
    •

  •     * If position is 1, content in DB is positioned
    •

  •     * after the original content
    •

  •     */
    •

  •     function buildContent($position,$content="",$contentdb="")
    •

  •     {
    •

  •         if ( $position == 0 ) {
    •

  •             $ret = $contentdb.$content;
    •

  •         } elseif ( $position == 1 ) {
    •

  •             $ret = $content.$contentdb;
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function buildTitle($originaltitle, $newtitle="")
    •

  •     {
    •

  •         if ($newtitle != "") {
    •

  •             $ret = $newtitle;
    •

  •         } else {
    •

  •             $ret = $originaltitle;
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function isCustom()
    •

  •     {
    •

  •         if ( $this->getVar("block_type") == "C" ) {
    •

  •             return true;
    •

  •         }
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * gets html form for editting block options
    •

  •     *
    •

  •     */
    •

  •     function getOptions()
    •

  •     {
    •

  •         global $xoopsConfig;
    •

  •         if ( $this->getVar("block_type") != "C" ) {
    •

  •             $edit_func = $this->getVar('edit_func');
    •

  •             if ( !$edit_func ) {
    •

  •                 return false;
    •

  •             }
    •

  •             if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/blocks/".$this->getVar('func_file')) ) {
    •

  •                 if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/".$xoopsConfig['language']."/blocks.php") ) {
    •

  •                     include_once XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/".$xoopsConfig['language']."/blocks.php";
    •

  •                 } elseif ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/english/blocks.php") ) {
    •

  •                     include_once XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/english/blocks.php";
    •

  •                 }
    •

  •                 include_once XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file');
    •

  •                 $options = explode("|", $this->getVar("options"));
    •

  •                 $edit_form = $edit_func($options);
    •

  •                 if ( !$edit_form ) {
    •

  •                     return false;
    •

  •                 }
    •

  •                 return $edit_form;
    •

  •             } else {
    •

  •                 return false;
    •

  •             }
    •

  •         } else {
    •

  •             return false;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * get all the blocks that match the supplied parameters
    •

  •     * @param $side   0: sideblock - left
    •

  •     *         1: sideblock - right
    •

  •     *         2: sideblock - left and right
    •

  •     *         3: centerblock - left
    •

  •     *         4: centerblock - right
    •

  •     *         5: centerblock - center
    •

  •     *         6: centerblock - left, right, center
    •

  •     * @param $groupid   groupid (can be an array)
    •

  •     * @param $visible   0: not visible 1: visible
    •

  •     * @param $orderby   order of the blocks
    •

  •     * @returns array of block objects
    •

  •     */
    •

  •     function getAllBlocksByGroup($groupid, $asobject=true, $side=null, $visible=null, $orderby="b.weight,b.bid", $isactive=1)
    •

  •     {
    •

  •         $db =& Database::getInstance();
    •

  •         $ret = array();
    •

  •         if ( !$asobject ) {
    •

  •             $sql = "SELECT b.bid ";
    •

  •         } else {
    •

  •             $sql = "SELECT b.* ";
    •

  •         }
    •

  •         $sql .= "FROM ".$db->prefix("newblocks")." b LEFT JOIN ".$db->prefix("group_permission")." l ON l.gperm_itemid=b.bid WHERE gperm_name = 'block_read' AND gperm_modid = 1";
    •

  •         if ( is_array($groupid) ) {
    •

  •             $sql .= " AND (l.gperm_groupid=".$groupid[0]."";
    •

  •             $size = count($groupid);
    •

  •             if ( $size  > 1 ) {
    •

  •                 for ( $i = 1; $i < $size; $i++ ) {
    •

  •                     $sql .= " OR l.gperm_groupid=".$groupid[$i]."";
    •

  •                 }
    •

  •             }
    •

  •             $sql .= ")";
    •

  •         } else {
    •

  •             $sql .= " AND l.gperm_groupid=".$groupid."";
    •

  •         }
    •

  •         $sql .= " AND b.isactive=".$isactive;
    •

  •         if ( isset($side) ) {
    •

  •             // get both sides in sidebox? (some themes need this)
    •

  •             if ( $side == XOOPS_SIDEBLOCK_BOTH ) {
    •

  •                 $side = "(b.side=0 OR b.side=1)";
    •

  •             } elseif ( $side == XOOPS_CENTERBLOCK_ALL ) {
    •

  •                 $side = "(b.side=3 OR b.side=4 OR b.side=5 OR b.side=7 OR b.side=8 OR b.side=9 )";
    •

  •             } else {
    •

  •                 $side = "b.side=".$side;
    •

  •             }
    •

  •             $sql .= " AND ".$side;
    •

  •         }
    •

  •         if ( isset($visible) ) {
    •

  •             $sql .= " AND b.visible=$visible";
    •

  •         }
    •

  •         $sql .= " ORDER BY $orderby";
    •

  •         $result = $db->query($sql);
    •

  •         $added = array();
    •

  •         while ( $myrow = $db->fetchArray($result) ) {
    •

  •             if ( !in_array($myrow['bid'], $added) ) {
    •

  •                 if (!$asobject) {
    •

  •                     $ret[] = $myrow['bid'];
    •

  •                 } else {
    •

  •                     $ret[] = new XoopsBlock($myrow);
    •

  •                 }
    •

  •                 array_push($added, $myrow['bid']);
    •

  •             }
    •

  •         }
    •

  •         //echo $sql;
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function getAllBlocks($rettype="object", $side=null, $visible=null, $orderby="side,weight,bid", $isactive=1)
    •

  •     {
    •

  •         $db =& Database::getInstance();
    •

  •         $ret = array();
    •

  •         $where_query = " WHERE isactive=".$isactive;
    •

  •         if ( isset($side) ) {
    •

  •             // get both sides in sidebox? (some themes need this)
    •

  •             if ( $side == 2 ) {
    •

  •                 $side = "(side=0 OR side=1)";
    •

  •             } elseif ( $side == 6 ) {
    •

  •                 $side = "(side=3 OR side=4 OR side=5 OR side=7 OR side=8 OR side=9)";
    •

  •             } else {
    •

  •                 $side = "side=".$side;
    •

  •             }
    •

  •             $where_query .= " AND ".$side;
    •

  •         }
    •

  •         if ( isset($visible) ) {
    •

  •             $where_query .= " AND visible=$visible";
    •

  •         }
    •

  •         $where_query .= " ORDER BY $orderby";
    •

  •         switch ($rettype) {
    •

  •         case "object":
    •

  •             $sql = "SELECT * FROM ".$db->prefix("newblocks")."".$where_query;
    •

  •             $result = $db->query($sql);
    •

  •             while ( $myrow = $db->fetchArray($result) ) {
    •

  •                 $ret[] = new XoopsBlock($myrow);
    •

  •             }
    •

  •             break;
    •

  •         case "list":
    •

  •             $sql = "SELECT * FROM ".$db->prefix("newblocks")."".$where_query;
    •

  •             $result = $db->query($sql);
    •

  •             while ( $myrow = $db->fetchArray($result) ) {
    •

  •                 $block = new XoopsBlock($myrow);
    •

  •                 $name = ($block->getVar("block_type") != "C") ? $block->getVar("name") : $block->getVar("title");
    •

  •                 $ret[$block->getVar("bid")] = $name;
    •

  •             }
    •

  •             break;
    •

  •         case "id":
    •

  •             $sql = "SELECT bid FROM ".$db->prefix("newblocks")."".$where_query;
    •

  •             $result = $db->query($sql);
    •

  •             while ( $myrow = $db->fetchArray($result) ) {
    •

  •                 $ret[] = $myrow['bid'];
    •

  •             }
    •

  •             break;
    •

  •         }
    •

  •         //echo $sql;
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function getByModule($moduleid, $asobject=true)
    •

  •     {
    •

  •         $db =& Database::getInstance();
    •

  •         if ( $asobject == true ) {
    •

  •             $sql = $sql = "SELECT * FROM ".$db->prefix("newblocks")." WHERE mid=".$moduleid."";
    •

  •         } else {
    •

  •             $sql = "SELECT bid FROM ".$db->prefix("newblocks")." WHERE mid=".$moduleid."";
    •

  •         }
    •

  •         $result = $db->query($sql);
    •

  •         $ret = array();
    •

  •         while( $myrow = $db->fetchArray($result) ) {
    •

  •             if ( $asobject ) {
    •

  •                 $ret[] = new XoopsBlock($myrow);
    •

  •             } else {
    •

  •                 $ret[] = $myrow['bid'];
    •

  •             }
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function getAllByGroupModule($groupid, $module_id=0, $toponlyblock=false, $visible=null, $orderby='b.weight,b.bid', $isactive=1)
    •

  •     {
    •

  •         $db =& Database::getInstance();
    •

  •         $ret = array();
    •

  •         $sql = "SELECT DISTINCT gperm_itemid FROM ".$db->prefix('group_permission')." WHERE gperm_name = 'block_read' AND gperm_modid = 1";
    •

  •         if ( is_array($groupid) ) {
    •

  •             $sql .= ' AND gperm_groupid IN ('.implode(',', $groupid).')';
    •

  •         } else {
    •

  •             if (intval($groupid) > 0) {
    •

  •                 $sql .= ' AND gperm_groupid='.$groupid;
    •

  •             }
    •

  •         }
    •

  •         $result = $db->query($sql);
    •

  •         $blockids = array();
    •

  •         while ( $myrow = $db->fetchArray($result) ) {
    •

  •             $blockids[] = $myrow['gperm_itemid'];
    •

  •         }
    •

  •         if (!empty($blockids)) {
    •

  •             $sql = 'SELECT b.* FROM '.$db->prefix('newblocks').' b, '.$db->prefix('block_module_link').' m WHERE m.block_id=b.bid';
    •

  •             $sql .= ' AND b.isactive='.$isactive;
    •

  •             if (isset($visible)) {
    •

  •                 $sql .= ' AND b.visible='.intval($visible);
    •

  •             }
    •

  •             $module_id = intval($module_id);
    •

  •             if (!empty($module_id)) {
    •

  •                 $sql .= ' AND m.module_id IN (0,'.$module_id;
    •

  •                 if ($toponlyblock) {
    •

  •                     $sql .= ',-1';
    •

  •                 }
    •

  •                 $sql .= ')';
    •

  •             } else {
    •

  •                 if ($toponlyblock) {
    •

  •                     $sql .= ' AND m.module_id IN (0,-1)';
    •

  •                 } else {
    •

  •                     $sql .= ' AND m.module_id=0';
    •

  •                 }
    •

  •             }
    •

  •             $sql .= ' AND b.bid IN ('.implode(',', $blockids).')';
    •

  •             $sql .= ' ORDER BY '.$orderby;
    •

  •             $result = $db->query($sql);
    •

  •             while ( $myrow = $db->fetchArray($result) ) {
    •

  •                 $block =& new XoopsBlock($myrow);
    •

  •                 $ret[$myrow['bid']] =& $block;
    •

  •                 unset($block);
    •

  •             }
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function getNonGroupedBlocks($module_id=0, $toponlyblock=false, $visible=null, $orderby='b.weight,b.bid', $isactive=1)
    •

  •     {
    •

  •         $db =& Database::getInstance();
    •

  •         $ret = array();
    •

  •         $bids = array();
    •

  •         $sql = "SELECT DISTINCT(bid) from ".$db->prefix('newblocks');
    •

  •         if ($result = $db->query($sql)) {
    •

  •             while ( $myrow = $db->fetchArray($result) ) {
    •

  •                 $bids[] = $myrow['bid'];
    •

  •             }
    •

  •         }
    •

  •         $sql = "SELECT DISTINCT(p.gperm_itemid) from ".$db->prefix('group_permission')." p, ".$db->prefix('groups')." g WHERE g.groupid=p.gperm_groupid AND p.gperm_name='block_read'";
    •

  •         $grouped = array();
    •

  •         if ($result = $db->query($sql)) {
    •

  •             while ( $myrow = $db->fetchArray($result) ) {
    •

  •                 $grouped[] = $myrow['gperm_itemid'];
    •

  •             }
    •

  •         }
    •

  •         $non_grouped = array_diff($bids, $grouped);
    •

  •         if (!empty($non_grouped)) {
    •

  •             $sql = 'SELECT b.* FROM '.$db->prefix('newblocks').' b, '.$db->prefix('block_module_link').' m WHERE m.block_id=b.bid';
    •

  •             $sql .= ' AND b.isactive='.$isactive;
    •

  •             if (isset($visible)) {
    •

  •                 $sql .= ' AND b.visible='.intval($visible);
    •

  •             }
    •

  •             $module_id = intval($module_id);
    •

  •             if (!empty($module_id)) {
    •

  •                 $sql .= ' AND m.module_id IN (0,'.$module_id;
    •

  •                 if ($toponlyblock) {
    •

  •                     $sql .= ',-1';
    •

  •                 }
    •

  •                 $sql .= ')';
    •

  •             } else {
    •

  •                 if ($toponlyblock) {
    •

  •                     $sql .= ' AND m.module_id IN (0,-1)';
    •

  •                 } else {
    •

  •                     $sql .= ' AND m.module_id=0';
    •

  •                 }
    •

  •             }
    •

  •             $sql .= ' AND b.bid IN ('.implode(',', $non_grouped).')';
    •

  •             $sql .= ' ORDER BY '.$orderby;
    •

  •             $result = $db->query($sql);
    •

  •             while ( $myrow = $db->fetchArray($result) ) {
    •

  •                 $block =& new XoopsBlock($myrow);
    •

  •                 $ret[$myrow['bid']] =& $block;
    •

  •                 unset($block);
    •

  •             }
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function countSimilarBlocks($moduleId, $funcNum, $showFunc = null)
    •

  •     {
    •

  •         $funcNum = intval($funcNum);
    •

  •         $moduleId = intval($moduleId);
    •

  •         if ($funcNum < 1 || $moduleId < 1) {
    •

  •             // invalid query
    •

  •             return 0;
    •

  •         }
    •

  •         $db =& Database::getInstance();
    •

  •         if (isset($showFunc)) {
    •

  •             // showFunc is set for more strict comparison
    •

  •             $sql = sprintf("SELECT COUNT(*) FROM %s WHERE mid = %d AND func_num = %d AND show_func = %s", $db->prefix('newblocks'), $moduleId, $funcNum, $db->quoteString(trim($showFunc)));
    •

  •         } else {
    •

  •             $sql = sprintf("SELECT COUNT(*) FROM %s WHERE mid = %d AND func_num = %d", $db->prefix('newblocks'), $moduleId, $funcNum);
    •

  •         }
    •

  •         if (!$result = $db->query($sql)) {
    •

  •             return 0;
    •

  •         }
    •

  •         list($count) = $db->fetchRow($result);
    •

  •         return $count;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:57 +0200 by phpDocumentor 1.4.0a2


File Source for xoopscomments.php

Source for file xoopscomments.php

Documentation is available at xoopscomments.php

  • <?php
    •

  • // $Id: xoopscomments.php 506 2006-05-26 23:10:37Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     exit();
    •

  • }
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopstree.php";
    •

  • require_once XOOPS_ROOT_PATH.'/class/xoopsobject.php';
    •

  • include_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/comment.php';
    •

  •
    •

  • class XoopsComments extends XoopsObject
    •

  • {
    •

  •     var $ctable;
    •

  •     var $db;
    •

  •
    •

  •     function XoopsComments($ctable, $id=null)
    •

  •     {
    •

  •         $this->ctable = $ctable;
    •

  •         $this->db =& Database::getInstance();
    •

  •         $this->XoopsObject();
    •

  •         $this->initVar('comment_id', XOBJ_DTYPE_INT, null, false);
    •

  •         $this->initVar('item_id', XOBJ_DTYPE_INT, null, false);
    •

  •         $this->initVar('order', XOBJ_DTYPE_INT, null, false);
    •

  •         $this->initVar('mode', XOBJ_DTYPE_OTHER, null, false);
    •

  •         $this->initVar('subject', XOBJ_DTYPE_TXTBOX, null, false, 255);
    •

  •         $this->initVar('comment', XOBJ_DTYPE_TXTAREA, null, false, null);
    •

  •         $this->initVar('ip', XOBJ_DTYPE_OTHER, null, false);
    •

  •         $this->initVar('pid', XOBJ_DTYPE_INT, 0, false);
    •

  •         $this->initVar('date', XOBJ_DTYPE_INT, null, false);
    •

  •         $this->initVar('nohtml', XOBJ_DTYPE_INT, 1, false);
    •

  •         $this->initVar('nosmiley', XOBJ_DTYPE_INT, 0, false);
    •

  •         $this->initVar('noxcode', XOBJ_DTYPE_INT, 0, false);
    •

  •         $this->initVar('user_id', XOBJ_DTYPE_INT, null, false);
    •

  •         $this->initVar('icon', XOBJ_DTYPE_OTHER, null, false);
    •

  •         $this->initVar('prefix', XOBJ_DTYPE_OTHER, null, false);
    •

  •         if ( !empty($id) ) {
    •

  •             if ( is_array($id) ) {
    •

  •                 $this->assignVars($id);
    •

  •             } else {
    •

  •                 $this->load(intval($id));
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function load($id)
    •

  •     {
    •

  •         $sql = "SELECT * FROM ".$this->ctable." WHERE comment_id=".$id."";
    •

  •         $arr = $this->db->fetchArray($this->db->query($sql));
    •

  •         $this->assignVars($arr);
    •

  •     }
    •

  •
    •

  •     function store()
    •

  •     {
    •

  •         if ( !$this->cleanVars() ) {
    •

  •             return false;
    •

  •         }
    •

  •         foreach ( $this->cleanVars as $k=>$v ) {
    •

  •             $$k = $v;
    •

  •         }
    •

  •         $isnew = false;
    •

  •         if ( empty($comment_id ) ) {
    •

  •             $isnew = true;
    •

  •             $comment_id = $this->db->genId($this->ctable."_comment_id_seq");
    •

  •             $sql = sprintf("INSERT INTO %s (comment_id, pid, item_id, date, user_id, ip, subject, comment, nohtml, nosmiley, noxcode, icon) VALUES (%u, %u, %u, %u, %u, '%s', '%s', '%s', %u, %u, %u, '%s')", $this->ctable, $comment_id, $pid, $item_id, time(), $user_id, $ip, $subject, $comment, $nohtml, $nosmiley, $noxcode, $icon);
    •

  •         } else {
    •

  •             $sql = sprintf("UPDATE %s SET subject = '%s', comment = '%s', nohtml = %u, nosmiley = %u, noxcode = %u, icon = '%s'  WHERE comment_id = %u", $this->ctable, $subject, $comment, $nohtml, $nosmiley, $noxcode, $icon, $comment_id);
    •

  •         }
    •

  •         if ( !$result = $this->db->query($sql) ) {
    •

  •             //echo $sql;
    •

  •             return false;
    •

  •         }
    •

  •         if ( empty($comment_id) ) {
    •

  •             $comment_id = $this->db->getInsertId();
    •

  •         }
    •

  •         if ( $isnew != false ) {
    •

  •             $sql = sprintf("UPDATE %s SET posts = posts+1 WHERE uid = %u", $this->db->prefix("users"), $user_id);
    •

  •             if (!$result = $this->db->query($sql)) {
    •

  •                 echo "Could not update user posts.";
    •

  •             }
    •

  •         }
    •

  •         return $comment_id;
    •

  •     }
    •

  •
    •

  •     function delete()
    •

  •     {
    •

  •         $sql = sprintf("DELETE FROM %s WHERE comment_id = %u", $this->ctable, $this->getVar('comment_id'));
    •

  •         if ( !$result = $this->db->query($sql) ) {
    •

  •             return false;
    •

  •         }
    •

  •         $sql = sprintf("UPDATE %s SET posts = posts-1 WHERE uid = %u", $this->db->prefix("users"), $this->getVar("user_id"));
    •

  •         if ( !$result = $this->db->query($sql) ) {
    •

  •             echo "Could not update user posts.";
    •

  •         }
    •

  •         $mytree = new XoopsTree($this->ctable, "comment_id", "pid");
    •

  •         $arr = $mytree->getAllChild($this->getVar("comment_id"), "comment_id");
    •

  •         $size = count($arr);
    •

  •         if ( $size > 0 ) {
    •

  •             for ( $i = 0; $i < $size; $i++ ) {
    •

  •                 $sql = sprintf("DELETE FROM %s WHERE comment_bid = %u", $this->ctable, $arr[$i]['comment_id']);
    •

  •                 if ( !$result = $this->db->query($sql) ) {
    •

  •                     echo "Could not delete comment.";
    •

  •                 }
    •

  •                 $sql = sprintf("UPDATE %s SET posts = posts-1 WHERE uid = %u", $this->db->prefix("users"), $arr[$i]['user_id']);
    •

  •                 if ( !$result = $this->db->query($sql) ) {
    •

  •                     echo "Could not update user posts.";
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         return ($size + 1);
    •

  •     }
    •

  •
    •

  •     function getCommentTree()
    •

  •     {
    •

  •         $mytree = new XoopsTree($this->ctable, "comment_id", "pid");
    •

  •         $ret = array();
    •

  •         $tarray = $mytree->getChildTreeArray($this->getVar("comment_id"), "comment_id");
    •

  •         foreach ( $tarray as $ele ) {
    •

  •             $ret[] = new XoopsComments($this->ctable,$ele);
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function getAllComments($criteria=array(), $asobject=true, $orderby="comment_id ASC", $limit=0, $start=0)
    •

  •     {
    •

  •         $ret = array();
    •

  •         $where_query = "";
    •

  •         if ( is_array($criteria) && count($criteria) > 0 ) {
    •

  •             $where_query = " WHERE";
    •

  •             foreach ( $criteria as $c ) {
    •

  •                 $where_query .= " $c AND";
    •

  •             }
    •

  •             $where_query = substr($where_query, 0, -4);
    •

  •         }
    •

  •         if ( !$asobject ) {
    •

  •             $sql = "SELECT comment_id FROM ".$this->ctable."$where_query ORDER BY $orderby";
    •

  •             $result = $this->db->query($sql,$limit,$start);
    •

  •             while ( $myrow = $this->db->fetchArray($result) ) {
    •

  •                 $ret[] = $myrow['comment_id'];
    •

  •             }
    •

  •         } else {
    •

  •             $sql = "SELECT * FROM ".$this->ctable."".$where_query." ORDER BY $orderby";
    •

  •             $result = $this->db->query($sql,$limit,$start);
    •

  •             while ( $myrow = $this->db->fetchArray($result) ) {
    •

  •                 $ret[] = new XoopsComments($this->ctable,$myrow);
    •

  •             }
    •

  •         }
    •

  •         //echo $sql;
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     /* Methods below will be moved to maybe another class? */
    •

  •     function printNavBar($item_id, $mode="flat", $order=1)
    •

  •     {
    •

  •         global $xoopsConfig, $xoopsUser;
    •

  •         echo "<form method='get' action='".$_SERVER['PHP_SELF']."'><table width='100%' border='0' cellspacing='1' cellpadding='2'><tr><td class='bg1' align='center'><select name='mode'><option value='nocomments'";
    •

  •         if ( $mode == "nocomments" ) {
    •

  •             echo " selected='selected'";
    •

  •         }
    •

  •         echo ">". _NOCOMMENTS ."</option><option value='flat'";
    •

  •         if ($mode == 'flat') {
    •

  •             echo " selected='selected'";
    •

  •         }
    •

  •         echo ">". _FLAT ."</option><option value='thread'";
    •

  •         if ( $mode == "thread" || $mode == "" ) {
    •

  •             echo " selected='selected'";
    •

  •         }
    •

  •         echo ">". _THREADED ."</option></select><select name='order'><option value='0'";
    •

  •         if ( $order != 1 ) {
    •

  •             echo " selected='selected'";
    •

  •         }
    •

  •         echo ">". _OLDESTFIRST ."</option><option value='1'";
    •

  •         if ( $order == 1 ) {
    •

  •             echo " selected='selected'";
    •

  •         }
    •

  •         echo ">". _NEWESTFIRST ."</option></select><input type='hidden' name='item_id' value='".intval($item_id)."' /><input type='submit' value='". _CM_REFRESH ."' />";
    •

  •         if ( $xoopsConfig['anonpost'] == 1 || $xoopsUser ) {
    •

  •             if ($mode != "flat" || $mode != "nocomments" || $mode != "thread" ) {
    •

  •                 $mode = "flat";
    •

  •             }
    •

  •             echo "&nbsp;<input type='button' onclick='location=\"newcomment.php?item_id=".intval($item_id)."&amp;order=".intval($order)."&amp;mode=".$mode."\"' value='"._CM_POSTCOMMENT."' />";
    •

  •         }
    •

  •         echo "</td></tr></table></form>";
    •

  •     }
    •

  •
    •

  •     function showThreadHead()
    •

  •     {
    •

  •         openThread();
    •

  •     }
    •

  •
    •

  •     function showThreadPost($order, $mode, $adminview=0, $color_num=1)
    •

  •     {
    •

  •         global $xoopsConfig, $xoopsUser;
    •

  •         $edit_image = "";
    •

  •         $reply_image = "";
    •

  •         $delete_image = "";
    •

  •         $post_date = formatTimestamp($this->getVar("date"),"m");
    •

  •         if ( $this->getVar("user_id") != 0 ) {
    •

  •             $poster = new XoopsUser($this->getVar("user_id"));
    •

  •             if ( !$poster->isActive() ) {
    •

  •                 $poster = 0;
    •

  •             }
    •

  •         } else {
    •

  •             $poster = 0;
    •

  •         }
    •

  •         if ( $this->getVar("icon") != null && $this->getVar("icon") != "" ) {
    •

  •             $subject_image = "<a name='".$this->getVar("comment_id")."' id='".$this->getVar("comment_id")."'></a><img src='".XOOPS_URL."/images/subject/".$this->getVar("icon")."' alt='' />";
    •

  •         } else {
    •

  •             $subject_image =  "<a name='".$this->getVar("comment_id")."' id='".$this->getVar("comment_id")."'></a><img src='".XOOPS_URL."/images/icons/no_posticon.gif' alt='' />";
    •

  •         }
    •

  •         if ( $adminview ) {
    •

  •             $ip_image = "<img src='".XOOPS_URL."/images/icons/ip.gif' alt='".$this->getVar("ip")."' />";
    •

  •         } else {
    •

  •             $ip_image = "<img src='".XOOPS_URL."/images/icons/ip.gif' alt='' />";
    •

  •         }
    •

  •         if ( $adminview || ($xoopsUser && $this->getVar("user_id") == $xoopsUser->getVar("uid")) ) {
    •

  •             $edit_image = "<a href='editcomment.php?comment_id=".$this->getVar("comment_id")."&amp;mode=".$mode."&amp;order=".intval($order)."'><img src='".XOOPS_URL."/images/icons/edit.gif' alt='"._EDIT."' /></a>";
    •

  •         }
    •

  •         if ( $xoopsConfig['anonpost'] || $xoopsUser ) {
    •

  •             $reply_image = "<a href='replycomment.php?comment_id=".$this->getVar("comment_id")."&amp;mode=".$mode."&amp;order=".intval($order)."'><img src='".XOOPS_URL."/images/icons/reply.gif' alt='"._REPLY."' /></a>";
    •

  •         }
    •

  •         if ( $adminview ) {
    •

  •             $delete_image = "<a href='deletecomment.php?comment_id=".$this->getVar("comment_id")."&amp;mode=".$mode."&amp;order=".intval($order)."'><img src='".XOOPS_URL."/images/icons/delete.gif' alt='"._DELETE."' /></a>";
    •

  •         }
    •

  •
    •

  •         if ( $poster ) {
    •

  •             $text = $this->getVar("comment");
    •

  •             if ( $poster->getVar("attachsig") ) {
    •

  •                 $text .= "<p><br />_________________<br />". $poster->user_sig()."</p>";
    •

  •             }
    •

  •             $reg_date = _CM_JOINED;
    •

  •             $reg_date .= formatTimestamp($poster->getVar("user_regdate"),"s");
    •

  •             $posts = _CM_POSTS;
    •

  •             $posts .= $poster->getVar("posts");
    •

  •             $user_from = _CM_FROM;
    •

  •             $user_from .= $poster->getVar("user_from");
    •

  •             $rank = $poster->rank();
    •

  •             if ( $rank['image'] != "" ) {
    •

  •                 $rank['image'] = "<img src='".XOOPS_UPLOAD_URL."/".$rank['image']."' alt='' />";
    •

  •             }
    •

  •             $avatar_image = "<img src='".XOOPS_UPLOAD_URL."/".$poster->getVar("user_avatar")."' alt='' />";
    •

  •             if ( $poster->isOnline() ) {
    •

  •                 $online_image = "<span style='color:#ee0000;font-weight:bold;'>"._ONLINE."</span>";
    •

  •             } else {
    •

  •                 $online_image = "";
    •

  •             }
    •

  •             $profile_image = "<a href='".XOOPS_URL."/userinfo.php?uid=".$poster->getVar("uid")."'><img src='".XOOPS_URL."/images/icons/profile.gif' alt='"._PROFILE."' /></a>";
    •

  •             if ( $xoopsUser ) {
    •

  •                 $pm_image =  "<a href='javascript:openWithSelfMain(\"".XOOPS_URL."/pmlite.php?send2=1&amp;to_userid=".$poster->getVar("uid")."\",\"pmlite\",450,370);'><img src='".XOOPS_URL."/images/icons/pm.gif' alt='".sprintf(_SENDPMTO,$poster->getVar("uname", "E"))."' /></a>";
    •

  •             } else {
    •

  •                 $pm_image = "";
    •

  •             }
    •

  •                if ( $poster->getVar("user_viewemail") ) {
    •

  •                 $email_image = "<a href='mailto:".$poster->getVar("email", "E")."'><img src='".XOOPS_URL."/images/icons/email.gif' alt='".sprintf(_SENDEMAILTO,$poster->getVar("uname", "E"))."' /></a>";
    •

  •             } else {
    •

  •                 $email_image = "";
    •

  •             }
    •

  •             $posterurl = $poster->getVar("url");
    •

  •                if ( $posterurl != "" ) {
    •

  •                 $www_image = "<a href='$posterurl' target='_blank'><img src='".XOOPS_URL."/images/icons/www.gif' alt='"._VISITWEBSITE."' /></a>";
    •

  •             } else {
    •

  •                 $www_image = "";
    •

  •             }
    •

  •                if ( $poster->getVar("user_icq") != "" ) {
    •

  •                 $icq_image = "<a href='http://wwp.icq.com/scripts/search.dll?to=".$poster->getVar("user_icq", "E")."'><img src='".XOOPS_URL."/images/icons/icq_add.gif' alt='"._ADD."' /></a>";
    •

  •             } else {
    •

  •                 $icq_image = "";
    •

  •             }
    •

  •             if ( $poster->getVar("user_aim") != "" ) {
    •

  •                 $aim_image = "<a href='aim:goim?screenname=".$poster->getVar("user_aim", "E")."&message=Hi+".$poster->getVar("user_aim")."+Are+you+there?'><img src='".XOOPS_URL."/images/icons/aim.gif' alt='aim' /></a>";
    •

  •             } else {
    •

  •                 $aim_image = "";
    •

  •             }
    •

  •                if ( $poster->getVar("user_yim") != "" ) {
    •

  •                 $yim_image = "<a href='http://edit.yahoo.com/config/send_webmesg?.target=".$poster->getVar("user_yim", "E")."&.src=pg'><img src='".XOOPS_URL."/images/icons/yim.gif' alt='yim' /></a>";
    •

  •             } else {
    •

  •                 $yim_image = "";
    •

  •             }
    •

  •             if ( $poster->getVar("user_msnm") != "" ) {
    •

  •                 $msnm_image = "<a href='".XOOPS_URL."/userinfo.php?uid=".$poster->getVar("uid")."'><img src='".XOOPS_URL."/images/icons/msnm.gif' alt='msnm' /></a>";
    •

  •             } else {
    •

  •                 $msnm_image = "";
    •

  •             }
    •

  •             showThread($color_num, $subject_image, $this->getVar("subject"), $text, $post_date, $ip_image, $reply_image, $edit_image, $delete_image, $poster->getVar("uname"), $rank['title'], $rank['image'], $avatar_image, $reg_date, $posts, $user_from, $online_image, $profile_image, $pm_image, $email_image, $www_image, $icq_image, $aim_image, $yim_image, $msnm_image);
    •

  •         } else {
    •

  •             showThread($color_num, $subject_image, $this->getVar("subject"), $this->getVar("comment"), $post_date, $ip_image, $reply_image, $edit_image, $delete_image, $xoopsConfig['anonymous']);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function showThreadFoot()
    •

  •     {
    •

  •         closeThread();
    •

  •     }
    •

  •
    •

  •     function showTreeHead($width="100%")
    •

  •     {
    •

  •         echo "<table border='0' class='outer' cellpadding='0' cellspacing='0' align='center' width='$width'><tr class='bg3' align='center'><td colspan='3'>". _CM_REPLIES ."</td></tr><tr class='bg3' align='left'><td width='60%' class='fg2'>". _CM_TITLE ."</td><td width='20%' class='fg2'>". _CM_POSTER ."</td><td class='fg2'>". _CM_POSTED ."</td></tr>";
    •

  •     }
    •

  •
    •

  •     function showTreeItem($order, $mode, $color_num)
    •

  •     {
    •

  •         if ( $color_num == 1 ) {
    •

  •             $bg = 'even';
    •

  •         } else {
    •

  •             $bg = 'odd';
    •

  •         }
    •

  •         $prefix = str_replace(".", "&nbsp;&nbsp;&nbsp;&nbsp;", $this->getVar("prefix"));
    •

  •         $date = formatTimestamp($this->getVar("date"),"m");
    •

  •         if ( $this->getVar("icon") != "" ) {
    •

  •             $icon = "subject/".$this->getVar("icon", "E");
    •

  •         } else {
    •

  •             $icon = "icons/no_posticon.gif";
    •

  •         }
    •

  •         echo "<tr class='$bg' align='left'><td>".$prefix."<img src='".XOOPS_URL."/images/".$icon."'>&nbsp;<a href='".$_SERVER['PHP_SELF']."?item_id=".$this->getVar("item_id")."&amp;comment_id=".$this->getVar("comment_id")."&amp;mode=".$mode."&amp;order=".$order."#".$this->getVar("comment_id")."'>".$this->getVar("subject")."</a></td><td><a href='".XOOPS_URL."/userinfo.php?uid=".$this->getVar("user_id")."'>".XoopsUser::getUnameFromId($this->getVar("user_id"))."</a></td><td>".$date."</td></tr>";
    •

  •     }
    •

  •
    •

  •     function showTreeFoot()
    •

  •     {
    •

  •         echo "</table><br />";
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:04 +0200 by phpDocumentor 1.4.0a2


File Source for xoopsformloader.php

Source for file xoopsformloader.php

Documentation is available at xoopsformloader.php

  • <?php
    •

  • // $Id: xoopsformloader.php 669 2006-08-25 22:14:09Z skalpa $
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     exit();
    •

  • }
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formelement.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/form.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formlabel.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formpassword.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formbutton.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formcheckbox.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formhidden.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formfile.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formradio.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formradioyn.php";
    •

  • //include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectavatar.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectcountry.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselecttimezone.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectlang.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectgroup.php";
    •

  • // RMV-NOTIFY
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectuser.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselecttheme.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectmatchoption.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formtext.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formtextarea.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formdhtmltextarea.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formelementtray.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/themeform.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/simpleform.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formtextdateselect.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formdatetime.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formhiddentoken.php";
    •

  • //include_once XOOPS_ROOT_PATH."/class/xoopsform/grouppermform.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formcolorpicker.php";
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:05 +0200 by phpDocumentor 1.4.0a2


File Source for xoopslists.php

Source for file xoopslists.php

Documentation is available at xoopslists.php

  • <?php
    •

  • // $Id: xoopslists.php 987 2007-08-13 07:34:08Z phppp $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: The XOOPS Project                                                 //
    •

  • // URL: http://www.xoops.org/                                                //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  •
    •

  •
    •

  • if ( !defined("XOOPS_LISTS_INCLUDED") ) {
    •

  •     define("XOOPS_LISTS_INCLUDED",1);
    •

  •     class XoopsLists
    •

  •     {
    •

  •         function getTimeZoneList()
    •

  •         {
    •

  •             include_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/timezone.php';
    •

  •             $time_zone_list = array ("-12" => _TZ_GMTM12, "-11" => _TZ_GMTM11, "-10" => _TZ_GMTM10, "-9" => _TZ_GMTM9, "-8" => _TZ_GMTM8, "-7" => _TZ_GMTM7, "-6" => _TZ_GMTM6, "-5" => _TZ_GMTM5, "-4" => _TZ_GMTM4, "-3.5" => _TZ_GMTM35, "-3" => _TZ_GMTM3, "-2" => _TZ_GMTM2, "-1" => _TZ_GMTM1, "0" => _TZ_GMT0, "1" => _TZ_GMTP1, "2" => _TZ_GMTP2, "3" => _TZ_GMTP3, "3.5" => _TZ_GMTP35, "4" => _TZ_GMTP4, "4.5" => _TZ_GMTP45, "5" => _TZ_GMTP5, "5.5" => _TZ_GMTP55, "6" => _TZ_GMTP6, "7" => _TZ_GMTP7, "8" => _TZ_GMTP8, "9" => _TZ_GMTP9, "9.5" => _TZ_GMTP95, "10" => _TZ_GMTP10, "11" => _TZ_GMTP11, "12" => _TZ_GMTP12);
    •

  •             return $time_zone_list;
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          * gets list of themes folder from themes directory
    •

  •          */
    •

  •         function getThemesList()
    •

  •         {
    •

  •             return XoopsLists::getDirListAsArray(XOOPS_THEME_PATH.'/');
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          * gets a list of module folders from the modules directory
    •

  •          */
    •

  •         function getModulesList()
    •

  •         {
    •

  •             return XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/modules/");
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          * gets list of name of directories inside a directory
    •

  •          */
    •

  •         function getDirListAsArray( $dirname ) {
    •

  •             $ignored = array( 'cvs', '_darcs' );
    •

  •             $list = array();
    •

  •             if ( substr( $dirname, -1 ) != '/' ) {
    •

  •                 $dirname .= '/';
    •

  •             }
    •

  •             if ( $handle = opendir( $dirname ) ) {
    •

  •                 while ( $file = readdir( $handle ) ) {
    •

  •                     if ( substr( $file, 0, 1 ) == '.' || in_array( strtolower( $file ), $ignored ) )    continue;
    •

  •                     if ( is_dir( $dirname . $file ) ) {
    •

  •                         $list[$file] = $file;
    •

  •                     }
    •

  •                 }
    •

  •                 closedir( $handle );
    •

  •                 asort( $list );
    •

  •                 reset( $list );
    •

  •             }
    •

  •             return $list;
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          *  gets list of all files in a directory
    •

  •          */
    •

  •         function getFileListAsArray($dirname, $prefix="")
    •

  •         {
    •

  •             $filelist = array();
    •

  •             if (substr($dirname, -1) == '/') {
    •

  •                 $dirname = substr($dirname, 0, -1);
    •

  •             }
    •

  •             if (is_dir($dirname) && $handle = opendir($dirname)) {
    •

  •                 while (false !== ($file = readdir($handle))) {
    •

  •                     if (!preg_match("/^[\.]{1,2}$/",$file) && is_file($dirname.'/'.$file)) {
    •

  •                         $file = $prefix.$file;
    •

  •                         $filelist[$file] = $file;
    •

  •                     }
    •

  •                 }
    •

  •                 closedir($handle);
    •

  •                 asort($filelist);
    •

  •                 reset($filelist);
    •

  •             }
    •

  •             return $filelist;
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          *  gets list of image file names in a directory
    •

  •          */
    •

  •         function getImgListAsArray($dirname, $prefix="")
    •

  •         {
    •

  •             $filelist = array();
    •

  •             if ($handle = opendir($dirname)) {
    •

  •                 while (false !== ($file = readdir($handle))) {
    •

  •                     if ( preg_match("/(\.gif|\.jpg|\.png)$/i", $file) ) {
    •

  •                         $file = $prefix.$file;
    •

  •                         $filelist[$file] = $file;
    •

  •                     }
    •

  •                 }
    •

  •                 closedir($handle);
    •

  •                 asort($filelist);
    •

  •                 reset($filelist);
    •

  •             }
    •

  •             return $filelist;
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          *  gets list of html file names in a certain directory
    •

  •         */
    •

  •         function getHtmlListAsArray($dirname, $prefix="")
    •

  •         {
    •

  •             $filelist = array();
    •

  •             if ($handle = opendir($dirname)) {
    •

  •                 while (false !== ($file = readdir($handle))) {
    •

  •                     if ( ( preg_match( "/(\.htm|\.html|\.xhtml)$/i", $file ) && !is_dir( $file ) ) ) {
    •

  •                         $file = $prefix.$file;
    •

  •                         $filelist[$file] = $prefix.$file;
    •

  •                     }
    •

  •                 }
    •

  •                 closedir($handle);
    •

  •                 asort($filelist);
    •

  •                 reset($filelist);
    •

  •             }
    •

  •             return $filelist;
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          *  gets list of avatar file names in a certain directory
    •

  •          *  if directory is not specified, default directory will be searched
    •

  •          */
    •

  •         function getAvatarsList($avatar_dir="")
    •

  •         {
    •

  •             $avatars = array();
    •

  •             if ( $avatar_dir != "" ) {
    •

  •                 $avatars = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/".$avatar_dir."/", $avatar_dir."/");
    •

  •             } else {
    •

  •                 $avatars = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/");
    •

  •             }
    •

  •             return $avatars;
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          *  gets list of all avatar image files inside default avatars directory
    •

  •          */
    •

  •         function getAllAvatarsList()
    •

  •         {
    •

  •             $avatars = array();
    •

  •             $dirlist = array();
    •

  •             $dirlist = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/images/avatar/");
    •

  •             if ( count($dirlist) > 0 ) {
    •

  •                 foreach ( $dirlist as $dir ) {
    •

  •                     $avatars[$dir] =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/".$dir."/", $dir."/");
    •

  •                 }
    •

  •             } else {
    •

  •                 return false;
    •

  •             }
    •

  •             return $avatars;
    •

  •         }
    •

  •
    •

  •         /*
    •

  •         *  gets list of subject icon image file names in a certain directory
    •

  •         *  if directory is not specified, default directory will be searched
    •

  •         */
    •

  •         function getSubjectsList($sub_dir="")
    •

  •         {
    •

  •             $subjects = array();
    •

  •             if($sub_dir != ""){
    •

  •                 $subjects = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/subject/".$sub_dir, $sub_dir."/");
    •

  •             } else {
    •

  •                 $subjects = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/subject/");
    •

  •             }
    •

  •             return $subjects;
    •

  •         }
    •

  •
    •

  •         /*
    •

  •          * gets list of language folders inside default language directory
    •

  •          */
    •

  •         function getLangList()
    •

  •         {
    •

  •             $lang_list = array();
    •

  •             $lang_list = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/language/");
    •

  •             return $lang_list;
    •

  •         }
    •

  •
    •

  •         function getCountryList()
    •

  •         {
    •

  •             $country_list = array (
    •

  •                 ""   => "-",
    •

  •                 "AD" => "Andorra",
    •

  •                 "AE" => "United Arab Emirates",
    •

  •                 "AF" => "Afghanistan",
    •

  •                 "AG" => "Antigua and Barbuda",
    •

  •                 "AI" => "Anguilla",
    •

  •                 "AL" => "Albania",
    •

  •                 "AM" => "Armenia",
    •

  •                 "AN" => "Netherlands Antilles",
    •

  •                 "AO" => "Angola",
    •

  •                 "AQ" => "Antarctica",
    •

  •                 "AR" => "Argentina",
    •

  •                 "AS" => "American Samoa",
    •

  •                 "AT" => "Austria",
    •

  •                 "AU" => "Australia",
    •

  •                 "AW" => "Aruba",
    •

  •                 "AZ" => "Azerbaijan",
    •

  •                 "BA" => "Bosnia and Herzegovina",
    •

  •                 "BB" => "Barbados",
    •

  •                 "BD" => "Bangladesh",
    •

  •                 "BE" => "Belgium",
    •

  •                 "BF" => "Burkina Faso",
    •

  •                 "BG" => "Bulgaria",
    •

  •                 "BH" => "Bahrain",
    •

  •                 "BI" => "Burundi",
    •

  •                 "BJ" => "Benin",
    •

  •                 "BM" => "Bermuda",
    •

  •                 "BN" => "Brunei Darussalam",
    •

  •                 "BO" => "Bolivia",
    •

  •                 "BR" => "Brazil",
    •

  •                 "BS" => "Bahamas",
    •

  •                 "BT" => "Bhutan",
    •

  •                 "BV" => "Bouvet Island",
    •

  •                 "BW" => "Botswana",
    •

  •                 "BY" => "Belarus",
    •

  •                 "BZ" => "Belize",
    •

  •                 "CA" => "Canada",
    •

  •                 "CC" => "Cocos (Keeling) Islands",
    •

  •                 "CF" => "Central African Republic",
    •

  •                 "CG" => "Congo",
    •

  •                 "CH" => "Switzerland",
    •

  •                 "CI" => "Cote D'Ivoire (Ivory Coast)",
    •

  •                 "CK" => "Cook Islands",
    •

  •                 "CL" => "Chile",
    •

  •                 "CM" => "Cameroon",
    •

  •                 "CN" => "China",
    •

  •                 "CO" => "Colombia",
    •

  •                 "CR" => "Costa Rica",
    •

  •                 "CS" => "Czechoslovakia (former)",
    •

  •                 "CU" => "Cuba",
    •

  •                 "CV" => "Cape Verde",
    •

  •                 "CX" => "Christmas Island",
    •

  •                 "CY" => "Cyprus",
    •

  •                 "CZ" => "Czech Republic",
    •

  •                 "DE" => "Germany",
    •

  •                 "DJ" => "Djibouti",
    •

  •                 "DK" => "Denmark",
    •

  •                 "DM" => "Dominica",
    •

  •                 "DO" => "Dominican Republic",
    •

  •                 "DZ" => "Algeria",
    •

  •                 "EC" => "Ecuador",
    •

  •                 "EE" => "Estonia",
    •

  •                 "EG" => "Egypt",
    •

  •                 "EH" => "Western Sahara",
    •

  •                 "ER" => "Eritrea",
    •

  •                 "ES" => "Spain",
    •

  •                 "ET" => "Ethiopia",
    •

  •                 "FI" => "Finland",
    •

  •                 "FJ" => "Fiji",
    •

  •                 "FK" => "Falkland Islands (Malvinas)",
    •

  •                 "FM" => "Micronesia",
    •

  •                 "FO" => "Faroe Islands",
    •

  •                 "FR" => "France",
    •

  •                 "FX" => "France, Metropolitan",
    •

  •                 "GA" => "Gabon",
    •

  •                 "GB" => "Great Britain (UK)",
    •

  •                 "GD" => "Grenada",
    •

  •                 "GE" => "Georgia",
    •

  •                 "GF" => "French Guiana",
    •

  •                 "GH" => "Ghana",
    •

  •                 "GI" => "Gibraltar",
    •

  •                 "GL" => "Greenland",
    •

  •                 "GM" => "Gambia",
    •

  •                 "GN" => "Guinea",
    •

  •                 "GP" => "Guadeloupe",
    •

  •                 "GQ" => "Equatorial Guinea",
    •

  •                 "GR" => "Greece",
    •

  •                 "GS" => "S. Georgia and S. Sandwich Isls.",
    •

  •                 "GT" => "Guatemala",
    •

  •                 "GU" => "Guam",
    •

  •                 "GW" => "Guinea-Bissau",
    •

  •                 "GY" => "Guyana",
    •

  •                 "HK" => "Hong Kong",
    •

  •                 "HM" => "Heard and McDonald Islands",
    •

  •                 "HN" => "Honduras",
    •

  •                 "HR" => "Croatia (Hrvatska)",
    •

  •                 "HT" => "Haiti",
    •

  •                 "HU" => "Hungary",
    •

  •                 "ID" => "Indonesia",
    •

  •                 "IE" => "Ireland",
    •

  •                 "IL" => "Israel",
    •

  •                 "IN" => "India",
    •

  •                 "IO" => "British Indian Ocean Territory",
    •

  •                 "IQ" => "Iraq",
    •

  •                 "IR" => "Iran",
    •

  •                 "IS" => "Iceland",
    •

  •                 "IT" => "Italy",
    •

  •                 "JM" => "Jamaica",
    •

  •                 "JO" => "Jordan",
    •

  •                 "JP" => "Japan",
    •

  •                 "KE" => "Kenya",
    •

  •                 "KG" => "Kyrgyzstan",
    •

  •                 "KH" => "Cambodia",
    •

  •                 "KI" => "Kiribati",
    •

  •                 "KM" => "Comoros",
    •

  •                 "KN" => "Saint Kitts and Nevis",
    •

  •                 "KP" => "Korea (North)",
    •

  •                 "KR" => "Korea (South)",
    •

  •                 "KW" => "Kuwait",
    •

  •                 "KY" => "Cayman Islands",
    •

  •                 "KZ" => "Kazakhstan",
    •

  •                 "LA" => "Laos",
    •

  •                 "LB" => "Lebanon",
    •

  •                 "LC" => "Saint Lucia",
    •

  •                 "LI" => "Liechtenstein",
    •

  •                 "LK" => "Sri Lanka",
    •

  •                 "LR" => "Liberia",
    •

  •                 "LS" => "Lesotho",
    •

  •                 "LT" => "Lithuania",
    •

  •                 "LU" => "Luxembourg",
    •

  •                 "LV" => "Latvia",
    •

  •                 "LY" => "Libya",
    •

  •                 "MA" => "Morocco",
    •

  •                 "MC" => "Monaco",
    •

  •                 "MD" => "Moldova",
    •

  •                 "MG" => "Madagascar",
    •

  •                 "MH" => "Marshall Islands",
    •

  •                 "MK" => "Macedonia",
    •

  •                 "ML" => "Mali",
    •

  •                 "MM" => "Myanmar",
    •

  •                 "MN" => "Mongolia",
    •

  •                 "MO" => "Macau",
    •

  •                 "MP" => "Northern Mariana Islands",
    •

  •                 "MQ" => "Martinique",
    •

  •                 "MR" => "Mauritania",
    •

  •                 "MS" => "Montserrat",
    •

  •                 "MT" => "Malta",
    •

  •                 "MU" => "Mauritius",
    •

  •                 "MV" => "Maldives",
    •

  •                 "MW" => "Malawi",
    •

  •                 "MX" => "Mexico",
    •

  •                 "MY" => "Malaysia",
    •

  •                 "MZ" => "Mozambique",
    •

  •                 "NA" => "Namibia",
    •

  •                 "NC" => "New Caledonia",
    •

  •                 "NE" => "Niger",
    •

  •                 "NF" => "Norfolk Island",
    •

  •                 "NG" => "Nigeria",
    •

  •                 "NI" => "Nicaragua",
    •

  •                 "NL" => "Netherlands",
    •

  •                 "NO" => "Norway",
    •

  •                 "NP" => "Nepal",
    •

  •                 "NR" => "Nauru",
    •

  •                 "NT" => "Neutral Zone",
    •

  •                 "NU" => "Niue",
    •

  •                 "NZ" => "New Zealand (Aotearoa)",
    •

  •                 "OM" => "Oman",
    •

  •                 "PA" => "Panama",
    •

  •                 "PE" => "Peru",
    •

  •                 "PF" => "French Polynesia",
    •

  •                 "PG" => "Papua New Guinea",
    •

  •                 "PH" => "Philippines",
    •

  •                 "PK" => "Pakistan",
    •

  •                 "PL" => "Poland",
    •

  •                 "PM" => "St. Pierre and Miquelon",
    •

  •                 "PN" => "Pitcairn",
    •

  •                 "PR" => "Puerto Rico",
    •

  •                 "PT" => "Portugal",
    •

  •                 "PW" => "Palau",
    •

  •                 "PY" => "Paraguay",
    •

  •                 "QA" => "Qatar",
    •

  •                 "RE" => "Reunion",
    •

  •                 "RO" => "Romania",
    •

  •                 "RU" => "Russian Federation",
    •

  •                 "RW" => "Rwanda",
    •

  •                 "SA" => "Saudi Arabia",
    •

  •                 "Sb" => "Solomon Islands",
    •

  •                 "SC" => "Seychelles",
    •

  •                 "SD" => "Sudan",
    •

  •                 "SE" => "Sweden",
    •

  •                 "SG" => "Singapore",
    •

  •                 "SH" => "St. Helena",
    •

  •                 "SI" => "Slovenia",
    •

  •                 "SJ" => "Svalbard and Jan Mayen Islands",
    •

  •                 "SK" => "Slovak Republic",
    •

  •                 "SL" => "Sierra Leone",
    •

  •                 "SM" => "San Marino",
    •

  •                 "SN" => "Senegal",
    •

  •                 "SO" => "Somalia",
    •

  •                 "SR" => "Suriname",
    •

  •                 "ST" => "Sao Tome and Principe",
    •

  •                 "SU" => "USSR (former)",
    •

  •                 "SV" => "El Salvador",
    •

  •                 "SY" => "Syria",
    •

  •                 "SZ" => "Swaziland",
    •

  •                 "TC" => "Turks and Caicos Islands",
    •

  •                 "TD" => "Chad",
    •

  •                 "TF" => "French Southern Territories",
    •

  •                 "TG" => "Togo",
    •

  •                 "TH" => "Thailand",
    •

  •                 "TJ" => "Tajikistan",
    •

  •                 "TK" => "Tokelau",
    •

  •                 "TM" => "Turkmenistan",
    •

  •                 "TN" => "Tunisia",
    •

  •                 "TO" => "Tonga",
    •

  •                 "TP" => "East Timor",
    •

  •                 "TR" => "Turkey",
    •

  •                 "TT" => "Trinidad and Tobago",
    •

  •                 "TV" => "Tuvalu",
    •

  •                 "TW" => "Taiwan",
    •

  •                 "TZ" => "Tanzania",
    •

  •                 "UA" => "Ukraine",
    •

  •                 "UG" => "Uganda",
    •

  •                 "UK" => "United Kingdom",
    •

  •                 "UM" => "US Minor Outlying Islands",
    •

  •                 "US" => "United States",
    •

  •                 "UY" => "Uruguay",
    •

  •                 "UZ" => "Uzbekistan",
    •

  •                 "VA" => "Vatican City State (Holy See)",
    •

  •                 "VC" => "Saint Vincent and the Grenadines",
    •

  •                 "VE" => "Venezuela",
    •

  •                 "VG" => "Virgin Islands (British)",
    •

  •                 "VI" => "Virgin Islands (U.S.)",
    •

  •                 "VN" => "Viet Nam",
    •

  •                 "VU" => "Vanuatu",
    •

  •                 "WF" => "Wallis and Futuna Islands",
    •

  •                 "WS" => "Samoa",
    •

  •                 "YE" => "Yemen",
    •

  •                 "YT" => "Mayotte",
    •

  •                 "YU" => "Yugoslavia",
    •

  •                 "ZA" => "South Africa",
    •

  •                 "ZM" => "Zambia",
    •

  •                 "ZR" => "Zaire",
    •

  •                 "ZW" => "Zimbabwe"
    •

  •             );
    •

  •             asort($country_list);
    •

  •             reset($country_list);
    •

  •             return $country_list;
    •

  •         }
    •

  •
    •

  •         function getHtmlList()
    •

  •         {
    •

  •             $html_list = array (
    •

  •                 "a" => "&lt;a&gt;",
    •

  •                 "abbr" => "&lt;abbr&gt;",
    •

  •                 "acronym" => "&lt;acronym&gt;",
    •

  •                 "address" => "&lt;address&gt;",
    •

  •                 "b" => "&lt;b&gt;",
    •

  •                 "bdo" => "&lt;bdo&gt;",
    •

  •                 "big" => "&lt;big&gt;",
    •

  •                 "blockquote" => "&lt;blockquote&gt;",
    •

  •                 "caption" => "&lt;caption&gt;",
    •

  •                 "cite" => "&lt;cite&gt;",
    •

  •                 "code" => "&lt;code&gt;",
    •

  •                 "col" => "&lt;col&gt;",
    •

  •                 "colgroup" => "&lt;colgroup&gt;",
    •

  •                 "dd" => "&lt;dd&gt;",
    •

  •                 "del" => "&lt;del&gt;",
    •

  •                 "dfn" => "&lt;dfn&gt;",
    •

  •                 "div" => "&lt;div&gt;",
    •

  •                 "dl" => "&lt;dl&gt;",
    •

  •                 "dt" => "&lt;dt&gt;",
    •

  •                 "em" => "&lt;em&gt;",
    •

  •                 "font" => "&lt;font&gt;",
    •

  •                 "h1" => "&lt;h1&gt;",
    •

  •                 "h2" => "&lt;h2&gt;",
    •

  •                 "h3" => "&lt;h3&gt;",
    •

  •                 "h4" => "&lt;h4&gt;",
    •

  •                 "h5" => "&lt;h5&gt;",
    •

  •                 "h6" => "&lt;h6&gt;",
    •

  •                 "hr" => "&lt;hr&gt;",
    •

  •                 "i" => "&lt;i&gt;",
    •

  •                 "img" => "&lt;img&gt;",
    •

  •                 "ins" => "&lt;ins&gt;",
    •

  •                 "kbd" => "&lt;kbd&gt;",
    •

  •                 "li" => "&lt;li&gt;",
    •

  •                 "map" => "&lt;map&gt;",
    •

  •                 "object" => "&lt;object&gt;",
    •

  •                 "ol" => "&lt;ol&gt;",
    •

  •                 "samp" => "&lt;samp&gt;",
    •

  •                 "small" => "&lt;small&gt;",
    •

  •                 "strong" => "&lt;strong&gt;",
    •

  •                 "sub" => "&lt;sub&gt;",
    •

  •                 "sup" => "&lt;sup&gt;",
    •

  •                 "table" => "&lt;table&gt;",
    •

  •                 "tbody" => "&lt;tbody&gt;",
    •

  •                 "td" => "&lt;td&gt;",
    •

  •                 "tfoot" => "&lt;tfoot&gt;",
    •

  •                 "th" => "&lt;th&gt;",
    •

  •                 "thead" => "&lt;thead&gt;",
    •

  •                 "tr" => "&lt;tr&gt;",
    •

  •                 "tt" => "&lt;tt&gt;",
    •

  •                 "ul" => "&lt;ul&gt;",
    •

  •                 "var" => "&lt;var&gt;"
    •

  •             );
    •

  •             asort($html_list);
    •

  •             reset($html_list);
    •

  •             return $html_list;
    •

  •         }
    •

  •
    •

  •         function getUserRankList()
    •

  •         {
    •

  •             $db =& Database::getInstance();
    •

  •             $myts =& MyTextSanitizer::getInstance();
    •

  •             $sql = "SELECT rank_id, rank_title FROM ".$db->prefix("ranks")." WHERE rank_special = 1";
    •

  •             $ret = array();
    •

  •             $result = $db->query($sql);
    •

  •             while ( $myrow = $db->fetchArray($result) ) {
    •

  •                 $ret[$myrow['rank_id']] = $myts->makeTboxData4Show($myrow['rank_title']);
    •

  •             }
    •

  •             return $ret;
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:10 +0200 by phpDocumentor 1.4.0a2


File Source for xoopsmodule.php

Source for file xoopsmodule.php

Documentation is available at xoopsmodule.php

  • <?php
    •

  • // $Id: xoopsmodule.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     exit();
    •

  • }
    •

  • /**
    •

  •  * this file is for backward compatibility only
    •

  •  *
    •

  •  **/
    •

  •
    •

  • /**
    •

  •  * load the new module class
    •

  •  **/
    •

  •
    •

  • require_once XOOPS_ROOT_PATH.'/kernel/module.php';
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:18 +0200 by phpDocumentor 1.4.0a2


File Source for xoopssecurity.php

Source for file xoopssecurity.php

Documentation is available at xoopssecurity.php

  • <?php
    •

  • // $Id: xoopssecurity.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • /*
    •

  •  * Class for managing security aspects such as checking referers, applying tokens and checking global variables for contamination
    •

  •  *
    •

  •  * @package        kernel
    •

  •  * @subpackage    core
    •

  •  *
    •

  •  * @author        Jan Pedersen     <mithrandir@xoops.org>
    •

  •  * @copyright    (c) 2000-2005 The Xoops Project - www.xoops.org
    •

  •  */
    •

  •
    •

  • class XoopsSecurity {
    •

  •     var $errors = array();
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      **/
    •

  •
    •

  •     function XoopsSecurity() {
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * Check if there is a valid token in $_REQUEST['XOOPS_TOKEN_REQUEST'] - can be expanded for more wide use, later (Mith)
    •

  •     *
    •

  •     * @param bool   $clearIfValid whether to clear the token after validation
    •

  •     * @param string $token token to validate
    •

  •     *
    •

  •     * @return bool
    •

  •     */
    •

  •     function check($clearIfValid = true, $token = false) {
    •

  •         return $this->validateToken($token, $clearIfValid);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * Create a token in the user's session
    •

  •     *
    •

  •     * @param int $timeout time in seconds the token should be valid
    •

  •     *
    •

  •     * @return string token value
    •

  •     */
    •

  •     function createToken($timeout = 0)
    •

  •     {
    •

  •         $this->garbageCollection();
    •

  •         if ($timeout == 0) {
    •

  •             $timeout = $GLOBALS['xoopsConfig']['session_expire'] * 60; //session_expire is in minutes, we need seconds
    •

  •         }
    •

  •         $token_id = md5(uniqid(rand(), true));
    •

  •         // save token data on the server
    •

  •         if (!isset($_SESSION['XOOPS_TOKEN_SESSION'])) {
    •

  •             $_SESSION['XOOPS_TOKEN_SESSION'] = array();
    •

  •         }
    •

  •         $token_data = array('id' => $token_id, 'expire' => time() + intval($timeout));
    •

  •         array_push($_SESSION['XOOPS_TOKEN_SESSION'], $token_data);
    •

  •         return md5($token_id.$_SERVER['HTTP_USER_AGENT'].XOOPS_DB_PREFIX);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * Check if a token is valid. If no token is specified, $_REQUEST['XOOPS_TOKEN_REQUEST'] is checked
    •

  •     *
    •

  •     * @param string $token token to validate
    •

  •     * @param bool   $clearIfValid whether to clear the token value if valid
    •

  •     *
    •

  •     * @return bool
    •

  •     ***/
    •

  •     function validateToken($token = false, $clearIfValid = true)
    •

  •     {
    •

  •         global $xoopsLogger;
    •

  •         $token = ($token === false) ? @$_REQUEST['XOOPS_TOKEN_REQUEST'] : $token;
    •

  •         if (empty($token) || empty($_SESSION['XOOPS_TOKEN_SESSION'])) {
    •

  •             $xoopsLogger->addExtra('Token Validation', 'No valid token found in request/session');
    •

  •             return false;
    •

  •         }
    •

  •         $validFound = false;
    •

  •         $token_data =& $_SESSION['XOOPS_TOKEN_SESSION'];
    •

  •         foreach (array_keys($token_data) as $i) {
    •

  •             if ($token === md5($token_data[$i]['id'].$_SERVER['HTTP_USER_AGENT'].XOOPS_DB_PREFIX)) {
    •

  •                 if ($this->filterToken($token_data[$i])) {
    •

  •                     if ($clearIfValid) {
    •

  •                         // token should be valid once, so clear it once validated
    •

  •                         unset($token_data[$i]);
    •

  •                     }
    •

  •                     $xoopsLogger->addExtra('Token Validation', 'Valid token found');
    •

  •                     $validFound = true;
    •

  •                 }
    •

  •                 else {
    •

  •                     $str = 'Valid token expired';
    •

  •                     $this->setErrors($str);
    •

  •                     $xoopsLogger->addExtra('Token Validation', $str);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         if (!$validFound) {
    •

  •             $xoopsLogger->addExtra('Token Validation', 'No valid token found');
    •

  •         }
    •

  •         $this->garbageCollection();
    •

  •         return $validFound;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * Clear all token values from user's session
    •

  •     **/
    •

  •
    •

  •     function clearTokens()
    •

  •     {
    •

  •         $_SESSION['XOOPS_TOKEN_SESSION'] = array();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * Check whether a token value is expired or not
    •

  •     *
    •

  •     * @param string $token
    •

  •     *
    •

  •     * @return bool
    •

  •     ***/
    •

  •     function filterToken($token)
    •

  •     {
    •

  •         return (!empty($token['expire']) && $token['expire'] >= time());
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * Perform garbage collection, clearing expired tokens
    •

  •     *
    •

  •     * @return void
    •

  •     ***/
    •

  •     function garbageCollection() {
    •

  •         if (isset($_SESSION['XOOPS_TOKEN_SESSION']) && count($_SESSION['XOOPS_TOKEN_SESSION']) > 0) {
    •

  •             $_SESSION['XOOPS_TOKEN_SESSION'] = array_filter($_SESSION['XOOPS_TOKEN_SESSION'], array($this, 'filterToken'));
    •

  •         }
    •

  •     }
    •

  •     /**
    •

  •     * Check the user agent's HTTP REFERER against XOOPS_URL
    •

  •     *
    •

  •     * @param int $docheck 0 to not check the referer (used with XML-RPC), 1 to actively check it
    •

  •     *
    •

  •     * @return bool
    •

  •     ***/
    •

  •     function checkReferer($docheck=1)
    •

  •     {
    •

  •         $ref = xoops_getenv('HTTP_REFERER');
    •

  •         if ($docheck == 0) {
    •

  •             return true;
    •

  •         }
    •

  •         if ($ref == '') {
    •

  •             return false;
    •

  •         }
    •

  •         if (strpos($ref, XOOPS_URL) !== 0 ) {
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * Check superglobals for contamination
    •

  •     *
    •

  •     * @return void
    •

  •     ***/
    •

  •     function checkSuperglobals() {
    •

  •         foreach (array('GLOBALS', '_SESSION', 'HTTP_SESSION_VARS', '_GET', 'HTTP_GET_VARS', '_POST', 'HTTP_POST_VARS', '_COOKIE', 'HTTP_COOKIE_VARS', '_REQUEST', '_SERVER', 'HTTP_SERVER_VARS', '_ENV', 'HTTP_ENV_VARS', '_FILES', 'HTTP_POST_FILES', 'xoopsDB', 'xoopsUser', 'xoopsUserId', 'xoopsUserGroups', 'xoopsUserIsAdmin', 'xoopsConfig', 'xoopsOption', 'xoopsModule', 'xoopsModuleConfig', 'xoopsRequestUri') as $bad_global) {
    •

  •             if (isset($_REQUEST[$bad_global])) {
    •

  •                 header('Location: '.XOOPS_URL.'/');
    •

  •                 exit();
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * Check if visitor's IP address is banned
    •

  •     * Should be changed to return bool and let the action be up to the calling script
    •

  •     *
    •

  •     * @return void
    •

  •     ***/
    •

  •     function checkBadips() {
    •

  •         global $xoopsConfig;
    •

  •         if ($xoopsConfig['enable_badips'] == 1 && isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] != '') {
    •

  •             foreach ($xoopsConfig['bad_ips'] as $bi) {
    •

  •                 if (!empty($bi) && preg_match("/".$bi."/", $_SERVER['REMOTE_ADDR'])) {
    •

  •                     exit();
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         unset($bi);
    •

  •         unset($bad_ips);
    •

  •         unset($xoopsConfig['badips']);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * Get the HTML code for a XoopsFormHiddenToken object - used in forms that do not use XoopsForm elements
    •

  •     *
    •

  •     * @return string
    •

  •     ***/
    •

  •     function getTokenHTML() {
    •

  •         require_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
    •

  •         $token = new XoopsFormHiddenToken();
    •

  •         return $token->render();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Add an error
    •

  •      *
    •

  •      * @param   string  $error
    •

  •      ***/
    •

  •     function setErrors($error)
    •

  •     {
    •

  •         $this->errors[] = trim($error);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Get generated errors
    •

  •      *
    •

  •      * @param    bool    $ashtml Format using HTML?
    •

  •      *
    •

  •      * @return    array|string   Array of array messages OR HTML string
    •

  •      */
    •

  •     function &getErrors($ashtml = false)
    •

  •     {
    •

  •         if (!$ashtml) {
    •

  •             return $this->errors;
    •

  •         } else {
    •

  •             $ret = '';
    •

  •             if (count($this->errors) > 0) {
    •

  •                 foreach ($this->errors as $error) {
    •

  •                     $ret .= $error.'<br />';
    •

  •                 }
    •

  •             }
    •

  •             return $ret;
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:22 +0200 by phpDocumentor 1.4.0a2


File Source for xoopsstory.php

Source for file xoopsstory.php

Documentation is available at xoopsstory.php

  • <?php
    •

  • // $Id: xoopsstory.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     exit();
    •

  • }
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopstopic.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsuser.php";
    •

  •
    •

  • class XoopsStory
    •

  • {
    •

  •     var $table;
    •

  •     var $storyid;
    •

  •     var $topicid;
    •

  •     var $uid;
    •

  •     var $title;
    •

  •     var $hometext;
    •

  •     var $bodytext="";
    •

  •     var $counter;
    •

  •     var $created;
    •

  •     var $published;
    •

  •     var $expired;
    •

  •     var $hostname;
    •

  •     var $nohtml=0;
    •

  •     var $nosmiley=0;
    •

  •     var $ihome=0;
    •

  •     var $notifypub=0;
    •

  •     var $type;
    •

  •     var $approved;
    •

  •     var $topicdisplay;
    •

  •     var $topicalign;
    •

  •     var $db;
    •

  •     var $topicstable;
    •

  •     var $comments;
    •

  •
    •

  •     function Story($storyid=-1)
    •

  •     {
    •

  •         $this->db =& Database::getInstance();
    •

  •         $this->table = "";
    •

  •         $this->topicstable = "";
    •

  •         if ( is_array($storyid) ) {
    •

  •             $this->makeStory($storyid);
    •

  •         } elseif ( $storyid != -1 ) {
    •

  •             $this->getStory(intval($storyid));
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function setStoryId($value)
    •

  •     {
    •

  •         $this->storyid = intval($value);
    •

  •     }
    •

  •
    •

  •     function setTopicId($value)
    •

  •     {
    •

  •         $this->topicid = intval($value);
    •

  •     }
    •

  •
    •

  •     function setUid($value)
    •

  •     {
    •

  •         $this->uid = intval($value);
    •

  •     }
    •

  •
    •

  •     function setTitle($value)
    •

  •     {
    •

  •         $this->title = $value;
    •

  •     }
    •

  •
    •

  •     function setHometext($value)
    •

  •     {
    •

  •         $this->hometext = $value;
    •

  •     }
    •

  •
    •

  •     function setBodytext($value)
    •

  •     {
    •

  •         $this->bodytext = $value;
    •

  •     }
    •

  •
    •

  •     function setPublished($value)
    •

  •     {
    •

  •         $this->published = intval($value);
    •

  •     }
    •

  •
    •

  •     function setExpired($value)
    •

  •     {
    •

  •         $this->expired = intval($value);
    •

  •     }
    •

  •
    •

  •     function setHostname($value)
    •

  •     {
    •

  •         $this->hostname = $value;
    •

  •     }
    •

  •
    •

  •     function setNohtml($value=0)
    •

  •     {
    •

  •         $this->nohtml = $value;
    •

  •     }
    •

  •
    •

  •     function setNosmiley($value=0)
    •

  •     {
    •

  •         $this->nosmiley = $value;
    •

  •     }
    •

  •
    •

  •     function setIhome($value)
    •

  •     {
    •

  •         $this->ihome = $value;
    •

  •     }
    •

  •
    •

  •     function setNotifyPub($value)
    •

  •     {
    •

  •         $this->notifypub = $value;
    •

  •     }
    •

  •
    •

  •     function setType($value)
    •

  •     {
    •

  •         $this->type = $value;
    •

  •     }
    •

  •
    •

  •     function setApproved($value)
    •

  •     {
    •

  •         $this->approved = intval($value);
    •

  •     }
    •

  •
    •

  •     function setTopicdisplay($value)
    •

  •     {
    •

  •         $this->topicdisplay = $value;
    •

  •     }
    •

  •
    •

  •     function setTopicalign($value)
    •

  •     {
    •

  •         $this->topicalign = $value;
    •

  •     }
    •

  •
    •

  •     function setComments($value)
    •

  •     {
    •

  •         $this->comments = intval($value);
    •

  •     }
    •

  •
    •

  •     function store($approved=false)
    •

  •     {
    •

  •         //$newpost = 0;
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         $title =$myts->censorString($this->title);
    •

  •         $hometext =$myts->censorString($this->hometext);
    •

  •         $bodytext =$myts->censorString($this->bodytext);
    •

  •         $title = $myts->makeTboxData4Save($title);
    •

  •         $hometext = $myts->makeTareaData4Save($hometext);
    •

  •         $bodytext = $myts->makeTareaData4Save($bodytext);
    •

  •         if ( !isset($this->nohtml) || $this->nohtml != 1 ) {
    •

  •             $this->nohtml = 0;
    •

  •         }
    •

  •         if ( !isset($this->nosmiley) || $this->nosmiley != 1 ) {
    •

  •             $this->nosmiley = 0;
    •

  •         }
    •

  •         if ( !isset($this->notifypub) || $this->notifypub != 1 ) {
    •

  •             $this->notifypub = 0;
    •

  •         }
    •

  •         if( !isset($this->topicdisplay) || $this->topicdisplay != 0 ) {
    •

  •             $this->topicdisplay = 1;
    •

  •         }
    •

  •         $expired = !empty($this->expired) ? $this->expired : 0;
    •

  •         if ( !isset($this->storyid) ) {
    •

  •             //$newpost = 1;
    •

  •             $newstoryid = $this->db->genId($this->table."_storyid_seq");
    •

  •             $created = time();
    •

  •             $published = ( $this->approved ) ? $this->published : 0;
    •

  •
    •

  •             $sql = sprintf("INSERT INTO %s (storyid, uid, title, created, published, expired, hostname, nohtml, nosmiley, hometext, bodytext, counter, topicid, ihome, notifypub, story_type, topicdisplay, topicalign, comments) VALUES (%u, %u, '%s', %u, %u, %u, '%s', %u, %u, '%s', '%s', %u, %u, %u, %u, '%s', %u, '%s', %u)", $this->table, $newstoryid, $this->uid, $title, $created, $published, $expired, $this->hostname, $this->nohtml, $this->nosmiley, $hometext, $bodytext, 0, $this->topicid, $this->ihome, $this->notifypub, $this->type, $this->topicdisplay, $this->topicalign, $this->comments);
    •

  •         } else {
    •

  •             if ( $this->approved ) {
    •

  •                 $sql = sprintf("UPDATE %s SET title = '%s', published = %u, expired = %u, nohtml = %u, nosmiley = %u, hometext = '%s', bodytext = '%s', topicid = %u, ihome = %u, topicdisplay = %u, topicalign = '%s', comments = %u WHERE storyid = %u", $this->table, $title, $this->published, $expired, $this->nohtml, $this->nosmiley, $hometext, $bodytext, $this->topicid, $this->ihome, $this->topicdisplay, $this->topicalign, $this->comments, $this->storyid);
    •

  •             } else {
    •

  •                 $sql = sprintf("UPDATE %s SET title = '%s', expired = %u, nohtml = %u, nosmiley = %u, hometext = '%s', bodytext = '%s', topicid = %u, ihome = %u, topicdisplay = %u, topicalign = '%s', comments = %u WHERE storyid = %u", $this->table, $title, $expired, $this->nohtml, $this->nosmiley, $hometext, $bodytext, $this->topicid, $this->ihome, $this->topicdisplay, $this->topicalign, $this->comments, $this->storyid);
    •

  •             }
    •

  •             $newstoryid = $this->storyid;
    •

  •         }
    •

  •         if (!$result = $this->db->query($sql)) {
    •

  •             return false;
    •

  •         }
    •

  •         if ( empty($newstoryid) ) {
    •

  •             $newstoryid = $this->db->getInsertId();
    •

  •             $this->storyid = $newstoryid;
    •

  •         }
    •

  •         return $newstoryid;
    •

  •     }
    •

  •
    •

  •     function getStory($storyid)
    •

  •     {
    •

  •         $sql = "SELECT * FROM ".$this->table." WHERE storyid=".$storyid."";
    •

  •         $array = $this->db->fetchArray($this->db->query($sql));
    •

  •         $this->makeStory($array);
    •

  •     }
    •

  •
    •

  •     function makeStory($array)
    •

  •     {
    •

  •         foreach ( $array as $key=>$value ){
    •

  •             $this->$key = $value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function delete()
    •

  •     {
    •

  •         $sql = sprintf("DELETE FROM %s WHERE storyid = %u", $this->table, $this->storyid);
    •

  •         if( !$result = $this->db->query($sql) ) {
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     function updateCounter()
    •

  •     {
    •

  •         $sql = sprintf("UPDATE %s SET counter = counter+1 WHERE storyid = %u", $this->table, $this->storyid);
    •

  •         if ( !$result = $this->db->queryF($sql) ) {
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     function updateComments($total)
    •

  •     {
    •

  •         $sql = sprintf("UPDATE %s SET comments = %u WHERE storyid = %u", $this->table, $total, $this->storyid);
    •

  •         if ( !$result = $this->db->queryF($sql) ) {
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     function topicid()
    •

  •     {
    •

  •         return $this->topicid;
    •

  •     }
    •

  •
    •

  •     function topic()
    •

  •     {
    •

  •         return new XoopsTopic($this->topicstable, $this->topicid);
    •

  •     }
    •

  •
    •

  •     function uid()
    •

  •     {
    •

  •         return $this->uid;
    •

  •     }
    •

  •
    •

  •     function uname()
    •

  •     {
    •

  •         return XoopsUser::getUnameFromId($this->uid);
    •

  •     }
    •

  •
    •

  •     function title($format="Show")
    •

  •     {
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         $smiley = 1;
    •

  •         if ( $this->nosmiley() ) {
    •

  •             $smiley = 0;
    •

  •         }
    •

  •         switch ( $format ) {
    •

  •         case "Show":
    •

  •             $title = $myts->makeTboxData4Show($this->title,$smiley);
    •

  •             break;
    •

  •         case "Edit":
    •

  •             $title = $myts->makeTboxData4Edit($this->title);
    •

  •             break;
    •

  •         case "Preview":
    •

  •             $title = $myts->makeTboxData4Preview($this->title,$smiley);
    •

  •             break;
    •

  •         case "InForm":
    •

  •             $title = $myts->makeTboxData4PreviewInForm($this->title);
    •

  •             break;
    •

  •         }
    •

  •         return $title;
    •

  •     }
    •

  •
    •

  •     function hometext($format="Show")
    •

  •     {
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         $html = 1;
    •

  •         $smiley = 1;
    •

  •         $xcodes = 1;
    •

  •         if ( $this->nohtml() ) {
    •

  •             $html = 0;
    •

  •         }
    •

  •         if ( $this->nosmiley() ) {
    •

  •             $smiley = 0;
    •

  •         }
    •

  •         switch ( $format ) {
    •

  •         case "Show":
    •

  •             $hometext = $myts->makeTareaData4Show($this->hometext,$html,$smiley,$xcodes);
    •

  •             break;
    •

  •         case "Edit":
    •

  •             $hometext = $myts->makeTareaData4Edit($this->hometext);
    •

  •             break;
    •

  •         case "Preview":
    •

  •             $hometext = $myts->makeTareaData4Preview($this->hometext,$html,$smiley,$xcodes);
    •

  •             break;
    •

  •         case "InForm":
    •

  •             $hometext = $myts->makeTareaData4PreviewInForm($this->hometext);
    •

  •             break;
    •

  •         }
    •

  •         return $hometext;
    •

  •     }
    •

  •
    •

  •     function bodytext($format="Show")
    •

  •     {
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         $html = 1;
    •

  •         $smiley = 1;
    •

  •         $xcodes = 1;
    •

  •         if ( $this->nohtml() ) {
    •

  •             $html = 0;
    •

  •         }
    •

  •         if ( $this->nosmiley() ) {
    •

  •             $smiley = 0;
    •

  •         }
    •

  •         switch ( $format ) {
    •

  •         case "Show":
    •

  •             $bodytext = $myts->makeTareaData4Show($this->bodytext,$html,$smiley,$xcodes);
    •

  •             break;
    •

  •         case "Edit":
    •

  •             $bodytext = $myts->makeTareaData4Edit($this->bodytext);
    •

  •             break;
    •

  •         case "Preview":
    •

  •             $bodytext = $myts->makeTareaData4Preview($this->bodytext,$html,$smiley, $xcodes);
    •

  •             break;
    •

  •         case "InForm":
    •

  •             $bodytext = $myts->makeTareaData4PreviewInForm($this->bodytext);
    •

  •             break;
    •

  •         }
    •

  •         return $bodytext;
    •

  •     }
    •

  •
    •

  •     function counter()
    •

  •     {
    •

  •         return $this->counter;
    •

  •     }
    •

  •
    •

  •     function created()
    •

  •     {
    •

  •         return $this->created;
    •

  •     }
    •

  •
    •

  •     function published()
    •

  •     {
    •

  •         return $this->published;
    •

  •     }
    •

  •
    •

  •     function expired()
    •

  •     {
    •

  •         return $this->expired;
    •

  •     }
    •

  •
    •

  •     function hostname()
    •

  •     {
    •

  •         return $this->hostname;
    •

  •     }
    •

  •
    •

  •     function storyid()
    •

  •     {
    •

  •         return $this->storyid;
    •

  •     }
    •

  •
    •

  •     function nohtml()
    •

  •     {
    •

  •         return $this->nohtml;
    •

  •     }
    •

  •
    •

  •     function nosmiley()
    •

  •     {
    •

  •         return $this->nosmiley;
    •

  •     }
    •

  •
    •

  •     function notifypub()
    •

  •     {
    •

  •         return $this->notifypub;
    •

  •     }
    •

  •
    •

  •     function type()
    •

  •     {
    •

  •         return $this->type;
    •

  •     }
    •

  •
    •

  •     function ihome()
    •

  •     {
    •

  •         return $this->ihome;
    •

  •     }
    •

  •
    •

  •     function topicdisplay()
    •

  •     {
    •

  •         return $this->topicdisplay;
    •

  •     }
    •

  •
    •

  •     function topicalign($astext=true)
    •

  •     {
    •

  •         if ( $astext ) {
    •

  •             if ( $this->topicalign == "R" ) {
    •

  •                 $ret = "right";
    •

  •             } else {
    •

  •                 $ret = "left";
    •

  •             }
    •

  •             return $ret;
    •

  •         }
    •

  •         return $this->topicalign;
    •

  •     }
    •

  •
    •

  •     function comments()
    •

  •     {
    •

  •         return $this->comments;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:24 +0200 by phpDocumentor 1.4.0a2


File Source for xoopstopic.php

Source for file xoopstopic.php

Documentation is available at xoopstopic.php

  • <?php
    •

  • // $Id: xoopstopic.php 783 2006-11-06 04:54:27Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     exit();
    •

  • }
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopstree.php";
    •

  •
    •

  • class XoopsTopic
    •

  • {
    •

  •     var $table;
    •

  •     var $topic_id;
    •

  •     var $topic_pid;
    •

  •     var $topic_title;
    •

  •     var $topic_imgurl;
    •

  •     var $prefix; // only used in topic tree
    •

  •     var $use_permission=false;
    •

  •     var $mid; // module id used for setting permission
    •

  •
    •

  •     function XoopsTopic($table, $topicid=0)
    •

  •     {
    •

  •         $this->db =& Database::getInstance();
    •

  •         $this->table = $table;
    •

  •         if ( is_array($topicid) ) {
    •

  •             $this->makeTopic($topicid);
    •

  •         } elseif ( $topicid != 0 ) {
    •

  •             $this->getTopic(intval($topicid));
    •

  •         } else {
    •

  •             $this->topic_id = $topicid;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function setTopicTitle($value)
    •

  •     {
    •

  •         $this->topic_title = $value;
    •

  •     }
    •

  •
    •

  •     function setTopicImgurl($value)
    •

  •     {
    •

  •         $this->topic_imgurl = $value;
    •

  •     }
    •

  •
    •

  •     function setTopicPid($value)
    •

  •     {
    •

  •         $this->topic_pid = $value;
    •

  •     }
    •

  •
    •

  •     function getTopic($topicid)
    •

  •     {
    •

  •         $sql = "SELECT * FROM ".$this->table." WHERE topic_id=".$topicid."";
    •

  •         $array = $this->db->fetchArray($this->db->query($sql));
    •

  •         $this->makeTopic($array);
    •

  •     }
    •

  •
    •

  •     function makeTopic($array)
    •

  •     {
    •

  •         foreach($array as $key=>$value){
    •

  •             $this->$key = $value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function usePermission($mid)
    •

  •     {
    •

  •         $this->mid = $mid;
    •

  •         $this->use_permission = true;
    •

  •     }
    •

  •
    •

  •     function store()
    •

  •     {
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         $title = "";
    •

  •         $imgurl = "";
    •

  •         if ( isset($this->topic_title) && $this->topic_title != "" ) {
    •

  •             $title = $myts->makeTboxData4Save($this->topic_title);
    •

  •         }
    •

  •         if ( isset($this->topic_imgurl) && $this->topic_imgurl != "" ) {
    •

  •             $imgurl = $myts->makeTboxData4Save($this->topic_imgurl);
    •

  •         }
    •

  •         if ( !isset($this->topic_pid) || !is_numeric($this->topic_pid) ) {
    •

  •             $this->topic_pid = 0;
    •

  •         }
    •

  •         if ( empty($this->topic_id) ) {
    •

  •             $this->topic_id = $this->db->genId($this->table."_topic_id_seq");
    •

  •             $sql = sprintf("INSERT INTO %s (topic_id, topic_pid, topic_imgurl, topic_title) VALUES (%u, %u, '%s', '%s')", $this->table, $this->topic_id, $this->topic_pid, $imgurl, $title);
    •

  •         } else {
    •

  •             $sql = sprintf("UPDATE %s SET topic_pid = %u, topic_imgurl = '%s', topic_title = '%s' WHERE topic_id = %u", $this->table, $this->topic_pid, $imgurl, $title, $this->topic_id);
    •

  •         }
    •

  •         if ( !$result = $this->db->query($sql) ) {
    •

  •             ErrorHandler::show('0022');
    •

  •         }
    •

  •         if ( $this->use_permission == true ) {
    •

  •             if ( empty($this->topic_id) ) {
    •

  •                 $this->topic_id = $this->db->getInsertId();
    •

  •             }
    •

  •             $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
    •

  •             $parent_topics = $xt->getAllParentId($this->topic_id);
    •

  •             if ( !empty($this->m_groups) && is_array($this->m_groups) ){
    •

  •                 foreach ( $this->m_groups as $m_g ) {
    •

  •                     $moderate_topics = XoopsPerms::getPermitted($this->mid, "ModInTopic", $m_g);
    •

  •                     $add = true;
    •

  •                     // only grant this permission when the group has this permission in all parent topics of the created topic
    •

  •                     foreach($parent_topics as $p_topic){
    •

  •                         if ( !in_array($p_topic, $moderate_topics) ) {
    •

  •                             $add = false;
    •

  •                             continue;
    •

  •                         }
    •

  •                     }
    •

  •                     if ( $add == true ) {
    •

  •                         $xp = new XoopsPerms();
    •

  •                         $xp->setModuleId($this->mid);
    •

  •                         $xp->setName("ModInTopic");
    •

  •                         $xp->setItemId($this->topic_id);
    •

  •                         $xp->store();
    •

  •                         $xp->addGroup($m_g);
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •             if ( !empty($this->s_groups) && is_array($this->s_groups) ){
    •

  •                 foreach ( $s_groups as $s_g ) {
    •

  •                     $submit_topics = XoopsPerms::getPermitted($this->mid, "SubmitInTopic", $s_g);
    •

  •                     $add = true;
    •

  •                     foreach($parent_topics as $p_topic){
    •

  •                         if ( !in_array($p_topic, $submit_topics) ) {
    •

  •                             $add = false;
    •

  •                             continue;
    •

  •                         }
    •

  •                     }
    •

  •                     if ( $add == true ) {
    •

  •                         $xp = new XoopsPerms();
    •

  •                         $xp->setModuleId($this->mid);
    •

  •                         $xp->setName("SubmitInTopic");
    •

  •                         $xp->setItemId($this->topic_id);
    •

  •                         $xp->store();
    •

  •                         $xp->addGroup($s_g);
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •             if ( !empty($this->r_groups) && is_array($this->r_groups) ){
    •

  •                 foreach ( $r_groups as $r_g ) {
    •

  •                     $read_topics = XoopsPerms::getPermitted($this->mid, "ReadInTopic", $r_g);
    •

  •                     $add = true;
    •

  •                     foreach($parent_topics as $p_topic){
    •

  •                         if ( !in_array($p_topic, $read_topics) ) {
    •

  •                             $add = false;
    •

  •                             continue;
    •

  •                         }
    •

  •                     }
    •

  •                     if ( $add == true ) {
    •

  •                         $xp = new XoopsPerms();
    •

  •                         $xp->setModuleId($this->mid);
    •

  •                         $xp->setName("ReadInTopic");
    •

  •                         $xp->setItemId($this->topic_id);
    •

  •                         $xp->store();
    •

  •                         $xp->addGroup($r_g);
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     function delete()
    •

  •     {
    •

  •         $sql = sprintf("DELETE FROM %s WHERE topic_id = %u", $this->table, $this->topic_id);
    •

  •         $this->db->query($sql);
    •

  •     }
    •

  •
    •

  •     function topic_id()
    •

  •     {
    •

  •         return $this->topic_id;
    •

  •     }
    •

  •
    •

  •     function topic_pid()
    •

  •     {
    •

  •         return $this->topic_pid;
    •

  •     }
    •

  •
    •

  •     function topic_title($format="S")
    •

  •     {
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         switch($format){
    •

  •             case "S":
    •

  •                 $title = $myts->makeTboxData4Show($this->topic_title);
    •

  •                 break;
    •

  •             case "E":
    •

  •                 $title = $myts->makeTboxData4Edit($this->topic_title);
    •

  •                 break;
    •

  •             case "P":
    •

  •                 $title = $myts->makeTboxData4Preview($this->topic_title);
    •

  •                 break;
    •

  •             case "F":
    •

  •                 $title = $myts->makeTboxData4PreviewInForm($this->topic_title);
    •

  •                 break;
    •

  •         }
    •

  •         return $title;
    •

  •     }
    •

  •
    •

  •     function topic_imgurl($format="S")
    •

  •     {
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         switch($format){
    •

  •             case "S":
    •

  •                 $imgurl= $myts->makeTboxData4Show($this->topic_imgurl);
    •

  •                 break;
    •

  •             case "E":
    •

  •                 $imgurl = $myts->makeTboxData4Edit($this->topic_imgurl);
    •

  •                 break;
    •

  •             case "P":
    •

  •                 $imgurl = $myts->makeTboxData4Preview($this->topic_imgurl);
    •

  •                 break;
    •

  •             case "F":
    •

  •                 $imgurl = $myts->makeTboxData4PreviewInForm($this->topic_imgurl);
    •

  •                 break;
    •

  •         }
    •

  •         return $imgurl;
    •

  •     }
    •

  •
    •

  •     function prefix()
    •

  •     {
    •

  •         if ( isset($this->prefix) ) {
    •

  •             return $this->prefix;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function getFirstChildTopics()
    •

  •     {
    •

  •         $ret = array();
    •

  •         $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
    •

  •         $topic_arr = $xt->getFirstChild($this->topic_id, "topic_title");
    •

  •         if ( is_array($topic_arr) && count($topic_arr) ) {
    •

  •             foreach($topic_arr as $topic){
    •

  •                 $ret[] = new XoopsTopic($this->table, $topic);
    •

  •             }
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function getAllChildTopics()
    •

  •     {
    •

  •         $ret = array();
    •

  •         $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
    •

  •         $topic_arr = $xt->getAllChild($this->topic_id, "topic_title");
    •

  •         if ( is_array($topic_arr) && count($topic_arr) ) {
    •

  •             foreach($topic_arr as $topic){
    •

  •                 $ret[] = new XoopsTopic($this->table, $topic);
    •

  •             }
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function getChildTopicsTreeArray()
    •

  •     {
    •

  •         $ret = array();
    •

  •         $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
    •

  •         $topic_arr = $xt->getChildTreeArray($this->topic_id, "topic_title");
    •

  •         if ( is_array($topic_arr) && count($topic_arr) ) {
    •

  •             foreach($topic_arr as $topic){
    •

  •                 $ret[] = new XoopsTopic($this->table, $topic);
    •

  •             }
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function makeTopicSelBox($none=0, $seltopic=-1, $selname="", $onchange="")
    •

  •     {
    •

  •         $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
    •

  •         if ( $seltopic != -1 ) {
    •

  •             $xt->makeMySelBox("topic_title", "topic_title", $seltopic, $none, $selname, $onchange);
    •

  •         } elseif ( !empty($this->topic_id) ) {
    •

  •             $xt->makeMySelBox("topic_title", "topic_title", $this->topic_id, $none, $selname, $onchange);
    •

  •         } else {
    •

  •             $xt->makeMySelBox("topic_title", "topic_title", 0, $none, $selname, $onchange);
    •

  •         }
    •

  •     }
    •

  •
    •

  •     //generates nicely formatted linked path from the root id to a given id
    •

  •     function getNiceTopicPathFromId($funcURL)
    •

  •     {
    •

  •         $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
    •

  •         $ret = $xt->getNicePathFromId($this->topic_id, "topic_title", $funcURL);
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function getAllChildTopicsId()
    •

  •     {
    •

  •         $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
    •

  •         $ret = $xt->getAllChildId($this->topic_id, "topic_title");
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function getTopicsList()
    •

  •     {
    •

  •         $result = $this->db->query('SELECT topic_id, topic_pid, topic_title FROM '.$this->table);
    •

  •         $ret = array();
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         while ($myrow = $this->db->fetchArray($result)) {
    •

  •             $ret[$myrow['topic_id']] = array('title' => $myts->htmlspecialchars($myrow['topic_title']), 'pid' => $myrow['topic_pid']);
    •

  •         }
    •

  •         return $ret;
    •

  •     }
    •

  •
    •

  •     function topicExists($pid, $title) {
    •

  •         $sql = "SELECT COUNT(*) from ".$this->table." WHERE topic_pid = ".intval($pid)." AND topic_title = '".trim($title)."'";
    •

  •         $rs = $this->db->query($sql);
    •

  •         list($count) = $this->db->fetchRow($rs);
    •

  •         if ($count > 0) {
    •

  •             return true;
    •

  •         } else {
    •

  •             return false;
    •

  •         }
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:28 +0200 by phpDocumentor 1.4.0a2


File Source for xoopstree.php

Source for file xoopstree.php

Documentation is available at xoopstree.php

  • <?php
    •

  • // $Id: xoopstree.php 506 2006-05-26 23:10:37Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  •
    •

  • class XoopsTree
    •

  • {
    •

  •     var $table;     //table with parent-child structure
    •

  •     var $id;    //name of unique id for records in table $table
    •

  •     var $pid;     // name of parent id used in table $table
    •

  •     var $order;    //specifies the order of query results
    •

  •     var $title;     // name of a field in table $table which will be used when  selection box and paths are generated
    •

  •     var $db;
    •

  •
    •

  •     //constructor of class XoopsTree
    •

  •     //sets the names of table, unique id, and parend id
    •

  •     function XoopsTree($table_name, $id_name, $pid_name)
    •

  •     {
    •

  •         $this->db =& Database::getInstance();
    •

  •         $this->table = $table_name;
    •

  •         $this->id = $id_name;
    •

  •         $this->pid = $pid_name;
    •

  •     }
    •

  •
    •

  •
    •

  •     // returns an array of first child objects for a given id($sel_id)
    •

  •     function getFirstChild($sel_id, $order="")
    •

  •     {
    •

  •         $arr =array();
    •

  •         $sql = "SELECT * FROM ".$this->table." WHERE ".$this->pid."=".$sel_id."";
    •

  •         if ( $order != "" ) {
    •

  •             $sql .= " ORDER BY $order";
    •

  •         }
    •

  •         $result = $this->db->query($sql);
    •

  •         $count = $this->db->getRowsNum($result);
    •

  •         if ( $count==0 ) {
    •

  •             return $arr;
    •

  •         }
    •

  •         while ( $myrow=$this->db->fetchArray($result) ) {
    •

  •             array_push($arr, $myrow);
    •

  •         }
    •

  •         return $arr;
    •

  •     }
    •

  •
    •

  •     // returns an array of all FIRST child ids of a given id($sel_id)
    •

  •     function getFirstChildId($sel_id)
    •

  •     {
    •

  •         $idarray =array();
    •

  •         $result = $this->db->query("SELECT ".$this->id." FROM ".$this->table." WHERE ".$this->pid."=".$sel_id."");
    •

  •         $count = $this->db->getRowsNum($result);
    •

  •         if ( $count == 0 ) {
    •

  •             return $idarray;
    •

  •         }
    •

  •         while ( list($id) = $this->db->fetchRow($result) ) {
    •

  •             array_push($idarray, $id);
    •

  •         }
    •

  •         return $idarray;
    •

  •     }
    •

  •
    •

  •     //returns an array of ALL child ids for a given id($sel_id)
    •

  •     function getAllChildId($sel_id, $order="", $idarray = array())
    •

  •     {
    •

  •         $sql = "SELECT ".$this->id." FROM ".$this->table." WHERE ".$this->pid."=".$sel_id."";
    •

  •         if ( $order != "" ) {
    •

  •             $sql .= " ORDER BY $order";
    •

  •         }
    •

  •         $result=$this->db->query($sql);
    •

  •         $count = $this->db->getRowsNum($result);
    •

  •         if ( $count==0 ) {
    •

  •             return $idarray;
    •

  •         }
    •

  •         while ( list($r_id) = $this->db->fetchRow($result) ) {
    •

  •             array_push($idarray, $r_id);
    •

  •             $idarray = $this->getAllChildId($r_id,$order,$idarray);
    •

  •         }
    •

  •         return $idarray;
    •

  •     }
    •

  •
    •

  •     //returns an array of ALL parent ids for a given id($sel_id)
    •

  •     function getAllParentId($sel_id, $order="", $idarray = array())
    •

  •     {
    •

  •         $sql = "SELECT ".$this->pid." FROM ".$this->table." WHERE ".$this->id."=".$sel_id."";
    •

  •         if ( $order != "" ) {
    •

  •             $sql .= " ORDER BY $order";
    •

  •         }
    •

  •         $result=$this->db->query($sql);
    •

  •         list($r_id) = $this->db->fetchRow($result);
    •

  •         if ( $r_id == 0 ) {
    •

  •             return $idarray;
    •

  •         }
    •

  •         array_push($idarray, $r_id);
    •

  •         $idarray = $this->getAllParentId($r_id,$order,$idarray);
    •

  •         return $idarray;
    •

  •     }
    •

  •
    •

  •     //generates path from the root id to a given id($sel_id)
    •

  •     // the path is delimetered with "/"
    •

  •     function getPathFromId($sel_id, $title, $path="")
    •

  •     {
    •

  •         $result = $this->db->query("SELECT ".$this->pid.", ".$title." FROM ".$this->table." WHERE ".$this->id."=$sel_id");
    •

  •         if ( $this->db->getRowsNum($result) == 0 ) {
    •

  •             return $path;
    •

  •         }
    •

  •         list($parentid,$name) = $this->db->fetchRow($result);
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         $name = $myts->makeTboxData4Show($name);
    •

  •         $path = "/".$name.$path."";
    •

  •         if ( $parentid == 0 ) {
    •

  •             return $path;
    •

  •         }
    •

  •         $path = $this->getPathFromId($parentid, $title, $path);
    •

  •         return $path;
    •

  •     }
    •

  •
    •

  •     //makes a nicely ordered selection box
    •

  •     //$preset_id is used to specify a preselected item
    •

  •     //set $none to 1 to add a option with value 0
    •

  •     function makeMySelBox($title,$order="",$preset_id=0, $none=0, $sel_name="", $onchange="")
    •

  •     {
    •

  •         if ( $sel_name == "" ) {
    •

  •             $sel_name = $this->id;
    •

  •         }
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         echo "<select name='".$sel_name."'";
    •

  •         if ( $onchange != "" ) {
    •

  •             echo " onchange='".$onchange."'";
    •

  •         }
    •

  •         echo ">\n";
    •

  •         $sql = "SELECT ".$this->id.", ".$title." FROM ".$this->table." WHERE ".$this->pid."=0";
    •

  •         if ( $order != "" ) {
    •

  •             $sql .= " ORDER BY $order";
    •

  •         }
    •

  •         $result = $this->db->query($sql);
    •

  •         if ( $none ) {
    •

  •             echo "<option value='0'>----</option>\n";
    •

  •         }
    •

  •         while ( list($catid, $name) = $this->db->fetchRow($result) ) {
    •

  •             $sel = "";
    •

  •             if ( $catid == $preset_id ) {
    •

  •                 $sel = " selected='selected'";
    •

  •             }
    •

  •             echo "<option value='$catid'$sel>$name</option>\n";
    •

  •             $sel = "";
    •

  •             $arr = $this->getChildTreeArray($catid, $order);
    •

  •             foreach ( $arr as $option ) {
    •

  •                 $option['prefix'] = str_replace(".","--",$option['prefix']);
    •

  •                 $catpath = $option['prefix']."&nbsp;".$myts->makeTboxData4Show($option[$title]);
    •

  •                 if ( $option[$this->id] == $preset_id ) {
    •

  •                     $sel = " selected='selected'";
    •

  •                 }
    •

  •                 echo "<option value='".$option[$this->id]."'$sel>$catpath</option>\n";
    •

  •                 $sel = "";
    •

  •             }
    •

  •         }
    •

  •         echo "</select>\n";
    •

  •     }
    •

  •
    •

  •     //generates nicely formatted linked path from the root id to a given id
    •

  •     function getNicePathFromId($sel_id, $title, $funcURL, $path="")
    •

  •     {
    •

  •         $sql = "SELECT ".$this->pid.", ".$title." FROM ".$this->table." WHERE ".$this->id."=$sel_id";
    •

  •         $result = $this->db->query($sql);
    •

  •         if ( $this->db->getRowsNum($result) == 0 ) {
    •

  •             return $path;
    •

  •         }
    •

  •         list($parentid,$name) = $this->db->fetchRow($result);
    •

  •         $myts =& MyTextSanitizer::getInstance();
    •

  •         $name = $myts->makeTboxData4Show($name);
    •

  •         $path = "<a href='".$funcURL."&amp;".$this->id."=".$sel_id."'>".$name."</a>&nbsp;:&nbsp;".$path."";
    •

  •         if ( $parentid == 0 ) {
    •

  •             return $path;
    •

  •         }
    •

  •         $path = $this->getNicePathFromId($parentid, $title, $funcURL, $path);
    •

  •         return $path;
    •

  •     }
    •

  •
    •

  •     //generates id path from the root id to a given id
    •

  •     // the path is delimetered with "/"
    •

  •     function getIdPathFromId($sel_id, $path="")
    •

  •     {
    •

  •         $result = $this->db->query("SELECT ".$this->pid." FROM ".$this->table." WHERE ".$this->id."=$sel_id");
    •

  •         if ( $this->db->getRowsNum($result) == 0 ) {
    •

  •             return $path;
    •

  •         }
    •

  •         list($parentid) = $this->db->fetchRow($result);
    •

  •         $path = "/".$sel_id.$path."";
    •

  •         if ( $parentid == 0 ) {
    •

  •             return $path;
    •

  •         }
    •

  •         $path = $this->getIdPathFromId($parentid, $path);
    •

  •         return $path;
    •

  •     }
    •

  •
    •

  •     function getAllChild($sel_id=0,$order="",$parray = array())
    •

  •     {
    •

  •         $sql = "SELECT * FROM ".$this->table." WHERE ".$this->pid."=".$sel_id."";
    •

  •         if ( $order != "" ) {
    •

  •             $sql .= " ORDER BY $order";
    •

  •         }
    •

  •         $result = $this->db->query($sql);
    •

  •         $count = $this->db->getRowsNum($result);
    •

  •         if ( $count == 0 ) {
    •

  •             return $parray;
    •

  •         }
    •

  •         while ( $row = $this->db->fetchArray($result) ) {
    •

  •             array_push($parray, $row);
    •

  •             $parray=$this->getAllChild($row[$this->id],$order,$parray);
    •

  •         }
    •

  •         return $parray;
    •

  •     }
    •

  •
    •

  •     function getChildTreeArray($sel_id=0,$order="",$parray = array(),$r_prefix="")
    •

  •     {
    •

  •         $sql = "SELECT * FROM ".$this->table." WHERE ".$this->pid."=".$sel_id."";
    •

  •         if ( $order != "" ) {
    •

  •             $sql .= " ORDER BY $order";
    •

  •         }
    •

  •         $result = $this->db->query($sql);
    •

  •         $count = $this->db->getRowsNum($result);
    •

  •         if ( $count == 0 ) {
    •

  •             return $parray;
    •

  •         }
    •

  •         while ( $row = $this->db->fetchArray($result) ) {
    •

  •             $row['prefix'] = $r_prefix.".";
    •

  •             array_push($parray, $row);
    •

  •             $parray = $this->getChildTreeArray($row[$this->id],$order,$parray,$row['prefix']);
    •

  •         }
    •

  •         return $parray;
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:29 +0200 by phpDocumentor 1.4.0a2


File Source for xoopsuser.php

Source for file xoopsuser.php

Documentation is available at xoopsuser.php

  • <?php
    •

  • // $Id: xoopsuser.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • // this file is for backward compatibility only
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     exit();
    •

  • }
    •

  • require_once XOOPS_ROOT_PATH.'/kernel/user.php';
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:30 +0200 by phpDocumentor 1.4.0a2


File Source for zipdownloader.php

Source for file zipdownloader.php

Documentation is available at zipdownloader.php

  • <?php
    •

  • // $Id: zipdownloader.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     exit();
    •

  • }
    •

  • include_once XOOPS_ROOT_PATH.'/class/downloader.php';
    •

  • include_once XOOPS_ROOT_PATH.'/class/class.zipfile.php';
    •

  •
    •

  • class XoopsZipDownloader extends XoopsDownloader
    •

  • {
    •

  •     function XoopsZipDownloader($ext = '.zip', $mimyType = 'application/x-zip')
    •

  •     {
    •

  •         $this->archiver = new zipfile();
    •

  •         $this->ext      = trim($ext);
    •

  •         $this->mimeType = trim($mimyType);
    •

  •     }
    •

  •
    •

  •     function addFile($filepath, $newfilename=null)
    •

  •     {
    •

  •         // Read in the file's contents
    •

  •         $fp = fopen($filepath, "r");
    •

  •         $data = fread($fp, filesize($filepath));
    •

  •         fclose($fp);
    •

  •         $filename = (isset($newfilename) && trim($newfilename) != '') ? trim($newfilename) : $filepath;
    •

  •         $this->archiver->addFile($data, $filename, filemtime($filename));
    •

  •     }
    •

  •
    •

  •     function addBinaryFile($filepath, $newfilename=null)
    •

  •     {
    •

  •         // Read in the file's contents
    •

  •         $fp = fopen($filepath, "rb");
    •

  •         $data = fread($fp, filesize($filepath));
    •

  •         fclose($fp);
    •

  •         $filename = (isset($newfilename) && trim($newfilename) != '') ? trim($newfilename) : $filepath;
    •

  •         $this->archiver->addFile($data, $filename, filemtime($filename));
    •

  •     }
    •

  •
    •

  •     function addFileData(&$data, $filename, $time=0)
    •

  •     {
    •

  •         $this->archiver->addFile($data, $filename, $time);
    •

  •     }
    •

  •
    •

  •     function addBinaryFileData(&$data, $filename, $time=0)
    •

  •     {
    •

  •         $this->addFileData($data, $filename, $time);
    •

  •     }
    •

  •
    •

  •     function download($name, $gzip = true)
    •

  •     {
    •

  •         $this->_header($name.$this->ext);
    •

  •         echo $this->archiver->file();
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:31 +0200 by phpDocumentor 1.4.0a2


Docs For Class BloggerApi

Class BloggerApi

[line 36]
XoopsXmlRpcApi
   |
   --BloggerApi
Location: /xml/rpc/bloggerapi.php

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcApi

  • XoopsXmlRpcApi::$isadmin = false
  • XoopsXmlRpcApi::$module =
  • XoopsXmlRpcApi::$params =
  • XoopsXmlRpcApi::$response =
  • XoopsXmlRpcApi::$user =
  • XoopsXmlRpcApi::$xoopsTagMap = array()

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcApi

  • XoopsXmlRpcApi::XoopsXmlRpcApi()
  • XoopsXmlRpcApi::_checkAdmin()
  • XoopsXmlRpcApi::_checkUser()
  • XoopsXmlRpcApi::_getPostFields()
  • XoopsXmlRpcApi::_getTagCdata()
  • XoopsXmlRpcApi::_getXoopsApi()
  • XoopsXmlRpcApi::_getXoopsTagMap()
  • XoopsXmlRpcApi::_setUser()
  • XoopsXmlRpcApi::_setXoopsTagMap()

Method Detail

    BloggerApi::BloggerApi

    BloggerApi( &$params, &$response, &$module );

    Parameters

    &$params

    &$response

    &$module

    [ Top ]

    BloggerApi::deletePost

    deletePost( );

    [ Top ]

    BloggerApi::editPost

    editPost( );

    [ Top ]

    BloggerApi::getPost

    getPost( );

    [ Top ]

    BloggerApi::getRecentPosts

    getRecentPosts( );

    [ Top ]

    BloggerApi::getTemplate

    getTemplate( );

    [ Top ]

    BloggerApi::getUserInfo

    getUserInfo( );

    [ Top ]

    BloggerApi::getUsersBlogs

    getUsersBlogs( );

    [ Top ]

    BloggerApi::newPost

    newPost( );

    [ Top ]

    BloggerApi::setTemplate

    setTemplate( );

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:56:45 +0200 by phpDocumentor 1.4.0a2


Docs For Class zipfile

Class zipfile

[line 32]

Location: /class.zipfile.php

Class Variable Summary

  • $ctrl_dir = array()

        Central directory

  • $datasec = array()

        Array to store compressed data

  • $eof_ctrl_dir =  "\x50\x4b\x05\x06\x00\x00\x00\x00"

        End of central directory record

  • $old_offset =  0

        Last offset position

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    zipfile::addFile

addFile(
string
$data, string
$name, [integer
$time = 0] );

    Parameters

    $data

    file contents

    $name

    name of the file in the archive (may contains the path)

    $time

    the current timestamp

    Remarks

    Adds "file" to archive

    access

    public

    [ Top ]

    zipfile::file

file(
 );

    Returns

    the zipped file

    Remarks

    Dumps out file

    access

    public

    [ Top ]

    zipfile::unix2DosTime

unix2DosTime(
[integer
$unixtime = 0] );

    Parameters

    $unixtime

    the current Unix timestamp

    Returns

    the current date in a four byte DOS format

    Remarks

    Converts an Unix timestamp to a four byte DOS date and time format (date  in high two bytes, time in low two bytes allowing magnitude comparison).

    access

    private

    [ Top ]

Variable Detail

  • $ctrl_dir = array() [line 46]
    •

  • Data type: array
    •

    Remarks

    Central directory

  • $datasec = array() [line 39]
    •

  • Data type: array
    •

    Remarks

    Array to store compressed data

  • $eof_ctrl_dir =  "\x50\x4b\x05\x06\x00\x00\x00\x00" [line 53]
    •

  • Data type: string
    •

    Remarks

    End of central directory record

  • $old_offset =  0 [line 60]
    •

  • Data type: integer
    •

    Remarks

    Last offset position

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:57:17 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsDatabaseFactory

Class XoopsDatabaseFactory

[line 2]

Location: /database/databasefactory.php

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

  • static object Reference getDatabase()

    Gets a reference to the only instance of database class. Currently  only being used within the installer.

  • static object Reference getDatabaseConnection()

    Get a reference to the only instance of database class and connects to DB

  • object Reference getDatabase()

    Gets a reference to the only instance of database class. Currently  only being used within the installer.

  • object Reference getDatabaseConnection()

    Get a reference to the only instance of database class and connects to DB

Inherited Method Summary

Method Detail

    static XoopsDatabaseFactory::getDatabase

static &getDatabase(
 );

    Returns

    to the only instance of database class

    Remarks

    Gets a reference to the only instance of database class. Currently  only being used within the installer.

    staticvar

    object The $instance: only instance of database class

    [ Top ]

    static XoopsDatabaseFactory::getDatabaseConnection

static &getDatabaseConnection(
 );

    Returns

    to the only instance of database class

    Remarks

    Get a reference to the only instance of database class and connects to DB

    if the class has not been instantiated yet, this will also take  care of that

    staticvar

    object The $instance: only instance of database class

    [ Top ]

    XoopsDatabaseFactory::XoopsDatabaseFactory

XoopsDatabaseFactory(
 );

    [ Top ]

Variable Detail

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:57:48 +0200 by phpDocumentor 1.4.0a2


Docs For Class MetaWeblogApi

Class MetaWeblogApi

[line 36]
XoopsXmlRpcApi
   |
   --MetaWeblogApi
Location: /xml/rpc/metaweblogapi.php

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcApi

  • XoopsXmlRpcApi::$isadmin = false
  • XoopsXmlRpcApi::$module =
  • XoopsXmlRpcApi::$params =
  • XoopsXmlRpcApi::$response =
  • XoopsXmlRpcApi::$user =
  • XoopsXmlRpcApi::$xoopsTagMap = array()

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcApi

  • XoopsXmlRpcApi::XoopsXmlRpcApi()
  • XoopsXmlRpcApi::_checkAdmin()
  • XoopsXmlRpcApi::_checkUser()
  • XoopsXmlRpcApi::_getPostFields()
  • XoopsXmlRpcApi::_getTagCdata()
  • XoopsXmlRpcApi::_getXoopsApi()
  • XoopsXmlRpcApi::_getXoopsTagMap()
  • XoopsXmlRpcApi::_setUser()
  • XoopsXmlRpcApi::_setXoopsTagMap()

Method Detail

    MetaWeblogApi::MetaWeblogApi

    MetaWeblogApi( &$params, &$response, &$module );

    Parameters

    &$params

    &$response

    &$module

    [ Top ]

    MetaWeblogApi::editPost

    editPost( );

    [ Top ]

    MetaWeblogApi::getCategories

    getCategories( );

    [ Top ]

    MetaWeblogApi::getPost

    getPost( );

    [ Top ]

    MetaWeblogApi::getRecentPosts

    getRecentPosts( );

    [ Top ]

    MetaWeblogApi::newPost

    newPost( );

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:52 +0200 by phpDocumentor 1.4.0a2


Docs For Class MovableTypeApi

Class MovableTypeApi

[line 36]
XoopsXmlRpcApi
   |
   --MovableTypeApi
Location: /xml/rpc/movabletypeapi.php

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcApi

  • XoopsXmlRpcApi::$isadmin = false
  • XoopsXmlRpcApi::$module =
  • XoopsXmlRpcApi::$params =
  • XoopsXmlRpcApi::$response =
  • XoopsXmlRpcApi::$user =
  • XoopsXmlRpcApi::$xoopsTagMap = array()

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcApi

  • XoopsXmlRpcApi::XoopsXmlRpcApi()
  • XoopsXmlRpcApi::_checkAdmin()
  • XoopsXmlRpcApi::_checkUser()
  • XoopsXmlRpcApi::_getPostFields()
  • XoopsXmlRpcApi::_getTagCdata()
  • XoopsXmlRpcApi::_getXoopsApi()
  • XoopsXmlRpcApi::_getXoopsTagMap()
  • XoopsXmlRpcApi::_setUser()
  • XoopsXmlRpcApi::_setXoopsTagMap()

Method Detail

    MovableTypeApi::MovableTypeApi

    MovableTypeApi( &$params, &$response, &$module );

    Parameters

    &$params

    &$response

    &$module

    [ Top ]

    MovableTypeApi::getCategoryList

    getCategoryList( );

    [ Top ]

    MovableTypeApi::getPostCategories

    getPostCategories( );

    [ Top ]

    MovableTypeApi::setPostCategories

    setPostCategories( );

    [ Top ]

    MovableTypeApi::supportedMethods

    supportedMethods( );

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:59:07 +0200 by phpDocumentor 1.4.0a2


Docs For Class SaxParser

Class SaxParser

[line 16]

Classes extended from SaxParser:

XoopsXmlRpcParser

Class RSS Parser

XoopsXmlRss2Parser

*****************************************************************************

XoopsThemeSetParser

*****************************************************************************

Location: /xml/saxparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

  • $errors = array()

  • $isCaseFolding =

  • $level =

  • $parser =

  • $tagHandlers = array()

  • $tags = array()

  • $targetEncoding =

  • $xmlInput =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    SaxParser::SaxParser

SaxParser(

&$input );

    Parameters

    &$input

    Remarks

    **************************************************************************

    **************************************************************************

    [ Top ]

    SaxParser::addTagHandler

addTagHandler(
$tagName
&$tagHandler, $functionName
1 );

    Parameters

    1

    string.  The name of the function in XmlDocument's

    &$tagHandler

    string.  The name of the tag currently being parsed.

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::free

free(
 );

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::getCurrentLevel

getCurrentLevel(
 );

    [ Top ]

    SaxParser::getCurrentTag

getCurrentTag(
 );

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::getErrors

&getErrors(
[$ashtml
$ashtml = true] );

    Parameters

    $ashtml

    bool    return as html?

    Remarks

    Gets all the error messages

    [ Top ]

    SaxParser::getParentTag

getParentTag(
 );

    [ Top ]

    SaxParser::getXmlError

getXmlError(
 );

    Remarks

    **************************************************************************

    private

    [ Top ]

    SaxParser::handleBeginElement

handleBeginElement(
$parser
$parser, $tagName
$tagName, $attributesArray
$attributesArray );

    Parameters

    $parser

    int.  The handle to the parser.

    $tagName

    string.  The name of the tag currently being parsed.

    $attributesArray

    attay.  The list of attributes associated with

    Remarks

    **************************************************************************

    private

    [ Top ]

    SaxParser::handleBeginElementDefault

handleBeginElementDefault(

$parser,
$tagName,
$attributesArray );

    Parameters

    $parser

    $tagName

    $attributesArray

    Remarks

    The default tag handler method for a tag with no handler

    abstract

    [ Top ]

    SaxParser::handleCharacterData

handleCharacterData(
$parser
$parser, $data
$data );

    Parameters

    $parser

    int.  The handle to the parser.

    $data

    string.  Character data inside the tag

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::handleCharacterDataDefault

handleCharacterDataDefault(

$parser,
$data );

    Parameters

    $parser

    $data

    Remarks

    The default tag handler method for a tag with no handler

    abstract

    [ Top ]

    SaxParser::handleDefault

handleDefault(
$parser
$parser,
$data );

    Parameters

    $parser

    int.  The handle to the parser.

    $data

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::handleEndElement

handleEndElement(
$parser
$parser, $tagName
$tagName );

    Parameters

    $parser

    int.  The handle to the parser.

    $tagName

    string.  The name of the tag currently being parsed.

    Remarks

    **************************************************************************

    private

    [ Top ]

    SaxParser::handleEndElementDefault

handleEndElementDefault(

$parser,
$tagName );

    Parameters

    $parser

    $tagName

    Remarks

    The default tag handler method for a tag with no handler

    abstract

    [ Top ]

    SaxParser::handleExternalEntityRef

handleExternalEntityRef(
$parser
$parser,
$openEntityNames,
$base,
$systemId,
$publicId );

    Parameters

    $parser

    int.  The handle to the parser.

    $openEntityNames

    $base

    $systemId

    $publicId

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::handleNotationDecl

handleNotationDecl(
$parser
$parser,
$notationName,
$base,
$systemId,
$publicId );

    Parameters

    $parser

    int.  The handle to the parser.

    $notationName

    $base

    $systemId

    $publicId

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::handleProcessingInstruction

handleProcessingInstruction(
$parser
$parser,
&$target,
&$data );

    Parameters

    $parser

    int.  The handle to the parser.

    &$target

    &$data

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::handleUnparsedEntityDecl

handleUnparsedEntityDecl(
$parser
$parser,
$entityName,
$base,
$systemId,
$publicId,
$notationName );

    Parameters

    $parser

    int.  The handle to the parser.

    $entityName

    $base

    $systemId

    $publicId

    $notationName

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::parse

parse(
 );

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::setCaseFolding

setCaseFolding(
$isCaseFolding
$isCaseFolding );

    Parameters

    $isCaseFolding

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::setErrors

setErrors(
$error
$error );

    Parameters

    $error

    string    an error message

    Remarks

    Sets error messages

    [ Top ]

    SaxParser::useAsciiEncoding

useAsciiEncoding(
 );

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::useIsoEncoding

useIsoEncoding(
 );

    Remarks

    **************************************************************************

    [ Top ]

    SaxParser::useUtfEncoding

useUtfEncoding(
 );

    Remarks

    **************************************************************************

    [ Top ]

Variable Detail

  • $errors = array() [line 33]
    •

  • Data type: mixed
    •

  • $isCaseFolding =  [line 21]
    •

  • Data type: mixed
    •

  • $level =  [line 18]
    •

  • Data type: mixed
    •

  • $parser =  [line 19]
    •

  • Data type: mixed
    •

  • $tagHandlers = array() [line 25]
    •

  • Data type: mixed
    •

  • $tags = array() [line 28]
    •

  • Data type: mixed
    •

  • $targetEncoding =  [line 22]
    •

  • Data type: mixed
    •

  • $xmlInput =  [line 31]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:59:19 +0200 by phpDocumentor 1.4.0a2


Docs For Class Snoopy

Class Snoopy

[line 38]

Location: /snoopy.php

Remarks

***********************************************

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 (at your option) 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 ***********************************************

Class Variable Summary

  • $accept =    "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"

  • $agent =    "Snoopy v1.2.3"

  • $cookies = array()

  • $curl_path =    "/usr/local/bin/curl"

  • $error =    ""

  • $expandlinks =    true

  • $headers = array()

  • $host =    "www.php.net"

        ** Public variables ***

  • $lastredirectaddr =    ""

  • $maxframes =    0

  • $maxlength =    500000

  • $maxredirs =    5

  • $offsiteok =    true

  • $pass =    ""

  • $passcookies =    true

  • $port =    80

  • $proxy_host =    ""

  • $proxy_pass =    ""

  • $proxy_port =    ""

  • $proxy_user =    ""

  • $rawheaders = array()

  • $read_timeout =    0

  • $referer =    ""

  • $response_code =    ""

  • $results =    ""

  • $status =    0

  • $temp_dir =    "/tmp"

  • $timed_out =    false

  • $user =    ""

  • $_fp_timeout =    30

  • $_framedepth =    0

  • $_frameurls = array()

  • $_httpmethod =    "GET"

  • $_httpversion =    "HTTP/1.0"

  • $_isproxy =    false

  • $_maxlinelen =    4096

        ** Private variables ***

  • $_mime_boundary =    ""

  • $_redirectaddr =    false

  • $_redirectdepth =    0

  • $_submit_method =    "POST"

  • $_submit_type =    "application/x-www-form-urlencoded"

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    Snoopy::fetch

fetch(

$URI );

    Parameters

    $URI

    [ Top ]

    Snoopy::fetchform

fetchform(

$URI );

    Parameters

    $URI

    [ Top ]

    Snoopy::fetchlinks

fetchlinks(

$URI );

    Parameters

    $URI

    [ Top ]

    Snoopy::fetchtext

fetchtext(

$URI );

    Parameters

    $URI

    [ Top ]

    Snoopy::setcookies

setcookies(
 );

    [ Top ]

    Snoopy::set_submit_multipart

set_submit_multipart(
 );

    [ Top ]

    Snoopy::set_submit_normal

set_submit_normal(
 );

    [ Top ]

    Snoopy::set_submit_xml

set_submit_xml(
 );

    [ Top ]

    Snoopy::submit

submit(

$URI, [
$formvars = ""], [
$formfiles = ""] );

    Parameters

    $URI

    $formvars

    $formfiles

    [ Top ]

    Snoopy::submitlinks

submitlinks(

$URI, [
$formvars = ""], [
$formfiles = ""] );

    Parameters

    $URI

    $formvars

    $formfiles

    [ Top ]

    Snoopy::submittext

submittext(

$URI, [
$formvars = ""], [
$formfiles = ""] );

    Parameters

    $URI

    $formvars

    $formfiles

    [ Top ]

    Snoopy::_check_timeout

_check_timeout(

$fp );

    Parameters

    $fp

    [ Top ]

    Snoopy::_connect

_connect(

&$fp );

    Parameters

    &$fp

    [ Top ]

    Snoopy::_disconnect

_disconnect(

$fp );

    Parameters

    $fp

    [ Top ]

    Snoopy::_expandlinks

_expandlinks(

$links,
$URI );

    Parameters

    $links

    $URI

    [ Top ]

    Snoopy::_httprequest

_httprequest(

$url,
$fp,
$URI,
$http_method, [
$content_type = ""], [
$body = ""] );

    Parameters

    $url

    $fp

    $URI

    $http_method

    $content_type

    $body

    [ Top ]

    Snoopy::_httpsrequest

_httpsrequest(

$url,
$URI,
$http_method, [
$content_type = ""], [
$body = ""] );

    Parameters

    $url

    $URI

    $http_method

    $content_type

    $body

    [ Top ]

    Snoopy::_prepare_post_body

_prepare_post_body(

$formvars,
$formfiles );

    Parameters

    $formvars

    $formfiles

    [ Top ]

    Snoopy::_stripform

_stripform(

$document );

    Parameters

    $document

    [ Top ]

    Snoopy::_striplinks

_striplinks(

$document );

    Parameters

    $document

    [ Top ]

    Snoopy::_striptext

_striptext(

$document );

    Parameters

    $document

    [ Top ]

Variable Detail

  • $accept =    "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*" [line 73]
    •

  • Data type: mixed
    •

  • $agent =    "Snoopy v1.2.3" [line 51]
    •

  • Data type: mixed
    •

  • $cookies = array() [line 53]
    •

  • Data type: mixed
    •

  • $curl_path =    "/usr/local/bin/curl" [line 91]
    •

  • Data type: mixed
    •

  • $error =    "" [line 77]
    •

  • Data type: mixed
    •

  • $expandlinks =    true [line 62]
    •

  • Data type: mixed
    •

  • $headers = array() [line 79]
    •

  • Data type: mixed
    •

  • $host =    "www.php.net" [line 44]
    •

  • Data type: mixed
    •

    Remarks

    ** Public variables ***

  • $lastredirectaddr =    "" [line 59]
    •

  • Data type: mixed
    •

  • $maxframes =    0 [line 61]
    •

  • Data type: mixed
    •

  • $maxlength =    500000 [line 80]
    •

  • Data type: mixed
    •

  • $maxredirs =    5 [line 58]
    •

  • Data type: mixed
    •

  • $offsiteok =    true [line 60]
    •

  • Data type: mixed
    •

  • $pass =    "" [line 70]
    •

  • Data type: mixed
    •

  • $passcookies =    true [line 65]
    •

  • Data type: mixed
    •

  • $port =    80 [line 45]
    •

  • Data type: mixed
    •

  • $proxy_host =    "" [line 46]
    •

  • Data type: mixed
    •

  • $proxy_pass =    "" [line 49]
    •

  • Data type: mixed
    •

  • $proxy_port =    "" [line 47]
    •

  • Data type: mixed
    •

  • $proxy_user =    "" [line 48]
    •

  • Data type: mixed
    •

  • $rawheaders = array() [line 55]
    •

  • Data type: mixed
    •

  • $read_timeout =    0 [line 81]
    •

  • Data type: mixed
    •

  • $referer =    "" [line 52]
    •

  • Data type: mixed
    •

  • $response_code =    "" [line 78]
    •

  • Data type: mixed
    •

  • $results =    "" [line 75]
    •

  • Data type: mixed
    •

  • $status =    0 [line 85]
    •

  • Data type: mixed
    •

  • $temp_dir =    "/tmp" [line 87]
    •

  • Data type: mixed
    •

  • $timed_out =    false [line 84]
    •

  • Data type: mixed
    •

  • $user =    "" [line 69]
    •

  • Data type: mixed
    •

  • $_fp_timeout =    30 [line 118]
    •

  • Data type: mixed
    •

  • $_framedepth =    0 [line 115]
    •

  • Data type: mixed
    •

  • $_frameurls = array() [line 114]
    •

  • Data type: mixed
    •

  • $_httpmethod =    "GET" [line 107]
    •

  • Data type: mixed
    •

  • $_httpversion =    "HTTP/1.0" [line 108]
    •

  • Data type: mixed
    •

  • $_isproxy =    false [line 117]
    •

  • Data type: mixed
    •

  • $_maxlinelen =    4096 [line 105]
    •

  • Data type: mixed
    •

    Remarks

    ** Private variables ***

  • $_mime_boundary =    "" [line 111]
    •

  • Data type: mixed
    •

  • $_redirectaddr =    false [line 112]
    •

  • Data type: mixed
    •

  • $_redirectdepth =    0 [line 113]
    •

  • Data type: mixed
    •

  • $_submit_method =    "POST" [line 109]
    •

  • Data type: mixed
    •

  • $_submit_type =    "application/x-www-form-urlencoded" [line 110]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:00:02 +0200 by phpDocumentor 1.4.0a2


Docs For Class ThemeSetAuthorHandler

Class ThemeSetAuthorHandler

[line 146]
XmlTagHandler
   |
   --ThemeSetAuthorHandler
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    ThemeSetAuthorHandler::ThemeSetAuthorHandler

    ThemeSetAuthorHandler( );

    [ Top ]

    ThemeSetAuthorHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    ThemeSetAuthorHandler::handleBeginElement

    handleBeginElement( &$parser, &$attributes );

    Overrides XmlTagHandler::handleBeginElement() (**************************************************************************)

    Parameters

    &$parser

    &$attributes

    [ Top ]

    ThemeSetAuthorHandler::handleEndElement

    handleEndElement( &$parser );

    Overrides XmlTagHandler::handleEndElement() (**************************************************************************)

    Parameters

    &$parser

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:17 +0200 by phpDocumentor 1.4.0a2


Docs For Class ThemeSetDateCreatedHandler

Class ThemeSetDateCreatedHandler

[line 121]
XmlTagHandler
   |
   --ThemeSetDateCreatedHandler
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    ThemeSetDateCreatedHandler::ThemeSetDateCreatedHandler

    ThemeSetDateCreatedHandler( );

    [ Top ]

    ThemeSetDateCreatedHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    ThemeSetDateCreatedHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:17 +0200 by phpDocumentor 1.4.0a2


Docs For Class ThemeSetDescriptionHandler

Class ThemeSetDescriptionHandler

[line 169]
XmlTagHandler
   |
   --ThemeSetDescriptionHandler
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    ThemeSetDescriptionHandler::ThemeSetDescriptionHandler

    ThemeSetDescriptionHandler( );

    [ Top ]

    ThemeSetDescriptionHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    ThemeSetDescriptionHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:17 +0200 by phpDocumentor 1.4.0a2


Docs For Class ThemeSetEmailHandler

Class ThemeSetEmailHandler

[line 247]
XmlTagHandler
   |
   --ThemeSetEmailHandler
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    ThemeSetEmailHandler::ThemeSetEmailHandler

    ThemeSetEmailHandler( );

    [ Top ]

    ThemeSetEmailHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    ThemeSetEmailHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:17 +0200 by phpDocumentor 1.4.0a2


Docs For Class ThemeSetFileTypeHandler

Class ThemeSetFileTypeHandler

[line 368]
XmlTagHandler
   |
   --ThemeSetFileTypeHandler
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    ThemeSetFileTypeHandler::ThemeSetFileTypeHandler

    ThemeSetFileTypeHandler( );

    [ Top ]

    ThemeSetFileTypeHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    ThemeSetFileTypeHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:17 +0200 by phpDocumentor 1.4.0a2


Docs For Class ThemeSetGeneratorHandler

Class ThemeSetGeneratorHandler

[line 196]
XmlTagHandler
   |
   --ThemeSetGeneratorHandler
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    ThemeSetGeneratorHandler::ThemeSetGeneratorHandler

    ThemeSetGeneratorHandler( );

    [ Top ]

    ThemeSetGeneratorHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    ThemeSetGeneratorHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:18 +0200 by phpDocumentor 1.4.0a2


Docs For Class ThemeSetImageHandler

Class ThemeSetImageHandler

[line 319]
XmlTagHandler
   |
   --ThemeSetImageHandler
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    ThemeSetImageHandler::ThemeSetImageHandler

    ThemeSetImageHandler( );

    [ Top ]

    ThemeSetImageHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    ThemeSetImageHandler::handleBeginElement

    handleBeginElement( &$parser, &$attributes );

    Overrides XmlTagHandler::handleBeginElement() (**************************************************************************)

    Parameters

    &$parser

    &$attributes

    [ Top ]

    ThemeSetImageHandler::handleEndElement

    handleEndElement( &$parser );

    Overrides XmlTagHandler::handleEndElement() (**************************************************************************)

    Parameters

    &$parser

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:18 +0200 by phpDocumentor 1.4.0a2


Docs For Class ThemeSetLinkHandler

Class ThemeSetLinkHandler

[line 271]
XmlTagHandler
   |
   --ThemeSetLinkHandler
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    ThemeSetLinkHandler::ThemeSetLinkHandler

    ThemeSetLinkHandler( );

    [ Top ]

    ThemeSetLinkHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    ThemeSetLinkHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:18 +0200 by phpDocumentor 1.4.0a2


Docs For Class ThemeSetModuleHandler

Class ThemeSetModuleHandler

[line 343]
XmlTagHandler
   |
   --ThemeSetModuleHandler
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    ThemeSetModuleHandler::ThemeSetModuleHandler

    ThemeSetModuleHandler( );

    [ Top ]

    ThemeSetModuleHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    ThemeSetModuleHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:18 +0200 by phpDocumentor 1.4.0a2


Docs For Class ThemeSetNameHandler

Class ThemeSetNameHandler

[line 220]
XmlTagHandler
   |
   --ThemeSetNameHandler
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    ThemeSetNameHandler::ThemeSetNameHandler

    ThemeSetNameHandler( );

    [ Top ]

    ThemeSetNameHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    ThemeSetNameHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:18 +0200 by phpDocumentor 1.4.0a2


Docs For Class ThemeSetTagHandler

Class ThemeSetTagHandler

[line 392]
XmlTagHandler
   |
   --ThemeSetTagHandler
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    ThemeSetTagHandler::ThemeSetTagHandler

    ThemeSetTagHandler( );

    [ Top ]

    ThemeSetTagHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    ThemeSetTagHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:19 +0200 by phpDocumentor 1.4.0a2


Docs For Class ThemeSetTemplateHandler

Class ThemeSetTemplateHandler

[line 295]
XmlTagHandler
   |
   --ThemeSetTemplateHandler
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    ThemeSetTemplateHandler::ThemeSetTemplateHandler

    ThemeSetTemplateHandler( );

    [ Top ]

    ThemeSetTemplateHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    ThemeSetTemplateHandler::handleBeginElement

    handleBeginElement( &$parser, &$attributes );

    Overrides XmlTagHandler::handleBeginElement() (**************************************************************************)

    Parameters

    &$parser

    &$attributes

    [ Top ]

    ThemeSetTemplateHandler::handleEndElement

    handleEndElement( &$parser );

    Overrides XmlTagHandler::handleEndElement() (**************************************************************************)

    Parameters

    &$parser

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:19 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsThemeSetParser

Class XoopsThemeSetParser

[line 38]
SaxParser
   |
   --XoopsThemeSetParser
Location: /xml/themesetparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

  • $imagesData = array()
  • $tempArr = array()
  • $templatesData = array()
  • $themeSetData = array()

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class SaxParser

  • SaxParser::$errors = array()
  • SaxParser::$isCaseFolding =
  • SaxParser::$level =
  • SaxParser::$parser =
  • SaxParser::$tagHandlers = array()
  • SaxParser::$tags = array()
  • SaxParser::$targetEncoding =
  • SaxParser::$xmlInput =

Method Summary

Inherited Method Summary

Inherited From Class SaxParser

  • SaxParser::SaxParser()
    **************************************************************************
  • SaxParser::addTagHandler()
    **************************************************************************
  • SaxParser::free()
    **************************************************************************
  • SaxParser::getCurrentLevel()
  • SaxParser::getCurrentTag()
    **************************************************************************
  • SaxParser::getErrors()
    Gets all the error messages
  • SaxParser::getParentTag()
  • SaxParser::getXmlError()
    **************************************************************************
  • SaxParser::handleBeginElement()
    **************************************************************************
  • SaxParser::handleBeginElementDefault()
    The default tag handler method for a tag with no handler
  • SaxParser::handleCharacterData()
    **************************************************************************
  • SaxParser::handleCharacterDataDefault()
    The default tag handler method for a tag with no handler
  • SaxParser::handleDefault()
    **************************************************************************
  • SaxParser::handleEndElement()
    **************************************************************************
  • SaxParser::handleEndElementDefault()
    The default tag handler method for a tag with no handler
  • SaxParser::handleExternalEntityRef()
    **************************************************************************
  • SaxParser::handleNotationDecl()
    **************************************************************************
  • SaxParser::handleProcessingInstruction()
    **************************************************************************
  • SaxParser::handleUnparsedEntityDecl()
    **************************************************************************
  • SaxParser::parse()
    **************************************************************************
  • SaxParser::setCaseFolding()
    **************************************************************************
  • SaxParser::setErrors()
    Sets error messages
  • SaxParser::useAsciiEncoding()
    **************************************************************************
  • SaxParser::useIsoEncoding()
    **************************************************************************
  • SaxParser::useUtfEncoding()
    **************************************************************************

Method Detail

    XoopsThemeSetParser::XoopsThemeSetParser

    XoopsThemeSetParser( &$input );

    Parameters

    &$input

    [ Top ]

    XoopsThemeSetParser::getImagesData

    &getImagesData( );

    [ Top ]

    XoopsThemeSetParser::getTempArr

    getTempArr( );

    [ Top ]

    XoopsThemeSetParser::getTemplatesData

    &getTemplatesData( );

    [ Top ]

    XoopsThemeSetParser::getThemeSetData

    &getThemeSetData( [ $name = null] );

    Parameters

    $name

    [ Top ]

    XoopsThemeSetParser::resetTempArr

    resetTempArr( );

    [ Top ]

    XoopsThemeSetParser::setImagesData

    setImagesData( &$imagearr );

    Parameters

    &$imagearr

    [ Top ]

    XoopsThemeSetParser::setTempArr

    setTempArr( $name, &$value, [ $delim = ''] );

    Parameters

    $name

    &$value

    $delim

    [ Top ]

    XoopsThemeSetParser::setTemplatesData

    setTemplatesData( &$tplarr );

    Parameters

    &$tplarr

    [ Top ]

    XoopsThemeSetParser::setThemeSetData

    setThemeSetData( $name, &$value );

    Parameters

    $name

    &$value

    [ Top ]

Variable Detail

  • $imagesData = array() [line 42]
  • Data type: mixed

  • $tempArr = array() [line 40]
  • Data type: mixed

  • $templatesData = array() [line 43]
  • Data type: mixed

  • $themeSetData = array() [line 41]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:19 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcApi

Class XoopsXmlRpcApi

[line 33]

Classes extended from XoopsXmlRpcApi:

BloggerApi

MetaWeblogApi

MovableTypeApi

XoopsApi

Location: /xml/rpc/xmlrpcapi.php

Class Variable Summary

  • $isadmin =  false

  • $module =

  • $params =

  • $response =

  • $user =

  • $xoopsTagMap = array()

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsXmlRpcApi::XoopsXmlRpcApi

XoopsXmlRpcApi(

&$params,
&$response,
&$module );

    Parameters

    &$params

    &$response

    &$module

    [ Top ]

    XoopsXmlRpcApi::_checkAdmin

_checkAdmin(
 );

    [ Top ]

    XoopsXmlRpcApi::_checkUser

_checkUser(

$username,
$password );

    Parameters

    $username

    $password

    [ Top ]

    XoopsXmlRpcApi::_getPostFields

&_getPostFields(
[
$post_id = null], [
$blog_id = null] );

    Parameters

    $post_id

    $blog_id

    [ Top ]

    XoopsXmlRpcApi::_getTagCdata

_getTagCdata(

&$text,
$tag, [
$remove = true] );

    Parameters

    &$text

    $tag

    $remove

    [ Top ]

    XoopsXmlRpcApi::_getXoopsApi

&_getXoopsApi(

&$params );

    Parameters

    &$params

    [ Top ]

    XoopsXmlRpcApi::_getXoopsTagMap

_getXoopsTagMap(

$xoopstag );

    Parameters

    $xoopstag

    [ Top ]

    XoopsXmlRpcApi::_setUser

_setUser(

&$user, [
$isadmin = false] );

    Parameters

    &$user

    $isadmin

    [ Top ]

    XoopsXmlRpcApi::_setXoopsTagMap

_setXoopsTagMap(

$xoopstag,
$blogtag );

    Parameters

    $xoopstag

    $blogtag

    [ Top ]

Variable Detail

  • $isadmin =  false [line 51]
    •

  • Data type: mixed
    •

  • $module =  [line 43]
    •

  • Data type: mixed
    •

  • $params =  [line 37]
    •

  • Data type: mixed
    •

  • $response =  [line 40]
    •

  • Data type: mixed
    •

  • $user =  [line 49]
    •

  • Data type: mixed
    •

  • $xoopsTagMap = array() [line 46]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:00:28 +0200 by phpDocumentor 1.4.0a2


Docs For Class RpcArrayHandler

Class RpcArrayHandler

[line 874]
XmlTagHandler
   |
   --RpcArrayHandler
Location: /xml/rpc/xmlrpcparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RpcArrayHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcArrayHandler::handleBeginElement

    handleBeginElement( &$parser, &$attributes );

    Overrides XmlTagHandler::handleBeginElement() (**************************************************************************)

    Parameters

    &$parser

    &$attributes

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcArrayHandler::handleEndElement

    handleEndElement( &$parser );

    Overrides XmlTagHandler::handleEndElement() (**************************************************************************)

    Parameters

    &$parser

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:31 +0200 by phpDocumentor 1.4.0a2


Docs For Class RpcBase64Handler

Class RpcBase64Handler

[line 672]
XmlTagHandler
   |
   --RpcBase64Handler
Location: /xml/rpc/xmlrpcparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RpcBase64Handler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcBase64Handler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:32 +0200 by phpDocumentor 1.4.0a2


Docs For Class RpcBooleanHandler

Class RpcBooleanHandler

[line 570]
XmlTagHandler
   |
   --RpcBooleanHandler
Location: /xml/rpc/xmlrpcparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RpcBooleanHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcBooleanHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:32 +0200 by phpDocumentor 1.4.0a2


Docs For Class RpcDateTimeHandler

Class RpcDateTimeHandler

[line 635]
XmlTagHandler
   |
   --RpcDateTimeHandler
Location: /xml/rpc/xmlrpcparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RpcDateTimeHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcDateTimeHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:32 +0200 by phpDocumentor 1.4.0a2


Docs For Class RpcDoubleHandler

Class RpcDoubleHandler

[line 537]
XmlTagHandler
   |
   --RpcDoubleHandler
Location: /xml/rpc/xmlrpcparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RpcDoubleHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcDoubleHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:32 +0200 by phpDocumentor 1.4.0a2


Docs For Class RpcIntHandler

Class RpcIntHandler

[line 505]
XmlTagHandler
   |
   --RpcIntHandler
Location: /xml/rpc/xmlrpcparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RpcIntHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcIntHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:33 +0200 by phpDocumentor 1.4.0a2


Docs For Class RpcMemberHandler

Class RpcMemberHandler

[line 825]
XmlTagHandler
   |
   --RpcMemberHandler
Location: /xml/rpc/xmlrpcparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RpcMemberHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcMemberHandler::handleBeginElement

    handleBeginElement( &$parser, &$attributes );

    Overrides XmlTagHandler::handleBeginElement() (**************************************************************************)

    Parameters

    &$parser

    &$attributes

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcMemberHandler::handleEndElement

    handleEndElement( &$parser );

    Overrides XmlTagHandler::handleEndElement() (**************************************************************************)

    Parameters

    &$parser

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:33 +0200 by phpDocumentor 1.4.0a2


Docs For Class RpcMethodNameHandler

Class RpcMethodNameHandler

[line 473]
XmlTagHandler
   |
   --RpcMethodNameHandler
Location: /xml/rpc/xmlrpcparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RpcMethodNameHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcMethodNameHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:33 +0200 by phpDocumentor 1.4.0a2


Docs For Class RpcNameHandler

Class RpcNameHandler

[line 704]
XmlTagHandler
   |
   --RpcNameHandler
Location: /xml/rpc/xmlrpcparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RpcNameHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcNameHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:33 +0200 by phpDocumentor 1.4.0a2


Docs For Class RpcStringHandler

Class RpcStringHandler

[line 603]
XmlTagHandler
   |
   --RpcStringHandler
Location: /xml/rpc/xmlrpcparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RpcStringHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcStringHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:33 +0200 by phpDocumentor 1.4.0a2


Docs For Class RpcStructHandler

Class RpcStructHandler

[line 922]
XmlTagHandler
   |
   --RpcStructHandler
Location: /xml/rpc/xmlrpcparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RpcStructHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    author

    see

    [ Top ]

    RpcStructHandler::handleBeginElement

    handleBeginElement( &$parser, &$attributes );

    Overrides XmlTagHandler::handleBeginElement() (**************************************************************************)

    Parameters

    &$parser

    &$attributes

    author

    see

    [ Top ]

    RpcStructHandler::handleEndElement

    handleEndElement( &$parser );

    Overrides XmlTagHandler::handleEndElement() (**************************************************************************)

    Parameters

    &$parser

    author

    see

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:34 +0200 by phpDocumentor 1.4.0a2


Docs For Class RpcValueHandler

Class RpcValueHandler

[line 743]
XmlTagHandler
   |
   --RpcValueHandler
Location: /xml/rpc/xmlrpcparser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RpcValueHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcValueHandler::handleBeginElement

    handleBeginElement( &$parser, &$attributes );

    Overrides XmlTagHandler::handleBeginElement() (**************************************************************************)

    Parameters

    &$parser

    &$attributes

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcValueHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    RpcValueHandler::handleEndElement

    handleEndElement( &$parser );

    Overrides XmlTagHandler::handleEndElement() (**************************************************************************)

    Parameters

    &$parser

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:34 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcArray

Class XoopsXmlRpcArray

[line 279]
XoopsXmlRpcTag
   |
   --XoopsXmlRpcArray
Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

  • $_tags = array()

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::$_fault = false

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::XoopsXmlRpcTag()
  • XoopsXmlRpcTag::encode()
  • XoopsXmlRpcTag::isFault()
  • XoopsXmlRpcTag::render()
  • XoopsXmlRpcTag::setFault()

Method Detail

    XoopsXmlRpcArray::XoopsXmlRpcArray

    XoopsXmlRpcArray( );

    [ Top ]

    XoopsXmlRpcArray::add

    add( &$tagobj );

    Parameters

    &$tagobj

    [ Top ]

    XoopsXmlRpcArray::render

    render( );

    Overrides XoopsXmlRpcTag::render() (parent method not documented)

    [ Top ]

Variable Detail

  • $_tags = array() [line 282]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:36 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcBase64

Class XoopsXmlRpcBase64

[line 263]
XoopsXmlRpcTag
   |
   --XoopsXmlRpcBase64
Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

  • $_value =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::$_fault = false

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::XoopsXmlRpcTag()
  • XoopsXmlRpcTag::encode()
  • XoopsXmlRpcTag::isFault()
  • XoopsXmlRpcTag::render()
  • XoopsXmlRpcTag::setFault()

Method Detail

    XoopsXmlRpcBase64::XoopsXmlRpcBase64

    XoopsXmlRpcBase64( $value );

    Parameters

    $value

    [ Top ]

    XoopsXmlRpcBase64::render

    render( );

    Overrides XoopsXmlRpcTag::render() (parent method not documented)

    [ Top ]

Variable Detail

  • $_value = [line 266]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:37 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcBoolean

Class XoopsXmlRpcBoolean

[line 211]
XoopsXmlRpcTag
   |
   --XoopsXmlRpcBoolean
Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

  • $_value =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::$_fault = false

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::XoopsXmlRpcTag()
  • XoopsXmlRpcTag::encode()
  • XoopsXmlRpcTag::isFault()
  • XoopsXmlRpcTag::render()
  • XoopsXmlRpcTag::setFault()

Method Detail

    XoopsXmlRpcBoolean::XoopsXmlRpcBoolean

    XoopsXmlRpcBoolean( $value );

    Parameters

    $value

    [ Top ]

    XoopsXmlRpcBoolean::render

    render( );

    Overrides XoopsXmlRpcTag::render() (parent method not documented)

    [ Top ]

Variable Detail

  • $_value = [line 214]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:37 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcDatetime

Class XoopsXmlRpcDatetime

[line 243]
XoopsXmlRpcTag
   |
   --XoopsXmlRpcDatetime
Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

  • $_value =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::$_fault = false

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::XoopsXmlRpcTag()
  • XoopsXmlRpcTag::encode()
  • XoopsXmlRpcTag::isFault()
  • XoopsXmlRpcTag::render()
  • XoopsXmlRpcTag::setFault()

Method Detail

    XoopsXmlRpcDatetime::XoopsXmlRpcDatetime

    XoopsXmlRpcDatetime( $value );

    Parameters

    $value

    [ Top ]

    XoopsXmlRpcDatetime::render

    render( );

    Overrides XoopsXmlRpcTag::render() (parent method not documented)

    [ Top ]

Variable Detail

  • $_value = [line 246]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:37 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcDocument

Class XoopsXmlRpcDocument

[line 32]

Classes extended from XoopsXmlRpcDocument:

XoopsXmlRpcResponse

XoopsXmlRpcRequest

Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

  • $_tags = array()

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsXmlRpcDocument::XoopsXmlRpcDocument

XoopsXmlRpcDocument(
 );

    [ Top ]

    XoopsXmlRpcDocument::add

add(

&$tagobj );

    Parameters

    &$tagobj

    [ Top ]

    XoopsXmlRpcDocument::render

render(
 );

    Overridden in child classes as:

    XoopsXmlRpcResponse::render()

    XoopsXmlRpcRequest::render()

    [ Top ]

Variable Detail

  • $_tags = array() [line 35]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:00:37 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcDouble

Class XoopsXmlRpcDouble

[line 195]
XoopsXmlRpcTag
   |
   --XoopsXmlRpcDouble
Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

  • $_value =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::$_fault = false

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::XoopsXmlRpcTag()
  • XoopsXmlRpcTag::encode()
  • XoopsXmlRpcTag::isFault()
  • XoopsXmlRpcTag::render()
  • XoopsXmlRpcTag::setFault()

Method Detail

    XoopsXmlRpcDouble::XoopsXmlRpcDouble

    XoopsXmlRpcDouble( $value );

    Parameters

    $value

    [ Top ]

    XoopsXmlRpcDouble::render

    render( );

    Overrides XoopsXmlRpcTag::render() (parent method not documented)

    [ Top ]

Variable Detail

  • $_value = [line 198]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:37 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcFault

Class XoopsXmlRpcFault

[line 121]
XoopsXmlRpcTag
   |
   --XoopsXmlRpcFault
Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

  • $_code =
  • $_extra =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::$_fault = false

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::XoopsXmlRpcTag()
  • XoopsXmlRpcTag::encode()
  • XoopsXmlRpcTag::isFault()
  • XoopsXmlRpcTag::render()
  • XoopsXmlRpcTag::setFault()

Method Detail

    XoopsXmlRpcFault::XoopsXmlRpcFault

    XoopsXmlRpcFault( $code, [ $extra = null] );

    Parameters

    $code

    $extra

    [ Top ]

    XoopsXmlRpcFault::render

    render( );

    Overrides XoopsXmlRpcTag::render() (parent method not documented)

    [ Top ]

Variable Detail

  • $_code = [line 124]
  • Data type: mixed

  • $_extra = [line 125]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:38 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcInt

Class XoopsXmlRpcInt

[line 179]
XoopsXmlRpcTag
   |
   --XoopsXmlRpcInt
Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

  • $_value =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::$_fault = false

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::XoopsXmlRpcTag()
  • XoopsXmlRpcTag::encode()
  • XoopsXmlRpcTag::isFault()
  • XoopsXmlRpcTag::render()
  • XoopsXmlRpcTag::setFault()

Method Detail

    XoopsXmlRpcInt::XoopsXmlRpcInt

    XoopsXmlRpcInt( $value );

    Parameters

    $value

    [ Top ]

    XoopsXmlRpcInt::render

    render( );

    Overrides XoopsXmlRpcTag::render() (parent method not documented)

    [ Top ]

Variable Detail

  • $_value = [line 182]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:38 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcRequest

Class XoopsXmlRpcRequest

[line 70]
XoopsXmlRpcDocument
   |
   --XoopsXmlRpcRequest
Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

  • $methodName =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcDocument

  • XoopsXmlRpcDocument::$_tags = array()

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcDocument

  • XoopsXmlRpcDocument::XoopsXmlRpcDocument()
  • XoopsXmlRpcDocument::add()
  • XoopsXmlRpcDocument::render()

Method Detail

    XoopsXmlRpcRequest::XoopsXmlRpcRequest

    XoopsXmlRpcRequest( $methodName );

    Parameters

    $methodName

    [ Top ]

    XoopsXmlRpcRequest::render

    render( );

    Overrides XoopsXmlRpcDocument::render() (parent method not documented)

    [ Top ]

Variable Detail

  • $methodName = [line 73]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:38 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcResponse

Class XoopsXmlRpcResponse

[line 53]
XoopsXmlRpcDocument
   |
   --XoopsXmlRpcResponse
Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcDocument

  • XoopsXmlRpcDocument::$_tags = array()

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcDocument

  • XoopsXmlRpcDocument::XoopsXmlRpcDocument()
  • XoopsXmlRpcDocument::add()
  • XoopsXmlRpcDocument::render()

Method Detail

    XoopsXmlRpcResponse::render

    render( );

    Overrides XoopsXmlRpcDocument::render() (parent method not documented)

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:38 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcString

Class XoopsXmlRpcString

[line 227]
XoopsXmlRpcTag
   |
   --XoopsXmlRpcString
Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

  • $_value =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::$_fault = false

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::XoopsXmlRpcTag()
  • XoopsXmlRpcTag::encode()
  • XoopsXmlRpcTag::isFault()
  • XoopsXmlRpcTag::render()
  • XoopsXmlRpcTag::setFault()

Method Detail

    XoopsXmlRpcString::XoopsXmlRpcString

    XoopsXmlRpcString( $value );

    Parameters

    $value

    [ Top ]

    XoopsXmlRpcString::render

    render( );

    Overrides XoopsXmlRpcTag::render() (parent method not documented)

    [ Top ]

Variable Detail

  • $_value = [line 230]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:38 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcStruct

Class XoopsXmlRpcStruct

[line 305]
XoopsXmlRpcTag
   |
   --XoopsXmlRpcStruct
Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

  • $_tags = array()

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::$_fault = false

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcTag

  • XoopsXmlRpcTag::XoopsXmlRpcTag()
  • XoopsXmlRpcTag::encode()
  • XoopsXmlRpcTag::isFault()
  • XoopsXmlRpcTag::render()
  • XoopsXmlRpcTag::setFault()

Method Detail

    XoopsXmlRpcStruct::XoopsXmlRpcStruct

    XoopsXmlRpcStruct( );

    [ Top ]

    XoopsXmlRpcStruct::add

    add( $name, &$tagobj );

    Parameters

    $name

    &$tagobj

    [ Top ]

    XoopsXmlRpcStruct::render

    render( );

    Overrides XoopsXmlRpcTag::render() (parent method not documented)

    [ Top ]

Variable Detail

  • $_tags = array() [line 307]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:39 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcTag

Class XoopsXmlRpcTag

[line 91]

Classes extended from XoopsXmlRpcTag:

XoopsXmlRpcFault

XoopsXmlRpcInt

XoopsXmlRpcDouble

XoopsXmlRpcBoolean

XoopsXmlRpcString

XoopsXmlRpcDatetime

XoopsXmlRpcBase64

XoopsXmlRpcArray

XoopsXmlRpcStruct

Location: /xml/rpc/xmlrpctag.php

Class Variable Summary

  • $_fault =  false

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsXmlRpcTag::XoopsXmlRpcTag

XoopsXmlRpcTag(
 );

    [ Top ]

    XoopsXmlRpcTag::encode

&encode(

&$text );

    Parameters

    &$text

    [ Top ]

    XoopsXmlRpcTag::isFault

isFault(
 );

    [ Top ]

    XoopsXmlRpcTag::render

render(
 );

    Overridden in child classes as:

    XoopsXmlRpcFault::render()

    XoopsXmlRpcInt::render()

    XoopsXmlRpcDouble::render()

    XoopsXmlRpcBoolean::render()

    XoopsXmlRpcString::render()

    XoopsXmlRpcDatetime::render()

    XoopsXmlRpcBase64::render()

    XoopsXmlRpcArray::render()

    XoopsXmlRpcStruct::render()

    [ Top ]

    XoopsXmlRpcTag::setFault

setFault(
[
$fault = true] );

    Parameters

    $fault

    [ Top ]

Variable Detail

  • $_fault =  false [line 94]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:00:39 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssAuthorHandler

Class RssAuthorHandler

[line 697]
XmlTagHandler
   |
   --RssAuthorHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssAuthorHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssAuthorHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

    RssAuthorHandler::RssGuidHandler

    RssGuidHandler( );

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:41 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssCategoryHandler

Class RssCategoryHandler

[line 600]
XmlTagHandler
   |
   --RssCategoryHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssCategoryHandler::RssCategoryHandler

    RssCategoryHandler( );

    [ Top ]

    RssCategoryHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssCategoryHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:41 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssChannelHandler

Class RssChannelHandler

[line 141]
XmlTagHandler
   |
   --RssChannelHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssChannelHandler::RssChannelHandler

    RssChannelHandler( );

    [ Top ]

    RssChannelHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:42 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssCommentsHandler

Class RssCommentsHandler

[line 627]
XmlTagHandler
   |
   --RssCommentsHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssCommentsHandler::RssCommentsHandler

    RssCommentsHandler( );

    [ Top ]

    RssCommentsHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssCommentsHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:42 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssCopyrightHandler

Class RssCopyrightHandler

[line 276]
XmlTagHandler
   |
   --RssCopyrightHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssCopyrightHandler::RssCopyrightHandler

    RssCopyrightHandler( );

    [ Top ]

    RssCopyrightHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssCopyrightHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:42 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssDescriptionHandler

Class RssDescriptionHandler

[line 219]
XmlTagHandler
   |
   --RssDescriptionHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssDescriptionHandler::RssDescriptionHandler

    RssDescriptionHandler( );

    [ Top ]

    RssDescriptionHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssDescriptionHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:42 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssDocsHandler

Class RssDocsHandler

[line 401]
XmlTagHandler
   |
   --RssDocsHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssDocsHandler::RssDocsHandler

    RssDocsHandler( );

    [ Top ]

    RssDocsHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssDocsHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:42 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssGeneratorHandler

Class RssGeneratorHandler

[line 251]
XmlTagHandler
   |
   --RssGeneratorHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssGeneratorHandler::RssGeneratorHandler

    RssGeneratorHandler( );

    [ Top ]

    RssGeneratorHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssGeneratorHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:43 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssGuidHandler

Class RssGuidHandler

[line 676]
XmlTagHandler
   |
   --RssGuidHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssGuidHandler::RssGuidHandler

    RssGuidHandler( );

    [ Top ]

    RssGuidHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssGuidHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:43 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssHeightHandler

Class RssHeightHandler

[line 555]
XmlTagHandler
   |
   --RssHeightHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssHeightHandler::RssHeightHandler

    RssHeightHandler( );

    [ Top ]

    RssHeightHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssHeightHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:43 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssImageHandler

Class RssImageHandler

[line 500]
XmlTagHandler
   |
   --RssImageHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssImageHandler::RssImageHandler

    RssImageHandler( );

    [ Top ]

    RssImageHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:43 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssItemHandler

Class RssItemHandler

[line 575]
XmlTagHandler
   |
   --RssItemHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssItemHandler::RssItemHandler

    RssItemHandler( );

    [ Top ]

    RssItemHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssItemHandler::handleBeginElement

    handleBeginElement( &$parser, &$attributes );

    Overrides XmlTagHandler::handleBeginElement() (**************************************************************************)

    Parameters

    &$parser

    &$attributes

    [ Top ]

    RssItemHandler::handleEndElement

    handleEndElement( &$parser );

    Overrides XmlTagHandler::handleEndElement() (**************************************************************************)

    Parameters

    &$parser

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:43 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssLanguageHandler

Class RssLanguageHandler

[line 351]
XmlTagHandler
   |
   --RssLanguageHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssLanguageHandler::RssLanguageHandler

    RssLanguageHandler( );

    [ Top ]

    RssLanguageHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssLanguageHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:44 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssLastBuildDateHandler

Class RssLastBuildDateHandler

[line 475]
XmlTagHandler
   |
   --RssLastBuildDateHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssLastBuildDateHandler::RssLastBuildDateHandler

    RssLastBuildDateHandler( );

    [ Top ]

    RssLastBuildDateHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssLastBuildDateHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:44 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssLinkHandler

Class RssLinkHandler

[line 187]
XmlTagHandler
   |
   --RssLinkHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssLinkHandler::RssLinkHandler

    RssLinkHandler( );

    [ Top ]

    RssLinkHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssLinkHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:44 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssManagingEditorHandler

Class RssManagingEditorHandler

[line 326]
XmlTagHandler
   |
   --RssManagingEditorHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssManagingEditorHandler::RssManagingEditorHandler

    RssManagingEditorHandler( );

    [ Top ]

    RssManagingEditorHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssManagingEditorHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:44 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssNameHandler

Class RssNameHandler

[line 301]
XmlTagHandler
   |
   --RssNameHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssNameHandler::RssNameHandler

    RssNameHandler( );

    [ Top ]

    RssNameHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssNameHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:44 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssPubDateHandler

Class RssPubDateHandler

[line 648]
XmlTagHandler
   |
   --RssPubDateHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssPubDateHandler::RssPubDateHandler

    RssPubDateHandler( );

    [ Top ]

    RssPubDateHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssPubDateHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:44 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssSourceHandler

Class RssSourceHandler

[line 718]
XmlTagHandler
   |
   --RssSourceHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssSourceHandler::RssSourceHandler

    RssSourceHandler( );

    [ Top ]

    RssSourceHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssSourceHandler::handleBeginElement

    handleBeginElement( &$parser, &$attributes );

    Overrides XmlTagHandler::handleBeginElement() (**************************************************************************)

    Parameters

    &$parser

    &$attributes

    [ Top ]

    RssSourceHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:45 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssTextInputHandler

Class RssTextInputHandler

[line 451]
XmlTagHandler
   |
   --RssTextInputHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssTextInputHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssTextInputHandler::handleBeginElement

    handleBeginElement( &$parser, &$attributes );

    Overrides XmlTagHandler::handleBeginElement() (**************************************************************************)

    Parameters

    &$parser

    &$attributes

    [ Top ]

    RssTextInputHandler::handleEndElement

    handleEndElement( &$parser );

    Overrides XmlTagHandler::handleEndElement() (**************************************************************************)

    Parameters

    &$parser

    [ Top ]

    RssTextInputHandler::RssWebMasterHandler

    RssWebMasterHandler( );

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:45 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssTitleHandler

Class RssTitleHandler

[line 155]
XmlTagHandler
   |
   --RssTitleHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssTitleHandler::RssTitleHandler

    RssTitleHandler( );

    [ Top ]

    RssTitleHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssTitleHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:45 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssTtlHandler

Class RssTtlHandler

[line 426]
XmlTagHandler
   |
   --RssTtlHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssTtlHandler::RssTtlHandler

    RssTtlHandler( );

    [ Top ]

    RssTtlHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssTtlHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:45 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssUrlHandler

Class RssUrlHandler

[line 513]
XmlTagHandler
   |
   --RssUrlHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssUrlHandler::RssUrlHandler

    RssUrlHandler( );

    [ Top ]

    RssUrlHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssUrlHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:45 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssWebMasterHandler

Class RssWebMasterHandler

[line 376]
XmlTagHandler
   |
   --RssWebMasterHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssWebMasterHandler::RssWebMasterHandler

    RssWebMasterHandler( );

    [ Top ]

    RssWebMasterHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssWebMasterHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:46 +0200 by phpDocumentor 1.4.0a2


Docs For Class RssWidthHandler

Class RssWidthHandler

[line 534]
XmlTagHandler
   |
   --RssWidthHandler
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Inherited From Class XmlTagHandler

  • XmlTagHandler::XmlTagHandler()
    **************************************************************************
  • XmlTagHandler::getName()
    **************************************************************************
  • XmlTagHandler::handleBeginElement()
    **************************************************************************
  • XmlTagHandler::handleCharacterData()
    **************************************************************************
  • XmlTagHandler::handleEndElement()
    **************************************************************************

Method Detail

    RssWidthHandler::RssWidthHandler

    RssWidthHandler( );

    [ Top ]

    RssWidthHandler::getName

    getName( );

    Overrides XmlTagHandler::getName() (**************************************************************************)

    [ Top ]

    RssWidthHandler::handleCharacterData

    handleCharacterData( &$parser, &$data );

    Overrides XmlTagHandler::handleCharacterData() (**************************************************************************)

    Parameters

    &$parser

    &$data

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:46 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRss2Parser

Class XoopsXmlRss2Parser

[line 37]
SaxParser
   |
   --XoopsXmlRss2Parser
Location: /xml/rss/xmlrss2parser.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

  • $_channelData = array()
  • $_imageData = array()
  • $_items = array()
  • $_tempArr = array()

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class SaxParser

  • SaxParser::$errors = array()
  • SaxParser::$isCaseFolding =
  • SaxParser::$level =
  • SaxParser::$parser =
  • SaxParser::$tagHandlers = array()
  • SaxParser::$tags = array()
  • SaxParser::$targetEncoding =
  • SaxParser::$xmlInput =

Method Summary

Inherited Method Summary

Inherited From Class SaxParser

  • SaxParser::SaxParser()
    **************************************************************************
  • SaxParser::addTagHandler()
    **************************************************************************
  • SaxParser::free()
    **************************************************************************
  • SaxParser::getCurrentLevel()
  • SaxParser::getCurrentTag()
    **************************************************************************
  • SaxParser::getErrors()
    Gets all the error messages
  • SaxParser::getParentTag()
  • SaxParser::getXmlError()
    **************************************************************************
  • SaxParser::handleBeginElement()
    **************************************************************************
  • SaxParser::handleBeginElementDefault()
    The default tag handler method for a tag with no handler
  • SaxParser::handleCharacterData()
    **************************************************************************
  • SaxParser::handleCharacterDataDefault()
    The default tag handler method for a tag with no handler
  • SaxParser::handleDefault()
    **************************************************************************
  • SaxParser::handleEndElement()
    **************************************************************************
  • SaxParser::handleEndElementDefault()
    The default tag handler method for a tag with no handler
  • SaxParser::handleExternalEntityRef()
    **************************************************************************
  • SaxParser::handleNotationDecl()
    **************************************************************************
  • SaxParser::handleProcessingInstruction()
    **************************************************************************
  • SaxParser::handleUnparsedEntityDecl()
    **************************************************************************
  • SaxParser::parse()
    **************************************************************************
  • SaxParser::setCaseFolding()
    **************************************************************************
  • SaxParser::setErrors()
    Sets error messages
  • SaxParser::useAsciiEncoding()
    **************************************************************************
  • SaxParser::useIsoEncoding()
    **************************************************************************
  • SaxParser::useUtfEncoding()
    **************************************************************************

Method Detail

    XoopsXmlRss2Parser::XoopsXmlRss2Parser

    XoopsXmlRss2Parser( &$input );

    Parameters

    &$input

    [ Top ]

    XoopsXmlRss2Parser::getChannelData

    &getChannelData( [ $name = null] );

    Parameters

    $name

    [ Top ]

    XoopsXmlRss2Parser::getImageData

    &getImageData( [ $name = null] );

    Parameters

    $name

    [ Top ]

    XoopsXmlRss2Parser::getItems

    &getItems( );

    [ Top ]

    XoopsXmlRss2Parser::getTempArr

    getTempArr( );

    [ Top ]

    XoopsXmlRss2Parser::resetTempArr

    resetTempArr( );

    [ Top ]

    XoopsXmlRss2Parser::setChannelData

    setChannelData( $name, &$value );

    Parameters

    $name

    &$value

    [ Top ]

    XoopsXmlRss2Parser::setImageData

    setImageData( $name, &$value );

    Parameters

    $name

    &$value

    [ Top ]

    XoopsXmlRss2Parser::setItems

    setItems( &$itemarr );

    Parameters

    &$itemarr

    [ Top ]

    XoopsXmlRss2Parser::setTempArr

    setTempArr( $name, &$value, [ $delim = ''] );

    Parameters

    $name

    &$value

    $delim

    [ Top ]

Variable Detail

  • $_channelData = array() [line 40]
  • Data type: mixed

  • $_imageData = array() [line 41]
  • Data type: mixed

  • $_items = array() [line 42]
  • Data type: mixed

  • $_tempArr = array() [line 39]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:46 +0200 by phpDocumentor 1.4.0a2


Docs For Class XmlTagHandler

Class XmlTagHandler

[line 13]

Classes extended from XmlTagHandler:

RpcMethodNameHandler

*****************************************************************************

RpcIntHandler

*****************************************************************************

RpcDoubleHandler

*****************************************************************************

RpcBooleanHandler

*****************************************************************************

RpcStringHandler

*****************************************************************************

RpcDateTimeHandler

*****************************************************************************

RpcBase64Handler

*****************************************************************************

RpcNameHandler

*****************************************************************************

RpcValueHandler

*****************************************************************************

RpcMemberHandler

*****************************************************************************

RpcArrayHandler

*****************************************************************************

RpcStructHandler

*****************************************************************************

RssChannelHandler

*****************************************************************************

RssTitleHandler

*****************************************************************************

RssLinkHandler

*****************************************************************************

RssDescriptionHandler

*****************************************************************************

RssGeneratorHandler

*****************************************************************************

RssCopyrightHandler

*****************************************************************************

RssNameHandler

*****************************************************************************

RssManagingEditorHandler

*****************************************************************************

RssLanguageHandler

*****************************************************************************

RssWebMasterHandler

*****************************************************************************

RssDocsHandler

*****************************************************************************

RssTtlHandler

*****************************************************************************

RssTextInputHandler

*****************************************************************************

RssLastBuildDateHandler

*****************************************************************************

RssImageHandler

*****************************************************************************

RssUrlHandler

*****************************************************************************

RssWidthHandler

*****************************************************************************

RssHeightHandler

*****************************************************************************

RssItemHandler

*****************************************************************************

RssCategoryHandler

*****************************************************************************

RssCommentsHandler

*****************************************************************************

RssPubDateHandler

*****************************************************************************

RssGuidHandler

*****************************************************************************

RssAuthorHandler

*****************************************************************************

RssSourceHandler

*****************************************************************************

ThemeSetDateCreatedHandler

*****************************************************************************

ThemeSetAuthorHandler

*****************************************************************************

ThemeSetDescriptionHandler

*****************************************************************************

ThemeSetGeneratorHandler

*****************************************************************************

ThemeSetNameHandler

*****************************************************************************

ThemeSetEmailHandler

*****************************************************************************

ThemeSetLinkHandler

*****************************************************************************

ThemeSetTemplateHandler

*****************************************************************************

ThemeSetImageHandler

*****************************************************************************

ThemeSetModuleHandler

*****************************************************************************

ThemeSetFileTypeHandler

*****************************************************************************

ThemeSetTagHandler

*****************************************************************************

Location: /xml/xmltaghandler.php

Remarks

*****************************************************************************

*****************************************************************************

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XmlTagHandler::XmlTagHandler

XmlTagHandler(
 );

    Remarks

    **************************************************************************

    **************************************************************************

    [ Top ]

    XmlTagHandler::getName

getName(
 );

    Overridden in child classes as:

    RpcMethodNameHandler::getName()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcIntHandler::getName()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcDoubleHandler::getName()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcBooleanHandler::getName()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcStringHandler::getName()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcDateTimeHandler::getName()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcBase64Handler::getName()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcNameHandler::getName()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcValueHandler::getName()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcMemberHandler::getName()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcArrayHandler::getName()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcStructHandler::getName()

    RssChannelHandler::getName()

    RssTitleHandler::getName()

    RssLinkHandler::getName()

    RssDescriptionHandler::getName()

    RssGeneratorHandler::getName()

    RssCopyrightHandler::getName()

    RssNameHandler::getName()

    RssManagingEditorHandler::getName()

    RssLanguageHandler::getName()

    RssWebMasterHandler::getName()

    RssDocsHandler::getName()

    RssTtlHandler::getName()

    RssTextInputHandler::getName()

    RssLastBuildDateHandler::getName()

    RssImageHandler::getName()

    RssUrlHandler::getName()

    RssWidthHandler::getName()

    RssHeightHandler::getName()

    RssItemHandler::getName()

    RssCategoryHandler::getName()

    RssCommentsHandler::getName()

    RssPubDateHandler::getName()

    RssGuidHandler::getName()

    RssAuthorHandler::getName()

    RssSourceHandler::getName()

    ThemeSetDateCreatedHandler::getName()

    ThemeSetAuthorHandler::getName()

    ThemeSetDescriptionHandler::getName()

    ThemeSetGeneratorHandler::getName()

    ThemeSetNameHandler::getName()

    ThemeSetEmailHandler::getName()

    ThemeSetLinkHandler::getName()

    ThemeSetTemplateHandler::getName()

    ThemeSetImageHandler::getName()

    ThemeSetModuleHandler::getName()

    ThemeSetFileTypeHandler::getName()

    ThemeSetTagHandler::getName()

    Remarks

    **************************************************************************

    **************************************************************************

    [ Top ]

    XmlTagHandler::handleBeginElement

handleBeginElement(

&$parser,
&$attributes );

    Overridden in child classes as:

    RpcValueHandler::handleBeginElement()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcMemberHandler::handleBeginElement()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcArrayHandler::handleBeginElement()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcStructHandler::handleBeginElement()

    RssTextInputHandler::handleBeginElement()

    RssItemHandler::handleBeginElement()

    RssSourceHandler::handleBeginElement()

    ThemeSetAuthorHandler::handleBeginElement()

    ThemeSetTemplateHandler::handleBeginElement()

    ThemeSetImageHandler::handleBeginElement()

    Parameters

    &$parser

    &$attributes

    Remarks

    **************************************************************************

    **************************************************************************

    [ Top ]

    XmlTagHandler::handleCharacterData

handleCharacterData(

&$parser,
&$data );

    Overridden in child classes as:

    RpcMethodNameHandler::handleCharacterData()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcIntHandler::handleCharacterData()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcDoubleHandler::handleCharacterData()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcBooleanHandler::handleCharacterData()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcStringHandler::handleCharacterData()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcDateTimeHandler::handleCharacterData()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcBase64Handler::handleCharacterData()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcNameHandler::handleCharacterData()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcValueHandler::handleCharacterData()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RssTitleHandler::handleCharacterData()

    RssLinkHandler::handleCharacterData()

    RssDescriptionHandler::handleCharacterData()

    RssGeneratorHandler::handleCharacterData()

    RssCopyrightHandler::handleCharacterData()

    RssNameHandler::handleCharacterData()

    RssManagingEditorHandler::handleCharacterData()

    RssLanguageHandler::handleCharacterData()

    RssWebMasterHandler::handleCharacterData()

    RssDocsHandler::handleCharacterData()

    RssTtlHandler::handleCharacterData()

    RssLastBuildDateHandler::handleCharacterData()

    RssUrlHandler::handleCharacterData()

    RssWidthHandler::handleCharacterData()

    RssHeightHandler::handleCharacterData()

    RssCategoryHandler::handleCharacterData()

    RssCommentsHandler::handleCharacterData()

    RssPubDateHandler::handleCharacterData()

    RssGuidHandler::handleCharacterData()

    RssAuthorHandler::handleCharacterData()

    RssSourceHandler::handleCharacterData()

    ThemeSetDateCreatedHandler::handleCharacterData()

    ThemeSetDescriptionHandler::handleCharacterData()

    ThemeSetGeneratorHandler::handleCharacterData()

    ThemeSetNameHandler::handleCharacterData()

    ThemeSetEmailHandler::handleCharacterData()

    ThemeSetLinkHandler::handleCharacterData()

    ThemeSetModuleHandler::handleCharacterData()

    ThemeSetFileTypeHandler::handleCharacterData()

    ThemeSetTagHandler::handleCharacterData()

    Parameters

    &$parser

    &$data

    Remarks

    **************************************************************************

    **************************************************************************

    [ Top ]

    XmlTagHandler::handleEndElement

handleEndElement(

&$parser );

    Overridden in child classes as:

    RpcValueHandler::handleEndElement()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcMemberHandler::handleEndElement()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcArrayHandler::handleEndElement()

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    RpcStructHandler::handleEndElement()

    RssTextInputHandler::handleEndElement()

    RssItemHandler::handleEndElement()

    ThemeSetAuthorHandler::handleEndElement()

    ThemeSetTemplateHandler::handleEndElement()

    ThemeSetImageHandler::handleEndElement()

    Parameters

    &$parser

    Remarks

    **************************************************************************

    **************************************************************************

    [ Top ]

Variable Detail

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:00:47 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsApi

Class XoopsApi

[line 36]
XoopsXmlRpcApi
   |
   --XoopsApi
Location: /xml/rpc/xoopsapi.php

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsXmlRpcApi

  • XoopsXmlRpcApi::$isadmin = false
  • XoopsXmlRpcApi::$module =
  • XoopsXmlRpcApi::$params =
  • XoopsXmlRpcApi::$response =
  • XoopsXmlRpcApi::$user =
  • XoopsXmlRpcApi::$xoopsTagMap = array()

Method Summary

Inherited Method Summary

Inherited From Class XoopsXmlRpcApi

  • XoopsXmlRpcApi::XoopsXmlRpcApi()
  • XoopsXmlRpcApi::_checkAdmin()
  • XoopsXmlRpcApi::_checkUser()
  • XoopsXmlRpcApi::_getPostFields()
  • XoopsXmlRpcApi::_getTagCdata()
  • XoopsXmlRpcApi::_getXoopsApi()
  • XoopsXmlRpcApi::_getXoopsTagMap()
  • XoopsXmlRpcApi::_setUser()
  • XoopsXmlRpcApi::_setXoopsTagMap()

Method Detail

    XoopsApi::XoopsApi

    XoopsApi( &$params, &$response, &$module );

    Parameters

    &$params

    &$response

    &$module

    [ Top ]

    XoopsApi::deletePost

    deletePost( );

    [ Top ]

    XoopsApi::editPost

    editPost( );

    [ Top ]

    XoopsApi::getCategories

    &getCategories( [ $respond = true] );

    Parameters

    $respond

    [ Top ]

    XoopsApi::getPost

    &getPost( [ $respond = true] );

    Parameters

    $respond

    [ Top ]

    XoopsApi::getRecentPosts

    &getRecentPosts( [ $respond = true] );

    Parameters

    $respond

    [ Top ]

    XoopsApi::newPost

    newPost( );

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:51 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsBlock

Class XoopsBlock

[line 37]
XoopsObject
   |
   --XoopsBlock
Location: /xoopsblock.php

Class Variable Summary

  • $db =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsBlock::XoopsBlock

    XoopsBlock( [ $id = null] );

    Parameters

    $id

    [ Top ]

    XoopsBlock::buildBlock

    buildBlock( );

    [ Top ]

    XoopsBlock::buildContent

    buildContent( $position, [ $content = ""], [ $contentdb = ""] );

    Parameters

    $position

    $content

    $contentdb

    [ Top ]

    XoopsBlock::buildTitle

    buildTitle( $originaltitle, [ $newtitle = ""] );

    Parameters

    $originaltitle

    $newtitle

    [ Top ]

    XoopsBlock::countSimilarBlocks

    countSimilarBlocks( $moduleId, $funcNum, [ $showFunc = null] );

    Parameters

    $moduleId

    $funcNum

    $showFunc

    [ Top ]

    XoopsBlock::delete

    delete( );

    [ Top ]

    XoopsBlock::getAllBlocks

    getAllBlocks(
[
$rettype = "object"], [
$side = null], [
$visible = null], [
$orderby = "side,weight,bid"], [
$isactive = 1] );

    Parameters

    $rettype

    $side

    $visible

    $orderby

    $isactive

    [ Top ]

    XoopsBlock::getAllBlocksByGroup

    getAllBlocksByGroup(
$side
$groupid, [$groupid
$asobject = true], [$visible
$side = null], [$orderby
$visible = null], [
$orderby = "b.weight,b.bid"], [
$isactive = 1] );

    Parameters

    $groupid

    0: sideblock - left 1: sideblock - right 2: sideblock - left and right 3: centerblock - left 4: centerblock - right 5: centerblock - center 6: centerblock - left, right, center

    $asobject

    groupid (can be an array)

    $side

    0: not visible 1: visible

    $visible

    order of the blocks

    $orderby

    $isactive

    Returns

    of block objects

    Remarks

    get all the blocks that match the supplied parameters

    [ Top ]

    XoopsBlock::getAllByGroupModule

    getAllByGroupModule(

$groupid, [
$module_id = 0], [
$toponlyblock = false], [
$visible = null], [
$orderby = 'b.weight,b.bid'], [
$isactive = 1] );

    Parameters

    $groupid

    $module_id

    $toponlyblock

    $visible

    $orderby

    $isactive

    [ Top ]

    XoopsBlock::getByModule

    getByModule( $moduleid, [ $asobject = true] );

    Parameters

    $moduleid

    $asobject

    [ Top ]

    XoopsBlock::getContent

    getContent( [$format $format = 'S'], [$c_type $c_type = 'T'] );

    Parameters

    $format

    output use: S for Show and E for Edit

    $c_type

    type of block content

    Remarks

    do stripslashes/htmlspecialchars according to the needed output

    [ Top ]

    XoopsBlock::getNonGroupedBlocks

    getNonGroupedBlocks(
[
$module_id = 0], [
$toponlyblock = false], [
$visible = null], [
$orderby = 'b.weight,b.bid'], [
$isactive = 1] );

    Parameters

    $module_id

    $toponlyblock

    $visible

    $orderby

    $isactive

    [ Top ]

    XoopsBlock::getOptions

    getOptions( );

    Remarks

    gets html form for editting block options

    [ Top ]

    XoopsBlock::isCustom

    isCustom( );

    [ Top ]

    XoopsBlock::load

    load( $id );

    Parameters

    $id

    [ Top ]

    XoopsBlock::store

    store( );

    [ Top ]

Variable Detail

  • $db = [line 39]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:57 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsComments

Class XoopsComments

[line 38]
XoopsObject
   |
   --XoopsComments
Location: /xoopscomments.php

Class Variable Summary

  • $ctable =
  • $db =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsComments::XoopsComments

    XoopsComments( $ctable, [ $id = null] );

    Parameters

    $ctable

    $id

    [ Top ]

    XoopsComments::delete

    delete( );

    [ Top ]

    XoopsComments::getAllComments

    getAllComments(
[
$criteria = array()], [
$asobject = true], [
$orderby = "comment_id ASC"], [
$limit = 0], [
$start = 0] );

    Parameters

    $criteria

    $asobject

    $orderby

    $limit

    $start

    [ Top ]

    XoopsComments::getCommentTree

    getCommentTree( );

    [ Top ]

    XoopsComments::load

    load( $id );

    Parameters

    $id

    [ Top ]

    XoopsComments::printNavBar

    printNavBar( $item_id, [ $mode = "flat"], [ $order = 1] );

    Parameters

    $item_id

    $mode

    $order

    [ Top ]

    XoopsComments::showThreadFoot

    showThreadFoot( );

    [ Top ]

    XoopsComments::showThreadHead

    showThreadHead( );

    [ Top ]

    XoopsComments::showThreadPost

    showThreadPost( $order, $mode, [ $adminview = 0], [ $color_num = 1] );

    Parameters

    $order

    $mode

    $adminview

    $color_num

    [ Top ]

    XoopsComments::showTreeFoot

    showTreeFoot( );

    [ Top ]

    XoopsComments::showTreeHead

    showTreeHead( [ $width = "100%"] );

    Parameters

    $width

    [ Top ]

    XoopsComments::showTreeItem

    showTreeItem( $order, $mode, $color_num );

    Parameters

    $order

    $mode

    $color_num

    [ Top ]

    XoopsComments::store

    store( );

    [ Top ]

Variable Detail

  • $ctable = [line 40]
  • Data type: mixed

  • $db = [line 41]
  • Data type: mixed

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:01:04 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsLists

Class XoopsLists

[line 35]

Location: /xoopslists.php

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsLists::getAllAvatarsList

getAllAvatarsList(
 );

    [ Top ]

    XoopsLists::getAvatarsList

getAvatarsList(
[
$avatar_dir = ""] );

    Parameters

    $avatar_dir

    [ Top ]

    XoopsLists::getCountryList

getCountryList(
 );

    [ Top ]

    XoopsLists::getDirListAsArray

getDirListAsArray(

$dirname );

    Parameters

    $dirname

    [ Top ]

    XoopsLists::getFileListAsArray

getFileListAsArray(

$dirname, [
$prefix = ""] );

    Parameters

    $dirname

    $prefix

    [ Top ]

    XoopsLists::getHtmlList

getHtmlList(
 );

    [ Top ]

    XoopsLists::getHtmlListAsArray

getHtmlListAsArray(

$dirname, [
$prefix = ""] );

    Parameters

    $dirname

    $prefix

    [ Top ]

    XoopsLists::getImgListAsArray

getImgListAsArray(

$dirname, [
$prefix = ""] );

    Parameters

    $dirname

    $prefix

    [ Top ]

    XoopsLists::getLangList

getLangList(
 );

    [ Top ]

    XoopsLists::getModulesList

getModulesList(
 );

    [ Top ]

    XoopsLists::getSubjectsList

getSubjectsList(
[
$sub_dir = ""] );

    Parameters

    $sub_dir

    [ Top ]

    XoopsLists::getThemesList

getThemesList(
 );

    [ Top ]

    XoopsLists::getTimeZoneList

getTimeZoneList(
 );

    [ Top ]

    XoopsLists::getUserRankList

getUserRankList(
 );

    [ Top ]

Variable Detail

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:01:10 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsSecurity

Class XoopsSecurity

[line 41]

Location: /xoopssecurity.php

Class Variable Summary

  • $errors = array()

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsSecurity::XoopsSecurity

XoopsSecurity(
 );

    Remarks

    Constructor

    [ Top ]

    XoopsSecurity::check

check(
[bool
$clearIfValid = true], [string
$token = false] );

    Parameters

    $clearIfValid

    whether to clear the token after validation

    $token

    token to validate

    Remarks

    Check if there is a valid token in $_REQUEST['XOOPS_TOKEN_REQUEST'] - can be expanded for more wide use, later (Mith)

    [ Top ]

    XoopsSecurity::checkBadips

checkBadips(
 );

    Remarks

    Check if visitor's IP address is banned  Should be changed to return bool and let the action be up to the calling script

    [ Top ]

    XoopsSecurity::checkReferer

checkReferer(
[int
$docheck = 1] );

    Parameters

    $docheck

    0 to not check the referer (used with XML-RPC), 1 to actively check it

    Remarks

    Check the user agent's HTTP REFERER against XOOPS_URL

    [ Top ]

    XoopsSecurity::checkSuperglobals

checkSuperglobals(
 );

    Remarks

    Check superglobals for contamination

    [ Top ]

    XoopsSecurity::clearTokens

clearTokens(
 );

    Remarks

    Clear all token values from user's session

    [ Top ]

    XoopsSecurity::createToken

createToken(
[int
$timeout = 0] );

    Parameters

    $timeout

    time in seconds the token should be valid

    Returns

    token value

    Remarks

    Create a token in the user's session

    [ Top ]

    XoopsSecurity::filterToken

filterToken(
string
$token );

    Parameters

    $token

    Remarks

    Check whether a token value is expired or not

    [ Top ]

    XoopsSecurity::garbageCollection

garbageCollection(
 );

    Remarks

    Perform garbage collection, clearing expired tokens

    [ Top ]

    XoopsSecurity::getErrors

&getErrors(
[bool
$ashtml = false] );

    Parameters

    $ashtml

    Format using HTML?

    Returns

    Array of array messages OR HTML string

    Remarks

    Get generated errors

    [ Top ]

    XoopsSecurity::getTokenHTML

getTokenHTML(
 );

    Remarks

    Get the HTML code for a XoopsFormHiddenToken object - used in forms that do not use XoopsForm elements

    [ Top ]

    XoopsSecurity::setErrors

setErrors(
string
$error );

    Parameters

    $error

    Remarks

    Add an error

    [ Top ]

    XoopsSecurity::validateToken

validateToken(
[string
$token = false], [bool
$clearIfValid = true] );

    Parameters

    $token

    token to validate

    $clearIfValid

    whether to clear the token value if valid

    Remarks

    Check if a token is valid. If no token is specified, $_REQUEST['XOOPS_TOKEN_REQUEST'] is checked

    [ Top ]

Variable Detail

  • $errors = array() [line 42]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:01:22 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsStory

Class XoopsStory

[line 37]

Location: /xoopsstory.php

Class Variable Summary

  • $approved =

  • $bodytext = ""

  • $comments =

  • $counter =

  • $created =

  • $db =

  • $expired =

  • $hometext =

  • $hostname =

  • $ihome = 0

  • $nohtml = 0

  • $nosmiley = 0

  • $notifypub = 0

  • $published =

  • $storyid =

  • $table =

  • $title =

  • $topicalign =

  • $topicdisplay =

  • $topicid =

  • $topicstable =

  • $type =

  • $uid =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsStory::bodytext

bodytext(
[
$format = "Show"] );

    Parameters

    $format

    [ Top ]

    XoopsStory::comments

comments(
 );

    [ Top ]

    XoopsStory::counter

counter(
 );

    [ Top ]

    XoopsStory::created

created(
 );

    [ Top ]

    XoopsStory::delete

delete(
 );

    [ Top ]

    XoopsStory::expired

expired(
 );

    [ Top ]

    XoopsStory::getStory

getStory(

$storyid );

    Parameters

    $storyid

    [ Top ]

    XoopsStory::hometext

hometext(
[
$format = "Show"] );

    Parameters

    $format

    [ Top ]

    XoopsStory::hostname

hostname(
 );

    [ Top ]

    XoopsStory::ihome

ihome(
 );

    [ Top ]

    XoopsStory::makeStory

makeStory(

$array );

    Parameters

    $array

    [ Top ]

    XoopsStory::nohtml

nohtml(
 );

    [ Top ]

    XoopsStory::nosmiley

nosmiley(
 );

    [ Top ]

    XoopsStory::notifypub

notifypub(
 );

    [ Top ]

    XoopsStory::published

published(
 );

    [ Top ]

    XoopsStory::setApproved

setApproved(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setBodytext

setBodytext(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setComments

setComments(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setExpired

setExpired(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setHometext

setHometext(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setHostname

setHostname(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setIhome

setIhome(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setNohtml

setNohtml(
[
$value = 0] );

    Parameters

    $value

    [ Top ]

    XoopsStory::setNosmiley

setNosmiley(
[
$value = 0] );

    Parameters

    $value

    [ Top ]

    XoopsStory::setNotifyPub

setNotifyPub(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setPublished

setPublished(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setStoryId

setStoryId(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setTitle

setTitle(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setTopicalign

setTopicalign(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setTopicdisplay

setTopicdisplay(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setTopicId

setTopicId(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setType

setType(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::setUid

setUid(

$value );

    Parameters

    $value

    [ Top ]

    XoopsStory::store

store(
[
$approved = false] );

    Parameters

    $approved

    [ Top ]

    XoopsStory::Story

Story(
[
$storyid = -1] );

    Parameters

    $storyid

    [ Top ]

    XoopsStory::storyid

storyid(
 );

    [ Top ]

    XoopsStory::title

title(
[
$format = "Show"] );

    Parameters

    $format

    [ Top ]

    XoopsStory::topic

topic(
 );

    [ Top ]

    XoopsStory::topicalign

topicalign(
[
$astext = true] );

    Parameters

    $astext

    [ Top ]

    XoopsStory::topicdisplay

topicdisplay(
 );

    [ Top ]

    XoopsStory::topicid

topicid(
 );

    [ Top ]

    XoopsStory::type

type(
 );

    [ Top ]

    XoopsStory::uid

uid(
 );

    [ Top ]

    XoopsStory::uname

uname(
 );

    [ Top ]

    XoopsStory::updateComments

updateComments(

$total );

    Parameters

    $total

    [ Top ]

    XoopsStory::updateCounter

updateCounter(
 );

    [ Top ]

Variable Detail

  • $approved =  [line 56]
    •

  • Data type: mixed
    •

  • $bodytext = "" [line 45]
    •

  • Data type: mixed
    •

  • $comments =  [line 61]
    •

  • Data type: mixed
    •

  • $counter =  [line 46]
    •

  • Data type: mixed
    •

  • $created =  [line 47]
    •

  • Data type: mixed
    •

  • $db =  [line 59]
    •

  • Data type: mixed
    •

  • $expired =  [line 49]
    •

  • Data type: mixed
    •

  • $hometext =  [line 44]
    •

  • Data type: mixed
    •

  • $hostname =  [line 50]
    •

  • Data type: mixed
    •

  • $ihome = 0 [line 53]
    •

  • Data type: mixed
    •

  • $nohtml = 0 [line 51]
    •

  • Data type: mixed
    •

  • $nosmiley = 0 [line 52]
    •

  • Data type: mixed
    •

  • $notifypub = 0 [line 54]
    •

  • Data type: mixed
    •

  • $published =  [line 48]
    •

  • Data type: mixed
    •

  • $storyid =  [line 40]
    •

  • Data type: mixed
    •

  • $table =  [line 39]
    •

  • Data type: mixed
    •

  • $title =  [line 43]
    •

  • Data type: mixed
    •

  • $topicalign =  [line 58]
    •

  • Data type: mixed
    •

  • $topicdisplay =  [line 57]
    •

  • Data type: mixed
    •

  • $topicid =  [line 41]
    •

  • Data type: mixed
    •

  • $topicstable =  [line 60]
    •

  • Data type: mixed
    •

  • $type =  [line 55]
    •

  • Data type: mixed
    •

  • $uid =  [line 42]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:01:24 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsTopic

Class XoopsTopic

[line 36]

Location: /xoopstopic.php

Class Variable Summary

  • $mid =

  • $prefix =

  • $table =

  • $topic_id =

  • $topic_imgurl =

  • $topic_pid =

  • $topic_title =

  • $use_permission = false

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsTopic::XoopsTopic

XoopsTopic(

$table, [
$topicid = 0] );

    Parameters

    $table

    $topicid

    [ Top ]

    XoopsTopic::delete

delete(
 );

    [ Top ]

    XoopsTopic::getAllChildTopics

getAllChildTopics(
 );

    [ Top ]

    XoopsTopic::getAllChildTopicsId

getAllChildTopicsId(
 );

    [ Top ]

    XoopsTopic::getChildTopicsTreeArray

getChildTopicsTreeArray(
 );

    [ Top ]

    XoopsTopic::getFirstChildTopics

getFirstChildTopics(
 );

    [ Top ]

    XoopsTopic::getNiceTopicPathFromId

getNiceTopicPathFromId(

$funcURL );

    Parameters

    $funcURL

    [ Top ]

    XoopsTopic::getTopic

getTopic(

$topicid );

    Parameters

    $topicid

    [ Top ]

    XoopsTopic::getTopicsList

getTopicsList(
 );

    [ Top ]

    XoopsTopic::makeTopic

makeTopic(

$array );

    Parameters

    $array

    [ Top ]

    XoopsTopic::makeTopicSelBox

    makeTopicSelBox(
[
$none = 0], [
$seltopic = -1], [
$selname = ""], [
$onchange = ""] );

    Parameters

    $none

    $seltopic

    $selname

    $onchange

    [ Top ]

    XoopsTopic::prefix

prefix(
 );

    [ Top ]

    XoopsTopic::setTopicImgurl

setTopicImgurl(

$value );

    Parameters

    $value

    [ Top ]

    XoopsTopic::setTopicPid

setTopicPid(

$value );

    Parameters

    $value

    [ Top ]

    XoopsTopic::setTopicTitle

setTopicTitle(

$value );

    Parameters

    $value

    [ Top ]

    XoopsTopic::store

store(
 );

    [ Top ]

    XoopsTopic::topicExists

topicExists(

$pid,
$title );

    Parameters

    $pid

    $title

    [ Top ]

    XoopsTopic::topic_id

topic_id(
 );

    [ Top ]

    XoopsTopic::topic_imgurl

topic_imgurl(
[
$format = "S"] );

    Parameters

    $format

    [ Top ]

    XoopsTopic::topic_pid

topic_pid(
 );

    [ Top ]

    XoopsTopic::topic_title

topic_title(
[
$format = "S"] );

    Parameters

    $format

    [ Top ]

    XoopsTopic::usePermission

usePermission(

$mid );

    Parameters

    $mid

    [ Top ]

Variable Detail

  • $mid =  [line 45]
    •

  • Data type: mixed
    •

  • $prefix =  [line 43]
    •

  • Data type: mixed
    •

  • $table =  [line 38]
    •

  • Data type: mixed
    •

  • $topic_id =  [line 39]
    •

  • Data type: mixed
    •

  • $topic_imgurl =  [line 42]
    •

  • Data type: mixed
    •

  • $topic_pid =  [line 40]
    •

  • Data type: mixed
    •

  • $topic_title =  [line 41]
    •

  • Data type: mixed
    •

  • $use_permission = false [line 44]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:01:28 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsTree

Class XoopsTree

[line 32]

Location: /xoopstree.php

Class Variable Summary

  • $db =

  • $id =

  • $order =

  • $pid =

  • $table =

  • $title =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsTree::XoopsTree

XoopsTree(

$table_name,
$id_name,
$pid_name );

    Parameters

    $table_name

    $id_name

    $pid_name

    [ Top ]

    XoopsTree::getAllChild

    getAllChild(
[
$sel_id = 0], [
$order = ""], [
$parray = array()] );

    Parameters

    $sel_id

    $order

    $parray

    [ Top ]

    XoopsTree::getAllChildId

getAllChildId(

$sel_id, [
$order = ""], [
$idarray = array()] );

    Parameters

    $sel_id

    $order

    $idarray

    [ Top ]

    XoopsTree::getAllParentId

getAllParentId(

$sel_id, [
$order = ""], [
$idarray = array()] );

    Parameters

    $sel_id

    $order

    $idarray

    [ Top ]

    XoopsTree::getChildTreeArray

    getChildTreeArray(
[
$sel_id = 0], [
$order = ""], [
$parray = array()], [
$r_prefix = ""] );

    Parameters

    $sel_id

    $order

    $parray

    $r_prefix

    [ Top ]

    XoopsTree::getFirstChild

getFirstChild(

$sel_id, [
$order = ""] );

    Parameters

    $sel_id

    $order

    [ Top ]

    XoopsTree::getFirstChildId

getFirstChildId(

$sel_id );

    Parameters

    $sel_id

    [ Top ]

    XoopsTree::getIdPathFromId

getIdPathFromId(

$sel_id, [
$path = ""] );

    Parameters

    $sel_id

    $path

    [ Top ]

    XoopsTree::getNicePathFromId

getNicePathFromId(

$sel_id,
$title,
$funcURL, [
$path = ""] );

    Parameters

    $sel_id

    $title

    $funcURL

    $path

    [ Top ]

    XoopsTree::getPathFromId

getPathFromId(

$sel_id,
$title, [
$path = ""] );

    Parameters

    $sel_id

    $title

    $path

    [ Top ]

    XoopsTree::makeMySelBox

    makeMySelBox(

$title, [
$order = ""], [
$preset_id = 0], [
$none = 0], [
$sel_name = ""], [
$onchange = ""] );

    Parameters

    $title

    $order

    $preset_id

    $none

    $sel_name

    $onchange

    [ Top ]

Variable Detail

  • $db =  [line 39]
    •

  • Data type: mixed
    •

  • $id =  [line 35]
    •

  • Data type: mixed
    •

  • $order =  [line 37]
    •

  • Data type: mixed
    •

  • $pid =  [line 36]
    •

  • Data type: mixed
    •

  • $table =  [line 34]
    •

  • Data type: mixed
    •

  • $title =  [line 38]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:01:29 +0200 by phpDocumentor 1.4.0a2


Package PHPMailer Element Index

Element index for package PHPMailer

Indexes by package:
kernel
default
xos_kernel
class
Smarty
xos_opal
xos_logos
XOOPS
xoops20
kernal

Index of all elements
a b c d e f g h i l m n p q r s t u v w
top
a
$AltBody in file class.phpmailer.php, variable PHPMailer::$AltBody
Sets the text-only body of the message. This automatically sets the email to multipart/alternative. This body can be read by mail clients that do not have HTML email capability such as mutt. Clients that can read HTML will view the normal Body.
$attachment | in file class.phpmailer.php, variable PHPMailer::$attachment
AddAddress in file class.phpmailer.php, method PHPMailer::AddAddress()
Adds a "To" address.
AddAttachment in file class.phpmailer.php, method PHPMailer::AddAttachment()
Adds an attachment from a path on the filesystem.
AddBCC in file class.phpmailer.php, method PHPMailer::AddBCC()
Adds a "Bcc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
AddCC in file class.phpmailer.php, method PHPMailer::AddCC()
Adds a "Cc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
AddCustomHeader in file class.phpmailer.php, method PHPMailer::AddCustomHeader()
Adds a custom header.
AddEmbeddedImage in file class.phpmailer.php, method PHPMailer::AddEmbeddedImage()
Adds an embedded attachment. This can include images, sounds, and just about any other document. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif".
AddrAppend in file class.phpmailer.php, method PHPMailer::AddrAppend()
Creates recipient headers.
AddReplyTo in file class.phpmailer.php, method PHPMailer::AddReplyTo()
Adds a "Reply-to" address.
AddrFormat in file class.phpmailer.php, method PHPMailer::AddrFormat()
Formats an address correctly.
AddStringAttachment in file class.phpmailer.php, method PHPMailer::AddStringAttachment()
Adds a string or binary attachment (non-filesystem) to the list.
AttachAll in file class.phpmailer.php, method PHPMailer::AttachAll()
Attaches all fs, string, and binary attachments to the message.
Authenticate in file class.smtp.php, method SMTP::Authenticate()
Performs SMTP authentication. Must be run after running the Hello() method. Returns true if successfully authenticated.
top
b
$bcc | in file class.phpmailer.php, variable PHPMailer::$bcc
$Body in file class.phpmailer.php, variable PHPMailer::$Body
Sets the Body of the message. This can be either an HTML or text body.
$boundary | in file class.phpmailer.php, variable PHPMailer::$boundary
top
c
$cc | in file class.phpmailer.php, variable PHPMailer::$cc
$CharSet in file class.phpmailer.php, variable PHPMailer::$CharSet
Sets the CharSet of the message.
$ConfirmReadingTo in file class.phpmailer.php, variable PHPMailer::$ConfirmReadingTo
Sets the email address that a reading confirmation will be sent.
$ContentType in file class.phpmailer.php, variable PHPMailer::$ContentType
Sets the Content-type of the message.
$CRLF in file class.smtp.php, variable SMTP::$CRLF
SMTP reply line ending
$CustomHeader | in file class.phpmailer.php, variable PHPMailer::$CustomHeader
ClearAddresses in file class.phpmailer.php, method PHPMailer::ClearAddresses()
Clears all recipients assigned in the TO array. Returns void.
ClearAllRecipients in file class.phpmailer.php, method PHPMailer::ClearAllRecipients()
Clears all recipients assigned in the TO, CC and BCC array. Returns void.
ClearAttachments in file class.phpmailer.php, method PHPMailer::ClearAttachments()
Clears all previously set filesystem, string, and binary attachments. Returns void.
ClearBCCs in file class.phpmailer.php, method PHPMailer::ClearBCCs()
Clears all recipients assigned in the BCC array. Returns void.
ClearCCs in file class.phpmailer.php, method PHPMailer::ClearCCs()
Clears all recipients assigned in the CC array. Returns void.
ClearCustomHeaders in file class.phpmailer.php, method PHPMailer::ClearCustomHeaders()
Clears all custom headers. Returns void.
ClearReplyTos in file class.phpmailer.php, method PHPMailer::ClearReplyTos()
Clears all recipients assigned in the ReplyTo array. Returns void.
Close in file class.smtp.php, method SMTP::Close()
Closes the socket and cleans up the state of the class.
Connect in file class.smtp.php, method SMTP::Connect()
Connect to the server specified on the port specified.
Connected in file class.smtp.php, method SMTP::Connected()
Returns true if connected to a server otherwise false
CreateBody in file class.phpmailer.php, method PHPMailer::CreateBody()
Assembles the message body. Returns an empty string on failure.
CreateHeader in file class.phpmailer.php, method PHPMailer::CreateHeader()
Assembles message header.
class.phpmailer.php | procedural page class.phpmailer.php
class.smtp.php | procedural page class.smtp.php
top
d
$do_debug in file class.smtp.php, variable SMTP::$do_debug
Sets whether debugging is turned on
Data in file class.smtp.php, method SMTP::Data()
Issues a data command and sends the msg_data to the server
top
e
$Encoding in file class.phpmailer.php, variable PHPMailer::$Encoding
Sets the Encoding of the message. Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable".
$error | in file class.smtp.php, variable SMTP::$error
$ErrorInfo in file class.phpmailer.php, variable PHPMailer::$ErrorInfo
Holds the most recent mailer error message.
$error_count | in file class.phpmailer.php, variable PHPMailer::$error_count
EncodeFile in file class.phpmailer.php, method PHPMailer::EncodeFile()
Encodes attachment in requested format. Returns an empty string on failure.
EncodeHeader in file class.phpmailer.php, method PHPMailer::EncodeHeader()
Encode a header string to best of Q, B, quoted or none.
EncodeQ in file class.phpmailer.php, method PHPMailer::EncodeQ()
Encode string to q encoding.
EncodeQP in file class.phpmailer.php, method PHPMailer::EncodeQP()
Encode string to quoted-printable.
EncodeString in file class.phpmailer.php, method PHPMailer::EncodeString()
Encodes string to requested format. Returns an empty string on failure.
EndBoundary in file class.phpmailer.php, method PHPMailer::EndBoundary()
Returns the end of a message boundary.
Expand in file class.smtp.php, method SMTP::Expand()
Expand takes the name and asks the server to list all the people who are members of the _list_. Expand will return back and array of the result or false if an error occurs.
top
f
$From in file class.phpmailer.php, variable PHPMailer::$From
Sets the From email address for the message.
$FromName in file class.phpmailer.php, variable PHPMailer::$FromName
Sets the From name of the message.
FixEOL in file class.phpmailer.php, method PHPMailer::FixEOL()
Changes every end of line from CR or LF to CRLF.
top
g
GetBoundary in file class.phpmailer.php, method PHPMailer::GetBoundary()
Returns the start of a message boundary.
get_lines in file class.smtp.php, method SMTP::get_lines()
Read in as many lines as possible either before eof or socket timeout occurs on the operation.
top
h
$Helo in file class.phpmailer.php, variable PHPMailer::$Helo
Sets the SMTP HELO of the message (Default is $Hostname).
$helo_rply | in file class.smtp.php, variable SMTP::$helo_rply
$Host in file class.phpmailer.php, variable PHPMailer::$Host
Sets the SMTP hosts. All hosts must be separated by a semicolon. You can also specify a different port for each host by using this format: [hostname:port] (e.g. "smtp1.example.com:25;smtp2.example.com").
$Hostname in file class.phpmailer.php, variable PHPMailer::$Hostname
Sets the hostname to use in Message-Id and Received headers and as default HELO string. If empty, the value returned by SERVER_NAME is used or 'localhost.localdomain'.
HeaderLine in file class.phpmailer.php, method PHPMailer::HeaderLine()
Returns a formatted header line.
Hello in file class.smtp.php, method SMTP::Hello()
Sends the HELO command to the smtp server.
Help in file class.smtp.php, method SMTP::Help()
Gets help information on the keyword specified. If the keyword
top
i
InlineImageExists in file class.phpmailer.php, method PHPMailer::InlineImageExists()
Returns true if an inline attachment is present.
IsError in file class.phpmailer.php, method PHPMailer::IsError()
Returns true if an error occurred.
IsHTML in file class.phpmailer.php, method PHPMailer::IsHTML()
Sets message type to HTML.
IsMail in file class.phpmailer.php, method PHPMailer::IsMail()
Sets Mailer to send message using PHP mail() function.
IsQmail in file class.phpmailer.php, method PHPMailer::IsQmail()
Sets Mailer to send message using the qmail MTA.
IsSendmail in file class.phpmailer.php, method PHPMailer::IsSendmail()
Sets Mailer to send message using the $Sendmail program.
IsSMTP in file class.phpmailer.php, method PHPMailer::IsSMTP()
Sets Mailer to send message using SMTP.
top
l
$language | in file class.phpmailer.php, variable PHPMailer::$language
$LE | in file class.phpmailer.php, variable PHPMailer::$LE
Lang in file class.phpmailer.php, method PHPMailer::Lang()
Returns a message in the appropriate language.
top
m
$Mailer in file class.phpmailer.php, variable PHPMailer::$Mailer
Method to send mail: ("mail", "sendmail", or "smtp").
$message_type | in file class.phpmailer.php, variable PHPMailer::$message_type
Mail in file class.smtp.php, method SMTP::Mail()
Starts a mail transaction from the email address specified in $from. Returns true if successful or false otherwise. If True the mail transaction is started and then one or more Recipient commands may be called followed by a Data command.
MailSend in file class.phpmailer.php, method PHPMailer::MailSend()
Sends mail using the PHP mail() function.
top
n
Noop in file class.smtp.php, method SMTP::Noop()
Sends the command NOOP to the SMTP server.
top
p
$Password in file class.phpmailer.php, variable PHPMailer::$Password
Sets SMTP password.
$PluginDir in file class.phpmailer.php, variable PHPMailer::$PluginDir
Path to PHPMailer plugins. This is now only useful if the SMTP class is in a different directory than the PHP include path.
$Port in file class.phpmailer.php, variable PHPMailer::$Port
Sets the default SMTP server port.
$Priority in file class.phpmailer.php, variable PHPMailer::$Priority
Email priority (1 = High, 3 = Normal, 5 = low).
PHPMailer in file class.phpmailer.php, class PHPMailer
PHPMailer - PHP email transport class
top
q
Quit in file class.smtp.php, method SMTP::Quit()
Sends the quit command to the server and then closes the socket if there is no error or the $close_on_error argument is true.
top
r
$ReplyTo | in file class.phpmailer.php, variable PHPMailer::$ReplyTo
Recipient in file class.smtp.php, method SMTP::Recipient()
Sends the command RCPT to the SMTP server with the TO: argument of $to.
Reset in file class.smtp.php, method SMTP::Reset()
Sends the RSET command to abort and transaction that is currently in progress. Returns true if successful false otherwise.
RFCDate in file class.phpmailer.php, method PHPMailer::RFCDate()
Returns the proper RFC 822 formatted date.
top
s
$Sender in file class.phpmailer.php, variable PHPMailer::$Sender
Sets the Sender email (Return-Path) of the message. If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
$Sendmail in file class.phpmailer.php, variable PHPMailer::$Sendmail
Sets the path of the sendmail program.
$smtp | in file class.phpmailer.php, variable PHPMailer::$smtp
$SMTPAuth in file class.phpmailer.php, variable PHPMailer::$SMTPAuth
Sets SMTP authentication. Utilizes the Username and Password variables.
$SMTPDebug in file class.phpmailer.php, variable PHPMailer::$SMTPDebug
Sets SMTP class debugging on or off.
$SMTPKeepAlive in file class.phpmailer.php, variable PHPMailer::$SMTPKeepAlive
Prevents the SMTP connection from being closed after each mail sending. If this is set to true then to close the connection requires an explicit call to SmtpClose().
$smtp_conn | in file class.smtp.php, variable SMTP::$smtp_conn
$SMTP_PORT in file class.smtp.php, variable SMTP::$SMTP_PORT
SMTP server port
$Subject in file class.phpmailer.php, variable PHPMailer::$Subject
Sets the Subject of the message.
Send in file class.phpmailer.php, method PHPMailer::Send()
Creates message and assigns Mailer. If the message is not sent successfully then it returns false. Use the ErrorInfo variable to view description of the error.
Send in file class.smtp.php, method SMTP::Send()
Starts a mail transaction from the email address specified in
SendAndMail in file class.smtp.php, method SMTP::SendAndMail()
Starts a mail transaction from the email address specified in
SendHello in file class.smtp.php, method SMTP::SendHello()
Sends a HELO/EHLO command.
SendmailSend in file class.phpmailer.php, method PHPMailer::SendmailSend()
Sends mail using the $Sendmail program.
SendOrMail in file class.smtp.php, method SMTP::SendOrMail()
Starts a mail transaction from the email address specified in
ServerHostname in file class.phpmailer.php, method PHPMailer::ServerHostname()
Returns the server hostname or 'localhost.localdomain' if unknown.
ServerVar in file class.phpmailer.php, method PHPMailer::ServerVar()
Returns the appropriate server variable. Should work with both PHP 4.1.0+ as well as older versions. Returns an empty string if nothing is found.
SetError in file class.phpmailer.php, method PHPMailer::SetError()
Adds the error message to the error container.
SetLanguage in file class.phpmailer.php, method PHPMailer::SetLanguage()
Sets the language for all class error messages. Returns false if it cannot load the language file. The default language type is English.
SetMessageType in file class.phpmailer.php, method PHPMailer::SetMessageType()
Sets the message type.
SetWordWrap in file class.phpmailer.php, method PHPMailer::SetWordWrap()
Set the body wrapping.
SMTP in file class.smtp.php, class SMTP
SMTP is rfc 821 compliant and implements all the rfc 821 SMTP commands except TURN which will always return a not implemented error. SMTP also provides some utility methods for sending mail to an SMTP server.
SMTP in file class.smtp.php, method SMTP::SMTP()
Initialize the class so that the data is in a known state.
SmtpClose in file class.phpmailer.php, method PHPMailer::SmtpClose()
Closes the active SMTP session if one exists.
SmtpConnect in file class.phpmailer.php, method PHPMailer::SmtpConnect()
Initiates a connection to an SMTP server. Returns false if the operation failed.
SmtpSend in file class.phpmailer.php, method PHPMailer::SmtpSend()
Sends mail via SMTP using PhpSMTP (Author: Chris Ryan). Returns bool. Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
top
t
$Timeout in file class.phpmailer.php, variable PHPMailer::$Timeout
Sets the SMTP server timeout in seconds. This function will not work with the win32 version.
$to | in file class.phpmailer.php, variable PHPMailer::$to
TextLine in file class.phpmailer.php, method PHPMailer::TextLine()
Returns a formatted mail line.
Turn in file class.smtp.php, method SMTP::Turn()
This is an optional command for SMTP that this class does not support. This method is here to make the RFC821 Definition complete for this class and __may__ be implimented in the future
top
u
$Username in file class.phpmailer.php, variable PHPMailer::$Username
Sets SMTP username.
top
v
$Version in file class.phpmailer.php, variable PHPMailer::$Version
Holds PHPMailer version.
Verify in file class.smtp.php, method SMTP::Verify()
Verifies that the name is recognized by the server.
top
w
$WordWrap in file class.phpmailer.php, variable PHPMailer::$WordWrap
Sets word wrapping on the body of the message to a given number of characters.
WrapText in file class.phpmailer.php, method PHPMailer::WrapText()
Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable.


Class Trees for Package PHPMailer

Documentation generated on Tue, 28 Aug 2007 22:56:21 +0200 by phpDocumentor 1.4.0a2


Docs for page class.phpmailer.php

File: /mail/phpmailer/class.phpmailer.php

filesource

Source Code for this file

Classes in this file:
PHPMailer
PHPMailer - PHP email transport class

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:56:47 +0200 by phpDocumentor 1.4.0a2


Docs for page class.smtp.php

File: /mail/phpmailer/class.smtp.php

filesource

Source Code for this file

Classes in this file:
SMTP
SMTP is rfc 821 compliant and implements all the rfc 821 SMTP commands except TURN which will always return a not implemented error. SMTP also provides some utility methods for sending mail to an SMTP server.

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:01 +0200 by phpDocumentor 1.4.0a2


File Source for class.phpmailer.php

Source for file class.phpmailer.php

Documentation is available at class.phpmailer.php

  • <?php
    •

  • ////////////////////////////////////////////////////
    •

  • // PHPMailer - PHP email class
    •

  • //
    •

  • // Class for sending email using either
    •

  • // sendmail, PHP mail(), or SMTP.  Methods are
    •

  • // based upon the standard AspEmail(tm) classes.
    •

  • //
    •

  • // Copyright (C) 2001 - 2003  Brent R. Matzelle
    •

  • //
    •

  • // License: LGPL, see LICENSE
    •

  • ////////////////////////////////////////////////////
    •

  •
    •

  • /**
    •

  •  * PHPMailer - PHP email transport class
    •

  •  * @package PHPMailer
    •

  •  * @author Brent R. Matzelle
    •

  •  * @copyright 2001 - 2003 Brent R. Matzelle
    •

  •  */
    •

  • class PHPMailer
    •

  • {
    •

  •     /////////////////////////////////////////////////
    •

  •     // PUBLIC VARIABLES
    •

  •     /////////////////////////////////////////////////
    •

  •
    •

  •     /**
    •

  •      * Email priority (1 = High, 3 = Normal, 5 = low).
    •

  •      * @var int
    •

  •      */
    •

  •     var $Priority          = 3;
    •

  •
    •

  •     /**
    •

  •      * Sets the CharSet of the message.
    •

  •      * @var string
    •

  •      */
    •

  •     var $CharSet           = "iso-8859-1";
    •

  •
    •

  •     /**
    •

  •      * Sets the Content-type of the message.
    •

  •      * @var string
    •

  •      */
    •

  •     var $ContentType        = "text/plain";
    •

  •
    •

  •     /**
    •

  •      * Sets the Encoding of the message. Options for this are "8bit",
    •

  •      * "7bit", "binary", "base64", and "quoted-printable".
    •

  •      * @var string
    •

  •      */
    •

  •     var $Encoding          = "8bit";
    •

  •
    •

  •     /**
    •

  •      * Holds the most recent mailer error message.
    •

  •      * @var string
    •

  •      */
    •

  •     var $ErrorInfo         = "";
    •

  •
    •

  •     /**
    •

  •      * Sets the From email address for the message.
    •

  •      * @var string
    •

  •      */
    •

  •     var $From               = "root@localhost";
    •

  •
    •

  •     /**
    •

  •      * Sets the From name of the message.
    •

  •      * @var string
    •

  •      */
    •

  •     var $FromName           = "Root User";
    •

  •
    •

  •     /**
    •

  •      * Sets the Sender email (Return-Path) of the message.  If not empty,
    •

  •      * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
    •

  •      * @var string
    •

  •      */
    •

  •     var $Sender            = "";
    •

  •
    •

  •     /**
    •

  •      * Sets the Subject of the message.
    •

  •      * @var string
    •

  •      */
    •

  •     var $Subject           = "";
    •

  •
    •

  •     /**
    •

  •      * Sets the Body of the message.  This can be either an HTML or text body.
    •

  •      * If HTML then run IsHTML(true).
    •

  •      * @var string
    •

  •      */
    •

  •     var $Body               = "";
    •

  •
    •

  •     /**
    •

  •      * Sets the text-only body of the message.  This automatically sets the
    •

  •      * email to multipart/alternative.  This body can be read by mail
    •

  •      * clients that do not have HTML email capability such as mutt. Clients
    •

  •      * that can read HTML will view the normal Body.
    •

  •      * @var string
    •

  •      */
    •

  •     var $AltBody           = "";
    •

  •
    •

  •     /**
    •

  •      * Sets word wrapping on the body of the message to a given number of
    •

  •      * characters.
    •

  •      * @var int
    •

  •      */
    •

  •     var $WordWrap          = 0;
    •

  •
    •

  •     /**
    •

  •      * Method to send mail: ("mail", "sendmail", or "smtp").
    •

  •      * @var string
    •

  •      */
    •

  •     var $Mailer            = "mail";
    •

  •
    •

  •     /**
    •

  •      * Sets the path of the sendmail program.
    •

  •      * @var string
    •

  •      */
    •

  •     var $Sendmail          = "/usr/sbin/sendmail";
    •

  •
    •

  •     /**
    •

  •      * Path to PHPMailer plugins.  This is now only useful if the SMTP class
    •

  •      * is in a different directory than the PHP include path.
    •

  •      * @var string
    •

  •      */
    •

  •     var $PluginDir         = "";
    •

  •
    •

  •     /**
    •

  •      *  Holds PHPMailer version.
    •

  •      *  @var string
    •

  •      */
    •

  •     var $Version           = "1.73";
    •

  •
    •

  •     /**
    •

  •      * Sets the email address that a reading confirmation will be sent.
    •

  •      * @var string
    •

  •      */
    •

  •     var $ConfirmReadingTo  = "";
    •

  •
    •

  •     /**
    •

  •      *  Sets the hostname to use in Message-Id and Received headers
    •

  •      *  and as default HELO string. If empty, the value returned
    •

  •      *  by SERVER_NAME is used or 'localhost.localdomain'.
    •

  •      *  @var string
    •

  •      */
    •

  •     var $Hostname          = "";
    •

  •
    •

  •     /////////////////////////////////////////////////
    •

  •     // SMTP VARIABLES
    •

  •     /////////////////////////////////////////////////
    •

  •
    •

  •     /**
    •

  •      *  Sets the SMTP hosts.  All hosts must be separated by a
    •

  •      *  semicolon.  You can also specify a different port
    •

  •      *  for each host by using this format: [hostname:port]
    •

  •      *  (e.g. "smtp1.example.com:25;smtp2.example.com").
    •

  •      *  Hosts will be tried in order.
    •

  •      *  @var string
    •

  •      */
    •

  •     var $Host        = "localhost";
    •

  •
    •

  •     /**
    •

  •      *  Sets the default SMTP server port.
    •

  •      *  @var int
    •

  •      */
    •

  •     var $Port        = 25;
    •

  •
    •

  •     /**
    •

  •      *  Sets the SMTP HELO of the message (Default is $Hostname).
    •

  •      *  @var string
    •

  •      */
    •

  •     var $Helo        = "";
    •

  •
    •

  •     /**
    •

  •      *  Sets SMTP authentication. Utilizes the Username and Password variables.
    •

  •      *  @var bool
    •

  •      */
    •

  •     var $SMTPAuth     = false;
    •

  •
    •

  •     /**
    •

  •      *  Sets SMTP username.
    •

  •      *  @var string
    •

  •      */
    •

  •     var $Username     = "";
    •

  •
    •

  •     /**
    •

  •      *  Sets SMTP password.
    •

  •      *  @var string
    •

  •      */
    •

  •     var $Password     = "";
    •

  •
    •

  •     /**
    •

  •      *  Sets the SMTP server timeout in seconds. This function will not
    •

  •      *  work with the win32 version.
    •

  •      *  @var int
    •

  •      */
    •

  •     var $Timeout      = 10;
    •

  •
    •

  •     /**
    •

  •      *  Sets SMTP class debugging on or off.
    •

  •      *  @var bool
    •

  •      */
    •

  •     var $SMTPDebug    = false;
    •

  •
    •

  •     /**
    •

  •      * Prevents the SMTP connection from being closed after each mail
    •

  •      * sending.  If this is set to true then to close the connection
    •

  •      * requires an explicit call to SmtpClose().
    •

  •      * @var bool
    •

  •      */
    •

  •     var $SMTPKeepAlive = false;
    •

  •
    •

  •     /**#@+
    •

  •      * @access private
    •

  •      */
    •

  •     var $smtp            = NULL;
    •

  •     var $to              = array();
    •

  •     var $cc              = array();
    •

  •     var $bcc             = array();
    •

  •     var $ReplyTo         = array();
    •

  •     var $attachment      = array();
    •

  •     var $CustomHeader    = array();
    •

  •     var $message_type    = "";
    •

  •     var $boundary        = array();
    •

  •     var $language        = array();
    •

  •     var $error_count     = 0;
    •

  •     var $LE              = "\n";
    •

  •     /**#@-*/
    •

  •
    •

  •     /////////////////////////////////////////////////
    •

  •     // VARIABLE METHODS
    •

  •     /////////////////////////////////////////////////
    •

  •
    •

  •     /**
    •

  •      * Sets message type to HTML.
    •

  •      * @param bool $bool
    •

  •      * @return void
    •

  •      */
    •

  •     function IsHTML($bool) {
    •

  •         if($bool == true)
    •

  •             $this->ContentType = "text/html";
    •

  •         else
    •

  •             $this->ContentType = "text/plain";
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sets Mailer to send message using SMTP.
    •

  •      * @return void
    •

  •      */
    •

  •     function IsSMTP() {
    •

  •         $this->Mailer = "smtp";
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sets Mailer to send message using PHP mail() function.
    •

  •      * @return void
    •

  •      */
    •

  •     function IsMail() {
    •

  •         $this->Mailer = "mail";
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sets Mailer to send message using the $Sendmail program.
    •

  •      * @return void
    •

  •      */
    •

  •     function IsSendmail() {
    •

  •         $this->Mailer = "sendmail";
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sets Mailer to send message using the qmail MTA.
    •

  •      * @return void
    •

  •      */
    •

  •     function IsQmail() {
    •

  •         $this->Sendmail = "/var/qmail/bin/sendmail";
    •

  •         $this->Mailer = "sendmail";
    •

  •     }
    •

  •
    •

  •
    •

  •     /////////////////////////////////////////////////
    •

  •     // RECIPIENT METHODS
    •

  •     /////////////////////////////////////////////////
    •

  •
    •

  •     /**
    •

  •      * Adds a "To" address.
    •

  •      * @param string $address
    •

  •      * @param string $name
    •

  •      * @return void
    •

  •      */
    •

  •     function AddAddress($address, $name = "") {
    •

  •         $cur = count($this->to);
    •

  •         $this->to[$cur][0] = trim($address);
    •

  •         $this->to[$cur][1] = $name;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Adds a "Cc" address. Note: this function works
    •

  •      * with the SMTP mailer on win32, not with the "mail"
    •

  •      * mailer.
    •

  •      * @param string $address
    •

  •      * @param string $name
    •

  •      * @return void
    •

  •     */
    •

  •     function AddCC($address, $name = "") {
    •

  •         $cur = count($this->cc);
    •

  •         $this->cc[$cur][0] = trim($address);
    •

  •         $this->cc[$cur][1] = $name;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Adds a "Bcc" address. Note: this function works
    •

  •      * with the SMTP mailer on win32, not with the "mail"
    •

  •      * mailer.
    •

  •      * @param string $address
    •

  •      * @param string $name
    •

  •      * @return void
    •

  •      */
    •

  •     function AddBCC($address, $name = "") {
    •

  •         $cur = count($this->bcc);
    •

  •         $this->bcc[$cur][0] = trim($address);
    •

  •         $this->bcc[$cur][1] = $name;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Adds a "Reply-to" address.
    •

  •      * @param string $address
    •

  •      * @param string $name
    •

  •      * @return void
    •

  •      */
    •

  •     function AddReplyTo($address, $name = "") {
    •

  •         $cur = count($this->ReplyTo);
    •

  •         $this->ReplyTo[$cur][0] = trim($address);
    •

  •         $this->ReplyTo[$cur][1] = $name;
    •

  •     }
    •

  •
    •

  •
    •

  •     /////////////////////////////////////////////////
    •

  •     // MAIL SENDING METHODS
    •

  •     /////////////////////////////////////////////////
    •

  •
    •

  •     /**
    •

  •      * Creates message and assigns Mailer. If the message is
    •

  •      * not sent successfully then it returns false.  Use the ErrorInfo
    •

  •      * variable to view description of the error.
    •

  •      * @return bool
    •

  •      */
    •

  •     function Send() {
    •

  •         $header = "";
    •

  •         $body = "";
    •

  •         $result = true;
    •

  •
    •

  •         if((count($this->to) + count($this->cc) + count($this->bcc)) < 1)
    •

  •         {
    •

  •             $this->SetError($this->Lang("provide_address"));
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         // Set whether the message is multipart/alternative
    •

  •         if(!empty($this->AltBody))
    •

  •             $this->ContentType = "multipart/alternative";
    •

  •
    •

  •         $this->error_count = 0; // reset errors
    •

  •         $this->SetMessageType();
    •

  •         $header .= $this->CreateHeader();
    •

  •         $body = $this->CreateBody();
    •

  •
    •

  •         if($body == "") { return false; }
    •

  •
    •

  •         // Choose the mailer
    •

  •         switch($this->Mailer)
    •

  •         {
    •

  •             case "sendmail":
    •

  •                 $result = $this->SendmailSend($header, $body);
    •

  •                 break;
    •

  •             case "mail":
    •

  •                 $result = $this->MailSend($header, $body);
    •

  •                 break;
    •

  •             case "smtp":
    •

  •                 $result = $this->SmtpSend($header, $body);
    •

  •                 break;
    •

  •             default:
    •

  •             $this->SetError($this->Mailer . $this->Lang("mailer_not_supported"));
    •

  •                 $result = false;
    •

  •                 break;
    •

  •         }
    •

  •
    •

  •         return $result;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sends mail using the $Sendmail program.
    •

  •      * @access private
    •

  •      * @return bool
    •

  •      */
    •

  •     function SendmailSend($header, $body) {
    •

  •         if ($this->Sender != "")
    •

  •             $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
    •

  •         else
    •

  •             $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail));
    •

  •
    •

  •         if(!@$mail = popen($sendmail, "w"))
    •

  •         {
    •

  •             $this->SetError($this->Lang("execute") . $this->Sendmail);
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         fputs($mail, $header);
    •

  •         fputs($mail, $body);
    •

  •
    •

  •         $result = pclose($mail) >> 8 & 0xFF;
    •

  •         if($result != 0)
    •

  •         {
    •

  •             $this->SetError($this->Lang("execute") . $this->Sendmail);
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sends mail using the PHP mail() function.
    •

  •      * @access private
    •

  •      * @return bool
    •

  •      */
    •

  •     function MailSend($header, $body) {
    •

  •         $to = "";
    •

  •         for($i = 0; $i < count($this->to); $i++)
    •

  •         {
    •

  •             if($i != 0) { $to .= ", "; }
    •

  •             $to .= $this->to[$i][0];
    •

  •         }
    •

  •
    •

  •         if ($this->Sender != "" && strlen(ini_get("safe_mode"))< 1)
    •

  •         {
    •

  •             $old_from = ini_get("sendmail_from");
    •

  •             ini_set("sendmail_from", $this->Sender);
    •

  •             $params = sprintf("-oi -f %s", $this->Sender);
    •

  •             $rt = @mail($to, $this->EncodeHeader($this->Subject), $body,
    •

  •                         $header, $params);
    •

  •         }
    •

  •         else
    •

  •             $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header);
    •

  •
    •

  •         if (isset($old_from))
    •

  •             ini_set("sendmail_from", $old_from);
    •

  •
    •

  •         if(!$rt)
    •

  •         {
    •

  •             $this->SetError($this->Lang("instantiate"));
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sends mail via SMTP using PhpSMTP (Author:
    •

  •      * Chris Ryan).  Returns bool.  Returns false if there is a
    •

  •      * bad MAIL FROM, RCPT, or DATA input.
    •

  •      * @access private
    •

  •      * @return bool
    •

  •      */
    •

  •     function SmtpSend($header, $body) {
    •

  •         include_once($this->PluginDir . "class.smtp.php");
    •

  •         $error = "";
    •

  •         $bad_rcpt = array();
    •

  •
    •

  •         if(!$this->SmtpConnect())
    •

  •             return false;
    •

  •
    •

  •         $smtp_from = ($this->Sender == "") ? $this->From : $this->Sender;
    •

  •         if(!$this->smtp->Mail($smtp_from))
    •

  •         {
    •

  •             $error = $this->Lang("from_failed") . $smtp_from;
    •

  •             $this->SetError($error);
    •

  •             $this->smtp->Reset();
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         // Attempt to send attach all recipients
    •

  •         for($i = 0; $i < count($this->to); $i++)
    •

  •         {
    •

  •             if(!$this->smtp->Recipient($this->to[$i][0]))
    •

  •                 $bad_rcpt[] = $this->to[$i][0];
    •

  •         }
    •

  •         for($i = 0; $i < count($this->cc); $i++)
    •

  •         {
    •

  •             if(!$this->smtp->Recipient($this->cc[$i][0]))
    •

  •                 $bad_rcpt[] = $this->cc[$i][0];
    •

  •         }
    •

  •         for($i = 0; $i < count($this->bcc); $i++)
    •

  •         {
    •

  •             if(!$this->smtp->Recipient($this->bcc[$i][0]))
    •

  •                 $bad_rcpt[] = $this->bcc[$i][0];
    •

  •         }
    •

  •
    •

  •         if(count($bad_rcpt) > 0) // Create error message
    •

  •         {
    •

  •             for($i = 0; $i < count($bad_rcpt); $i++)
    •

  •             {
    •

  •                 if($i != 0) { $error .= ", "; }
    •

  •                 $error .= $bad_rcpt[$i];
    •

  •             }
    •

  •             $error = $this->Lang("recipients_failed") . $error;
    •

  •             $this->SetError($error);
    •

  •             $this->smtp->Reset();
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         if(!$this->smtp->Data($header . $body))
    •

  •         {
    •

  •             $this->SetError($this->Lang("data_not_accepted"));
    •

  •             $this->smtp->Reset();
    •

  •             return false;
    •

  •         }
    •

  •         if($this->SMTPKeepAlive == true)
    •

  •             $this->smtp->Reset();
    •

  •         else
    •

  •             $this->SmtpClose();
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Initiates a connection to an SMTP server.  Returns false if the
    •

  •      * operation failed.
    •

  •      * @access private
    •

  •      * @return bool
    •

  •      */
    •

  •     function SmtpConnect() {
    •

  •         if($this->smtp == NULL) { $this->smtp = new SMTP(); }
    •

  •
    •

  •         $this->smtp->do_debug = $this->SMTPDebug;
    •

  •         $hosts = explode(";", $this->Host);
    •

  •         $index = 0;
    •

  •         $connection = ($this->smtp->Connected());
    •

  •
    •

  •         // Retry while there is no connection
    •

  •         while($index < count($hosts) && $connection == false)
    •

  •         {
    •

  •             if(strstr($hosts[$index], ":"))
    •

  •                 list($host, $port) = explode(":", $hosts[$index]);
    •

  •             else
    •

  •             {
    •

  •                 $host = $hosts[$index];
    •

  •                 $port = $this->Port;
    •

  •             }
    •

  •
    •

  •             if($this->smtp->Connect($host, $port, $this->Timeout))
    •

  •             {
    •

  •                 if ($this->Helo != '')
    •

  •                     $this->smtp->Hello($this->Helo);
    •

  •                 else
    •

  •                     $this->smtp->Hello($this->ServerHostname());
    •

  •
    •

  •                 if($this->SMTPAuth)
    •

  •                 {
    •

  •                     if(!$this->smtp->Authenticate($this->Username,
    •

  •                                                   $this->Password))
    •

  •                     {
    •

  •                         $this->SetError($this->Lang("authenticate"));
    •

  •                         $this->smtp->Reset();
    •

  •                         $connection = false;
    •

  •                     }
    •

  •                 }
    •

  •                 $connection = true;
    •

  •             }
    •

  •             $index++;
    •

  •         }
    •

  •         if(!$connection)
    •

  •             $this->SetError($this->Lang("connect_host"));
    •

  •
    •

  •         return $connection;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Closes the active SMTP session if one exists.
    •

  •      * @return void
    •

  •      */
    •

  •     function SmtpClose() {
    •

  •         if($this->smtp != NULL)
    •

  •         {
    •

  •             if($this->smtp->Connected())
    •

  •             {
    •

  •                 $this->smtp->Quit();
    •

  •                 $this->smtp->Close();
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sets the language for all class error messages.  Returns false
    •

  •      * if it cannot load the language file.  The default language type
    •

  •      * is English.
    •

  •      * @param string $lang_type Type of language (e.g. Portuguese: "br")
    •

  •      * @param string $lang_path Path to the language file directory
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function SetLanguage($lang_type, $lang_path = "language/") {
    •

  •         if(file_exists($lang_path.'phpmailer.lang-'.$lang_type.'.php'))
    •

  •             include($lang_path.'phpmailer.lang-'.$lang_type.'.php');
    •

  •         else if(file_exists($lang_path.'phpmailer.lang-en.php'))
    •

  •             include($lang_path.'phpmailer.lang-en.php');
    •

  •         else
    •

  •         {
    •

  •             $this->SetError("Could not load language file");
    •

  •             return false;
    •

  •         }
    •

  •         $this->language = $PHPMAILER_LANG;
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /////////////////////////////////////////////////
    •

  •     // MESSAGE CREATION METHODS
    •

  •     /////////////////////////////////////////////////
    •

  •
    •

  •     /**
    •

  •      * Creates recipient headers.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function AddrAppend($type, $addr) {
    •

  •         $addr_str = $type . ": ";
    •

  •         $addr_str .= $this->AddrFormat($addr[0]);
    •

  •         if(count($addr) > 1)
    •

  •         {
    •

  •             for($i = 1; $i < count($addr); $i++)
    •

  •                 $addr_str .= ", " . $this->AddrFormat($addr[$i]);
    •

  •         }
    •

  •         $addr_str .= $this->LE;
    •

  •
    •

  •         return $addr_str;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Formats an address correctly.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function AddrFormat($addr) {
    •

  •         if(empty($addr[1]))
    •

  •             $formatted = $addr[0];
    •

  •         else
    •

  •         {
    •

  •             $formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" .
    •

  •                          $addr[0] . ">";
    •

  •         }
    •

  •
    •

  •         return $formatted;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Wraps message for use with mailers that do not
    •

  •      * automatically perform wrapping and for quoted-printable.
    •

  •      * Original written by philippe.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function WrapText($message, $length, $qp_mode = false) {
    •

  •         $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE;
    •

  •
    •

  •         $message = $this->FixEOL($message);
    •

  •         if (substr($message, -1) == $this->LE)
    •

  •             $message = substr($message, 0, -1);
    •

  •
    •

  •         $line = explode($this->LE, $message);
    •

  •         $message = "";
    •

  •         for ($i=0 ;$i < count($line); $i++)
    •

  •         {
    •

  •           $line_part = explode(" ", $line[$i]);
    •

  •           $buf = "";
    •

  •           for ($e = 0; $e<count($line_part); $e++)
    •

  •           {
    •

  •               $word = $line_part[$e];
    •

  •               if ($qp_mode and (strlen($word) > $length))
    •

  •               {
    •

  •                 $space_left = $length - strlen($buf) - 1;
    •

  •                 if ($e != 0)
    •

  •                 {
    •

  •                     if ($space_left > 20)
    •

  •                     {
    •

  •                         $len = $space_left;
    •

  •                         if (substr($word, $len - 1, 1) == "=")
    •

  •                           $len--;
    •

  •                         elseif (substr($word, $len - 2, 1) == "=")
    •

  •                           $len -= 2;
    •

  •                         $part = substr($word, 0, $len);
    •

  •                         $word = substr($word, $len);
    •

  •                         $buf .= " " . $part;
    •

  •                         $message .= $buf . sprintf("=%s", $this->LE);
    •

  •                     }
    •

  •                     else
    •

  •                     {
    •

  •                         $message .= $buf . $soft_break;
    •

  •                     }
    •

  •                     $buf = "";
    •

  •                 }
    •

  •                 while (strlen($word) > 0)
    •

  •                 {
    •

  •                     $len = $length;
    •

  •                     if (substr($word, $len - 1, 1) == "=")
    •

  •                         $len--;
    •

  •                     elseif (substr($word, $len - 2, 1) == "=")
    •

  •                         $len -= 2;
    •

  •                     $part = substr($word, 0, $len);
    •

  •                     $word = substr($word, $len);
    •

  •
    •

  •                     if (strlen($word) > 0)
    •

  •                         $message .= $part . sprintf("=%s", $this->LE);
    •

  •                     else
    •

  •                         $buf = $part;
    •

  •                 }
    •

  •               }
    •

  •               else
    •

  •               {
    •

  •                 $buf_o = $buf;
    •

  •                 $buf .= ($e == 0) ? $word : (" " . $word);
    •

  •
    •

  •                 if (strlen($buf) > $length and $buf_o != "")
    •

  •                 {
    •

  •                     $message .= $buf_o . $soft_break;
    •

  •                     $buf = $word;
    •

  •                 }
    •

  •               }
    •

  •           }
    •

  •           $message .= $buf . $this->LE;
    •

  •         }
    •

  •
    •

  •         return $message;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Set the body wrapping.
    •

  •      * @access private
    •

  •      * @return void
    •

  •      */
    •

  •     function SetWordWrap() {
    •

  •         if($this->WordWrap < 1)
    •

  •             return;
    •

  •
    •

  •         switch($this->message_type)
    •

  •         {
    •

  •            case "alt":
    •

  •               // fall through
    •

  •            case "alt_attachments":
    •

  •               $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap);
    •

  •               break;
    •

  •            default:
    •

  •               $this->Body = $this->WrapText($this->Body, $this->WordWrap);
    •

  •               break;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Assembles message header.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function CreateHeader() {
    •

  •         $result = "";
    •

  •
    •

  •         // Set the boundaries
    •

  •         $uniq_id = md5(uniqid(time()));
    •

  •         $this->boundary[1] = "b1_" . $uniq_id;
    •

  •         $this->boundary[2] = "b2_" . $uniq_id;
    •

  •
    •

  •         $result .= $this->HeaderLine("Date", $this->RFCDate());
    •

  •         if($this->Sender == "")
    •

  •             $result .= $this->HeaderLine("Return-Path", trim($this->From));
    •

  •         else
    •

  •             $result .= $this->HeaderLine("Return-Path", trim($this->Sender));
    •

  •
    •

  •         // To be created automatically by mail()
    •

  •         if($this->Mailer != "mail")
    •

  •         {
    •

  •             if(count($this->to) > 0)
    •

  •                 $result .= $this->AddrAppend("To", $this->to);
    •

  •             else if (count($this->cc) == 0)
    •

  •                 $result .= $this->HeaderLine("To", "undisclosed-recipients:;");
    •

  •             if(count($this->cc) > 0)
    •

  •                 $result .= $this->AddrAppend("Cc", $this->cc);
    •

  •         }
    •

  •
    •

  •         $from = array();
    •

  •         $from[0][0] = trim($this->From);
    •

  •         $from[0][1] = $this->FromName;
    •

  •         $result .= $this->AddrAppend("From", $from);
    •

  •
    •

  •         // sendmail and mail() extract Bcc from the header before sending
    •

  •         if((($this->Mailer == "sendmail") || ($this->Mailer == "mail")) && (count($this->bcc) > 0))
    •

  •             $result .= $this->AddrAppend("Bcc", $this->bcc);
    •

  •
    •

  •         if(count($this->ReplyTo) > 0)
    •

  •             $result .= $this->AddrAppend("Reply-to", $this->ReplyTo);
    •

  •
    •

  •         // mail() sets the subject itself
    •

  •         if($this->Mailer != "mail")
    •

  •             $result .= $this->HeaderLine("Subject", $this->EncodeHeader(trim($this->Subject)));
    •

  •
    •

  •         $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE);
    •

  •         $result .= $this->HeaderLine("X-Priority", $this->Priority);
    •

  •         $result .= $this->HeaderLine("X-Mailer", "PHPMailer [version " . $this->Version . "]");
    •

  •
    •

  •         if($this->ConfirmReadingTo != "")
    •

  •         {
    •

  •             $result .= $this->HeaderLine("Disposition-Notification-To",
    •

  •                        "<" . trim($this->ConfirmReadingTo) . ">");
    •

  •         }
    •

  •
    •

  •         // Add custom headers
    •

  •         for($index = 0; $index < count($this->CustomHeader); $index++)
    •

  •         {
    •

  •             $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]),
    •

  •                        $this->EncodeHeader(trim($this->CustomHeader[$index][1])));
    •

  •         }
    •

  •         $result .= $this->HeaderLine("MIME-Version", "1.0");
    •

  •
    •

  •         switch($this->message_type)
    •

  •         {
    •

  •             case "plain":
    •

  •                 $result .= $this->HeaderLine("Content-Transfer-Encoding", $this->Encoding);
    •

  •                 $result .= sprintf("Content-Type: %s; charset=\"%s\"",
    •

  •                                     $this->ContentType, $this->CharSet);
    •

  •                 break;
    •

  •             case "attachments":
    •

  •                 // fall through
    •

  •             case "alt_attachments":
    •

  •                 if($this->InlineImageExists())
    •

  •                 {
    •

  •                     $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s",
    •

  •                                     "multipart/related", $this->LE, $this->LE,
    •

  •                                     $this->boundary[1], $this->LE);
    •

  •                 }
    •

  •                 else
    •

  •                 {
    •

  •                     $result .= $this->HeaderLine("Content-Type", "multipart/mixed;");
    •

  •                     $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
    •

  •                 }
    •

  •                 break;
    •

  •             case "alt":
    •

  •                 $result .= $this->HeaderLine("Content-Type", "multipart/alternative;");
    •

  •                 $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
    •

  •                 break;
    •

  •         }
    •

  •
    •

  •         if($this->Mailer != "mail")
    •

  •             $result .= $this->LE.$this->LE;
    •

  •
    •

  •         return $result;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Assembles the message body.  Returns an empty string on failure.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function CreateBody() {
    •

  •         $result = "";
    •

  •
    •

  •         $this->SetWordWrap();
    •

  •
    •

  •         switch($this->message_type)
    •

  •         {
    •

  •             case "alt":
    •

  •                 $result .= $this->GetBoundary($this->boundary[1], "",
    •

  •                                               "text/plain", "");
    •

  •                 $result .= $this->EncodeString($this->AltBody, $this->Encoding);
    •

  •                 $result .= $this->LE.$this->LE;
    •

  •                 $result .= $this->GetBoundary($this->boundary[1], "",
    •

  •                                               "text/html", "");
    •

  •
    •

  •                 $result .= $this->EncodeString($this->Body, $this->Encoding);
    •

  •                 $result .= $this->LE.$this->LE;
    •

  •
    •

  •                 $result .= $this->EndBoundary($this->boundary[1]);
    •

  •                 break;
    •

  •             case "plain":
    •

  •                 $result .= $this->EncodeString($this->Body, $this->Encoding);
    •

  •                 break;
    •

  •             case "attachments":
    •

  •                 $result .= $this->GetBoundary($this->boundary[1], "", "", "");
    •

  •                 $result .= $this->EncodeString($this->Body, $this->Encoding);
    •

  •                 $result .= $this->LE;
    •

  •
    •

  •                 $result .= $this->AttachAll();
    •

  •                 break;
    •

  •             case "alt_attachments":
    •

  •                 $result .= sprintf("--%s%s", $this->boundary[1], $this->LE);
    •

  •                 $result .= sprintf("Content-Type: %s;%s" .
    •

  •                                    "\tboundary=\"%s\"%s",
    •

  •                                    "multipart/alternative", $this->LE,
    •

  •                                    $this->boundary[2], $this->LE.$this->LE);
    •

  •
    •

  •                 // Create text body
    •

  •                 $result .= $this->GetBoundary($this->boundary[2], "",
    •

  •                                               "text/plain", "") . $this->LE;
    •

  •
    •

  •                 $result .= $this->EncodeString($this->AltBody, $this->Encoding);
    •

  •                 $result .= $this->LE.$this->LE;
    •

  •
    •

  •                 // Create the HTML body
    •

  •                 $result .= $this->GetBoundary($this->boundary[2], "",
    •

  •                                               "text/html", "") . $this->LE;
    •

  •
    •

  •                 $result .= $this->EncodeString($this->Body, $this->Encoding);
    •

  •                 $result .= $this->LE.$this->LE;
    •

  •
    •

  •                 $result .= $this->EndBoundary($this->boundary[2]);
    •

  •
    •

  •                 $result .= $this->AttachAll();
    •

  •                 break;
    •

  •         }
    •

  •         if($this->IsError())
    •

  •             $result = "";
    •

  •
    •

  •         return $result;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns the start of a message boundary.
    •

  •      * @access private
    •

  •      */
    •

  •     function GetBoundary($boundary, $charSet, $contentType, $encoding) {
    •

  •         $result = "";
    •

  •         if($charSet == "") { $charSet = $this->CharSet; }
    •

  •         if($contentType == "") { $contentType = $this->ContentType; }
    •

  •         if($encoding == "") { $encoding = $this->Encoding; }
    •

  •
    •

  •         $result .= $this->TextLine("--" . $boundary);
    •

  •         $result .= sprintf("Content-Type: %s; charset = \"%s\"",
    •

  •                             $contentType, $charSet);
    •

  •         $result .= $this->LE;
    •

  •         $result .= $this->HeaderLine("Content-Transfer-Encoding", $encoding);
    •

  •         $result .= $this->LE;
    •

  •
    •

  •         return $result;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns the end of a message boundary.
    •

  •      * @access private
    •

  •      */
    •

  •     function EndBoundary($boundary) {
    •

  •         return $this->LE . "--" . $boundary . "--" . $this->LE;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sets the message type.
    •

  •      * @access private
    •

  •      * @return void
    •

  •      */
    •

  •     function SetMessageType() {
    •

  •         if(count($this->attachment) < 1 && strlen($this->AltBody) < 1)
    •

  •             $this->message_type = "plain";
    •

  •         else
    •

  •         {
    •

  •             if(count($this->attachment) > 0)
    •

  •                 $this->message_type = "attachments";
    •

  •             if(strlen($this->AltBody) > 0 && count($this->attachment) < 1)
    •

  •                 $this->message_type = "alt";
    •

  •             if(strlen($this->AltBody) > 0 && count($this->attachment) > 0)
    •

  •                 $this->message_type = "alt_attachments";
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns a formatted header line.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function HeaderLine($name, $value) {
    •

  •         return $name . ": " . $value . $this->LE;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns a formatted mail line.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function TextLine($value) {
    •

  •         return $value . $this->LE;
    •

  •     }
    •

  •
    •

  •     /////////////////////////////////////////////////
    •

  •     // ATTACHMENT METHODS
    •

  •     /////////////////////////////////////////////////
    •

  •
    •

  •     /**
    •

  •      * Adds an attachment from a path on the filesystem.
    •

  •      * Returns false if the file could not be found
    •

  •      * or accessed.
    •

  •      * @param string $path Path to the attachment.
    •

  •      * @param string $name Overrides the attachment name.
    •

  •      * @param string $encoding File encoding (see $Encoding).
    •

  •      * @param string $type File extension (MIME) type.
    •

  •      * @return bool
    •

  •      */
    •

  •     function AddAttachment($path, $name = "", $encoding = "base64",
    •

  •                            $type = "application/octet-stream") {
    •

  •         if(!@is_file($path))
    •

  •         {
    •

  •             $this->SetError($this->Lang("file_access") . $path);
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         $filename = basename($path);
    •

  •         if($name == "")
    •

  •             $name = $filename;
    •

  •
    •

  •         $cur = count($this->attachment);
    •

  •         $this->attachment[$cur][0] = $path;
    •

  •         $this->attachment[$cur][1] = $filename;
    •

  •         $this->attachment[$cur][2] = $name;
    •

  •         $this->attachment[$cur][3] = $encoding;
    •

  •         $this->attachment[$cur][4] = $type;
    •

  •         $this->attachment[$cur][5] = false; // isStringAttachment
    •

  •         $this->attachment[$cur][6] = "attachment";
    •

  •         $this->attachment[$cur][7] = 0;
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Attaches all fs, string, and binary attachments to the message.
    •

  •      * Returns an empty string on failure.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function AttachAll() {
    •

  •         // Return text of body
    •

  •         $mime = array();
    •

  •
    •

  •         // Add all attachments
    •

  •         for($i = 0; $i < count($this->attachment); $i++)
    •

  •         {
    •

  •             // Check for string attachment
    •

  •             $bString = $this->attachment[$i][5];
    •

  •             if ($bString)
    •

  •                 $string = $this->attachment[$i][0];
    •

  •             else
    •

  •                 $path = $this->attachment[$i][0];
    •

  •
    •

  •             $filename    = $this->attachment[$i][1];
    •

  •             $name        = $this->attachment[$i][2];
    •

  •             $encoding    = $this->attachment[$i][3];
    •

  •             $type        = $this->attachment[$i][4];
    •

  •             $disposition = $this->attachment[$i][6];
    •

  •             $cid         = $this->attachment[$i][7];
    •

  •
    •

  •             $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE);
    •

  •             $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $name, $this->LE);
    •

  •             $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE);
    •

  •
    •

  •             if($disposition == "inline")
    •

  •                 $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE);
    •

  •
    •

  •             $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s",
    •

  •                               $disposition, $name, $this->LE.$this->LE);
    •

  •
    •

  •             // Encode as string attachment
    •

  •             if($bString)
    •

  •             {
    •

  •                 $mime[] = $this->EncodeString($string, $encoding);
    •

  •                 if($this->IsError()) { return ""; }
    •

  •                 $mime[] = $this->LE.$this->LE;
    •

  •             }
    •

  •             else
    •

  •             {
    •

  •                 $mime[] = $this->EncodeFile($path, $encoding);
    •

  •                 if($this->IsError()) { return ""; }
    •

  •                 $mime[] = $this->LE.$this->LE;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE);
    •

  •
    •

  •         return join("", $mime);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Encodes attachment in requested format.  Returns an
    •

  •      * empty string on failure.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function EncodeFile ($path, $encoding = "base64") {
    •

  •         if(!@$fd = fopen($path, "rb"))
    •

  •         {
    •

  •             $this->SetError($this->Lang("file_open") . $path);
    •

  •             return "";
    •

  •         }
    •

  •         $magic_quotes = get_magic_quotes_runtime();
    •

  •         set_magic_quotes_runtime(0);
    •

  •         $file_buffer = fread($fd, filesize($path));
    •

  •         $file_buffer = $this->EncodeString($file_buffer, $encoding);
    •

  •         fclose($fd);
    •

  •         set_magic_quotes_runtime($magic_quotes);
    •

  •
    •

  •         return $file_buffer;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Encodes string to requested format. Returns an
    •

  •      * empty string on failure.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function EncodeString ($str, $encoding = "base64") {
    •

  •         $encoded = "";
    •

  •         switch(strtolower($encoding)) {
    •

  •           case "base64":
    •

  •               // chunk_split is found in PHP >= 3.0.6
    •

  •               $encoded = chunk_split(base64_encode($str), 76, $this->LE);
    •

  •               break;
    •

  •           case "7bit":
    •

  •           case "8bit":
    •

  •               $encoded = $this->FixEOL($str);
    •

  •               if (substr($encoded, -(strlen($this->LE))) != $this->LE)
    •

  •                 $encoded .= $this->LE;
    •

  •               break;
    •

  •           case "binary":
    •

  •               $encoded = $str;
    •

  •               break;
    •

  •           case "quoted-printable":
    •

  •               $encoded = $this->EncodeQP($str);
    •

  •               break;
    •

  •           default:
    •

  •               $this->SetError($this->Lang("encoding") . $encoding);
    •

  •               break;
    •

  •         }
    •

  •         return $encoded;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Encode a header string to best of Q, B, quoted or none.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function EncodeHeader ($str, $position = 'text') {
    •

  •       $x = 0;
    •

  •
    •

  •       switch (strtolower($position)) {
    •

  •         case 'phrase':
    •

  •           if (!preg_match('/[\200-\377]/', $str)) {
    •

  •             // Can't use addslashes as we don't know what value has magic_quotes_sybase.
    •

  •             $encoded = addcslashes($str, "\0..\37\177\\\"");
    •

  •
    •

  •             if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str))
    •

  •               return ($encoded);
    •

  •             else
    •

  •               return ("\"$encoded\"");
    •

  •           }
    •

  •           $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches);
    •

  •           break;
    •

  •         case 'comment':
    •

  •           $x = preg_match_all('/[()"]/', $str, $matches);
    •

  •           // Fall-through
    •

  •         case 'text':
    •

  •         default:
    •

  •           $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches);
    •

  •           break;
    •

  •       }
    •

  •
    •

  •       if ($x == 0)
    •

  •         return ($str);
    •

  •
    •

  •       $maxlen = 75 - 7 - strlen($this->CharSet);
    •

  •       // Try to select the encoding which should produce the shortest output
    •

  •       if (strlen($str)/3 < $x) {
    •

  •         $encoding = 'B';
    •

  •         $encoded = base64_encode($str);
    •

  •         $maxlen -= $maxlen % 4;
    •

  •         $encoded = trim(chunk_split($encoded, $maxlen, "\n"));
    •

  •       } else {
    •

  •         $encoding = 'Q';
    •

  •         $encoded = $this->EncodeQ($str, $position);
    •

  •         $encoded = $this->WrapText($encoded, $maxlen, true);
    •

  •         $encoded = str_replace("=".$this->LE, "\n", trim($encoded));
    •

  •       }
    •

  •
    •

  •       $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded);
    •

  •       $encoded = trim(str_replace("\n", $this->LE, $encoded));
    •

  •
    •

  •       return $encoded;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Encode string to quoted-printable.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function EncodeQP ($str) {
    •

  •         $encoded = $this->FixEOL($str);
    •

  •         if (substr($encoded, -(strlen($this->LE))) != $this->LE)
    •

  •             $encoded .= $this->LE;
    •

  •
    •

  •         // Replace every high ascii, control and = characters
    •

  •         $encoded = preg_replace('/([\000-\010\013\014\016-\037\075\177-\377])/e',
    •

  •                   "'='.sprintf('%02X', ord('\\1'))", $encoded);
    •

  •         // Replace every spaces and tabs when it's the last character on a line
    •

  •         $encoded = preg_replace("/([\011\040])".$this->LE."/e",
    •

  •                   "'='.sprintf('%02X', ord('\\1')).'".$this->LE."'", $encoded);
    •

  •
    •

  •         // Maximum line length of 76 characters before CRLF (74 + space + '=')
    •

  •         $encoded = $this->WrapText($encoded, 74, true);
    •

  •
    •

  •         return $encoded;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Encode string to q encoding.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function EncodeQ ($str, $position = "text") {
    •

  •         // There should not be any EOL in the string
    •

  •         $encoded = preg_replace("[\r\n]", "", $str);
    •

  •
    •

  •         switch (strtolower($position)) {
    •

  •           case "phrase":
    •

  •             $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
    •

  •             break;
    •

  •           case "comment":
    •

  •             $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
    •

  •           case "text":
    •

  •           default:
    •

  •             // Replace every high ascii, control =, ? and _ characters
    •

  •             $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e',
    •

  •                   "'='.sprintf('%02X', ord('\\1'))", $encoded);
    •

  •             break;
    •

  •         }
    •

  •
    •

  •         // Replace every spaces to _ (more readable than =20)
    •

  •         $encoded = str_replace(" ", "_", $encoded);
    •

  •
    •

  •         return $encoded;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Adds a string or binary attachment (non-filesystem) to the list.
    •

  •      * This method can be used to attach ascii or binary data,
    •

  •      * such as a BLOB record from a database.
    •

  •      * @param string $string String attachment data.
    •

  •      * @param string $filename Name of the attachment.
    •

  •      * @param string $encoding File encoding (see $Encoding).
    •

  •      * @param string $type File extension (MIME) type.
    •

  •      * @return void
    •

  •      */
    •

  •     function AddStringAttachment($string, $filename, $encoding = "base64",
    •

  •                                  $type = "application/octet-stream") {
    •

  •         // Append to $attachment array
    •

  •         $cur = count($this->attachment);
    •

  •         $this->attachment[$cur][0] = $string;
    •

  •         $this->attachment[$cur][1] = $filename;
    •

  •         $this->attachment[$cur][2] = $filename;
    •

  •         $this->attachment[$cur][3] = $encoding;
    •

  •         $this->attachment[$cur][4] = $type;
    •

  •         $this->attachment[$cur][5] = true; // isString
    •

  •         $this->attachment[$cur][6] = "attachment";
    •

  •         $this->attachment[$cur][7] = 0;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Adds an embedded attachment.  This can include images, sounds, and
    •

  •      * just about any other document.  Make sure to set the $type to an
    •

  •      * image type.  For JPEG images use "image/jpeg" and for GIF images
    •

  •      * use "image/gif".
    •

  •      * @param string $path Path to the attachment.
    •

  •      * @param string $cid Content ID of the attachment.  Use this to identify
    •

  •      *         the Id for accessing the image in an HTML form.
    •

  •      * @param string $name Overrides the attachment name.
    •

  •      * @param string $encoding File encoding (see $Encoding).
    •

  •      * @param string $type File extension (MIME) type.
    •

  •      * @return bool
    •

  •      */
    •

  •     function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64",
    •

  •                               $type = "application/octet-stream") {
    •

  •
    •

  •         if(!@is_file($path))
    •

  •         {
    •

  •             $this->SetError($this->Lang("file_access") . $path);
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         $filename = basename($path);
    •

  •         if($name == "")
    •

  •             $name = $filename;
    •

  •
    •

  •         // Append to $attachment array
    •

  •         $cur = count($this->attachment);
    •

  •         $this->attachment[$cur][0] = $path;
    •

  •         $this->attachment[$cur][1] = $filename;
    •

  •         $this->attachment[$cur][2] = $name;
    •

  •         $this->attachment[$cur][3] = $encoding;
    •

  •         $this->attachment[$cur][4] = $type;
    •

  •         $this->attachment[$cur][5] = false; // isStringAttachment
    •

  •         $this->attachment[$cur][6] = "inline";
    •

  •         $this->attachment[$cur][7] = $cid;
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns true if an inline attachment is present.
    •

  •      * @access private
    •

  •      * @return bool
    •

  •      */
    •

  •     function InlineImageExists() {
    •

  •         $result = false;
    •

  •         for($i = 0; $i < count($this->attachment); $i++)
    •

  •         {
    •

  •             if($this->attachment[$i][6] == "inline")
    •

  •             {
    •

  •                 $result = true;
    •

  •                 break;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         return $result;
    •

  •     }
    •

  •
    •

  •     /////////////////////////////////////////////////
    •

  •     // MESSAGE RESET METHODS
    •

  •     /////////////////////////////////////////////////
    •

  •
    •

  •     /**
    •

  •      * Clears all recipients assigned in the TO array.  Returns void.
    •

  •      * @return void
    •

  •      */
    •

  •     function ClearAddresses() {
    •

  •         $this->to = array();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Clears all recipients assigned in the CC array.  Returns void.
    •

  •      * @return void
    •

  •      */
    •

  •     function ClearCCs() {
    •

  •         $this->cc = array();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Clears all recipients assigned in the BCC array.  Returns void.
    •

  •      * @return void
    •

  •      */
    •

  •     function ClearBCCs() {
    •

  •         $this->bcc = array();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Clears all recipients assigned in the ReplyTo array.  Returns void.
    •

  •      * @return void
    •

  •      */
    •

  •     function ClearReplyTos() {
    •

  •         $this->ReplyTo = array();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Clears all recipients assigned in the TO, CC and BCC
    •

  •      * array.  Returns void.
    •

  •      * @return void
    •

  •      */
    •

  •     function ClearAllRecipients() {
    •

  •         $this->to = array();
    •

  •         $this->cc = array();
    •

  •         $this->bcc = array();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Clears all previously set filesystem, string, and binary
    •

  •      * attachments.  Returns void.
    •

  •      * @return void
    •

  •      */
    •

  •     function ClearAttachments() {
    •

  •         $this->attachment = array();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Clears all custom headers.  Returns void.
    •

  •      * @return void
    •

  •      */
    •

  •     function ClearCustomHeaders() {
    •

  •         $this->CustomHeader = array();
    •

  •     }
    •

  •
    •

  •
    •

  •     /////////////////////////////////////////////////
    •

  •     // MISCELLANEOUS METHODS
    •

  •     /////////////////////////////////////////////////
    •

  •
    •

  •     /**
    •

  •      * Adds the error message to the error container.
    •

  •      * Returns void.
    •

  •      * @access private
    •

  •      * @return void
    •

  •      */
    •

  •     function SetError($msg) {
    •

  •         $this->error_count++;
    •

  •         $this->ErrorInfo = $msg;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns the proper RFC 822 formatted date.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function RFCDate() {
    •

  •         $tz = date("Z");
    •

  •         $tzs = ($tz < 0) ? "-" : "+";
    •

  •         $tz = abs($tz);
    •

  •         $tz = ($tz/3600)*100 + ($tz%3600)/60;
    •

  •         $result = sprintf("%s %s%04d", date("D, j M Y H:i:s"), $tzs, $tz);
    •

  •
    •

  •         return $result;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns the appropriate server variable.  Should work with both
    •

  •      * PHP 4.1.0+ as well as older versions.  Returns an empty string
    •

  •      * if nothing is found.
    •

  •      * @access private
    •

  •      * @return mixed
    •

  •      */
    •

  •     function ServerVar($varName) {
    •

  •         global $HTTP_SERVER_VARS;
    •

  •         global $HTTP_ENV_VARS;
    •

  •
    •

  •         if(!isset($_SERVER))
    •

  •         {
    •

  •             $_SERVER = $HTTP_SERVER_VARS;
    •

  •             if(!isset($_SERVER["REMOTE_ADDR"]))
    •

  •                 $_SERVER = $HTTP_ENV_VARS; // must be Apache
    •

  •         }
    •

  •
    •

  •         if(isset($_SERVER[$varName]))
    •

  •             return $_SERVER[$varName];
    •

  •         else
    •

  •             return "";
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns the server hostname or 'localhost.localdomain' if unknown.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function ServerHostname() {
    •

  •         if ($this->Hostname != "")
    •

  •             $result = $this->Hostname;
    •

  •         elseif ($this->ServerVar('SERVER_NAME') != "")
    •

  •             $result = $this->ServerVar('SERVER_NAME');
    •

  •         else
    •

  •             $result = "localhost.localdomain";
    •

  •
    •

  •         return $result;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns a message in the appropriate language.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function Lang($key) {
    •

  •         if(count($this->language) < 1)
    •

  •             $this->SetLanguage("en"); // set the default language
    •

  •
    •

  •         if(isset($this->language[$key]))
    •

  •             return $this->language[$key];
    •

  •         else
    •

  •             return "Language string failed to load: " . $key;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns true if an error occurred.
    •

  •      * @return bool
    •

  •      */
    •

  •     function IsError() {
    •

  •         return ($this->error_count > 0);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Changes every end of line from CR or LF to CRLF.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function FixEOL($str) {
    •

  •         $str = str_replace("\r\n", "\n", $str);
    •

  •         $str = str_replace("\r", "\n", $str);
    •

  •         $str = str_replace("\n", $this->LE, $str);
    •

  •         return $str;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Adds a custom header.
    •

  •      * @return void
    •

  •      */
    •

  •     function AddCustomHeader($custom_header) {
    •

  •         $this->CustomHeader[] = explode(":", $custom_header, 2);
    •

  •     }
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:56:57 +0200 by phpDocumentor 1.4.0a2


File Source for class.smtp.php

Source for file class.smtp.php

Documentation is available at class.smtp.php

  • <?php
    •

  • ////////////////////////////////////////////////////
    •

  • // SMTP - PHP SMTP class
    •

  • //
    •

  • // Version 1.02
    •

  • //
    •

  • // Define an SMTP class that can be used to connect
    •

  • // and communicate with any SMTP server. It implements
    •

  • // all the SMTP functions defined in RFC821 except TURN.
    •

  • //
    •

  • // Author: Chris Ryan
    •

  • //
    •

  • // License: LGPL, see LICENSE
    •

  • ////////////////////////////////////////////////////
    •

  •
    •

  • /**
    •

  •  * SMTP is rfc 821 compliant and implements all the rfc 821 SMTP
    •

  •  * commands except TURN which will always return a not implemented
    •

  •  * error. SMTP also provides some utility methods for sending mail
    •

  •  * to an SMTP server.
    •

  •  * @package PHPMailer
    •

  •  * @author Chris Ryan
    •

  •  */
    •

  • class SMTP
    •

  • {
    •

  •     /**
    •

  •      *  SMTP server port
    •

  •      *  @var int
    •

  •      */
    •

  •     var $SMTP_PORT = 25;
    •

  •
    •

  •     /**
    •

  •      *  SMTP reply line ending
    •

  •      *  @var string
    •

  •      */
    •

  •     var $CRLF = "\r\n";
    •

  •
    •

  •     /**
    •

  •      *  Sets whether debugging is turned on
    •

  •      *  @var bool
    •

  •      */
    •

  •     var $do_debug;       # the level of debug to perform
    •

  •
    •

  •     /**#@+
    •

  •      * @access private
    •

  •      */
    •

  •     var $smtp_conn;      # the socket to the server
    •

  •     var $error;          # error if any on the last call
    •

  •     var $helo_rply;      # the reply the server sent to us for HELO
    •

  •     /**#@-*/
    •

  •
    •

  •     /**
    •

  •      * Initialize the class so that the data is in a known state.
    •

  •      * @access public
    •

  •      * @return void
    •

  •      */
    •

  •     function SMTP() {
    •

  •         $this->smtp_conn = 0;
    •

  •         $this->error = null;
    •

  •         $this->helo_rply = null;
    •

  •
    •

  •         $this->do_debug = 0;
    •

  •     }
    •

  •
    •

  •     /*************************************************************
    •

  •      *                    CONNECTION FUNCTIONS                  *
    •

  •      ***********************************************************/
    •

  •
    •

  •     /**
    •

  •      * Connect to the server specified on the port specified.
    •

  •      * If the port is not specified use the default SMTP_PORT.
    •

  •      * If tval is specified then a connection will try and be
    •

  •      * established with the server for that number of seconds.
    •

  •      * If tval is not specified the default is 30 seconds to
    •

  •      * try on the connection.
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 220
    •

  •      * SMTP CODE FAILURE: 421
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function Connect($host,$port=0,$tval=30) {
    •

  •         # set the error val to null so there is no confusion
    •

  •         $this->error = null;
    •

  •
    •

  •         # make sure we are __not__ connected
    •

  •         if($this->connected()) {
    •

  •             # ok we are connected! what should we do?
    •

  •             # for now we will just give an error saying we
    •

  •             # are already connected
    •

  •             $this->error =
    •

  •                 array("error" => "Already connected to a server");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         if(empty($port)) {
    •

  •             $port = $this->SMTP_PORT;
    •

  •         }
    •

  •
    •

  •         #connect to the smtp server
    •

  •         $this->smtp_conn = fsockopen($host,    # the host of the server
    •

  •                                      $port,    # the port to use
    •

  •                                      $errno,   # error number if any
    •

  •                                      $errstr,  # error message if any
    •

  •                                      $tval);   # give up after ? secs
    •

  •         # verify we connected properly
    •

  •         if(empty($this->smtp_conn)) {
    •

  •             $this->error = array("error" => "Failed to connect to server",
    •

  •                                  "errno" => $errno,
    •

  •                                  "errstr" => $errstr);
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": $errstr ($errno)" . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         # sometimes the SMTP server takes a little longer to respond
    •

  •         # so we will give it a longer timeout for the first read
    •

  •         // Windows still does not have support for this timeout function
    •

  •         if(substr(PHP_OS, 0, 3) != "WIN")
    •

  •            socket_set_timeout($this->smtp_conn, $tval, 0);
    •

  •
    •

  •         # get any announcement stuff
    •

  •         $announce = $this->get_lines();
    •

  •
    •

  •         # set the timeout  of any socket functions at 1/10 of a second
    •

  •         //if(function_exists("socket_set_timeout"))
    •

  •         //   socket_set_timeout($this->smtp_conn, 0, 100000);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $announce;
    •

  •         }
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Performs SMTP authentication.  Must be run after running the
    •

  •      * Hello() method.  Returns true if successfully authenticated.
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function Authenticate($username, $password) {
    •

  •         // Start authentication
    •

  •         fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($code != 334) {
    •

  •             $this->error =
    •

  •                 array("error" => "AUTH not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         // Send encoded username
    •

  •         fputs($this->smtp_conn, base64_encode($username) . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($code != 334) {
    •

  •             $this->error =
    •

  •                 array("error" => "Username not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         // Send encoded password
    •

  •         fputs($this->smtp_conn, base64_encode($password) . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($code != 235) {
    •

  •             $this->error =
    •

  •                 array("error" => "Password not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Returns true if connected to a server otherwise false
    •

  •      * @access private
    •

  •      * @return bool
    •

  •      */
    •

  •     function Connected() {
    •

  •         if(!empty($this->smtp_conn)) {
    •

  •             $sock_status = socket_get_status($this->smtp_conn);
    •

  •             if($sock_status["eof"]) {
    •

  •                 # hmm this is an odd situation... the socket is
    •

  •                 # valid but we aren't connected anymore
    •

  •                 if($this->do_debug >= 1) {
    •

  •                     echo "SMTP -> NOTICE:" . $this->CRLF .
    •

  •                          "EOF caught while checking if connected";
    •

  •                 }
    •

  •                 $this->Close();
    •

  •                 return false;
    •

  •             }
    •

  •             return true; # everything looks good
    •

  •         }
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Closes the socket and cleans up the state of the class.
    •

  •      * It is not considered good to use this function without
    •

  •      * first trying to use QUIT.
    •

  •      * @access public
    •

  •      * @return void
    •

  •      */
    •

  •     function Close() {
    •

  •         $this->error = null; # so there is no confusion
    •

  •         $this->helo_rply = null;
    •

  •         if(!empty($this->smtp_conn)) {
    •

  •             # close the connection and cleanup
    •

  •             fclose($this->smtp_conn);
    •

  •             $this->smtp_conn = 0;
    •

  •         }
    •

  •     }
    •

  •
    •

  •
    •

  •     /***************************************************************
    •

  •      *                        SMTP COMMANDS                       *
    •

  •      *************************************************************/
    •

  •
    •

  •     /**
    •

  •      * Issues a data command and sends the msg_data to the server
    •

  •      * finializing the mail transaction. $msg_data is the message
    •

  •      * that is to be send with the headers. Each header needs to be
    •

  •      * on a single line followed by a <CRLF> with the message headers
    •

  •      * and the message body being seperated by and additional <CRLF>.
    •

  •      *
    •

  •      * Implements rfc 821: DATA <CRLF>
    •

  •      *
    •

  •      * SMTP CODE INTERMEDIATE: 354
    •

  •      *     [data]
    •

  •      *     <CRLF>.<CRLF>
    •

  •      *     SMTP CODE SUCCESS: 250
    •

  •      *     SMTP CODE FAILURE: 552,554,451,452
    •

  •      * SMTP CODE FAILURE: 451,554
    •

  •      * SMTP CODE ERROR  : 500,501,503,421
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function Data($msg_data) {
    •

  •         $this->error = null; # so no confusion is caused
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                     "error" => "Called Data() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         fputs($this->smtp_conn,"DATA" . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 354) {
    •

  •             $this->error =
    •

  •                 array("error" => "DATA command not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         # the server is ready to accept data!
    •

  •         # according to rfc 821 we should not send more than 1000
    •

  •         # including the CRLF
    •

  •         # characters on a single line so we will break the data up
    •

  •         # into lines by \r and/or \n then if needed we will break
    •

  •         # each of those into smaller lines to fit within the limit.
    •

  •         # in addition we will be looking for lines that start with
    •

  •         # a period '.' and append and additional period '.' to that
    •

  •         # line. NOTE: this does not count towards are limit.
    •

  •
    •

  •         # normalize the line breaks so we know the explode works
    •

  •         $msg_data = str_replace("\r\n","\n",$msg_data);
    •

  •         $msg_data = str_replace("\r","\n",$msg_data);
    •

  •         $lines = explode("\n",$msg_data);
    •

  •
    •

  •         # we need to find a good way to determine is headers are
    •

  •         # in the msg_data or if it is a straight msg body
    •

  •         # currently I'm assuming rfc 822 definitions of msg headers
    •

  •         # and if the first field of the first line (':' sperated)
    •

  •         # does not contain a space then it _should_ be a header
    •

  •         # and we can process all lines before a blank "" line as
    •

  •         # headers.
    •

  •         $field = substr($lines[0],0,strpos($lines[0],":"));
    •

  •         $in_headers = false;
    •

  •         if(!empty($field) && !strstr($field," ")) {
    •

  •             $in_headers = true;
    •

  •         }
    •

  •
    •

  •         $max_line_length = 998; # used below; set here for ease in change
    •

  •
    •

  •         while(list(,$line) = @each($lines)) {
    •

  •             $lines_out = null;
    •

  •             if($line == "" && $in_headers) {
    •

  •                 $in_headers = false;
    •

  •             }
    •

  •             # ok we need to break this line up into several
    •

  •             # smaller lines
    •

  •             while(strlen($line) > $max_line_length) {
    •

  •                 $pos = strrpos(substr($line,0,$max_line_length)," ");
    •

  •
    •

  •                 # Patch to fix DOS attack
    •

  •                 if(!$pos) {
    •

  •                     $pos = $max_line_length - 1;
    •

  •                 }
    •

  •
    •

  •                 $lines_out[] = substr($line,0,$pos);
    •

  •                 $line = substr($line,$pos + 1);
    •

  •                 # if we are processing headers we need to
    •

  •                 # add a LWSP-char to the front of the new line
    •

  •                 # rfc 822 on long msg headers
    •

  •                 if($in_headers) {
    •

  •                     $line = "\t" . $line;
    •

  •                 }
    •

  •             }
    •

  •             $lines_out[] = $line;
    •

  •
    •

  •             # now send the lines to the server
    •

  •             while(list(,$line_out) = @each($lines_out)) {
    •

  •                 if(strlen($line_out) > 0)
    •

  •                 {
    •

  •                     if(substr($line_out, 0, 1) == ".") {
    •

  •                         $line_out = "." . $line_out;
    •

  •                     }
    •

  •                 }
    •

  •                 fputs($this->smtp_conn,$line_out . $this->CRLF);
    •

  •             }
    •

  •         }
    •

  •
    •

  •         # ok all the message data has been sent so lets get this
    •

  •         # over with aleady
    •

  •         fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 250) {
    •

  •             $this->error =
    •

  •                 array("error" => "DATA not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Expand takes the name and asks the server to list all the
    •

  •      * people who are members of the _list_. Expand will return
    •

  •      * back and array of the result or false if an error occurs.
    •

  •      * Each value in the array returned has the format of:
    •

  •      *     [ <full-name> <sp> ] <path>
    •

  •      * The definition of <path> is defined in rfc 821
    •

  •      *
    •

  •      * Implements rfc 821: EXPN <SP> <string> <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 250
    •

  •      * SMTP CODE FAILURE: 550
    •

  •      * SMTP CODE ERROR  : 500,501,502,504,421
    •

  •      * @access public
    •

  •      * @return string array
    •

  •      */
    •

  •     function Expand($name) {
    •

  •         $this->error = null; # so no confusion is caused
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                     "error" => "Called Expand() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         fputs($this->smtp_conn,"EXPN " . $name . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 250) {
    •

  •             $this->error =
    •

  •                 array("error" => "EXPN not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         # parse the reply and place in our array to return to user
    •

  •         $entries = explode($this->CRLF,$rply);
    •

  •         while(list(,$l) = @each($entries)) {
    •

  •             $list[] = substr($l,4);
    •

  •         }
    •

  •
    •

  •         return $list;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sends the HELO command to the smtp server.
    •

  •      * This makes sure that we and the server are in
    •

  •      * the same known state.
    •

  •      *
    •

  •      * Implements from rfc 821: HELO <SP> <domain> <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 250
    •

  •      * SMTP CODE ERROR  : 500, 501, 504, 421
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function Hello($host="") {
    •

  •         $this->error = null; # so no confusion is caused
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                     "error" => "Called Hello() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         # if a hostname for the HELO wasn't specified determine
    •

  •         # a suitable one to send
    •

  •         if(empty($host)) {
    •

  •             # we need to determine some sort of appopiate default
    •

  •             # to send to the server
    •

  •             $host = "localhost";
    •

  •         }
    •

  •
    •

  •         // Send extended hello first (RFC 2821)
    •

  •         if(!$this->SendHello("EHLO", $host))
    •

  •         {
    •

  •             if(!$this->SendHello("HELO", $host))
    •

  •                 return false;
    •

  •         }
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sends a HELO/EHLO command.
    •

  •      * @access private
    •

  •      * @return bool
    •

  •      */
    •

  •     function SendHello($hello, $host) {
    •

  •         fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER: " . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 250) {
    •

  •             $this->error =
    •

  •                 array("error" => $hello . " not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         $this->helo_rply = $rply;
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Gets help information on the keyword specified. If the keyword
    •

  •      * is not specified then returns generic help, ussually contianing
    •

  •      * A list of keywords that help is available on. This function
    •

  •      * returns the results back to the user. It is up to the user to
    •

  •      * handle the returned data. If an error occurs then false is
    •

  •      * returned with $this->error set appropiately.
    •

  •      *
    •

  •      * Implements rfc 821: HELP [ <SP> <string> ] <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 211,214
    •

  •      * SMTP CODE ERROR  : 500,501,502,504,421
    •

  •      * @access public
    •

  •      * @return string
    •

  •      */
    •

  •     function Help($keyword="") {
    •

  •         $this->error = null; # to avoid confusion
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                     "error" => "Called Help() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         $extra = "";
    •

  •         if(!empty($keyword)) {
    •

  •             $extra = " " . $keyword;
    •

  •         }
    •

  •
    •

  •         fputs($this->smtp_conn,"HELP" . $extra . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 211 && $code != 214) {
    •

  •             $this->error =
    •

  •                 array("error" => "HELP not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         return $rply;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Starts a mail transaction from the email address specified in
    •

  •      * $from. Returns true if successful or false otherwise. If True
    •

  •      * the mail transaction is started and then one or more Recipient
    •

  •      * commands may be called followed by a Data command.
    •

  •      *
    •

  •      * Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 250
    •

  •      * SMTP CODE SUCCESS: 552,451,452
    •

  •      * SMTP CODE SUCCESS: 500,501,421
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function Mail($from) {
    •

  •         $this->error = null; # so no confusion is caused
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                     "error" => "Called Mail() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 250) {
    •

  •             $this->error =
    •

  •                 array("error" => "MAIL not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sends the command NOOP to the SMTP server.
    •

  •      *
    •

  •      * Implements from rfc 821: NOOP <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 250
    •

  •      * SMTP CODE ERROR  : 500, 421
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function Noop() {
    •

  •         $this->error = null; # so no confusion is caused
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                     "error" => "Called Noop() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         fputs($this->smtp_conn,"NOOP" . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 250) {
    •

  •             $this->error =
    •

  •                 array("error" => "NOOP not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sends the quit command to the server and then closes the socket
    •

  •      * if there is no error or the $close_on_error argument is true.
    •

  •      *
    •

  •      * Implements from rfc 821: QUIT <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 221
    •

  •      * SMTP CODE ERROR  : 500
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function Quit($close_on_error=true) {
    •

  •         $this->error = null; # so there is no confusion
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                     "error" => "Called Quit() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         # send the quit command to the server
    •

  •         fputs($this->smtp_conn,"quit" . $this->CRLF);
    •

  •
    •

  •         # get any good-bye messages
    •

  •         $byemsg = $this->get_lines();
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $byemsg;
    •

  •         }
    •

  •
    •

  •         $rval = true;
    •

  •         $e = null;
    •

  •
    •

  •         $code = substr($byemsg,0,3);
    •

  •         if($code != 221) {
    •

  •             # use e as a tmp var cause Close will overwrite $this->error
    •

  •             $e = array("error" => "SMTP server rejected quit command",
    •

  •                        "smtp_code" => $code,
    •

  •                        "smtp_rply" => substr($byemsg,4));
    •

  •             $rval = false;
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $e["error"] . ": " .
    •

  •                          $byemsg . $this->CRLF;
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if(empty($e) || $close_on_error) {
    •

  •             $this->Close();
    •

  •         }
    •

  •
    •

  •         return $rval;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sends the command RCPT to the SMTP server with the TO: argument of $to.
    •

  •      * Returns true if the recipient was accepted false if it was rejected.
    •

  •      *
    •

  •      * Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 250,251
    •

  •      * SMTP CODE FAILURE: 550,551,552,553,450,451,452
    •

  •      * SMTP CODE ERROR  : 500,501,503,421
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function Recipient($to) {
    •

  •         $this->error = null; # so no confusion is caused
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                     "error" => "Called Recipient() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 250 && $code != 251) {
    •

  •             $this->error =
    •

  •                 array("error" => "RCPT not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Sends the RSET command to abort and transaction that is
    •

  •      * currently in progress. Returns true if successful false
    •

  •      * otherwise.
    •

  •      *
    •

  •      * Implements rfc 821: RSET <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 250
    •

  •      * SMTP CODE ERROR  : 500,501,504,421
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function Reset() {
    •

  •         $this->error = null; # so no confusion is caused
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                     "error" => "Called Reset() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         fputs($this->smtp_conn,"RSET" . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 250) {
    •

  •             $this->error =
    •

  •                 array("error" => "RSET failed",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Starts a mail transaction from the email address specified in
    •

  •      * $from. Returns true if successful or false otherwise. If True
    •

  •      * the mail transaction is started and then one or more Recipient
    •

  •      * commands may be called followed by a Data command. This command
    •

  •      * will send the message to the users terminal if they are logged
    •

  •      * in.
    •

  •      *
    •

  •      * Implements rfc 821: SEND <SP> FROM:<reverse-path> <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 250
    •

  •      * SMTP CODE SUCCESS: 552,451,452
    •

  •      * SMTP CODE SUCCESS: 500,501,502,421
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function Send($from) {
    •

  •         $this->error = null; # so no confusion is caused
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                     "error" => "Called Send() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         fputs($this->smtp_conn,"SEND FROM:" . $from . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 250) {
    •

  •             $this->error =
    •

  •                 array("error" => "SEND not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Starts a mail transaction from the email address specified in
    •

  •      * $from. Returns true if successful or false otherwise. If True
    •

  •      * the mail transaction is started and then one or more Recipient
    •

  •      * commands may be called followed by a Data command. This command
    •

  •      * will send the message to the users terminal if they are logged
    •

  •      * in and send them an email.
    •

  •      *
    •

  •      * Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 250
    •

  •      * SMTP CODE SUCCESS: 552,451,452
    •

  •      * SMTP CODE SUCCESS: 500,501,502,421
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function SendAndMail($from) {
    •

  •         $this->error = null; # so no confusion is caused
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                 "error" => "Called SendAndMail() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 250) {
    •

  •             $this->error =
    •

  •                 array("error" => "SAML not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Starts a mail transaction from the email address specified in
    •

  •      * $from. Returns true if successful or false otherwise. If True
    •

  •      * the mail transaction is started and then one or more Recipient
    •

  •      * commands may be called followed by a Data command. This command
    •

  •      * will send the message to the users terminal if they are logged
    •

  •      * in or mail it to them if they are not.
    •

  •      *
    •

  •      * Implements rfc 821: SOML <SP> FROM:<reverse-path> <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 250
    •

  •      * SMTP CODE SUCCESS: 552,451,452
    •

  •      * SMTP CODE SUCCESS: 500,501,502,421
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function SendOrMail($from) {
    •

  •         $this->error = null; # so no confusion is caused
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                 "error" => "Called SendOrMail() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         fputs($this->smtp_conn,"SOML FROM:" . $from . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 250) {
    •

  •             $this->error =
    •

  •                 array("error" => "SOML not accepted from server",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * This is an optional command for SMTP that this class does not
    •

  •      * support. This method is here to make the RFC821 Definition
    •

  •      * complete for this class and __may__ be implimented in the future
    •

  •      *
    •

  •      * Implements from rfc 821: TURN <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 250
    •

  •      * SMTP CODE FAILURE: 502
    •

  •      * SMTP CODE ERROR  : 500, 503
    •

  •      * @access public
    •

  •      * @return bool
    •

  •      */
    •

  •     function Turn() {
    •

  •         $this->error = array("error" => "This method, TURN, of the SMTP ".
    •

  •                                         "is not implemented");
    •

  •         if($this->do_debug >= 1) {
    •

  •             echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF;
    •

  •         }
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Verifies that the name is recognized by the server.
    •

  •      * Returns false if the name could not be verified otherwise
    •

  •      * the response from the server is returned.
    •

  •      *
    •

  •      * Implements rfc 821: VRFY <SP> <string> <CRLF>
    •

  •      *
    •

  •      * SMTP CODE SUCCESS: 250,251
    •

  •      * SMTP CODE FAILURE: 550,551,553
    •

  •      * SMTP CODE ERROR  : 500,501,502,421
    •

  •      * @access public
    •

  •      * @return int
    •

  •      */
    •

  •     function Verify($name) {
    •

  •         $this->error = null; # so no confusion is caused
    •

  •
    •

  •         if(!$this->connected()) {
    •

  •             $this->error = array(
    •

  •                     "error" => "Called Verify() without being connected");
    •

  •             return false;
    •

  •         }
    •

  •
    •

  •         fputs($this->smtp_conn,"VRFY " . $name . $this->CRLF);
    •

  •
    •

  •         $rply = $this->get_lines();
    •

  •         $code = substr($rply,0,3);
    •

  •
    •

  •         if($this->do_debug >= 2) {
    •

  •             echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
    •

  •         }
    •

  •
    •

  •         if($code != 250 && $code != 251) {
    •

  •             $this->error =
    •

  •                 array("error" => "VRFY failed on name '$name'",
    •

  •                       "smtp_code" => $code,
    •

  •                       "smtp_msg" => substr($rply,4));
    •

  •             if($this->do_debug >= 1) {
    •

  •                 echo "SMTP -> ERROR: " . $this->error["error"] .
    •

  •                          ": " . $rply . $this->CRLF;
    •

  •             }
    •

  •             return false;
    •

  •         }
    •

  •         return $rply;
    •

  •     }
    •

  •
    •

  •     /*******************************************************************
    •

  •      *                       INTERNAL FUNCTIONS                       *
    •

  •      ******************************************************************/
    •

  •
    •

  •     /**
    •

  •      * Read in as many lines as possible
    •

  •      * either before eof or socket timeout occurs on the operation.
    •

  •      * With SMTP we can tell if we have more lines to read if the
    •

  •      * 4th character is '-' symbol. If it is a space then we don't
    •

  •      * need to read anything else.
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function get_lines() {
    •

  •         $data = "";
    •

  •         while($str = fgets($this->smtp_conn,515)) {
    •

  •             if($this->do_debug >= 4) {
    •

  •                 echo "SMTP -> get_lines(): \$data was \"$data\"" .
    •

  •                          $this->CRLF;
    •

  •                 echo "SMTP -> get_lines(): \$str is \"$str\"" .
    •

  •                          $this->CRLF;
    •

  •             }
    •

  •             $data .= $str;
    •

  •             if($this->do_debug >= 4) {
    •

  •                 echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF;
    •

  •             }
    •

  •             # if the 4th character is a space then we are done reading
    •

  •             # so just break the loop
    •

  •             if(substr($str,3,1) == " ") { break; }
    •

  •         }
    •

  •         return $data;
    •

  •     }
    •

  •
    •

  • }
    •

  •
    •

  •
    •

  •  ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:07 +0200 by phpDocumentor 1.4.0a2


Docs For Class PHPMailer

Class PHPMailer

[line 20]

Classes extended from PHPMailer:

XoopsMultiMailer

Mailer Class.

Location: /mail/phpmailer/class.phpmailer.php

Remarks

PHPMailer - PHP email transport class

author

Brent R. Matzelle

copyright

2001 - 2003 Brent R. Matzelle

Class Variable Summary

  • $AltBody =  ""

        Sets the text-only body of the message.  This automatically sets the  email to multipart/alternative.  This body can be read by mail  clients that do not have HTML email capability such as mutt. Clients  that can read HTML will view the normal Body.

  • $attachment = array()

  • $bcc = array()

  • $Body =  ""

        Sets the Body of the message.  This can be either an HTML or text body.

  • $boundary = array()

  • $cc = array()

  • $CharSet =  "iso-8859-1"

        Sets the CharSet of the message.

  • $ConfirmReadingTo =  ""

        Sets the email address that a reading confirmation will be sent.

  • $ContentType =  "text/plain"

        Sets the Content-type of the message.

  • $CustomHeader = array()

  • $Encoding =  "8bit"

        Sets the Encoding of the message. Options for this are "8bit",  "7bit", "binary", "base64", and "quoted-printable".

  • $ErrorInfo =  ""

        Holds the most recent mailer error message.

  • $error_count =  0

  • $From =  "root@localhost"

        Sets the From email address for the message.

  • $FromName =  "Root User"

        Sets the From name of the message.

  • $Helo =  ""

        Sets the SMTP HELO of the message (Default is $Hostname).

  • $Host =  "localhost"

        Sets the SMTP hosts.  All hosts must be separated by a   semicolon.  You can also specify a different port   for each host by using this format: [hostname:port]   (e.g. "smtp1.example.com:25;smtp2.example.com").

  • $Hostname =  ""

        Sets the hostname to use in Message-Id and Received headers   and as default HELO string. If empty, the value returned   by SERVER_NAME is used or 'localhost.localdomain'.

  • $language = array()

  • $LE =  "\n"

  • $Mailer =  "mail"

        Method to send mail: ("mail", "sendmail", or "smtp").

  • $message_type =  ""

  • $Password =  ""

        Sets SMTP password.

  • $PluginDir =  ""

        Path to PHPMailer plugins.  This is now only useful if the SMTP class  is in a different directory than the PHP include path.

  • $Port =  25

        Sets the default SMTP server port.

  • $Priority =  3

        Email priority (1 = High, 3 = Normal, 5 = low).

  • $ReplyTo = array()

  • $Sender =  ""

        Sets the Sender email (Return-Path) of the message.  If not empty,  will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.

  • $Sendmail =  "/usr/sbin/sendmail"

        Sets the path of the sendmail program.

  • $smtp =  NULL

  • $SMTPAuth =  false

        Sets SMTP authentication. Utilizes the Username and Password variables.

  • $SMTPDebug =  false

        Sets SMTP class debugging on or off.

  • $SMTPKeepAlive =  false

        Prevents the SMTP connection from being closed after each mail  sending.  If this is set to true then to close the connection  requires an explicit call to SmtpClose().

  • $Subject =  ""

        Sets the Subject of the message.

  • $Timeout =  10

        Sets the SMTP server timeout in seconds. This function will not   work with the win32 version.

  • $to = array()

  • $Username =  ""

        Sets SMTP username.

  • $Version =  "1.73"

        Holds PHPMailer version.

  • $WordWrap =  0

        Sets word wrapping on the body of the message to a given number of  characters.

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    PHPMailer::AddAddress

AddAddress(
string
$address, [string
$name = ""] );

    Parameters

    $address

    $name

    Remarks

    Adds a "To" address.

    [ Top ]

    PHPMailer::AddAttachment

AddAttachment(
string
$path, [string
$name = ""], [string
$encoding = "base64"], [string
$type = "application/octet-stream"] );

    Parameters

    $path

    Path to the attachment.

    $name

    Overrides the attachment name.

    $encoding

    File encoding (see $Encoding).

    $type

    File extension (MIME) type.

    Remarks

    Adds an attachment from a path on the filesystem.

    Returns false if the file could not be found  or accessed.

    [ Top ]

    PHPMailer::AddBCC

AddBCC(
string
$address, [string
$name = ""] );

    Parameters

    $address

    $name

    Remarks

    Adds a "Bcc" address. Note: this function works  with the SMTP mailer on win32, not with the "mail"  mailer.

    [ Top ]

    PHPMailer::AddCC

AddCC(
string
$address, [string
$name = ""] );

    Parameters

    $address

    $name

    Remarks

    Adds a "Cc" address. Note: this function works  with the SMTP mailer on win32, not with the "mail"  mailer.

    [ Top ]

    PHPMailer::AddCustomHeader

AddCustomHeader(

$custom_header );

    Parameters

    $custom_header

    Remarks

    Adds a custom header.

    [ Top ]

    PHPMailer::AddEmbeddedImage

AddEmbeddedImage(
string
$path, string
$cid, [string
$name = ""], [string
$encoding = "base64"], [string
$type = "application/octet-stream"] );

    Parameters

    $path

    Path to the attachment.

    $cid

    Content ID of the attachment.  Use this to identify         the Id for accessing the image in an HTML form.

    $name

    Overrides the attachment name.

    $encoding

    File encoding (see $Encoding).

    $type

    File extension (MIME) type.

    Remarks

    Adds an embedded attachment.  This can include images, sounds, and  just about any other document.  Make sure to set the $type to an  image type.  For JPEG images use "image/jpeg" and for GIF images  use "image/gif".

    [ Top ]

    PHPMailer::AddrAppend

AddrAppend(

$type,
$addr );

    Parameters

    $type

    $addr

    Remarks

    Creates recipient headers.

    access

    private

    [ Top ]

    PHPMailer::AddReplyTo

AddReplyTo(
string
$address, [string
$name = ""] );

    Parameters

    $address

    $name

    Remarks

    Adds a "Reply-to" address.

    [ Top ]

    PHPMailer::AddrFormat

AddrFormat(

$addr );

    Overridden in child classes as:

    XoopsMultiMailer::AddrFormat()

    Formats an address correctly. This overrides the default addr_format method which does not seem to encode $FromName correctly

    Parameters

    $addr

    Remarks

    Formats an address correctly.

    access

    private

    [ Top ]

    PHPMailer::AddStringAttachment

AddStringAttachment(
string
$string, string
$filename, [string
$encoding = "base64"], [string
$type = "application/octet-stream"] );

    Parameters

    $string

    String attachment data.

    $filename

    Name of the attachment.

    $encoding

    File encoding (see $Encoding).

    $type

    File extension (MIME) type.

    Remarks

    Adds a string or binary attachment (non-filesystem) to the list.

    This method can be used to attach ascii or binary data,  such as a BLOB record from a database.

    [ Top ]

    PHPMailer::AttachAll

AttachAll(
 );

    Remarks

    Attaches all fs, string, and binary attachments to the message.

    Returns an empty string on failure.

    access

    private

    [ Top ]

    PHPMailer::ClearAddresses

ClearAddresses(
 );

    Remarks

    Clears all recipients assigned in the TO array.  Returns void.

    [ Top ]

    PHPMailer::ClearAllRecipients

ClearAllRecipients(
 );

    Remarks

    Clears all recipients assigned in the TO, CC and BCC  array.  Returns void.

    [ Top ]

    PHPMailer::ClearAttachments

ClearAttachments(
 );

    Remarks

    Clears all previously set filesystem, string, and binary  attachments.  Returns void.

    [ Top ]

    PHPMailer::ClearBCCs

ClearBCCs(
 );

    Remarks

    Clears all recipients assigned in the BCC array.  Returns void.

    [ Top ]

    PHPMailer::ClearCCs

ClearCCs(
 );

    Remarks

    Clears all recipients assigned in the CC array.  Returns void.

    [ Top ]

    PHPMailer::ClearCustomHeaders

ClearCustomHeaders(
 );

    Remarks

    Clears all custom headers.  Returns void.

    [ Top ]

    PHPMailer::ClearReplyTos

ClearReplyTos(
 );

    Remarks

    Clears all recipients assigned in the ReplyTo array.  Returns void.

    [ Top ]

    PHPMailer::CreateBody

CreateBody(
 );

    Remarks

    Assembles the message body.  Returns an empty string on failure.

    access

    private

    [ Top ]

    PHPMailer::CreateHeader

CreateHeader(
 );

    Remarks

    Assembles message header.

    access

    private

    [ Top ]

    PHPMailer::EncodeFile

EncodeFile(

$path, [
$encoding = "base64"] );

    Parameters

    $path

    $encoding

    Remarks

    Encodes attachment in requested format.  Returns an  empty string on failure.

    access

    private

    [ Top ]

    PHPMailer::EncodeHeader

EncodeHeader(

$str, [
$position = 'text'] );

    Parameters

    $str

    $position

    Remarks

    Encode a header string to best of Q, B, quoted or none.

    access

    private

    [ Top ]

    PHPMailer::EncodeQ

EncodeQ(

$str, [
$position = "text"] );

    Parameters

    $str

    $position

    Remarks

    Encode string to q encoding.

    access

    private

    [ Top ]

    PHPMailer::EncodeQP

EncodeQP(

$str );

    Parameters

    $str

    Remarks

    Encode string to quoted-printable.

    access

    private

    [ Top ]

    PHPMailer::EncodeString

EncodeString(

$str, [
$encoding = "base64"] );

    Parameters

    $str

    $encoding

    Remarks

    Encodes string to requested format. Returns an  empty string on failure.

    access

    private

    [ Top ]

    PHPMailer::EndBoundary

EndBoundary(

$boundary );

    Parameters

    $boundary

    Remarks

    Returns the end of a message boundary.

    access

    private

    [ Top ]

    PHPMailer::FixEOL

FixEOL(

$str );

    Parameters

    $str

    Remarks

    Changes every end of line from CR or LF to CRLF.

    access

    private

    [ Top ]

    PHPMailer::GetBoundary

GetBoundary(

$boundary,
$charSet,
$contentType,
$encoding );

    Parameters

    $boundary

    $charSet

    $contentType

    $encoding

    Remarks

    Returns the start of a message boundary.

    access

    private

    [ Top ]

    PHPMailer::HeaderLine

HeaderLine(

$name,
$value );

    Parameters

    $name

    $value

    Remarks

    Returns a formatted header line.

    access

    private

    [ Top ]

    PHPMailer::InlineImageExists

InlineImageExists(
 );

    Remarks

    Returns true if an inline attachment is present.

    access

    private

    [ Top ]

    PHPMailer::IsError

IsError(
 );

    Remarks

    Returns true if an error occurred.

    [ Top ]

    PHPMailer::IsHTML

IsHTML(
bool
$bool );

    Parameters

    $bool

    Remarks

    Sets message type to HTML.

    [ Top ]

    PHPMailer::IsMail

IsMail(
 );

    Remarks

    Sets Mailer to send message using PHP mail() function.

    [ Top ]

    PHPMailer::IsQmail

IsQmail(
 );

    Remarks

    Sets Mailer to send message using the qmail MTA.

    [ Top ]

    PHPMailer::IsSendmail

IsSendmail(
 );

    Remarks

    Sets Mailer to send message using the $Sendmail program.

    [ Top ]

    PHPMailer::IsSMTP

IsSMTP(
 );

    Remarks

    Sets Mailer to send message using SMTP.

    [ Top ]

    PHPMailer::Lang

Lang(

$key );

    Parameters

    $key

    Remarks

    Returns a message in the appropriate language.

    access

    private

    [ Top ]

    PHPMailer::MailSend

MailSend(

$header,
$body );

    Parameters

    $header

    $body

    Remarks

    Sends mail using the PHP mail() function.

    access

    private

    [ Top ]

    PHPMailer::RFCDate

RFCDate(
 );

    Remarks

    Returns the proper RFC 822 formatted date.

    access

    private

    [ Top ]

    PHPMailer::Send

Send(
 );

    Remarks

    Creates message and assigns Mailer. If the message is  not sent successfully then it returns false.  Use the ErrorInfo  variable to view description of the error.

    [ Top ]

    PHPMailer::SendmailSend

SendmailSend(

$header,
$body );

    Parameters

    $header

    $body

    Remarks

    Sends mail using the $Sendmail program.

    access

    private

    [ Top ]

    PHPMailer::ServerHostname

ServerHostname(
 );

    Remarks

    Returns the server hostname or 'localhost.localdomain' if unknown.

    access

    private

    [ Top ]

    PHPMailer::ServerVar

ServerVar(

$varName );

    Parameters

    $varName

    Remarks

    Returns the appropriate server variable.  Should work with both  PHP 4.1.0+ as well as older versions.  Returns an empty string  if nothing is found.

    access

    private

    [ Top ]

    PHPMailer::SetError

SetError(

$msg );

    Parameters

    $msg

    Remarks

    Adds the error message to the error container.

    Returns void.

    access

    private

    [ Top ]

    PHPMailer::SetLanguage

SetLanguage(
string
$lang_type, [string
$lang_path = "language/"] );

    Parameters

    $lang_type

    Type of language (e.g. Portuguese: "br")

    $lang_path

    Path to the language file directory

    Remarks

    Sets the language for all class error messages.  Returns false  if it cannot load the language file.  The default language type  is English.

    access

    public

    [ Top ]

    PHPMailer::SetMessageType

SetMessageType(
 );

    Remarks

    Sets the message type.

    access

    private

    [ Top ]

    PHPMailer::SetWordWrap

SetWordWrap(
 );

    Remarks

    Set the body wrapping.

    access

    private

    [ Top ]

    PHPMailer::SmtpClose

SmtpClose(
 );

    Remarks

    Closes the active SMTP session if one exists.

    [ Top ]

    PHPMailer::SmtpConnect

SmtpConnect(
 );

    Remarks

    Initiates a connection to an SMTP server.  Returns false if the  operation failed.

    access

    private

    [ Top ]

    PHPMailer::SmtpSend

SmtpSend(

$header,
$body );

    Parameters

    $header

    $body

    Remarks

    Sends mail via SMTP using PhpSMTP (Author:  Chris Ryan).  Returns bool.  Returns false if there is a  bad MAIL FROM, RCPT, or DATA input.

    access

    private

    [ Top ]

    PHPMailer::TextLine

TextLine(

$value );

    Parameters

    $value

    Remarks

    Returns a formatted mail line.

    access

    private

    [ Top ]

    PHPMailer::WrapText

WrapText(

$message,
$length, [
$qp_mode = false] );

    Parameters

    $message

    $length

    $qp_mode

    Remarks

    Wraps message for use with mailers that do not  automatically perform wrapping and for quoted-printable.

    Original written by philippe.

    access

    private

    [ Top ]

Variable Detail

  • $AltBody =  "" [line 96]
    •

  • Data type: string
    •

    Remarks

    Sets the text-only body of the message.  This automatically sets the  email to multipart/alternative.  This body can be read by mail  clients that do not have HTML email capability such as mutt. Clients  that can read HTML will view the normal Body.

  • $attachment = array() [line 217]
    •

  • Data type: mixed
    •

    access

    private

  • $bcc = array() [line 215]
    •

  • Data type: mixed
    •

    access

    private

  • $Body =  "" [line 87]
    •

  • Data type: string
    •

    Remarks

    Sets the Body of the message.  This can be either an HTML or text body.

    If HTML then run IsHTML(true).

  • $boundary = array() [line 220]
    •

  • Data type: mixed
    •

    access

    private

  • $cc = array() [line 214]
    •

  • Data type: mixed
    •

    access

    private

  • $CharSet =  "iso-8859-1" [line 36]
    •

  • Data type: string
    •

    Remarks

    Sets the CharSet of the message.

  • $ConfirmReadingTo =  "" [line 134]
    •

  • Data type: string
    •

    Remarks

    Sets the email address that a reading confirmation will be sent.

  • $ContentType =  "text/plain" [line 42]
    •

  • Data type: string
    •

    Remarks

    Sets the Content-type of the message.

  • $CustomHeader = array() [line 218]
    •

  • Data type: mixed
    •

    access

    private

  • $Encoding =  "8bit" [line 49]
    •

  • Data type: string
    •

    Remarks

    Sets the Encoding of the message. Options for this are "8bit",  "7bit", "binary", "base64", and "quoted-printable".

  • $ErrorInfo =  "" [line 55]
    •

  • Data type: string
    •

    Remarks

    Holds the most recent mailer error message.

  • $error_count =  0 [line 222]
    •

  • Data type: mixed
    •

    access

    private

  • $From =  "root@localhost" [line 61]
    •

  • Data type: string
    •

    Remarks

    Sets the From email address for the message.

  • $FromName =  "Root User" [line 67]
    •

  • Data type: string
    •

    Remarks

    Sets the From name of the message.

  • $Helo =  "" [line 168]
    •

  • Data type: string
    •

    Remarks

    Sets the SMTP HELO of the message (Default is $Hostname).

  • $Host =  "localhost" [line 156]
    •

  • Data type: string
    •

    Remarks

    Sets the SMTP hosts.  All hosts must be separated by a   semicolon.  You can also specify a different port   for each host by using this format: [hostname:port]   (e.g. "smtp1.example.com:25;smtp2.example.com").

    Hosts will be tried in order.

  • $Hostname =  "" [line 142]
    •

  • Data type: string
    •

    Remarks

    Sets the hostname to use in Message-Id and Received headers   and as default HELO string. If empty, the value returned   by SERVER_NAME is used or 'localhost.localdomain'.

  • $language = array() [line 221]
    •

  • Data type: mixed
    •

    access

    private

  • $LE =  "\n" [line 223]
    •

  • Data type: mixed
    •

    access

    private

  • $Mailer =  "mail" [line 109]
    •

  • Data type: string
    •

    Remarks

    Method to send mail: ("mail", "sendmail", or "smtp").

  • $message_type =  "" [line 219]
    •

  • Data type: mixed
    •

    access

    private

  • $Password =  "" [line 186]
    •

  • Data type: string
    •

    Remarks

    Sets SMTP password.

  • $PluginDir =  "" [line 122]
    •

  • Data type: string
    •

    Remarks

    Path to PHPMailer plugins.  This is now only useful if the SMTP class  is in a different directory than the PHP include path.

  • $Port =  25 [line 162]
    •

  • Data type: int
    •

    Remarks

    Sets the default SMTP server port.

  • $Priority =  3 [line 30]
    •

  • Data type: int
    •

    Remarks

    Email priority (1 = High, 3 = Normal, 5 = low).

  • $ReplyTo = array() [line 216]
    •

  • Data type: mixed
    •

    access

    private

  • $Sender =  "" [line 74]
    •

  • Data type: string
    •

    Remarks

    Sets the Sender email (Return-Path) of the message.  If not empty,  will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.

  • $Sendmail =  "/usr/sbin/sendmail" [line 115]
    •

  • Data type: string
    •

    Remarks

    Sets the path of the sendmail program.

  • $smtp =  NULL [line 212]
    •

  • Data type: mixed
    •

    access

    private

  • $SMTPAuth =  false [line 174]
    •

  • Data type: bool
    •

    Remarks

    Sets SMTP authentication. Utilizes the Username and Password variables.

  • $SMTPDebug =  false [line 199]
    •

  • Data type: bool
    •

    Remarks

    Sets SMTP class debugging on or off.

  • $SMTPKeepAlive =  false [line 207]
    •

  • Data type: bool
    •

    Remarks

    Prevents the SMTP connection from being closed after each mail  sending.  If this is set to true then to close the connection  requires an explicit call to SmtpClose().

  • $Subject =  "" [line 80]
    •

  • Data type: string
    •

    Remarks

    Sets the Subject of the message.

  • $Timeout =  10 [line 193]
    •

  • Data type: int
    •

    Remarks

    Sets the SMTP server timeout in seconds. This function will not   work with the win32 version.

  • $to = array() [line 213]
    •

  • Data type: mixed
    •

    access

    private

  • $Username =  "" [line 180]
    •

  • Data type: string
    •

    Remarks

    Sets SMTP username.

  • $Version =  "1.73" [line 128]
    •

  • Data type: string
    •

    Remarks

    Holds PHPMailer version.

  • $WordWrap =  0 [line 103]
    •

  • Data type: int
    •

    Remarks

    Sets word wrapping on the body of the message to a given number of  characters.

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:56:57 +0200 by phpDocumentor 1.4.0a2


Docs For Class SMTP

Class SMTP

[line 24]

Location: /mail/phpmailer/class.smtp.php

Remarks

SMTP is rfc 821 compliant and implements all the rfc 821 SMTP  commands except TURN which will always return a not implemented  error. SMTP also provides some utility methods for sending mail  to an SMTP server.

author

Chris Ryan

Class Variable Summary

  • $CRLF =  "\r\n"

        SMTP reply line ending

  • $do_debug =

        Sets whether debugging is turned on

  • $error =

  • $helo_rply =

  • $smtp_conn =

  • $SMTP_PORT =  25

        SMTP server port

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    SMTP::SMTP

SMTP(
 );

    Remarks

    Initialize the class so that the data is in a known state.

    access

    public

    [ Top ]

    SMTP::Authenticate

Authenticate(

$username,
$password );

    Parameters

    $username

    $password

    Remarks

    Performs SMTP authentication.  Must be run after running the  Hello() method.  Returns true if successfully authenticated.

    access

    public

    [ Top ]

    SMTP::Close

Close(
 );

    Remarks

    Closes the socket and cleans up the state of the class.

    It is not considered good to use this function without  first trying to use QUIT.

    access

    public

    [ Top ]

    SMTP::Connect

Connect(

$host, [
$port = 0], [
$tval = 30] );

    Parameters

    $host

    $port

    $tval

    Remarks

    Connect to the server specified on the port specified.

    If the port is not specified use the default SMTP_PORT.  If tval is specified then a connection will try and be  established with the server for that number of seconds.  If tval is not specified the default is 30 seconds to  try on the connection.
    SMTP CODE SUCCESS: 220  SMTP CODE FAILURE: 421

    access

    public

    [ Top ]

    SMTP::Connected

Connected(
 );

    Remarks

    Returns true if connected to a server otherwise false

    access

    private

    [ Top ]

    SMTP::Data

Data(

$msg_data );

    Parameters

    $msg_data

    Remarks

    Issues a data command and sends the msg_data to the server

    finializing the mail transaction. $msg_data is the message  that is to be send with the headers. Each header needs to be  on a single line followed by a <CRLF> with the message headers  and the message body being seperated by and additional <CRLF>.
    Implements rfc 821: DATA <CRLF>
    SMTP CODE INTERMEDIATE: 354      [data]      <CRLF>.<CRLF>      SMTP CODE SUCCESS: 250      SMTP CODE FAILURE: 552,554,451,452  SMTP CODE FAILURE: 451,554  SMTP CODE ERROR  : 500,501,503,421

    access

    public

    [ Top ]

    SMTP::Expand

Expand(

$name );

    Parameters

    $name

    Returns

    array

    Remarks

    Expand takes the name and asks the server to list all the  people who are members of the _list_. Expand will return  back and array of the result or false if an error occurs.

    Each value in the array returned has the format of:      [ <full-name> <sp> ] <path>  The definition of <path> is defined in rfc 821
    Implements rfc 821: EXPN <SP> <string> <CRLF>
    SMTP CODE SUCCESS: 250  SMTP CODE FAILURE: 550  SMTP CODE ERROR  : 500,501,502,504,421

    access

    public

    [ Top ]

    SMTP::get_lines

get_lines(
 );

    Remarks

    Read in as many lines as possible  either before eof or socket timeout occurs on the operation.

    With SMTP we can tell if we have more lines to read if the  4th character is '-' symbol. If it is a space then we don't  need to read anything else.

    access

    private

    [ Top ]

    SMTP::Hello

Hello(
[
$host = ""] );

    Parameters

    $host

    Remarks

    Sends the HELO command to the smtp server.

    This makes sure that we and the server are in  the same known state.
    Implements from rfc 821: HELO <SP> <domain> <CRLF>
    SMTP CODE SUCCESS: 250  SMTP CODE ERROR  : 500, 501, 504, 421

    access

    public

    [ Top ]

    SMTP::Help

Help(
[
$keyword = ""] );

    Parameters

    $keyword

    Remarks

    Gets help information on the keyword specified. If the keyword

    is not specified then returns generic help, ussually contianing  A list of keywords that help is available on. This function  returns the results back to the user. It is up to the user to  handle the returned data. If an error occurs then false is  returned with $this->error set appropiately.
    Implements rfc 821: HELP [ <SP> <string> ] <CRLF>
    SMTP CODE SUCCESS: 211,214  SMTP CODE ERROR  : 500,501,502,504,421

    access

    public

    [ Top ]

    SMTP::Mail

Mail(

$from );

    Parameters

    $from

    Remarks

    Starts a mail transaction from the email address specified in  $from. Returns true if successful or false otherwise. If True  the mail transaction is started and then one or more Recipient  commands may be called followed by a Data command.

    Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>
    SMTP CODE SUCCESS: 250  SMTP CODE SUCCESS: 552,451,452  SMTP CODE SUCCESS: 500,501,421

    access

    public

    [ Top ]

    SMTP::Noop

Noop(
 );

    Remarks

    Sends the command NOOP to the SMTP server.

    Implements from rfc 821: NOOP <CRLF>
    SMTP CODE SUCCESS: 250  SMTP CODE ERROR  : 500, 421

    access

    public

    [ Top ]

    SMTP::Quit

Quit(
[
$close_on_error = true] );

    Parameters

    $close_on_error

    Remarks

    Sends the quit command to the server and then closes the socket  if there is no error or the $close_on_error argument is true.

    Implements from rfc 821: QUIT <CRLF>
    SMTP CODE SUCCESS: 221  SMTP CODE ERROR  : 500

    access

    public

    [ Top ]

    SMTP::Recipient

Recipient(

$to );

    Parameters

    $to

    Remarks

    Sends the command RCPT to the SMTP server with the TO: argument of $to.

    Returns true if the recipient was accepted false if it was rejected.
    Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
    SMTP CODE SUCCESS: 250,251  SMTP CODE FAILURE: 550,551,552,553,450,451,452  SMTP CODE ERROR  : 500,501,503,421

    access

    public

    [ Top ]

    SMTP::Reset

Reset(
 );

    Remarks

    Sends the RSET command to abort and transaction that is  currently in progress. Returns true if successful false  otherwise.

    Implements rfc 821: RSET <CRLF>
    SMTP CODE SUCCESS: 250  SMTP CODE ERROR  : 500,501,504,421

    access

    public

    [ Top ]

    SMTP::Send

Send(

$from );

    Parameters

    $from

    Remarks

    Starts a mail transaction from the email address specified in

    $from. Returns true if successful or false otherwise. If True  the mail transaction is started and then one or more Recipient  commands may be called followed by a Data command. This command  will send the message to the users terminal if they are logged  in.
    Implements rfc 821: SEND <SP> FROM:<reverse-path> <CRLF>
    SMTP CODE SUCCESS: 250  SMTP CODE SUCCESS: 552,451,452  SMTP CODE SUCCESS: 500,501,502,421

    access

    public

    [ Top ]

    SMTP::SendAndMail

SendAndMail(

$from );

    Parameters

    $from

    Remarks

    Starts a mail transaction from the email address specified in

    $from. Returns true if successful or false otherwise. If True  the mail transaction is started and then one or more Recipient  commands may be called followed by a Data command. This command  will send the message to the users terminal if they are logged  in and send them an email.
    Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>
    SMTP CODE SUCCESS: 250  SMTP CODE SUCCESS: 552,451,452  SMTP CODE SUCCESS: 500,501,502,421

    access

    public

    [ Top ]

    SMTP::SendHello

SendHello(

$hello,
$host );

    Parameters

    $hello

    $host

    Remarks

    Sends a HELO/EHLO command.

    access

    private

    [ Top ]

    SMTP::SendOrMail

SendOrMail(

$from );

    Parameters

    $from

    Remarks

    Starts a mail transaction from the email address specified in

    $from. Returns true if successful or false otherwise. If True  the mail transaction is started and then one or more Recipient  commands may be called followed by a Data command. This command  will send the message to the users terminal if they are logged  in or mail it to them if they are not.
    Implements rfc 821: SOML <SP> FROM:<reverse-path> <CRLF>
    SMTP CODE SUCCESS: 250  SMTP CODE SUCCESS: 552,451,452  SMTP CODE SUCCESS: 500,501,502,421

    access

    public

    [ Top ]

    SMTP::Turn

Turn(
 );

    Remarks

    This is an optional command for SMTP that this class does not  support. This method is here to make the RFC821 Definition  complete for this class and __may__ be implimented in the future

    Implements from rfc 821: TURN <CRLF>
    SMTP CODE SUCCESS: 250  SMTP CODE FAILURE: 502  SMTP CODE ERROR  : 500, 503

    access

    public

    [ Top ]

    SMTP::Verify

Verify(

$name );

    Parameters

    $name

    Remarks

    Verifies that the name is recognized by the server.

    Returns false if the name could not be verified otherwise  the response from the server is returned.
    Implements rfc 821: VRFY <SP> <string> <CRLF>
    SMTP CODE SUCCESS: 250,251  SMTP CODE FAILURE: 550,551,553  SMTP CODE ERROR  : 500,501,502,421

    access

    public

    [ Top ]

Variable Detail

  • $CRLF =  "\r\n" [line 36]
    •

  • Data type: string
    •

    Remarks

    SMTP reply line ending

  • $do_debug =  [line 42]
    •

  • Data type: bool
    •

    Remarks

    Sets whether debugging is turned on

  • $error =  [line 48]
    •

  • Data type: mixed
    •

    access

    private

  • $helo_rply =  [line 49]
    •

  • Data type: mixed
    •

    access

    private

  • $smtp_conn =  [line 47]
    •

  • Data type: mixed
    •

    access

    private

  • $SMTP_PORT =  25 [line 30]
    •

  • Data type: int
    •

    Remarks

    SMTP server port

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:57:07 +0200 by phpDocumentor 1.4.0a2


File Source for compiler.foreachq.php

Source for file compiler.foreachq.php

Documentation is available at compiler.foreachq.php

  • <?php
    •

  • /**
    •

  •  * foreachq Smarty compiler plug-in
    •

  •  *
    •

  •  * See the enclosed file LICENSE for licensing information.
    •

  •  * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html
    •

  •  *
    •

  •  * @copyright   The XOOPS project http://www.xoops.org/
    •

  •  * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
    •

  •  * @author        Skalpa Keo <skalpa@xoops.org>
    •

  •  * @package        xos_opal
    •

  •  * @subpackage    xos_opal_Smarty
    •

  •  * @since       2.0.14
    •

  •  * @version        $Id: compiler.foreachq.php 506 2006-05-26 23:10:37Z skalpa $
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Quick foreach template plug-in
    •

  •  *
    •

  •  * This plug-in works as a direct replacement for the original Smarty
    •

  •  * {@link http://smarty.php.net/manual/en/language.function.foreach.php foreach} function.
    •

  •  *
    •

  •  * The difference with <var>foreach</var> is minimal in terms of functionality, but can boost your templates
    •

  •  * a lot: foreach duplicates the content of the variable that is iterated, to ensure non-array
    •

  •  * variables can be specified freely. This implementation does not do that, but as a consequence
    •

  •  * requires that the variable you specify in the <var>from</var> parameter is an array or
    •

  •  * (when using PHP5) an object. Check the difference between the code generated by foreach
    •

  •  * and foreachq to understand completely.
    •

  •  *
    •

  •  * <b>Note:</b> to use foreachq, only the opening tag has to be replaced. The closing tab still
    •

  •  * remains {/foreach}
    •

  •  *
    •

  •  * <code>
    •

  •  * // Iterate, slow version
    •

  •  * {foreach from=$array item=elt}
    •

  •  *   {$elt}
    •

  •  * {/foreach}
    •

  •  * // Iterate, fast version
    •

  •  * {foreachq from=$array item=elt}
    •

  •  *   {$elt}
    •

  •  * {/foreach}
    •

  •  * </code>
    •

  •  */
    •

  • function smarty_compiler_foreachq( $argStr, &$comp ) {
    •

  •
    •

  •     $comp->_push_tag('foreach');
    •

  •
    •

  •     $attrs = $comp->_parse_attrs( $argStr, false );
    •

  •
    •

  •     $arg_list = array();
    •

  •
    •

  •     if (empty($attrs['from'])) {
    •

  •         return $comp->_syntax_error("foreachq: missing 'from' attribute", E_USER_ERROR, __FILE__, __LINE__);
    •

  •     }
    •

  •     $from = $attrs['from'];
    •

  •
    •

  •     if (empty($attrs['item'])) {
    •

  •         return $comp->_syntax_error("foreachq: missing 'item' attribute", E_USER_ERROR, __FILE__, __LINE__);
    •

  •     }
    •

  •     $item = $comp->_dequote($attrs['item']);
    •

  •     if (!preg_match('~^\w+$~', $item)) {
    •

  •         return $comp->_syntax_error("'foreachq: item' must be a variable name (literal string)", E_USER_ERROR, __FILE__, __LINE__);
    •

  •     }
    •

  •
    •

  •     if (isset($attrs['key'])) {
    •

  •         $key  = $comp->_dequote($attrs['key']);
    •

  •         if (!preg_match('~^\w+$~', $key)) {
    •

  •             return $comp->_syntax_error("foreachq: 'key' must to be a variable name (literal string)", E_USER_ERROR, __FILE__, __LINE__);
    •

  •         }
    •

  •         $key_part = "\$this->_tpl_vars['$key'] => ";
    •

  •     } else {
    •

  •         $key = null;
    •

  •         $key_part = '';
    •

  •     }
    •

  •
    •

  •     if (isset($attrs['name'])) {
    •

  •         $name = $attrs['name'];
    •

  •     } else {
    •

  •         $name = null;
    •

  •     }
    •

  •
    •

  •     $output = '';
    •

  •     //$output .= "\$_from = $from; if (!is_array(\$_from) && !is_object(\$_from)) { settype(\$_from, 'array'); }";
    •

  •     if (isset($name)) {
    •

  •         $foreach_props = "\$this->_foreach[$name]";
    •

  •         $output .= "{$foreach_props} = array('total' => count($from), 'iteration' => 0);\n";
    •

  •         //$output .= "{$foreach_props} = array('total' => count(\$_from), 'iteration' => 0);\n";
    •

  •         $output .= "if ({$foreach_props}['total'] > 0):\n";
    •

  •         $output .= "    foreach ($from as $key_part\$this->_tpl_vars['$item']):\n";
    •

  •         //$output .= "    foreach (\$_from as $key_part\$this->_tpl_vars['$item']):\n";
    •

  •         $output .= "        {$foreach_props}['iteration']++;\n";
    •

  •     } else {
    •

  •         $output .= "if (count($from)):\n";
    •

  •         $output .= "    foreach ($from as $key_part\$this->_tpl_vars['$item']):\n";
    •

  •         //$output .= "if (count(\$_from)):\n";
    •

  •         //$output .= "    foreach (\$_from as $key_part\$this->_tpl_vars['$item']):\n";
    •

  •     }
    •

  •     //$output .= '';
    •

  •
    •

  •     return $output;
    •

  •
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:23 +0200 by phpDocumentor 1.4.0a2


File Source for compiler.includeq.php

Source for file compiler.includeq.php

Documentation is available at compiler.includeq.php

  • <?php
    •

  • /**
    •

  •  * includeq Smarty compiler plug-in
    •

  •  *
    •

  •  * See the enclosed file LICENSE for licensing information.
    •

  •  * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html
    •

  •  *
    •

  •  * @copyright   The XOOPS project http://www.xoops.org/
    •

  •  * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
    •

  •  * @author        Skalpa Keo <skalpa@xoops.org>
    •

  •  * @package        xos_opal
    •

  •  * @subpackage    xos_opal_Smarty
    •

  •  * @since       2.0.14
    •

  •  * @version        $Id: compiler.includeq.php 506 2006-05-26 23:10:37Z skalpa $
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Quick include template plug-in
    •

  •  *
    •

  •  * Like {@link smarty_compiler_foreachq() foreachq}, this plug-in has been written to provide
    •

  •  * a faster version of an already existing Smarty function. <var>includeq</var> can be used
    •

  •  * as a replacement for the Smarty
    •

  •  * {@link http://smarty.php.net/manual/en/language.function.include.php include} function as long
    •

  •  * as you are aware of the differences between them.
    •

  •  *
    •

  •  * Normally, when you include a template, Smarty does the following:
    •

  •  * - Backup all your template variables in an array
    •

  •  * - Include the template you specified
    •

  •  * - Restore the template variables from the previously created backup array
    •

  •  *
    •

  •  * The advantage of this method is that it makes the main template variables <i>safe</i>: if your
    •

  •  * main template uses a variable called <var>$stuff</var> and the included template modifies it
    •

  •  * value, the main template will recover the original value automatically.
    •

  •  *
    •

  •  * While this can be useful in some cases (for example, when you include templates you have absolutely
    •

  •  * no control over), some may consider this a limitation and it has the disadvantage of slowing down
    •

  •  * the inclusion mechanism a lot.
    •

  •  *
    •

  •  * <var>includeq</var> fixes that: the code it generates doesn't contain the variables backup/recovery
    •

  •  * mechanism and thus makes templates inclusion faster. Note that however, this new behavior may
    •

  •  * create problems in some cases (but you can prevent them most of the times, for example by always
    •

  •  * using a <var>tmp_</var> prefix for the variables you create in included templates looping sections).
    •

  •  */
    •

  • function smarty_compiler_includeq( $tag_args, &$comp ) {
    •

  •
    •

  •     $attrs = $comp->_parse_attrs($tag_args);
    •

  •     $arg_list = array();
    •

  •
    •

  •     if (empty($attrs['file'])) {
    •

  •         $comp->_syntax_error("missing 'file' attribute in includeq tag", E_USER_ERROR, __FILE__, __LINE__);
    •

  •     }
    •

  •
    •

  •     foreach ($attrs as $arg_name => $arg_value) {
    •

  •         if ($arg_name == 'file') {
    •

  •             $include_file = $arg_value;
    •

  •             continue;
    •

  •         } else if ($arg_name == 'assign') {
    •

  •             $assign_var = $arg_value;
    •

  •             continue;
    •

  •         }
    •

  •         if (is_bool($arg_value))
    •

  •             $arg_value = $arg_value ? 'true' : 'false';
    •

  •         $arg_list[] = "'$arg_name' => $arg_value";
    •

  •     }
    •

  •
    •

  •     $output = '';
    •

  •
    •

  •     if (isset($assign_var)) {
    •

  •         $output .= "ob_start();\n";
    •

  •     }
    •

  •
    •

  •     //$output .= "\$_smarty_tpl_vars = \$this->_tpl_vars;\n";
    •

  •     $_params = "array('smarty_include_tpl_file' => " . $include_file . ", 'smarty_include_vars' => array(".implode(',', (array)$arg_list)."))";
    •

  •     $output .= "\$this->_smarty_include($_params);\n";
    •

  •     //"\$this->_tpl_vars = \$_smarty_tpl_vars;\n" .
    •

  •     //"unset(\$_smarty_tpl_vars);\n";
    •

  •
    •

  •     if (isset($assign_var)) {
    •

  •         $output .= "\$this->assign(" . $assign_var . ", ob_get_contents()); ob_end_clean();\n";
    •

  •     }
    •

  •     //$output .= '';
    •

  •     return $output;
    •

  • }
    •

  •
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:24 +0200 by phpDocumentor 1.4.0a2


File Source for compiler.xoAppUrl.php

Source for file compiler.xoAppUrl.php

Documentation is available at compiler.xoAppUrl.php

  • <?php
    •

  • /**
    •

  •  * xoAppUrl Smarty compiler plug-in
    •

  •  *
    •

  •  * See the enclosed file LICENSE for licensing information.
    •

  •  * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html
    •

  •  *
    •

  •  * @copyright   The XOOPS project http://www.xoops.org/
    •

  •  * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
    •

  •  * @author        Skalpa Keo <skalpa@xoops.org>
    •

  •  * @package        xos_opal
    •

  •  * @subpackage    xos_opal_Smarty
    •

  •  * @since       2.0.14
    •

  •  * @version        $Id: compiler.xoAppUrl.php 694 2006-09-04 11:33:22Z skalpa $
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Inserts the URL of an application page
    •

  •  *
    •

  •  * This plug-in allows you to generate a module location URL. It uses any URL rewriting
    •

  •  * mechanism and rules you'll have configured for the system.
    •

  •  *
    •

  •  * To ensure this can be as optimized as possible, it accepts 2 modes of operation:
    •

  •  *
    •

  •  * <b>Static address generation</b>:<br>
    •

  •  * This is the default mode and fastest mode. When used, the URL is generated during
    •

  •  * the template compilation, and statically written in the compiled template file.
    •

  •  * To use it, you just need to provide a location in a format XOOPS understands.
    •

  •  *
    •

  •  * <code>
    •

  •  * // Generate an URL using a physical path
    •

  •  * ([xoAppUrl modules/something/yourpage.php])
    •

  •  * // Generate an URL using a module+location identifier (2.3+)
    •

  •  * ([xoAppUrl mod_xoops_Identification#logout])
    •

  •  * </code>
    •

  •  *
    •

  •  * <b>Dynamic address generation</b>:<br>
    •

  •  * The is the slowest mode, and its use should be prevented unless necessary. Here,
    •

  •  * the URL is generated dynamically each time the template is displayed, thus allowing
    •

  •  * you to use the value of a template variable in the location string. To use it, you
    •

  •  * must surround your location with double-quotes ("), and use the
    •

  •  * {@link http://smarty.php.net/manual/en/language.syntax.quotes.php Smarty quoted strings}
    •

  •  * syntax to insert variables values.
    •

  •  *
    •

  •  * <code>
    •

  •  * // Use the value of the $sortby template variable in the URL
    •

  •  * ([xoAppUrl "modules/something/yourpage.php?order=`$sortby`"])
    •

  •  * </code>
    •

  •  */
    •

  • function smarty_compiler_xoAppUrl( $argStr, &$compiler ) {
    •

  •     global $xoops;
    •

  •     $argStr = trim( $argStr );
    •

  •
    •

  •     @list( $url, $params ) = explode( ' ', $argStr, 2 );
    •

  •
    •

  •     if ( substr( $url, 0, 1 ) == '/' ) {
    •

  •         $url = 'www' . $url;
    •

  •     }
    •

  •     // Static URL generation
    •

  •     if ( strpos( $argStr, '$' ) === false && $url != '.' ) {
    •

  •         if ( isset($params) ) {
    •

  •             $params = $compiler->_parse_attrs( $params, false );
    •

  •             foreach ( $params as $k => $v ) {
    •

  •                 if ( in_array( substr( $v, 0, 1 ), array( '"', "'" ) ) ) {
    •

  •                     $params[$k] = substr( $v, 1, -1 );
    •

  •                 }
    •

  •             }
    •

  •             $url = $xoops->buildUrl( $url, $params );
    •

  •         }
    •

  •         $url = $xoops->path( $url, true );
    •

  •         return "echo '" . addslashes( htmlspecialchars( $url ) ) . "';";
    •

  •     }
    •

  •     // Dynamic URL generation
    •

  •     if ( $url == '.' ) {
    •

  •         $str = "\$_SERVER['REQUEST_URI']";
    •

  •     } else {
    •

  •         $str = "\$GLOBALS['xoops']->path( '$url', true )";
    •

  •     }
    •

  •     if ( isset($params) ) {
    •

  •         $params = $compiler->_parse_attrs( $params, false );
    •

  •         $str = "\$GLOBALS['xoops']->buildUrl( $str, array(\n";
    •

  •         foreach ( $params as $k => $v ) {
    •

  •             $str .= var_export( $k, true ) . " => $v,\n";
    •

  •         }
    •

  •         $str .= ") )";
    •

  •     }
    •

  •     return "echo htmlspecialchars( $str );";
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:25 +0200 by phpDocumentor 1.4.0a2


File Source for compiler.xoImgUrl.php

Source for file compiler.xoImgUrl.php

Documentation is available at compiler.xoImgUrl.php

  • <?php
    •

  • /**
    •

  •  * xoImgUrl Smarty compiler plug-in
    •

  •  *
    •

  •  * See the enclosed file LICENSE for licensing information.
    •

  •  * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html
    •

  •  *
    •

  •  * @copyright   The XOOPS project http://www.xoops.org/
    •

  •  * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
    •

  •  * @author        Skalpa Keo <skalpa@xoops.org>
    •

  •  * @package        xos_opal
    •

  •  * @subpackage    xos_opal_Smarty
    •

  •  * @since       2.0.14
    •

  •  * @version        $Id: compiler.xoImgUrl.php 506 2006-05-26 23:10:37Z skalpa $
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Inserts the URL of a file resource customizable by themes
    •

  •  *
    •

  •  * This plug-in works like the {@link smarty_compiler_xoAppUrl() xoAppUrl} plug-in,
    •

  •  * except that it is intended to generate the URL of resource files customizable by
    •

  •  * themes.
    •

  •  *
    •

  •  * Here the current theme is asked to check if a custom version of the requested file exists, and
    •

  •  * if one is found its URL is returned. Otherwise, the request will be passed to the
    •

  •  * theme parents one by one. Ultimately, if no custom version has been found, the resource
    •

  •  * default URL location will be returned.
    •

  •  *
    •

  •  * <b>Note:</b> the themes inheritance system can generate many filesystem accesses depending
    •

  •  * on your themes configuration. Because of this, the use of the dynamic syntax with this plug-in
    •

  •  * is not possible right now.
    •

  •  */
    •

  • function smarty_compiler_xoImgUrl( $argStr, &$smarty ) {
    •

  •     global $xoops, $xoTheme;
    •

  •
    •

  •     $argStr = trim( $argStr );
    •

  •     $path = ( isset($xoTheme) && is_object( $xoTheme ) ) ? $xoTheme->resourcePath( $argStr ) : $argStr;
    •

  •     return "\necho '" . addslashes( $xoops->url( $path ) ) . "';";
    •

  •
    •

  • }
    •

  •
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:25 +0200 by phpDocumentor 1.4.0a2


Docs for page compiler.foreachq.php

File: /smarty/xoops_plugins/compiler.foreachq.php

Remarks

foreachq Smarty compiler plug-in

See the enclosed file LICENSE for licensing information. If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html

author

Skalpa Keo <skalpa@xoops.org>

version

$Id: compiler.foreachq.php 506 2006-05-26 23:10:37Z skalpa $

copyright

The XOOPS project http://www.xoops.org/

since

2.0.14

filesource

Source Code for this file

license

GNU public license

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_compiler_foreachq()
    Quick foreach template plug-in

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_compiler_foreachq() [line 44]

    Usage: smarty_compiler_foreachq( $argStr, &$comp)

    Parameters

    $argStr

    &$comp

    Remarks

    Quick foreach template plug-in

    This plug-in works as a direct replacement for the original Smarty foreach function.

    The difference with foreach is minimal in terms of functionality, but can boost your templates a lot: foreach duplicates the content of the variable that is iterated, to ensure non-array variables can be specified freely. This implementation does not do that, but as a consequence requires that the variable you specify in the from parameter is an array or (when using PHP5) an object. Check the difference between the code generated by foreach and foreachq to understand completely.

    Note: to use foreachq, only the opening tag has to be replaced. The closing tab still remains {/foreach}

  •  // Iterate, slow version
    •

  •  {foreach from=$array item=elt}
    •

  •    {$elt}
    •

  •  {/foreach}
    •

  •  // Iterate, fast version
    •

  •  {foreachq from=$array item=elt}
    •

  •    {$elt}
    •

  •  {/foreach}
    •

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:23 +0200 by phpDocumentor 1.4.0a2


Docs for page compiler.includeq.php

File: /smarty/xoops_plugins/compiler.includeq.php

Remarks

includeq Smarty compiler plug-in

See the enclosed file LICENSE for licensing information. If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html

author

Skalpa Keo <skalpa@xoops.org>

version

$Id: compiler.includeq.php 506 2006-05-26 23:10:37Z skalpa $

copyright

The XOOPS project http://www.xoops.org/

since

2.0.14

filesource

Source Code for this file

license

GNU public license

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_compiler_includeq()
    Quick include template plug-in

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_compiler_includeq() [line 44]

    Usage: smarty_compiler_includeq( $tag_args, &$comp)

    Parameters

    $tag_args

    &$comp

    Remarks

    Quick include template plug-in

    Like foreachq, this plug-in has been written to provide a faster version of an already existing Smarty function. includeq can be used as a replacement for the Smarty include function as long as you are aware of the differences between them.

    Normally, when you include a template, Smarty does the following:

    • Backup all your template variables in an array
    • Include the template you specified
    • Restore the template variables from the previously created backup array
    The advantage of this method is that it makes the main template variables safe: if your main template uses a variable called $stuff and the included template modifies it value, the main template will recover the original value automatically.

    While this can be useful in some cases (for example, when you include templates you have absolutely no control over), some may consider this a limitation and it has the disadvantage of slowing down the inclusion mechanism a lot.

    includeq fixes that: the code it generates doesn't contain the variables backup/recovery mechanism and thus makes templates inclusion faster. Note that however, this new behavior may create problems in some cases (but you can prevent them most of the times, for example by always using a tmp_ prefix for the variables you create in included templates looping sections).

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:24 +0200 by phpDocumentor 1.4.0a2


Docs for page compiler.xoAppUrl.php

File: /smarty/xoops_plugins/compiler.xoAppUrl.php

Remarks

xoAppUrl Smarty compiler plug-in

See the enclosed file LICENSE for licensing information. If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html

author

Skalpa Keo <skalpa@xoops.org>

version

$Id: compiler.xoAppUrl.php 694 2006-09-04 11:33:22Z skalpa $

copyright

The XOOPS project http://www.xoops.org/

since

2.0.14

filesource

Source Code for this file

license

GNU public license

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_compiler_xoAppUrl()
    Inserts the URL of an application page

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_compiler_xoAppUrl() [line 50]

    Usage: smarty_compiler_xoAppUrl( $argStr, &$compiler)

    Parameters

    $argStr

    &$compiler

    Remarks

    Inserts the URL of an application page

    This plug-in allows you to generate a module location URL. It uses any URL rewriting mechanism and rules you'll have configured for the system.

    To ensure this can be as optimized as possible, it accepts 2 modes of operation:

    Static address generation:
    This is the default mode and fastest mode. When used, the URL is generated during the template compilation, and statically written in the compiled template file. To use it, you just need to provide a location in a format XOOPS understands.

  •  // Generate an URL using a physical path
    •

  •  ([xoAppUrl modules/something/yourpage.php])
    •

  •  // Generate an URL using a module+location identifier (2.3+)
    •

  •  ([xoAppUrl mod_xoops_Identification#logout])
    •

    Dynamic address generation:
    The is the slowest mode, and its use should be prevented unless necessary. Here, the URL is generated dynamically each time the template is displayed, thus allowing you to use the value of a template variable in the location string. To use it, you must surround your location with double-quotes ("), and use the Smarty quoted strings syntax to insert variables values.

  •  // Use the value of the $sortby template variable in the URL
    •

  •  ([xoAppUrl "modules/something/yourpage.php?order=`$sortby`"])
    •

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:24 +0200 by phpDocumentor 1.4.0a2


Docs for page compiler.xoImgUrl.php

File: /smarty/xoops_plugins/compiler.xoImgUrl.php

Remarks

xoImgUrl Smarty compiler plug-in

See the enclosed file LICENSE for licensing information. If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html

author

Skalpa Keo <skalpa@xoops.org>

version

$Id: compiler.xoImgUrl.php 506 2006-05-26 23:10:37Z skalpa $

copyright

The XOOPS project http://www.xoops.org/

since

2.0.14

filesource

Source Code for this file

license

GNU public license

Classes in this file:

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void smarty_compiler_xoImgUrl()
    Inserts the URL of a file resource customizable by themes

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void smarty_compiler_xoImgUrl() [line 33]

    Usage: smarty_compiler_xoImgUrl( $argStr, &$smarty)

    Parameters

    $argStr

    &$smarty

    Remarks

    Inserts the URL of a file resource customizable by themes

    This plug-in works like the xoAppUrl plug-in, except that it is intended to generate the URL of resource files customizable by themes.

    Here the current theme is asked to check if a custom version of the requested file exists, and if one is found its URL is returned. Otherwise, the request will be passed to the theme parents one by one. Ultimately, if no custom version has been found, the resource default URL location will be returned.

    Note: the themes inheritance system can generate many filesystem accesses depending on your themes configuration. Because of this, the use of the dynamic syntax with this plug-in is not possible right now.

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:57:25 +0200 by phpDocumentor 1.4.0a2


File Source for theme.php

Source for file theme.php

Documentation is available at theme.php

  • <?php
    •

  • /**
    •

  • * xos_opal_Theme component class file
    •

  • *
    •

  • * @copyright    The Xoops project http://www.xoops.org/
    •

  • * @license      http://www.fsf.org/copyleft/gpl.html GNU public license
    •

  • * @author       Skalpa Keo <skalpa@xoops.org>
    •

  • * @since        2.3.0
    •

  • * @version        $Id: theme.php 892 2007-07-28 09:35:49Z phppp $
    •

  • * @package         xos_opal
    •

  • * @subpackage     xos_opal_Theme
    •

  • */
    •

  •
    •

  • /**
    •

  • * xos_opal_ThemeFactory
    •

  • *
    •

  • * @author         Skalpa Keo
    •

  • * @package        xos_opal
    •

  • * @subpackage    xos_opal_Theme
    •

  • * @since        2.3.0
    •

  • */
    •

  • class xos_opal_ThemeFactory {
    •

  •
    •

  •     var $xoBundleIdentifier = 'xos_opal_ThemeFactory';
    •

  •     /**
    •

  •      * Currently enabled themes (if empty, all the themes in themes/ are allowed)
    •

  •      * @var array
    •

  •      */
    •

  •     var $allowedThemes = array();
    •

  •     /**
    •

  •      * Default theme to instanciate if none specified
    •

  •      * @var string
    •

  •      */
    •

  •     var $defaultTheme = 'default';
    •

  •     /**
    •

  •      * If users are allowed to choose a custom theme
    •

  •      * @var bool
    •

  •      */
    •

  •     var $allowUserSelection = true;
    •

  •
    •

  •     /**
    •

  •      * Instanciate the specified theme
    •

  •      */
    •

  •     function &createInstance( $options = array(), $initArgs = array() ) {
    •

  •         // Grab the theme folder from request vars if present
    •

  •         if ( @empty( $options['folderName'] ) ) {
    •

  •             if ( ( $req = @$_REQUEST['xoops_theme_select'] ) && $this->isThemeAllowed( $req ) ) {
    •

  •                 $options['folderName'] = $req;
    •

  •                 if ( isset( $_SESSION ) && $this->allowUserSelection ) {
    •

  •                     $_SESSION[ $this->xoBundleIdentifier ]['defaultTheme'] = $req;
    •

  •                 }
    •

  •             } elseif ( isset( $_SESSION[ $this->xoBundleIdentifier ]['defaultTheme'] ) ) {
    •

  •                 $options['folderName'] = $_SESSION[ $this->xoBundleIdentifier ]['defaultTheme'];
    •

  •             } elseif ( @empty( $options['folderName'] ) || !$this->isThemeAllowed( $options['folderName'] ) ) {
    •

  •                 $options['folderName'] = $this->defaultTheme;
    •

  •             }
    •

  •             $GLOBALS['xoopsConfig']['theme_set'] = $options['folderName'];
    •

  •         }
    •

  •         $options['path'] = XOOPS_THEME_PATH . '/' . $options['folderName'];
    •

  •         $inst =& new xos_opal_Theme();
    •

  •         foreach ( $options as $k => $v ) $inst->$k = $v;
    •

  •         $inst->xoInit();
    •

  •         return $inst;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Checks if the specified theme is enabled or not
    •

  •      * @param string $name
    •

  •      * @return bool
    •

  •      */
    •

  •     function isThemeAllowed( $name ) {
    •

  •         return ( empty( $this->allowedThemes ) || in_array( $name, $this->allowedThemes ) );
    •

  •     }
    •

  •
    •

  • }
    •

  •
    •

  • class xos_opal_Theme {
    •

  •    /**
    •

  •     * The name of this theme
    •

  •     * @var string
    •

  •     */
    •

  •     var $folderName = '';
    •

  •    /**
    •

  •     * Physical path of this theme folder
    •

  •     * @var string
    •

  •     */
    •

  •     var $path = '';
    •

  •     var $url = '';
    •

  •
    •

  •    /**
    •

  •     * Whether or not the theme engine should include the output generated by php
    •

  •     * @var string
    •

  •     */
    •

  •     var $bufferOutput = true;
    •

  •     /**
    •

  •     * Canvas-level template to use
    •

  •     * @var string
    •

  •     */
    •

  •     var $canvasTemplate = 'theme.html';
    •

  •     /**
    •

  •     * Content-level template to use
    •

  •     * @var string
    •

  •     */
    •

  •     var $contentTemplate = '';
    •

  •
    •

  •     var $contentCacheLifetime = 0;
    •

  •     var $contentCacheId = null;
    •

  •
    •

  •     /**
    •

  •     * Text content to display right after the contentTemplate output
    •

  •     * @var string
    •

  •     */
    •

  •     var $content = '';
    •

  •     /**
    •

  •     * Page construction plug-ins to use
    •

  •     * @var array
    •

  •     * @access public
    •

  •     */
    •

  •     var $plugins = array( 'xos_logos_PageBuilder' );
    •

  •
    •

  •     var $renderCount = 0;
    •

  •     /**
    •

  •      * Pointer to the theme template engine
    •

  •      * @var XoopsTpl
    •

  •      */
    •

  •     var $template = false;
    •

  •
    •

  •     /**
    •

  •      * Array containing the document meta-information
    •

  •      * @var array
    •

  •      */
    •

  •     var $metas = array(
    •

  •         'http' => array(
    •

  •             'Content-Script-Type' => 'text/javascript',
    •

  •             'Content-Style-Type' => 'text/css',
    •

  •         ),
    •

  •         'meta' => array(),
    •

  •         'link' => array(),
    •

  •         'script' => array(),
    •

  •     );
    •

  •
    •

  •     /**
    •

  •      * Array of strings to be inserted in the head tag of HTML documents
    •

  •      * @var array
    •

  •      */
    •

  •     var $htmlHeadStrings = array();
    •

  •     /**
    •

  •      * Custom variables that will always be assigned to the template
    •

  •      * @var array
    •

  •      */
    •

  •     var $templateVars = array();
    •

  •
    •

  •     /**
    •

  •      * User extra information for cache id, like language, user groups
    •

  •      *
    •

  •      * @var boolean
    •

  •      */
    •

  •     var $use_extra_cache_id = true;
    •

  •
    •

  •    /**#@-*/
    •

  •
    •

  •     /**#@+ @tasktype 10 Initialization*/
    •

  •     /**
    •

  •      * Initializes this theme
    •

  •      *
    •

  •      * Upon initialization, the theme creates its template engine and instanciates the
    •

  •      * plug-ins from the specified {@link $plugins} list. If the theme is a 2.0 theme, that does not
    •

  •      * display redirection messages, the HTTP redirections system is disabled to ensure users will
    •

  •      * see the redirection screen.
    •

  •      *
    •

  •      * @param array $options
    •

  •      * @return bool
    •

  •      */
    •

  •    function xoInit( $options = array() ) {
    •

  •         global $xoops;
    •

  •
    •

  •         $this->path = XOOPS_ROOT_PATH . '/themes/' . $this->folderName;
    •

  •         $this->url = XOOPS_URL . '/themes/' . $this->folderName;
    •

  •
    •

  •         $this->template =& new XoopsTpl();
    •

  •         $this->template->currentTheme =& $this;
    •

  •         $this->template->assign_by_ref( 'xoTheme', $this );
    •

  •
    •

  •         global $xoopsConfig, $xoopsModule, $xoopsUser;
    •

  •         $this->template->assign( array(
    •

  •             'xoops_theme' => $xoopsConfig['theme_set'],
    •

  •             'xoops_imageurl' => XOOPS_THEME_URL.'/'.$xoopsConfig['theme_set'].'/',
    •

  •             'xoops_themecss'=> xoops_getcss($xoopsConfig['theme_set']),
    •

  •             'xoops_requesturi' => htmlspecialchars( $_SERVER['REQUEST_URI'], ENT_QUOTES),
    •

  •             'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES),
    •

  •             'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES),
    •

  •             'xoops_dirname' => @$xoopsModule ? $xoopsModule->getVar( 'dirname' ) : 'system',
    •

  •             'xoops_banner' => $xoopsConfig['banners'] ? xoops_getbanner() : '&nbsp;',
    •

  •             'xoops_pagetitle' => isset($xoopsModule) && is_object($xoopsModule) ? $xoopsModule->getVar('name') : htmlspecialchars( $xoopsConfig['slogan'], ENT_QUOTES ),
    •

  •         ) );
    •

  •         if ( isset($xoopsUser) && is_object($xoopsUser) ) {
    •

  •             $this->template->assign( array(
    •

  •                 'xoops_isuser' => true,
    •

  •                 'xoops_userid' => $xoopsUser->getVar('uid'),
    •

  •                 'xoops_uname' => $xoopsUser->getVar('uname'),
    •

  •                 'xoops_isadmin' => $GLOBALS['xoopsUserIsAdmin'],
    •

  •             ) );
    •

  •         } else {
    •

  •             $this->template->assign( array( 'xoops_isuser' => false, 'xoops_isadmin' => false ) );
    •

  •         }
    •

  •         // Meta tags
    •

  •         $config_handler =& xoops_gethandler('config');
    •

  •         $criteria = new CriteriaCompo(new Criteria('conf_modid', 0));
    •

  •         $criteria->add(new Criteria('conf_catid', XOOPS_CONF_METAFOOTER));
    •

  •         $config = $config_handler->getConfigs($criteria, true);
    •

  •         foreach ( array_keys($config) as $i ) {
    •

  •             $name = $config[$i]->getVar( 'conf_name', 'n' );
    •

  •             $value = $config[$i]->getVar( 'conf_value', 'n' );
    •

  •             if ( substr( $name, 0, 5 ) == 'meta_' ) {
    •

  •                 $this->addMeta( 'meta', substr( $name, 5 ), $value );
    •

  •             } else {
    •

  •                 // prefix each tag with 'xoops_'
    •

  •                 $this->template->assign( "xoops_$name", $value );
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if ( $this->bufferOutput ) {
    •

  •             ob_start();
    •

  •         }
    •

  •         $GLOBALS['xoTheme'] =& $this;
    •

  •         $GLOBALS['xoopsTpl'] =& $this->template;
    •

  •         // Instanciate and initialize all the theme plugins
    •

  •         foreach ( $this->plugins as $k => $bundleId ) {
    •

  •             if ( !is_object( $bundleId ) ) {
    •

  •                 $this->plugins[$bundleId] =& new $bundleId();
    •

  •                 $this->plugins[$bundleId]->theme =& $this;
    •

  •                 $this->plugins[$bundleId]->xoInit();
    •

  •                 unset( $this->plugins[$k] );
    •

  •             }
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •     /**#@-*/
    •

  •
    •

  •     /**
    •

  •      * Generate cache id based on extra information of language and user groups
    •

  •      *
    •

  •      * User groups other than anonymous should be detected to avoid disclosing group sensitive contents
    •

  •      *
    •

  •      * @param string    $cache_id        raw cache id
    •

  •      * @param string    $extraString    extra string
    •

  •      *
    •

  •      * @return string    complete cache id
    •

  •      */
    •

  •     function generateCacheId($cache_id, $extraString = '') {
    •

  •         static $extra_string;
    •

  •
    •

  •         if (!$this->use_extra_cache_id) {
    •

  •             return $cache_id;
    •

  •         }
    •

  •
    •

  •         if (empty($extraString)) {
    •

  •             if (empty($extra_string)) {
    •

  •                 global $xoopsUser, $xoopsConfig;
    •

  •
    •

  •                 // Generate language section
    •

  •                 $extra_string = $xoopsConfig['language'];
    •

  •
    •

  •                 // Generate group section
    •

  •                 if ( !@is_object( $xoopsUser ) ) {
    •

  •                     $extra_string .= '|' . XOOPS_GROUP_ANONYMOUS;
    •

  •                 } else {
    •

  •                     $groups = $xoopsUser->getGroups();
    •

  •                     sort($groups);
    •

  •                     // Generate group string for non-anonymous groups,
    •

  •                     // XOOPS_DB_PASS and XOOPS_DB_NAME (before we find better variables) are used to protect group sensitive contents
    •

  •                     $extra_string .= '|' . implode(",", $groups).substr( md5(XOOPS_DB_PASS.XOOPS_DB_NAME), 0, strlen(XOOPS_DB_USER) * 2 );
    •

  •                 }
    •

  •             }
    •

  •             $extraString = $extra_string;
    •

  •         }
    •

  •         $cache_id .= '|' . $extraString;
    •

  •
    •

  •         return $cache_id;
    •

  •     }
    •

  •
    •

  •     function checkCache() {
    •

  •         global $xoopsModule, $xoopsLogger;
    •

  •
    •

  •         if ( $_SERVER['REQUEST_METHOD'] != 'POST' && $this->contentCacheLifetime ) {
    •

  •             $template = $this->contentTemplate ? $this->contentTemplate : 'db:system_dummy.html';
    •

  •             $dirname = $xoopsModule->getVar( 'dirname', 'n' );
    •

  •
    •

  •             $this->template->caching = 2;
    •

  •             $this->template->cache_lifetime = $this->contentCacheLifetime;
    •

  •             $uri = str_replace( XOOPS_URL, '', $_SERVER['REQUEST_URI'] );
    •

  •             // Clean uri by removing session id
    •

  •             if (defined('SID') && SID && strpos($uri, SID)) {
    •

  •                 $uri = preg_replace("/([\?&])(".SID."$|".SID."&)/", "\\1", $uri);
    •

  •             }
    •

  •             $this->contentCacheId = $this->generateCacheId($dirname . '|' . $uri);
    •

  •
    •

  •             if ( $this->template->is_cached( $template, $this->contentCacheId ) ) {
    •

  •                 $xoopsLogger->addExtra( $template,    sprintf('Cached (regenerates every %d seconds)', $this->contentCacheLifetime  ) );
    •

  •                 $this->render( null, null, $template );
    •

  •                 return true;
    •

  •             }
    •

  •         }
    •

  •         return false;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Render the page
    •

  •      *
    •

  •      * The theme engine builds pages from 2 templates: canvas and content.
    •

  •      *
    •

  •      * A module can call this method directly and specify what templates the theme engine must use.
    •

  •      * If render() hasn't been called before, the theme defaults will be used for the canvas and
    •

  •      * page template (and xoopsOption['template_main'] for the content).
    •

  •      *
    •

  •      * @param string $canvasTpl        The canvas template, if different from the theme default
    •

  •      * @param string $pageTpl        The page template, if different from the theme default (unsupported, 2.3+ only)
    •

  •      * @param string $contentTpl    The content template
    •

  •      * @param array     $vars            Template variables to send to the template engine
    •

  •      */
    •

  •     function render( $canvasTpl = null, $pageTpl = null, $contentTpl = null, $vars = array() ) {
    •

  •         global $xoops, $xoopsLogger, $xoopsOption;
    •

  •
    •

  •         if ( $this->renderCount ) {
    •

  •             return false;
    •

  •         }
    •

  •         $xoopsLogger->startTime( 'Page rendering' );
    •

  •
    •

  •         // @internal: Lame fix to ensure the metas specified in the xoops config page don't appear twice
    •

  •         $old = array( 'robots', 'keywords', 'description', 'rating', 'author', 'copyright' );
    •

  •         foreach ( $this->metas['meta'] as $name => $value ) {
    •

  •             if ( in_array( $name, $old ) ) {
    •

  •                 $this->template->assign( "xoops_meta_$name", htmlspecialchars( $value, ENT_QUOTES ) );
    •

  •                 unset( $this->metas['meta'][$name] );
    •

  •             }
    •

  •         }
    •

  •
    •

  •         if ( $canvasTpl )        $this->canvasTemplate    = $canvasTpl;
    •

  •         if ( $contentTpl )        $this->contentTemplate    = $contentTpl;
    •

  •
    •

  •         if ( !empty( $vars ) ) {
    •

  •             $this->template->assign( $vars );
    •

  •         }
    •

  •         if ( $this->contentTemplate ) {
    •

  •             $this->content = $this->template->fetch( $this->contentTemplate, $this->contentCacheId );
    •

  •         }
    •

  •         if ( $this->bufferOutput ) {
    •

  •             $this->content .= ob_get_contents();
    •

  •             ob_end_clean();
    •

  •         }
    •

  •         $this->template->assign_by_ref( 'xoops_contents', $this->content );
    •

  •
    •

  •         $header = empty($xoopsOption['xoops_module_header']) ? $this->template->get_template_vars( 'xoops_module_header' ) : $xoopsOption['xoops_module_header'];
    •

  •         $this->template->assign( 'xoops_module_header', $header . "\n" . $this->renderMetas( null, true ) );
    •

  •
    •

  •         if ( !empty($xoopsOption['xoops_pagetitle']) ) {
    •

  •             $this->template->assign( 'xoops_pagetitle', $xoopsOption['xoops_pagetitle'] );
    •

  •         }
    •

  •
    •

  •         // Do not cache the main (theme.html) template output
    •

  •         $this->template->caching = 0;
    •

  •         $this->template->display( $this->path . '/' . $this->canvasTemplate );
    •

  •
    •

  •         $this->renderCount++;
    •

  •         $xoopsLogger->stopTime( 'Page rendering' );
    •

  •     }
    •

  •
    •

  •     /**#@+ @tasktype 20 Manipulating page meta-information*/
    •

  •     /**
    •

  •     * Adds script code to the document head
    •

  •     *
    •

  •     * This methods allows the insertion of an external script file (if $src is provided), or
    •

  •     * of a script snippet. The file URI is parsed to take benefit of the theme resource
    •

  •     * overloading system.
    •

  •     *
    •

  •     * The $attributes parameter allows you to specify the attributes that will be added to the
    •

  •     * inserted <script> tag. If unspecified, the <var>type</var> attribute value will default to
    •

  •     * 'text/javascript'.
    •

  •     *
    •

  •     * <code>
    •

  •     * // Add an external script using a physical path
    •

  •     * $theme->addScript( 'www/script.js', null, '' );
    •

  •     * $theme->addScript( 'modules/newbb/script.js', null, '' );
    •

  •     * // Specify attributes for the <script> tag
    •

  •     * $theme->addScript( 'mod_xoops_SiteManager#common.js', array( 'type' => 'application/x-javascript' ), '' );
    •

  •     * // Insert a code snippet
    •

  •     * $theme->addScript( null, array( 'type' => 'application/x-javascript' ), 'window.open("Hello world");' );
    •

  •     * </code>
    •

  •     *
    •

  •     * @param string $src path to an external script file
    •

  •     * @param array $attributes hash of attributes to add to the <script> tag
    •

  •     * @param string $content Code snippet to output within the <script> tag
    •

  •     *
    •

  •     * @return void
    •

  •     ***/
    •

  •     function addScript( $src = '', $attributes = array(), $content = '' ) {
    •

  •         global $xoops;
    •

  •         if ( empty( $attributes ) )             $attributes = array();
    •

  •         if ( !empty( $src ) )                     $attributes['src'] = $xoops->url( $this->resourcePath( $src ) );
    •

  •         if ( !empty( $content ) )                $attributes['_'] = $content;
    •

  •         if ( !isset( $attributes['type'] ) )     $attributes['type'] = 'text/javascript';
    •

  •         $this->addMeta( 'script', $src, $attributes );
    •

  •     }
    •

  •     /**
    •

  •      * Add StyleSheet or CSS code to the document head
    •

  •      * @param string $src path to .css file
    •

  •      * @param array $attributes name => value paired array of attributes such as title
    •

  •      * @param string $content CSS code to output between the <style> tags (in case $src is empty)
    •

  •      *
    •

  •      * @return void
    •

  •      ***/
    •

  •     function addStylesheet( $src = '', $attributes = array(), $content = '' ) {
    •

  •         global $xoops;
    •

  •         if ( empty( $attributes ) )             $attributes = array();
    •

  •         if ( !empty( $src ) )                     $attributes['href'] = $xoops->url( $this->resourcePath( $src ) );
    •

  •         if ( !isset($attributes['type']) )         $attributes['type'] = 'text/css';
    •

  •         if ( !empty( $content ) )                 $attributes['_'] = $content;
    •

  •         $this->addMeta( 'stylesheet', $src, $attributes );
    •

  •     }
    •

  •     /**
    •

  •       * Add a <link> to the header
    •

  •       * @param string    $rel        Relationship from the current doc to the anchored one
    •

  •       * @param string    $href        URI of the anchored document
    •

  •       * @param array        $attributes    Additional attributes to add to the <link> element
    •

  •       */
    •

  •     function addLink( $rel, $href = '', $attributes = array() ) {
    •

  •         global $xoops;
    •

  •         if ( empty( $attributes ) )             $attributes = array();
    •

  •         if ( !empty( $href ) )                     $attributes['href'] = $href;
    •

  •         $this->addMeta( 'link', $rel, $attributes );
    •

  •     }
    •

  •     /**
    •

  •      * Set a meta http-equiv value
    •

  •      */
    •

  •     function addHttpMeta( $name, $value = null ) {
    •

  •         if ( isset($value) ) {
    •

  •             return $this->addMeta( 'http', $name, $value );
    •

  •         }
    •

  •         unset( $this->metas['http'][$name] );
    •

  •     }
    •

  •     /**
    •

  •      * Change output page meta-information
    •

  •      */
    •

  •     function addMeta( $type = 'meta', $name = '', $value = '' ) {
    •

  •         if ( !isset( $this->metas[$type] ) ) {
    •

  •             $this->metas[$type] = array();
    •

  •         }
    •

  •         if ( isset($name) ) {
    •

  •             $this->metas[$type][$name] = $value;
    •

  •         } else {
    •

  •             $this->metas[$type][] =     $value;
    •

  •         }
    •

  •         return $value;
    •

  •     }
    •

  •
    •

  •     function headContent( $params, $content, &$smarty, &$repeat ) {
    •

  •         if ( !$repeat ) {
    •

  •             $this->htmlHeadStrings[] = $content;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function renderMetas( $type = null, $return = false ) {
    •

  •         $str = '';
    •

  •         if ( !isset($type) ) {
    •

  •             foreach ( array_keys($this->metas) as $type ) {
    •

  •                 $str .= $this->renderMetas( $type, true );
    •

  •             }
    •

  •             $str .= implode( "\n", $this->htmlHeadStrings );
    •

  •         } else {
    •

  •             switch ( $type ) {
    •

  •             case 'script':
    •

  •                 foreach ( $this->metas[$type] as $attrs ) {
    •

  •                     $str .= '<script' . $this->renderAttributes( $attrs ) . ">\n";
    •

  •                     if ( @$attrs['_'] ) {
    •

  •                         $str .= "\n//<![CDATA[\n" . $attrs['_'] . "\n//]]>";
    •

  •                     }
    •

  •                     $str .= "</script>\n";
    •

  •                 }
    •

  •                 break;
    •

  •             case 'link':
    •

  •                 foreach ( $this->metas[$type] as $rel => $attrs ) {
    •

  •                     $str .= '<link rel="' . $rel . '"' . $this->renderAttributes( $attrs ) . " />\n";
    •

  •                 }
    •

  •                 break;
    •

  •             case 'stylesheet':
    •

  •                 foreach ( $this->metas[$type] as $attrs ) {
    •

  •                     if ( @$attrs['_'] ) {
    •

  •                         $str .= '<style' . $this->renderAttributes($attrs) . ">\n/* <![CDATA[ */\n" . $attrs['_'] . "\n/* //]]> */\n</style>";
    •

  •                     } else {
    •

  •                         $str .= '<link rel="stylesheet"' . $this->renderAttributes($attrs) . " />\n";
    •

  •                     }
    •

  •                 }
    •

  •                 break;
    •

  •             case 'http':
    •

  •                 foreach ( $this->metas[$type] as $name => $content ) {
    •

  •                     $str .= '<meta http-equiv="' . htmlspecialchars( $name, ENT_QUOTES ) . '" content="' . htmlspecialchars( $content, ENT_QUOTES) . "\" />\n";
    •

  •                 }
    •

  •                 break;
    •

  •             default:
    •

  •                 foreach ( $this->metas[$type] as $name => $content ) {
    •

  •                     $str .= '<meta name="' . htmlspecialchars( $name, ENT_QUOTES ) . '" content="' . htmlspecialchars( $content, ENT_QUOTES) . "\" />\n";
    •

  •                 }
    •

  •                 break;
    •

  •             }
    •

  •         }
    •

  •         if ( $return ) {
    •

  •             return $str;
    •

  •         }
    •

  •         echo $str;
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Generates a unique element ID
    •

  •      * @param string $tagName
    •

  •      * @return string
    •

  •      */
    •

  •     function genElementId( $tagName = 'xos' ) {
    •

  •         static $cache = array();
    •

  •         if ( !isset( $cache[ $tagName ] ) ) {
    •

  •             $cache[$tagName] = 1;
    •

  •         }
    •

  •         return $tagName . '-' . $cache[$tagName]++;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Transform an attributes collection to an XML string
    •

  •      * @param array $coll
    •

  •      * @return string
    •

  •      */
    •

  •     function renderAttributes( $coll ) {
    •

  •         $str = '';
    •

  •         foreach ( $coll as $name => $val ) {
    •

  •             if ( $name != '_' ) {
    •

  •                 $str .= ' ' . $name . '="' . htmlspecialchars( $val, ENT_QUOTES ) . '"';
    •

  •             }
    •

  •         }
    •

  •         return $str;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Return a themable file resource path
    •

  •      *
    •

  •      * @param string $path
    •

  •      * @return string
    •

  •      */
    •

  •     function resourcePath( $path ) {
    •

  •         global $xoops;
    •

  •         if ( substr( $path, 0, 1 ) == '/' ) {
    •

  •             $path = substr( $path, 1 );
    •

  •         }
    •

  •         if ( file_exists( "$this->path/$path" ) ) {
    •

  •             return "themes/$this->folderName/$path";
    •

  •         }
    •

  •         return $path;
    •

  •     }
    •

  •
    •

  •
    •

  •
    •

  •
    •

  • }
    •

  •
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:13 +0200 by phpDocumentor 1.4.0a2


Docs For Class xos_opal_Theme

Class xos_opal_Theme

[line 77]

Location: /theme.php

Class Variable Summary

  • $bufferOutput =  true

        Whether or not the theme engine should include the output generated by php

  • $canvasTemplate =  'theme.html'

        Canvas-level template to use

  • $content =  ''

        Text content to display right after the contentTemplate output

  • $contentCacheId =  null

  • $contentCacheLifetime =  0

  • $contentTemplate =  ''

        Content-level template to use

  • $folderName =  ''

        The name of this theme

  • $htmlHeadStrings = array()

        Array of strings to be inserted in the head tag of HTML documents

  • $metas = array(

      'http' => array(

         'Content-Script-Type' => 'text/javascript',

         'Content-Style-Type' => 'text/css',

      ),'meta'=>array(),'link'=>array(),'script'=>array(),)

        Array containing the document meta-information

  • $path =  ''

        Physical path of this theme folder

  • $plugins = array( 'xos_logos_PageBuilder' )

        Page construction plug-ins to use

  • $renderCount =  0

  • $template =  false

        Pointer to the theme template engine

  • $templateVars = array()

        Custom variables that will always be assigned to the template

  • $url =  ''

  • $use_extra_cache_id =  true

        User extra information for cache id, like language, user groups

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    xos_opal_Theme::addHttpMeta

addHttpMeta(

$name, [
$value = null] );

    Parameters

    $name

    $value

    Remarks

    Set a meta http-equiv value

    [ Top ]

    xos_opal_Theme::addLink

addLink(
string
$rel, [string
$href = ''], [array
$attributes = array()] );

    Parameters

    $rel

    Relationship from the current doc to the anchored one

    $href

    URI of the anchored document

    $attributes

    Additional attributes to add to the <link> element

    Remarks

    Add a <link> to the header

    [ Top ]

    xos_opal_Theme::addMeta

    addMeta(
[
$type = 'meta'], [
$name = ''], [
$value = ''] );

    Parameters

    $type

    $name

    $value

    Remarks

    Change output page meta-information

    [ Top ]

    xos_opal_Theme::addScript

    addScript(
[string
$src = ''], [array
$attributes = array()], [string
$content = ''] );

    Parameters

    $src

    path to an external script file

    $attributes

    hash of attributes to add to the <script> tag

    $content

    Code snippet to output within the <script> tag

    Remarks

    Adds script code to the document head

    This methods allows the insertion of an external script file (if $src is provided), or  of a script snippet. The file URI is parsed to take benefit of the theme resource  overloading system.
    The $attributes parameter allows you to specify the attributes that will be added to the  inserted <script> tag. If unspecified, the type attribute value will default to  'text/javascript'.
  •  // Add an external script using a physical path
    •

  •  $theme->addScript( 'www/script.js', null, '' );
    •

  •  $theme->addScript( 'modules/newbb/script.js', null, '' );
    •

  •  // Specify attributes for the <script> tag
    •

  •  $theme->addScript( 'mod_xoops_SiteManager#common.js', array( 'type' => 'application/x-javascript' ), '' );
    •

  •  // Insert a code snippet
    •

  •  $theme->addScript( null, array( 'type' => 'application/x-javascript' ), 'window.open("Hello world");' );
    •

    [ Top ]

    xos_opal_Theme::addStylesheet

    addStylesheet(
[string
$src = ''], [array
$attributes = array()], [string
$content = ''] );

    Parameters

    $src

    path to .css file

    $attributes

    name => value paired array of attributes such as title

    $content

    CSS code to output between the <style> tags (in case $src is empty)

    Remarks

    Add StyleSheet or CSS code to the document head

    [ Top ]

    xos_opal_Theme::checkCache

checkCache(
 );

    [ Top ]

    xos_opal_Theme::genElementId

genElementId(
[string
$tagName = 'xos'] );

    Parameters

    $tagName

    Remarks

    Generates a unique element ID

    [ Top ]

    xos_opal_Theme::generateCacheId

generateCacheId(
string
$cache_id, [string
$extraString = ''] );

    Parameters

    $cache_id

    raw cache id

    $extraString

    extra string

    Returns

    complete cache id

    Remarks

    Generate cache id based on extra information of language and user groups

    User groups other than anonymous should be detected to avoid disclosing group sensitive contents

    [ Top ]

    xos_opal_Theme::headContent

headContent(

$params,
$content,
&$smarty,
&$repeat );

    Parameters

    $params

    $content

    &$smarty

    &$repeat

    [ Top ]

    xos_opal_Theme::render

    render(
[string
$canvasTpl = null], [string
$pageTpl = null], [string
$contentTpl = null], [array
$vars = array()] );

    Parameters

    $canvasTpl

    The canvas template, if different from the theme default

    $pageTpl

    The page template, if different from the theme default (unsupported, 2.3+ only)

    $contentTpl

    The content template

    $vars

    Template variables to send to the template engine

    Remarks

    Render the page

    The theme engine builds pages from 2 templates: canvas and content.
    A module can call this method directly and specify what templates the theme engine must use.  If render() hasn't been called before, the theme defaults will be used for the canvas and  page template (and xoopsOption['template_main'] for the content).

    [ Top ]

    xos_opal_Theme::renderAttributes

renderAttributes(
array
$coll );

    Parameters

    $coll

    Remarks

    Transform an attributes collection to an XML string

    [ Top ]

    xos_opal_Theme::renderMetas

renderMetas(
[
$type = null], [
$return = false] );

    Parameters

    $type

    $return

    [ Top ]

    xos_opal_Theme::resourcePath

resourcePath(
string
$path );

    Parameters

    $path

    Remarks

    Return a themable file resource path

    [ Top ]

    xos_opal_Theme::xoInit

xoInit(
[array
$options = array()] );

    Parameters

    $options

    Remarks

    Initializes this theme

    Upon initialization, the theme creates its template engine and instanciates the  plug-ins from the specified $plugins list. If the theme is a 2.0 theme, that does not  display redirection messages, the HTTP redirections system is disabled to ensure users will  see the redirection screen.

    [ Top ]

Variable Detail

  • $bufferOutput =  true [line 94]
    •

  • Data type: string
    •

    Remarks

    Whether or not the theme engine should include the output generated by php

  • $canvasTemplate =  'theme.html' [line 99]
    •

  • Data type: string
    •

    Remarks

    Canvas-level template to use

  • $content =  '' [line 113]
    •

  • Data type: string
    •

    Remarks

    Text content to display right after the contentTemplate output

  • $contentCacheId =  null [line 107]
    •

  • Data type: mixed
    •

  • $contentCacheLifetime =  0 [line 106]
    •

  • Data type: mixed
    •

  • $contentTemplate =  '' [line 104]
    •

  • Data type: string
    •

    Remarks

    Content-level template to use

  • $folderName =  '' [line 82]
    •

  • Data type: string
    •

    Remarks

    The name of this theme

  • $htmlHeadStrings = array() [line 146]
    •

  • Data type: array
    •

    Remarks

    Array of strings to be inserted in the head tag of HTML documents

  • $metas = array(

      'http' => array(

         'Content-Script-Type' => 'text/javascript',

         'Content-Style-Type' => 'text/css',

      ),'meta'=>array(),'link'=>array(),'script'=>array(),)     [line 132]
    •

  • Data type: array
    •

    Remarks

    Array containing the document meta-information

  • $path =  '' [line 87]
    •

  • Data type: string
    •

    Remarks

    Physical path of this theme folder

  • $plugins = array( 'xos_logos_PageBuilder' ) [line 119]
    •

  • Data type: array
    •

    Remarks

    Page construction plug-ins to use

    access

    public

  • $renderCount =  0 [line 121]
    •

  • Data type: mixed
    •

  • $template =  false [line 126]
    •

  • Data type: XoopsTpl
    •

    Remarks

    Pointer to the theme template engine

  • $templateVars = array() [line 151]
    •

  • Data type: array
    •

    Remarks

    Custom variables that will always be assigned to the template

  • $url =  '' [line 88]
    •

  • Data type: mixed
    •

  • $use_extra_cache_id =  true [line 158]
    •

  • Data type: boolean
    •

    Remarks

    User extra information for cache id, like language, user groups

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:00:13 +0200 by phpDocumentor 1.4.0a2


Docs For Class xos_opal_ThemeFactory

Class xos_opal_ThemeFactory

[line 22]

Location: /theme.php

Remarks

xos_opal_ThemeFactory

author

Skalpa Keo

since

2.3.0

Class Variable Summary

  • $allowedThemes = array()

        Currently enabled themes (if empty, all the themes in themes/ are allowed)

  • $allowUserSelection =  true

        If users are allowed to choose a custom theme

  • $defaultTheme =  'default'

        Default theme to instanciate if none specified

  • $xoBundleIdentifier =  'xos_opal_ThemeFactory'

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    xos_opal_ThemeFactory::createInstance

&createInstance(
[
$options = array()], [
$initArgs = array()] );

    Parameters

    $options

    $initArgs

    Remarks

    Instanciate the specified theme

    [ Top ]

    xos_opal_ThemeFactory::isThemeAllowed

isThemeAllowed(
string
$name );

    Parameters

    $name

    Remarks

    Checks if the specified theme is enabled or not

    [ Top ]

Variable Detail

  • $allowedThemes = array() [line 29]
    •

  • Data type: array
    •

    Remarks

    Currently enabled themes (if empty, all the themes in themes/ are allowed)

  • $allowUserSelection =  true [line 39]
    •

  • Data type: bool
    •

    Remarks

    If users are allowed to choose a custom theme

  • $defaultTheme =  'default' [line 34]
    •

  • Data type: string
    •

    Remarks

    Default theme to instanciate if none specified

  • $xoBundleIdentifier =  'xos_opal_ThemeFactory' [line 24]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:00:14 +0200 by phpDocumentor 1.4.0a2


Docs for page theme.php

File: /theme.php

Remarks

xos_opal_Theme component class file

author

Skalpa Keo <skalpa@xoops.org>

version

$Id: theme.php 892 2007-07-28 09:35:49Z phppp $

copyright

The Xoops project http://www.xoops.org/

since

2.3.0

filesource

Source Code for this file

license

GNU public license

Classes in this file:
xos_opal_ThemeFactory
xos_opal_ThemeFactory
xos_opal_Theme

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:10 +0200 by phpDocumentor 1.4.0a2


Package xos_opal Element Index

Element index for package xos_opal

Indexes by package:
kernel
default
xos_kernel
PHPMailer
class
Smarty
xos_logos
XOOPS
xoops20
kernal

Index of all elements
a b c d f g h i m p r s t u x
top
a
$allowedThemes in file theme.php, variable xos_opal_ThemeFactory::$allowedThemes
Currently enabled themes (if empty, all the themes in themes/ are allowed)
$allowUserSelection in file theme.php, variable xos_opal_ThemeFactory::$allowUserSelection
If users are allowed to choose a custom theme
addHttpMeta in file theme.php, method xos_opal_Theme::addHttpMeta()
Set a meta http-equiv value
addLink in file theme.php, method xos_opal_Theme::addLink()
Add a <link> to the header
addMeta in file theme.php, method xos_opal_Theme::addMeta()
Change output page meta-information
addScript in file theme.php, method xos_opal_Theme::addScript()
Adds script code to the document head
addStylesheet in file theme.php, method xos_opal_Theme::addStylesheet()
Add StyleSheet or CSS code to the document head
top
b
$bufferOutput in file theme.php, variable xos_opal_Theme::$bufferOutput
Whether or not the theme engine should include the output generated by php
top
c
compiler.foreachq.php | procedural page compiler.foreachq.php
compiler.includeq.php | procedural page compiler.includeq.php
compiler.xoAppUrl.php | procedural page compiler.xoAppUrl.php
compiler.xoImgUrl.php | procedural page compiler.xoImgUrl.php
$canvasTemplate in file theme.php, variable xos_opal_Theme::$canvasTemplate
Canvas-level template to use
$content in file theme.php, variable xos_opal_Theme::$content
Text content to display right after the contentTemplate output
$contentCacheId | in file theme.php, variable xos_opal_Theme::$contentCacheId
$contentCacheLifetime | in file theme.php, variable xos_opal_Theme::$contentCacheLifetime
$contentTemplate in file theme.php, variable xos_opal_Theme::$contentTemplate
Content-level template to use
checkCache | in file theme.php, method xos_opal_Theme::checkCache()
createInstance in file theme.php, method xos_opal_ThemeFactory::createInstance()
Instanciate the specified theme
top
d
$defaultTheme in file theme.php, variable xos_opal_ThemeFactory::$defaultTheme
Default theme to instanciate if none specified
top
f
$folderName in file theme.php, variable xos_opal_Theme::$folderName
The name of this theme
top
g
genElementId in file theme.php, method xos_opal_Theme::genElementId()
Generates a unique element ID
generateCacheId in file theme.php, method xos_opal_Theme::generateCacheId()
Generate cache id based on extra information of language and user groups
top
h
$htmlHeadStrings in file theme.php, variable xos_opal_Theme::$htmlHeadStrings
Array of strings to be inserted in the head tag of HTML documents
headContent | in file theme.php, method xos_opal_Theme::headContent()
top
i
isThemeAllowed in file theme.php, method xos_opal_ThemeFactory::isThemeAllowed()
Checks if the specified theme is enabled or not
top
m
$metas in file theme.php, variable xos_opal_Theme::$metas
Array containing the document meta-information
top
p
$path in file theme.php, variable xos_opal_Theme::$path
Physical path of this theme folder
$plugins in file theme.php, variable xos_opal_Theme::$plugins
Page construction plug-ins to use
top
r
$renderCount | in file theme.php, variable xos_opal_Theme::$renderCount
render in file theme.php, method xos_opal_Theme::render()
Render the page
renderAttributes in file theme.php, method xos_opal_Theme::renderAttributes()
Transform an attributes collection to an XML string
renderMetas | in file theme.php, method xos_opal_Theme::renderMetas()
resourcePath in file theme.php, method xos_opal_Theme::resourcePath()
Return a themable file resource path
top
s
smarty_compiler_foreachq in file compiler.foreachq.php, function smarty_compiler_foreachq()
Quick foreach template plug-in
smarty_compiler_includeq in file compiler.includeq.php, function smarty_compiler_includeq()
Quick include template plug-in
smarty_compiler_xoAppUrl in file compiler.xoAppUrl.php, function smarty_compiler_xoAppUrl()
Inserts the URL of an application page
smarty_compiler_xoImgUrl in file compiler.xoImgUrl.php, function smarty_compiler_xoImgUrl()
Inserts the URL of a file resource customizable by themes
top
t
$template in file theme.php, variable xos_opal_Theme::$template
Pointer to the theme template engine
$templateVars in file theme.php, variable xos_opal_Theme::$templateVars
Custom variables that will always be assigned to the template
theme.php | procedural page theme.php
top
u
$url | in file theme.php, variable xos_opal_Theme::$url
$use_extra_cache_id in file theme.php, variable xos_opal_Theme::$use_extra_cache_id
User extra information for cache id, like language, user groups
top
x
$xoBundleIdentifier | in file theme.php, variable xos_opal_ThemeFactory::$xoBundleIdentifier
xoInit in file theme.php, method xos_opal_Theme::xoInit()
Initializes this theme
xos_opal_Theme | in file theme.php, class xos_opal_Theme
xos_opal_ThemeFactory in file theme.php, class xos_opal_ThemeFactory
xos_opal_ThemeFactory


Class Trees for Package xos_opal

Documentation generated on Tue, 28 Aug 2007 22:56:21 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsErrorHandler

Class XoopsErrorHandler

[line 35]
XoopsLogger
   |
   --XoopsErrorHandler
Location: /errorhandler.php

Remarks

Backward compatibility code, do not use this class directly

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsLogger

  • XoopsLogger::$activated = true
  • XoopsLogger::$blocks = array()
  • XoopsLogger::$errors = array()
  • XoopsLogger::$extra = array()
  • XoopsLogger::$logend = array()
  • XoopsLogger::$logstart = array()
  • XoopsLogger::$queries = array()
  • XoopsLogger::$renderingEnabled = false
  • XoopsLogger::$usePopup = false

Method Summary

Inherited Method Summary

Inherited From Class XoopsLogger

  • XoopsLogger::XoopsLogger()
  • XoopsLogger::addBlock()
    Log display of a block
  • XoopsLogger::addExtra()
    Log extra information
  • XoopsLogger::addQuery()
    Log a database query
  • XoopsLogger::dump()
  • XoopsLogger::dumpAll()
  • XoopsLogger::dumpBlocks()
  • XoopsLogger::dumpExtra()
  • XoopsLogger::dumpQueries()
  • XoopsLogger::dumpTime()
    get the current execution time of a timer
  • XoopsLogger::enableRendering()
    Enable logger output rendering When output rendering is enabled, the logger will insert its output within the page content.
  • XoopsLogger::handleError()
    Error handling callback (called by the zend engine)
  • XoopsLogger::instance()
    Get a reference to the only instance of this class
  • XoopsLogger::microtime()
    Returns the current microtime in seconds.
  • XoopsLogger::render()
    Output buffering callback inserting logger dump in page output
  • XoopsLogger::sanitizePath()
  • XoopsLogger::startTime()
    Start a timer
  • XoopsLogger::stopTime()
    Stop a timer

Method Detail

    XoopsErrorHandler::activate

    activate( [ $showErrors = false] );

    Parameters

    $showErrors

    Remarks

    Activate the error handler

    [ Top ]

    XoopsErrorHandler::renderErrors

    renderErrors( );

    Remarks

    Render the list of errors

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:57:50 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsLogger

Class XoopsLogger

[line 25]

Classes extended from XoopsLogger:

XoopsErrorHandler

Backward compatibility code, do not use this class directly

Location: /logger.php

Remarks

Collects information for a page request

Records information about database queries, blocks, and execution time  and can display it as HTML. It also catches php runtime errors.

Class Variable Summary

  • $activated =  true

  • $blocks = array()

  • $errors = array()

  • $extra = array()

  • $logend = array()

  • $logstart = array()

  • $queries = array()

  • $renderingEnabled =  false

  • $usePopup =  false

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsLogger::XoopsLogger

XoopsLogger(
 );

    [ Top ]

    XoopsLogger::addBlock

addBlock(
string
$name, [bool
$cached = false], [int
$cachetime = 0] );

    Parameters

    $name

    name of the block

    $cached

    was the block cached?

    $cachetime

    cachetime of the block

    Remarks

    Log display of a block

    [ Top ]

    XoopsLogger::addExtra

addExtra(
string
$name, int
$msg );

    Parameters

    $name

    name for the entry

    $msg

    text message for the entry

    Remarks

    Log extra information

    [ Top ]

    XoopsLogger::addQuery

addQuery(
string
$sql, [string
$error = null], [int
$errno = null] );

    Parameters

    $sql

    SQL string

    $error

    error message (if any)

    $errno

    error number (if any)

    Remarks

    Log a database query

    [ Top ]

    XoopsLogger::dump

dump(
[
$mode = ''] );

    Parameters

    $mode

    [ Top ]

    XoopsLogger::dumpAll

dumpAll(
 );

    deprecated

    [ Top ]

    XoopsLogger::dumpBlocks

dumpBlocks(
 );

    deprecated

    [ Top ]

    XoopsLogger::dumpExtra

dumpExtra(
 );

    deprecated

    [ Top ]

    XoopsLogger::dumpQueries

dumpQueries(
 );

    deprecated

    [ Top ]

    XoopsLogger::dumpTime

dumpTime(
[string
$name = 'XOOPS'] );

    Parameters

    $name

    name of the counter

    Returns

    current execution time of the counter

    Remarks

    get the current execution time of a timer

    [ Top ]

    XoopsLogger::enableRendering

enableRendering(
 );

    Remarks

    Enable logger output rendering  When output rendering is enabled, the logger will insert its output within the page content.

    If the string <!--{xo-logger-output}--> is found in the page content, the logger output will  replace it, otherwise it will be inserted after all the page output.

    [ Top ]

    XoopsLogger::handleError

handleError(

$errno,
$errstr,
$errfile,
$errline );

    Parameters

    $errno

    $errstr

    $errfile

    $errline

    Remarks

    Error handling callback (called by the zend engine)

    [ Top ]

    XoopsLogger::instance

&instance(
 );

    Returns

    reference to the only instance

    Remarks

    Get a reference to the only instance of this class

    [ Top ]

    XoopsLogger::microtime

microtime(
 );

    Remarks

    Returns the current microtime in seconds.

    [ Top ]

    XoopsLogger::render

render(

$output );

    Parameters

    $output

    Remarks

    Output buffering callback inserting logger dump in page output

    [ Top ]

    XoopsLogger::sanitizePath

sanitizePath(

$path );

    Parameters

    $path

    access

    protected

    [ Top ]

    XoopsLogger::startTime

startTime(
[string
$name = 'XOOPS'] );

    Parameters

    $name

    name of the timer

    Remarks

    Start a timer

    [ Top ]

    XoopsLogger::stopTime

stopTime(
[string
$name = 'XOOPS'] );

    Parameters

    $name

    name of the timer

    Remarks

    Stop a timer

    [ Top ]

Variable Detail

  • $activated =  true [line 38]
    •

  • Data type: mixed
    •

  • $blocks = array() [line 30]
    •

  • Data type: array
    •

  • $errors = array() [line 34]
    •

  • Data type: array
    •

  • $extra = array() [line 31]
    •

  • Data type: array
    •

  • $logend = array() [line 33]
    •

  • Data type: array
    •

  • $logstart = array() [line 32]
    •

  • Data type: array
    •

  • $queries = array() [line 29]
    •

  • Data type: array
    •

  • $renderingEnabled =  false [line 41]
    •

  • Data type: mixed
    •

    access

    protected

  • $usePopup =  false [line 37]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 22:58:46 +0200 by phpDocumentor 1.4.0a2


File Source for logger.php

Source for file logger.php

Documentation is available at logger.php

  • <?php
    •

  • /**
    •

  •  * XoopsLogger component main class file
    •

  •  *
    •

  •  * See the enclosed file LICENSE for licensing information.
    •

  •  * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html
    •

  •  *
    •

  •  * @copyright    The XOOPS project http://www.xoops.org/
    •

  •  * @license        http://www.fsf.org/copyleft/gpl.html GNU public license
    •

  •  * @author        Kazumi Ono  <onokazu@xoops.org>
    •

  •  * @author        Skalpa Keo <skalpa@xoops.org>
    •

  •  * @since        2.0
    •

  •  * @package        xos_kernel
    •

  •  * @subpackage    XoopsLogger
    •

  •  * @version        $Id: logger.php 694 2006-09-04 11:33:22Z skalpa $
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * Collects information for a page request
    •

  •  *
    •

  •  * Records information about database queries, blocks, and execution time
    •

  •  * and can display it as HTML. It also catches php runtime errors.
    •

  •  * @package xos_kernel
    •

  •  */
    •

  • class XoopsLogger {
    •

  •     /**#@+
    •

  •      * @var array
    •

  •      */
    •

  •     var $queries = array();
    •

  •     var $blocks = array();
    •

  •     var $extra = array();
    •

  •     var $logstart = array();
    •

  •     var $logend = array();
    •

  •     var $errors = array();
    •

  •     /**#@-*/
    •

  •
    •

  •     var $usePopup = false;
    •

  •     var $activated = true;
    •

  •
    •

  •     /**@access protected*/
    •

  •     var $renderingEnabled = false;
    •

  •
    •

  •     function XoopsLogger() {
    •

  •     }
    •

  •     /**
    •

  •      * Get a reference to the only instance of this class
    •

  •      * @return  object XoopsLogger  reference to the only instance
    •

  •      */
    •

  •     function &instance() {
    •

  •         static $instance;
    •

  •
    •

  •         if ( !isset( $instance ) ) {
    •

  •             $instance = new XoopsLogger();
    •

  •             // Always catch errors, for security reasons
    •

  •             set_error_handler( 'XoopsErrorHandler_HandleError' );
    •

  •         }
    •

  •         return $instance;
    •

  •     }
    •

  •     /**
    •

  •      * Enable logger output rendering
    •

  •      * When output rendering is enabled, the logger will insert its output within the page content.
    •

  •      * If the string <!--{xo-logger-output}--> is found in the page content, the logger output will
    •

  •      * replace it, otherwise it will be inserted after all the page output.
    •

  •      */
    •

  •     function enableRendering() {
    •

  •         if ( !$this->renderingEnabled ) {
    •

  •             ob_start( array( &$this, 'render' ) );
    •

  •             $this->renderingEnabled = true;
    •

  •         }
    •

  •     }
    •

  •     /**
    •

  •      * Returns the current microtime in seconds.
    •

  •      * @return float
    •

  •      */
    •

  •     function microtime() {
    •

  •         $now = explode( ' ', microtime() );
    •

  •         return (float)$now[0] + (float)$now[1];
    •

  •     }
    •

  •     /**
    •

  •      * Start a timer
    •

  •      * @param   string  $name   name of the timer
    •

  •      */
    •

  •     function startTime($name = 'XOOPS') {
    •

  •         $this->logstart[$name] = $this->microtime();
    •

  •     }
    •

  •     /**
    •

  •      * Stop a timer
    •

  •      * @param   string  $name   name of the timer
    •

  •      */
    •

  •     function stopTime($name = 'XOOPS') {
    •

  •         $this->logend[$name] = $this->microtime();
    •

  •     }
    •

  •     /**
    •

  •      * Log a database query
    •

  •      * @param   string  $sql    SQL string
    •

  •      * @param   string  $error  error message (if any)
    •

  •      * @param   int     $errno  error number (if any)
    •

  •      */
    •

  •     function addQuery($sql, $error=null, $errno=null) {
    •

  •         if ( $this->activated )        $this->queries[] = array('sql' => $sql, 'error' => $error, 'errno' => $errno);
    •

  •     }
    •

  •     /**
    •

  •      * Log display of a block
    •

  •      * @param   string  $name       name of the block
    •

  •      * @param   bool    $cached     was the block cached?
    •

  •      * @param   int     $cachetime  cachetime of the block
    •

  •      */
    •

  •     function addBlock($name, $cached = false, $cachetime = 0) {
    •

  •         if ( $this->activated )        $this->blocks[] = array('name' => $name, 'cached' => $cached, 'cachetime' => $cachetime);
    •

  •     }
    •

  •     /**
    •

  •      * Log extra information
    •

  •      * @param   string  $name       name for the entry
    •

  •      * @param   int     $msg  text message for the entry
    •

  •      */
    •

  •     function addExtra($name, $msg) {
    •

  •         if ( $this->activated )        $this->extra[] = array('name' => $name, 'msg' => $msg);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Error handling callback (called by the zend engine)
    •

  •      */
    •

  •     function handleError( $errno, $errstr, $errfile, $errline ) {
    •

  •         $errstr = $this->sanitizePath( $errstr );
    •

  •         $errfile = $this->sanitizePath( $errfile );
    •

  •         if ( $this->activated && ( $errno & error_reporting() ) ) {
    •

  •             // NOTE: we only store relative pathnames
    •

  •             $this->errors[] = compact( 'errno', 'errstr', 'errfile', 'errline' );
    •

  •         }
    •

  •         if ( $errno == E_USER_ERROR ) {
    •

  •             $trace = true;
    •

  •             if ( substr( $errstr, 0, '8' ) == 'notrace:' ) {
    •

  •                 $trace = false;
    •

  •                 $errstr = substr( $errstr, 8 );
    •

  •             }
    •

  •             echo 'This page cannot be displayed due to an internal error.<br/><br/>';
    •

  •             echo "You can provide the following information to the administrators of ";
    •

  •             echo "this site to help them solve the problem:<br /><br />";
    •

  •             echo "Error: $errstr<br />";
    •

  •             if ( $trace && function_exists( 'debug_backtrace' ) ) {
    •

  •                 echo "<div style='color:#ffffff;background-color:#ffffff'>Backtrace:<br />";
    •

  •                 $trace = debug_backtrace();
    •

  •                 array_shift( $trace );
    •

  •                 foreach ( $trace as $step ) {
    •

  •                     if ( isset( $step['file'] ) ) {
    •

  •                         echo $this->sanitizePath( $step['file'] );
    •

  •                         echo ' (' . $step['line'] . ")\n<br />";
    •

  •                     }
    •

  •                 }
    •

  •                 echo '</div>';
    •

  •             }
    •

  •             exit();
    •

  •         }
    •

  •     }
    •

  •     /**
    •

  •      * @access protected
    •

  •      */
    •

  •     function sanitizePath( $path ) {
    •

  •         $path = str_replace(
    •

  •             array( '\\', XOOPS_ROOT_PATH, str_replace( '\\', '/', realpath( XOOPS_ROOT_PATH ) ) ),
    •

  •             array( '/', '', '' ),
    •

  •             $path
    •

  •         );
    •

  •         return $path;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Output buffering callback inserting logger dump in page output
    •

  •      */
    •

  •     function render( $output ) {
    •

  •         global $xoopsUser;
    •

  •         if ( !$this->activated || !$xoopsUser || !$xoopsUser->isAdmin() ) {
    •

  •             return $output;
    •

  •         }
    •

  •         $this->renderingEnabled = $this->activated = false;
    •

  •
    •

  •         $log = $this->dump( $this->usePopup ? 'popup' : '' );
    •

  •
    •

  •         $pattern = '<!--{xo-logger-output}-->';
    •

  •         $pos = strpos( $output, $pattern );
    •

  •         if ( $pos !== false ) {
    •

  •             return substr( $output, 0, $pos ) . $log . substr( $output, $pos + strlen( $pattern ) );
    •

  •         } else {
    •

  •             return $output . $log;
    •

  •         }
    •

  •     }
    •

  •     /**#@+
    •

  •      * @protected
    •

  •      */
    •

  •     function dump( $mode = '' ) {
    •

  •         include XOOPS_ROOT_PATH . '/class/logger_render.php';
    •

  •         return $ret;
    •

  •     }
    •

  •     /**
    •

  •      * get the current execution time of a timer
    •

  •      *
    •

  •      * @param   string  $name   name of the counter
    •

  •      * @return  float   current execution time of the counter
    •

  •      */
    •

  •     function dumpTime( $name = 'XOOPS' ) {
    •

  •         if ( !isset($this->logstart[$name]) ) {
    •

  •             return 0;
    •

  •         }
    •

  •         $stop = isset( $this->logend[$name] ) ? $this->logend[$name] : $this->microtime();
    •

  •         return $stop - $this->logstart[$name];
    •

  •     }
    •

  •     /**#@-*/
    •

  •     /**#@+
    •

  •      * @deprecated
    •

  •      */
    •

  •     function dumpAll() {            return $this->dump( '' );            }
    •

  •     function dumpBlocks() {            return $this->dump( 'blocks' );        }
    •

  •     function dumpExtra() {            return $this->dump( 'extra' );        }
    •

  •     function dumpQueries() {        return $this->dump( 'queries' );    }
    •

  •     /**#@-*/
    •

  • }
    •

  •
    •

  • /*
    •

  • * PHP Error handler
    •

  • *
    •

  • * NB: You're not supposed to call this function directly, if you dont understand why, then
    •

  • * you'd better spend some time reading your PHP manual before you hurt somebody
    •

  • *
    •

  • * @internal: Using a function and not calling the handler method directly coz old PHP versions
    •

  • * set_error_handler() have problems with the array( obj,methodname ) syntax
    •

  • */
    •

  • function XoopsErrorHandler_HandleError( $errNo, $errStr, $errFile, $errLine, $errContext = null ) {
    •

  •     $logger =& XoopsLogger::instance();
    •

  •     $logger->handleError( $errNo, $errStr, $errFile, $errLine, $errContext );
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:46 +0200 by phpDocumentor 1.4.0a2


Docs for page logger.php

File: /logger.php

Remarks

XoopsLogger component main class file

See the enclosed file LICENSE for licensing information. If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html

author

Skalpa Keo <skalpa@xoops.org>

author

Kazumi Ono <onokazu@xoops.org>

version

$Id: logger.php 694 2006-09-04 11:33:22Z skalpa $

copyright

The XOOPS project http://www.xoops.org/

since

2.0

filesource

Source Code for this file

license

GNU public license

Classes in this file:
XoopsLogger
Collects information for a page request

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

  • void XoopsErrorHandler_HandleError()

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

  • void XoopsErrorHandler_HandleError() [line 227]

    Usage: XoopsErrorHandler_HandleError( $errNo, $errStr, $errFile, $errLine, [ $errContext = null])

    Parameters

    $errNo

    $errStr

    $errFile

    $errLine

    $errContext

    [ Top ]

Documentation generated on Tue, 28 Aug 2007 22:58:45 +0200 by phpDocumentor 1.4.0a2


Package xos_kernel Element Index

Element index for package xos_kernel

Indexes by package:
kernel
default
PHPMailer
class
Smarty
xos_opal
xos_logos
XOOPS
xoops20
kernal

Index of all elements
a b d e h i l m q r s u x
top
a
$activated | in file logger.php, variable XoopsLogger::$activated
activate in file errorhandler.php, method XoopsErrorHandler::activate()
Activate the error handler
addBlock in file logger.php, method XoopsLogger::addBlock()
Log display of a block
addExtra in file logger.php, method XoopsLogger::addExtra()
Log extra information
addQuery in file logger.php, method XoopsLogger::addQuery()
Log a database query
top
b
$blocks | in file logger.php, variable XoopsLogger::$blocks
top
d
dump | in file logger.php, method XoopsLogger::dump()
dumpAll | in file logger.php, method XoopsLogger::dumpAll()
dumpBlocks | in file logger.php, method XoopsLogger::dumpBlocks()
dumpExtra | in file logger.php, method XoopsLogger::dumpExtra()
dumpQueries | in file logger.php, method XoopsLogger::dumpQueries()
dumpTime in file logger.php, method XoopsLogger::dumpTime()
get the current execution time of a timer
top
e
$errors | in file logger.php, variable XoopsLogger::$errors
$extra | in file logger.php, variable XoopsLogger::$extra
enableRendering in file logger.php, method XoopsLogger::enableRendering()
Enable logger output rendering When output rendering is enabled, the logger will insert its output within the page content.
top
h
handleError in file logger.php, method XoopsLogger::handleError()
Error handling callback (called by the zend engine)
top
i
instance in file logger.php, method XoopsLogger::instance()
Get a reference to the only instance of this class
top
l
$logend | in file logger.php, variable XoopsLogger::$logend
$logstart | in file logger.php, variable XoopsLogger::$logstart
logger.php | procedural page logger.php
top
m
microtime in file logger.php, method XoopsLogger::microtime()
Returns the current microtime in seconds.
top
q
$queries | in file logger.php, variable XoopsLogger::$queries
top
r
$renderingEnabled | in file logger.php, variable XoopsLogger::$renderingEnabled
render in file logger.php, method XoopsLogger::render()
Output buffering callback inserting logger dump in page output
renderErrors in file errorhandler.php, method XoopsErrorHandler::renderErrors()
Render the list of errors
top
s
sanitizePath | in file logger.php, method XoopsLogger::sanitizePath()
startTime in file logger.php, method XoopsLogger::startTime()
Start a timer
stopTime in file logger.php, method XoopsLogger::stopTime()
Stop a timer
top
u
$usePopup | in file logger.php, variable XoopsLogger::$usePopup
top
x
XoopsErrorHandler in file errorhandler.php, class XoopsErrorHandler
Backward compatibility code, do not use this class directly
XoopsErrorHandler_HandleError | in file logger.php, function XoopsErrorHandler_HandleError()
XoopsLogger | in file logger.php, method XoopsLogger::XoopsLogger()
XoopsLogger in file logger.php, class XoopsLogger
Collects information for a page request


Class Trees for Package xos_kernel

Documentation generated on Tue, 28 Aug 2007 22:56:21 +0200 by phpDocumentor 1.4.0a2


File Source for formcolorpicker.php

Source for file formcolorpicker.php

Documentation is available at formcolorpicker.php

  • <?php
    •

  • /**
    •

  • * XoopsFormColorPicker component class file
    •

  • *
    •

  • * This class provide a textfield with a color picker popup. This color picker
    •

  • * come from Tigra project (http://www.softcomplex.com/products/tigra_color_picker/).
    •

  • *
    •

  • * @copyright    The Xoops project http://www.xoops.org/
    •

  • * @license      http://www.fsf.org/copyleft/gpl.html GNU public license
    •

  • * @author       Zoullou <webmaster@zoullou.org>
    •

  • * @since        2.0.15
    •

  • * @version        $Id: formcolorpicker.php 669 2006-08-25 22:14:09Z skalpa $
    •

  • * @package         xoops20
    •

  • * @subpackage     xoops20_XoopsForm
    •

  • */
    •

  •
    •

  •
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  •
    •

  •
    •

  • class XoopsFormColorPicker extends XoopsFormText
    •

  • {
    •

  •
    •

  •     function XoopsFormColorPicker($caption, $name, $value="#FFFFFF")
    •

  •     {
    •

  •         $this->XoopsFormText($caption, $name, 9, 7, $value);
    •

  •     }
    •

  •
    •

  •     function render()
    •

  •     {
    •

  •         if(isset($GLOBALS['xoTheme'])) {
    •

  •             $GLOBALS['xoTheme']->addScript('include/color-picker.js');
    •

  •         } else {
    •

  •             echo "<script type=\"text/javascript\" src=\"".XOOPS_URL."/include/color-picker.js\"></script>";
    •

  •         }
    •

  •         $this->setExtra(' style="background-color:'.$this->getValue().';"');
    •

  •         return parent::render()."\n<input type='reset' value=' ... ' onclick=\"return TCP.popup('".XOOPS_URL."/include/',document.getElementById('".$this->getName()."'));\">\n";
    •

  •     }
    •

  •     /**
    •

  •      * Returns custom validation Javascript
    •

  •      *
    •

  •      * @return    string    Element validation Javascript
    •

  •      */
    •

  •     function renderValidationJS() {
    •

  •         $eltname    = $this->getName();
    •

  •         $eltcaption = trim( $this->getCaption() );
    •

  •         $eltmsg = empty($eltcaption) ? sprintf( _FORM_ENTER, $eltname ) : sprintf( _FORM_ENTER, $eltcaption );
    •

  •
    •

  •         return "if ( !(new RegExp(\"^#[0-9a-fA-F]{6}\",\"i\").test(myform.{$eltname}.value)) ) { window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }";
    •

  •     }
    •

  •
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:57:56 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormColorPicker

Class XoopsFormColorPicker

[line 23]
XoopsFormElement
   |
   --XoopsFormText
      |
      --XoopsFormColorPicker
Location: /xoopsform/formcolorpicker.php

Remarks

XoopsFormColorPicker component class file

This class provide a textfield with a color picker popup. This color picker come from Tigra project (http://www.softcomplex.com/products/tigra_color_picker/).

author

Zoullou <webmaster@zoullou.org>

version

$Id: formcolorpicker.php 669 2006-08-25 22:14:09Z skalpa $

copyright

The Xoops project http://www.xoops.org/

since

2.0.15

license

GNU public license

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormText

  • XoopsFormText::$_maxlength =
    Maximum length of the text
  • XoopsFormText::$_size =
    Size
  • XoopsFormText::$_value =
    Initial text

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element
  • XoopsFormElement::$_required = false
    required field?

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormText

  • XoopsFormText::XoopsFormText()
    Constructor
  • XoopsFormText::getMaxlength()
    Get maximum text length
  • XoopsFormText::getSize()
    Get size
  • XoopsFormText::getValue()
    Get initial text value
  • XoopsFormText::render()
    Prepare HTML for output
  • XoopsFormText::setValue()
    Set initial text value

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormColorPicker::XoopsFormColorPicker

    XoopsFormColorPicker( $caption, $name, [ $value = "#FFFFFF"] );

    Parameters

    $caption

    $name

    $value

    [ Top ]

    XoopsFormColorPicker::render

    render( );

    Overrides XoopsFormText::render() (Prepare HTML for output)

    [ Top ]

    XoopsFormColorPicker::renderValidationJS

    renderValidationJS( );

    Overrides XoopsFormElement::renderValidationJS() (Render custom javascript validation code)

    Returns

    Element validation Javascript

    Remarks

    Returns custom validation Javascript

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:57:56 +0200 by phpDocumentor 1.4.0a2


Docs for page formcolorpicker.php

File: /xoopsform/formcolorpicker.php

filesource

Source Code for this file

Classes in this file:
XoopsFormColorPicker
XoopsFormColorPicker component class file

Include Statements Summary

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:57:55 +0200 by phpDocumentor 1.4.0a2


Package xoops20 Element Index

Element index for package xoops20

Indexes by package:
kernel
default
xos_kernel
PHPMailer
class
Smarty
xos_opal
xos_logos
XOOPS
kernal

Index of all elements
f r x
top
f
formcolorpicker.php | procedural page formcolorpicker.php
top
r
render | in file formcolorpicker.php, method XoopsFormColorPicker::render()
renderValidationJS in file formcolorpicker.php, method XoopsFormColorPicker::renderValidationJS()
Returns custom validation Javascript
top
x
XoopsFormColorPicker | in file formcolorpicker.php, method XoopsFormColorPicker::XoopsFormColorPicker()
XoopsFormColorPicker in file formcolorpicker.php, class XoopsFormColorPicker
XoopsFormColorPicker component class file


Class Trees for Package xoops20

Documentation generated on Tue, 28 Aug 2007 22:56:21 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsFormSelectUser

Class XoopsFormSelectUser

[line 20]
XoopsFormElement
   |
   --XoopsFormElementTray
      |
      --XoopsFormSelectUser
Location: /xoopsform/formselectuser.php

Remarks

A group of form elements

author

Kazumi Ono <onokazu@xoops.org>

copyright

copyright (c) 2000-2003 XOOPS.org

Class Variable Summary

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class XoopsFormElementTray

  • XoopsFormElementTray::$_delimeter =
    HTML to seperate the elements
  • XoopsFormElementTray::$_elements = array()
    array of form element objects
  • XoopsFormElementTray::$_required = array()
    required elements

Inherited From Class XoopsFormElement

  • XoopsFormElement::$customValidationCode = array()
    Javascript performing additional validation of this element data
  • XoopsFormElement::$_accesskey = ''
    Accesskey for this element
  • XoopsFormElement::$_caption =
    caption of the element
  • XoopsFormElement::$_class = ''
    HTML class for this element
  • XoopsFormElement::$_description = ""
    description of the field
  • XoopsFormElement::$_extra = ""
    extra attributes to go in the tag
  • XoopsFormElement::$_hidden = false
    hidden?
  • XoopsFormElement::$_name =
    "name" attribute of the element

Method Summary

Inherited Method Summary

Inherited From Class XoopsFormElementTray

  • XoopsFormElementTray::XoopsFormElementTray()
    constructor
  • XoopsFormElementTray::addElement()
    Add an element to the group
  • XoopsFormElementTray::getDelimeter()
    Get the delimiter of this group
  • XoopsFormElementTray::getElements()
    Get an array of the elements in this group
  • XoopsFormElementTray::getRequired()
    get an array of "required" form elements
  • XoopsFormElementTray::isContainer()
    Is this element a container of other elements?
  • XoopsFormElementTray::isRequired()
    Find out if there are required elements.
  • XoopsFormElementTray::render()
    prepare HTML to output this group

Inherited From Class XoopsFormElement

  • XoopsFormElement::XoopsFormElement()
    constructor
  • XoopsFormElement::getAccessKey()
    get the "accesskey" attribute for the element
  • XoopsFormElement::getAccessString()
    If the accesskey is found in the specified string, underlines it
  • XoopsFormElement::getCaption()
    get the caption for the element
  • XoopsFormElement::getClass()
    get the "class" attribute for the element
  • XoopsFormElement::getDescription()
    get the element's description
  • XoopsFormElement::getExtra()
    Get the extra attributes for the element
  • XoopsFormElement::getName()
    get the "name" attribute for the element
  • XoopsFormElement::isContainer()
    Is this element a container of other elements?
  • XoopsFormElement::isHidden()
    Find out if an element is "hidden".
  • XoopsFormElement::isRequired()
    Find out if an element is required.
  • XoopsFormElement::render()
    Generates output for the element.
  • XoopsFormElement::renderValidationJS()
    Render custom javascript validation code
  • XoopsFormElement::setAccessKey()
    set the "accesskey" attribute for the element
  • XoopsFormElement::setCaption()
    set the caption for the element
  • XoopsFormElement::setClass()
    set the "class" attribute for the element
  • XoopsFormElement::setDescription()
    set the element's description
  • XoopsFormElement::setExtra()
    Add extra attributes to the element.
  • XoopsFormElement::setHidden()
    flag the element as "hidden"
  • XoopsFormElement::setName()
    set the "name" attribute for the element

Method Detail

    XoopsFormSelectUser::XoopsFormSelectUser

    XoopsFormSelectUser( string $caption, string $name, [bool $include_anon = false], [mixed $value = array()], [int $size = 1], [bool $multiple = false] );

    Parameters

    $caption

    $name

    $value

    Pre-selected value (or array of them). For an item with massive members, such as "Registered Users", "$value" should be used to store selected temporary users only instead of all members of that item

    $include_anon

    Include user "anonymous"?

    $size

    Number or rows. "1" makes a drop-down-list.

    $multiple

    Allow multiple selections?

    Remarks

    Constructor

    [ Top ]

Variable Detail

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 22:58:19 +0200 by phpDocumentor 1.4.0a2


Package kernal Element Index

Element index for package kernal

Indexes by package:
kernel
default
xos_kernel
PHPMailer
class
Smarty
xos_opal
xos_logos
XOOPS
xoops20

Index of all elements
f x
top
f
formselectuser.php procedural page formselectuser.php
top
x
XoopsFormSelectUser in file formselectuser.php, method XoopsFormSelectUser::XoopsFormSelectUser()
Constructor
XoopsFormSelectUser in file formselectuser.php, class XoopsFormSelectUser
A group of form elements


Class Trees for Package kernal

Documentation generated on Tue, 28 Aug 2007 22:56:21 +0200 by phpDocumentor 1.4.0a2


Docs for page formselectuser.php

File: /xoopsform/formselectuser.php

Remarks

user select with page navigation

limit: Only work with javascript enabled

author

Taiwen Jiang (phppp or D.J.) <php_pp@hotmail.com>

version

$Id: formselectuser.php 1011 2007-08-24 08:07:21Z phppp $

copyright

The XOOPS project http://www.xoops.org/

since

1.00

filesource

Source Code for this file

license

GNU public license

Classes in this file:
XoopsFormSelectUser
A group of form elements

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formelementtray.php"
    user select with page navigation
  • include_once = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php"

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formelementtray.php" [line 17]

    Remarks

    user select with page navigation

    limit: Only work with javascript enabled

    author

    Taiwen Jiang (phppp or D.J.) <php_pp@hotmail.com>

    version

    $Id: formselectuser.php 1011 2007-08-24 08:07:21Z phppp $

    copyright

    The XOOPS project http://www.xoops.org/

    since

    1.00

    filesource

    Source Code for this file

    license

    GNU public license

  • include_once file: = XOOPS_ROOT_PATH."/class/xoopsform/formselect.php" [line 18]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 22:58:18 +0200 by phpDocumentor 1.4.0a2


File Source for formselectuser.php

Source for file formselectuser.php

Documentation is available at formselectuser.php

  • <?php
    •

  • /**
    •

  •  * user select with page navigation
    •

  •  *
    •

  •  * limit: Only work with javascript enabled
    •

  •  *
    •

  •  * @copyright    The XOOPS project http://www.xoops.org/
    •

  •  * @license        http://www.fsf.org/copyleft/gpl.html GNU public license
    •

  •  * @author        Taiwen Jiang (phppp or D.J.) <php_pp@hotmail.com>
    •

  •  * @since        1.00
    •

  •  * @version        $Id: formselectuser.php 1011 2007-08-24 08:07:21Z phppp $
    •

  •  * @package        kernal
    •

  •  */
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formelementtray.php";
    •

  • include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
    •

  •
    •

  • class XoopsFormSelectUser extends XoopsFormElementTray
    •

  • {
    •

  •     /**
    •

  •      * Constructor
    •

  •      *
    •

  •      * @param    string    $caption
    •

  •      * @param    string    $name
    •

  •      * @param    mixed    $value            Pre-selected value (or array of them).
    •

  •      *                                     For an item with massive members, such as "Registered Users", "$value" should be used to store selected temporary users only instead of all members of that item
    •

  •      * @param    bool    $include_anon    Include user "anonymous"?
    •

  •      * @param    int        $size            Number or rows. "1" makes a drop-down-list.
    •

  •      * @param    bool    $multiple       Allow multiple selections?
    •

  •      */
    •

  •     function XoopsFormSelectUser($caption, $name, $include_anon = false, $value = array(), $size = 1, $multiple = false)
    •

  •     {
    •

  •         $limit = 200;
    •

  •         $select_element = new XoopsFormSelect("", $name, $value, $size, $multiple);
    •

  •
    •

  •         if ($include_anon) {
    •

  •             $select_element->addOption(0, $GLOBALS["xoopsConfig"]['anonymous']);
    •

  •         }
    •

  •         if (!is_array($value)) {
    •

  •             $value = array($value);
    •

  •         }
    •

  •         if (count($value) > 0) {
    •

  •             $criteria = new CriteriaCompo(new Criteria("uid", "(".implode(",", $value).")", "IN"));
    •

  •         } else {
    •

  •             $criteria = new CriteriaCompo();
    •

  •             $criteria->setLimit($limit);
    •

  •         }
    •

  •         $criteria->setSort('name');
    •

  •         $criteria->setOrder('ASC');
    •

  •         $member_handler =& xoops_gethandler('member');
    •

  •         $users = $member_handler->getUserList($criteria);
    •

  •         $select_element->addOptionArray($users);
    •

  •         if (count($users) < $limit) {
    •

  •             $this->XoopsFormElementTray($caption, "", $name);
    •

  •             $this->addElement($select_element);
    •

  •             return;
    •

  •         }
    •

  •
    •

  •
    •

  •         if (!@include_once XOOPS_ROOT_PATH."/language/".$GLOBALS["xoopsConfig"]["language"]."/findusers.php") {
    •

  •             include_once XOOPS_ROOT_PATH."/language/english/findusers.php";
    •

  •         }
    •

  •
    •

  •         $js_addusers =
    •

  •             "<script type=\"text/javascript\">
    •

  •             function addusers(opts){
    •

  •                 var num = opts.substring(0, opts.indexOf(\":\"));
    •

  •                 opts = opts.substring(opts.indexOf(\":\")+1, opts.length);
    •

  •                 var sel = xoopsGetElementById(\"". $name . ($multiple ? "[]" : "") . "\");
    •

  •                 var arr = new Array(num);
    •

  •                 for (var n=0; n < num; n++) {
    •

  •                     var nm = opts.substring(0, opts.indexOf(\":\"));
    •

  •                     opts = opts.substring(opts.indexOf(\":\")+1, opts.length);
    •

  •                     var val = opts.substring(0, opts.indexOf(\":\"));
    •

  •                     opts = opts.substring(opts.indexOf(\":\")+1, opts.length);
    •

  •                     var txt = opts.substring(0, nm - val.length);
    •

  •                     opts = opts.substring(nm - val.length, opts.length);
    •

  •                     var added = false;
    •

  •                     for (var k = 0; k < sel.options.length; k++) {
    •

  •                         if(sel.options[k].value == val){
    •

  •                             added = true;
    •

  •                             break;
    •

  •                         }
    •

  •                     }
    •

  •                     if (added == false) {
    •

  •                         sel.options[k] = new Option(txt, val);
    •

  •                         sel.options[k].selected = true;
    •

  •                     }
    •

  •                 }
    •

  •                 return true;
    •

  •             }
    •

  •             </script>";
    •

  •
    •

  •         $token = $GLOBALS['xoopsSecurity']->createToken();
    •

  •         $action_tray = new XoopsFormElementTray("", " | ");
    •

  •         $action_tray->addElement(new XoopsFormLabel('', "<a href='#' onclick='var sel = xoopsGetElementById(\"" . $name . ( $multiple ? "[]" : "" ) . "\");for (var i = sel.options.length-1; i >= 0; i--) {if (!sel.options[i].selected) {sel.options[i] = null;}}; return false;'>"._MA_USER_REMOVE."</a>"));
    •

  •         $action_tray->addElement(new XoopsFormLabel('', "<a href='#' onclick='openWithSelfMain(\"".XOOPS_URL."/include/findusers.php?target={$name}&amp;multiple={$multiple}&amp;token={$token}\", \"userselect\", 800, 600, null); return false;' >"._MA_USER_MORE."</a>".$js_addusers));
    •

  •
    •

  •         $this->XoopsFormElementTray($caption, "<br /><br />", $name);
    •

  •         $this->addElement($select_element);
    •

  •         $this->addElement($action_tray);
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 22:58:19 +0200 by phpDocumentor 1.4.0a2


File Source for theme_blocks.php

Source for file theme_blocks.php

Documentation is available at theme_blocks.php

  • <?php
    •

  • /**
    •

  •  * xos_logos_PageBuilder component class file
    •

  •  *
    •

  •  * @copyright    The XOOPS project http://www.xoops.org/
    •

  •  * @license      http://www.fsf.org/copyleft/gpl.html GNU public license
    •

  •  * @package      xos_logos
    •

  •  * @subpackage   xos_logos_PageBuilder
    •

  •  * @version        $Id: theme_blocks.php 974 2007-08-11 03:33:51Z phppp $
    •

  •  * @author       Skalpa Keo <skalpa@xoops.org>
    •

  •  * @since        2.3.0
    •

  •  */
    •

  • /**
    •

  •  * This file cannot be requested directly
    •

  •  */
    •

  • if ( !defined( 'XOOPS_ROOT_PATH' ) )    exit();
    •

  •
    •

  • include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php';
    •

  • include_once XOOPS_ROOT_PATH . '/class/template.php';
    •

  •
    •

  • /**
    •

  •  * xos_logos_PageBuilder main class
    •

  •  *
    •

  •  * @package     xos_logos
    •

  •  * @subpackage  xos_logos_PageBuilder
    •

  •  * @author         Skalpa Keo
    •

  •  * @since       2.3.0
    •

  •  */
    •

  • class xos_logos_PageBuilder {
    •

  •
    •

  •     var $theme = false;
    •

  •
    •

  •     var $blocks = array();
    •

  •
    •

  •     function xoInit( $options = array() ) {
    •

  •         $this->retrieveBlocks();
    •

  •         if ( $this->theme ) {
    •

  •             $this->theme->template->assign_by_ref( 'xoBlocks', $this->blocks );
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Called before a specific zone is rendered
    •

  •      */
    •

  •     function preRender( $zone = '' ) {
    •

  •     }
    •

  •     /**
    •

  •      * Called after a specific zone is rendered
    •

  •      */
    •

  •     function postRender( $zone = '' ) {
    •

  •     }
    •

  •
    •

  •     function retrieveBlocks() {
    •

  •         global $xoopsUser, $xoopsModule, $xoopsConfig;
    •

  •
    •

  •         $startMod = ( $xoopsConfig['startpage'] == '--' ) ? 'system' : $xoopsConfig['startpage'];
    •

  •         if ( @is_object( $xoopsModule ) ) {
    •

  •             list( $mid, $dirname ) = array( $xoopsModule->getVar('mid'), $xoopsModule->getVar('dirname') );
    •

  •             $isStart = ( substr( $_SERVER['PHP_SELF'], -9 ) == 'index.php' && $xoopsConfig['startpage'] == $dirname );
    •

  •         } else {
    •

  •             list( $mid, $dirname ) = array( 0, 'system' );
    •

  •             $isStart = !@empty( $GLOBALS['xoopsOption']['show_cblock'] );
    •

  •         }
    •

  •
    •

  •         $groups = @is_object( $xoopsUser ) ? $xoopsUser->getGroups() : array( XOOPS_GROUP_ANONYMOUS );
    •

  •
    •

  •         $oldzones = array(
    •

  •             XOOPS_SIDEBLOCK_LEFT                => 'canvas_left',
    •

  •             XOOPS_SIDEBLOCK_RIGHT                => 'canvas_right',
    •

  •             XOOPS_CENTERBLOCK_LEFT                => 'page_topleft',
    •

  •             XOOPS_CENTERBLOCK_CENTER            => 'page_topcenter',
    •

  •             XOOPS_CENTERBLOCK_RIGHT                => 'page_topright',
    •

  •             XOOPS_CENTERBLOCK_BOTTOMLEFT        => 'page_bottomleft',
    •

  •             XOOPS_CENTERBLOCK_BOTTOM            => 'page_bottomcenter',
    •

  •             XOOPS_CENTERBLOCK_BOTTOMRIGHT        => 'page_bottomright',
    •

  •         );
    •

  •         foreach ( $oldzones as $zone ) {
    •

  •             $this->blocks[$zone] = array();
    •

  •         }
    •

  •         if ( $this->theme ) {
    •

  •             $template =& $this->theme->template;
    •

  •             $backup = array( $template->caching, $template->cache_lifetime );
    •

  •         } else {
    •

  •             $template =& new XoopsTpl();
    •

  •         }
    •

  •         $xoopsblock = new XoopsBlock();
    •

  •         $block_arr = array();
    •

  •         $block_arr = $xoopsblock->getAllByGroupModule( $groups, $mid, $isStart, XOOPS_BLOCK_VISIBLE);
    •

  •         foreach ( $block_arr as $block ) {
    •

  •             $side = $oldzones[ $block->getVar('side') ];
    •

  •             if ( $var = $this->buildBlock( $block, $template ) ) {
    •

  •                 $this->blocks[$side][$var["id"]] = $var;
    •

  •             }
    •

  •         }
    •

  •         if ( $this->theme ) {
    •

  •             list( $template->caching, $template->cache_lifetime ) = $backup;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     function generateCacheId($cache_id) {
    •

  •         if ($this->theme) {
    •

  •             $cache_id = $this->theme->generateCacheId($cache_id);
    •

  •         }
    •

  •         return $cache_id;
    •

  •     }
    •

  •
    •

  •     function buildBlock( $xobject, &$template ) {
    •

  •         // The lame type workaround will change
    •

  •         // bid is added temporarily as workaround for specific block manipulation
    •

  •         $block = array(
    •

  •             'id'        => $xobject->getVar( 'bid' ),
    •

  •             'module'    => $xobject->getVar( 'dirname' ),
    •

  •             'title'        => $xobject->getVar( 'title' ),
    •

  •             //'name'        => strtolower( preg_replace( '/[^0-9a-zA-Z_]/', '', str_replace( ' ', '_', $xobject->getVar( 'name' ) ) ) ),
    •

  •             'weight'    => $xobject->getVar( 'weight' ),
    •

  •             'lastmod'    => $xobject->getVar( 'last_modified' ),
    •

  •         );
    •

  •
    •

  •         //global $xoopsLogger;
    •

  •
    •

  •         $xoopsLogger =& XoopsLogger::instance();
    •

  •
    •

  •         $bcachetime = intval( $xobject->getVar('bcachetime') );
    •

  •         //$template =& new XoopsTpl();
    •

  •         if (empty($bcachetime)) {
    •

  •             $template->caching = 0;
    •

  •         } else {
    •

  •             $template->caching = 2;
    •

  •             $template->cache_lifetime = $bcachetime;
    •

  •         }
    •

  •         $tplName = ( $tplName = $xobject->getVar('template') ) ? "db:$tplName" : "db:system_block_dummy.html";
    •

  •         $cacheid = $this->generateCacheId( 'blk_' . $xobject->getVar( 'dirname', 'n' ) . '_' . $xobject->getVar('bid')/*, $xobject->getVar( 'show_func', 'n' )*/ );
    •

  •
    •

  •         if ( !$bcachetime || !$template->is_cached( $tplName, $cacheid ) ) {
    •

  •             $xoopsLogger->addBlock( $xobject->getVar('name') );
    •

  •             if ( ! ( $bresult = $xobject->buildBlock() ) ) {
    •

  •                 return false;
    •

  •             }
    •

  •             $template->assign( 'block', $bresult );
    •

  •             $block['content'] = $template->fetch( $tplName, $cacheid );
    •

  •         } else {
    •

  •             $xoopsLogger->addBlock( $xobject->getVar('name'), true, $bcachetime );
    •

  •             $block['content'] = $template->fetch( $tplName, $cacheid );
    •

  •         }
    •

  •         return $block;
    •

  •     }
    •

  •
    •

  •
    •

  • }
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:20 +0200 by phpDocumentor 1.4.0a2


Docs For Class xos_logos_PageBuilder

Class xos_logos_PageBuilder

[line 29]

Location: /theme_blocks.php

Remarks

xos_logos_PageBuilder main class

author

Skalpa Keo

since

2.3.0

Class Variable Summary

  • $blocks = array()

  • $theme =  false

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    xos_logos_PageBuilder::buildBlock

buildBlock(

$xobject,
&$template );

    Parameters

    $xobject

    &$template

    [ Top ]

    xos_logos_PageBuilder::generateCacheId

generateCacheId(

$cache_id );

    Parameters

    $cache_id

    [ Top ]

    xos_logos_PageBuilder::postRender

postRender(
[
$zone = ''] );

    Parameters

    $zone

    Remarks

    Called after a specific zone is rendered

    [ Top ]

    xos_logos_PageBuilder::preRender

preRender(
[
$zone = ''] );

    Parameters

    $zone

    Remarks

    Called before a specific zone is rendered

    [ Top ]

    xos_logos_PageBuilder::retrieveBlocks

retrieveBlocks(
 );

    [ Top ]

    xos_logos_PageBuilder::xoInit

xoInit(
[
$options = array()] );

    Parameters

    $options

    [ Top ]

Variable Detail

  • $blocks = array() [line 33]
    •

  • Data type: mixed
    •

  • $theme =  false [line 31]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:00:21 +0200 by phpDocumentor 1.4.0a2


Docs for page theme_blocks.php

File: /theme_blocks.php

Remarks

xos_logos_PageBuilder component class file

author

Skalpa Keo <skalpa@xoops.org>

version

$Id: theme_blocks.php 974 2007-08-11 03:33:51Z phppp $

copyright

The XOOPS project http://www.xoops.org/

since

2.3.0

filesource

Source Code for this file

license

GNU public license

Classes in this file:
xos_logos_PageBuilder
xos_logos_PageBuilder main class

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH.'/class/xoopsblock.php'
    This file cannot be requested directly
  • include_once = XOOPS_ROOT_PATH.'/class/template.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH.'/class/xoopsblock.php' [line 18]

    Remarks

    This file cannot be requested directly

  • include_once file: = XOOPS_ROOT_PATH.'/class/template.php' [line 19]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:20 +0200 by phpDocumentor 1.4.0a2


Package xos_logos Element Index

Element index for package xos_logos

Indexes by package:
kernel
default
xos_kernel
PHPMailer
class
Smarty
xos_opal
XOOPS
xoops20
kernal

Index of all elements
b g p r t x
top
b
$blocks | in file theme_blocks.php, variable xos_logos_PageBuilder::$blocks
buildBlock | in file theme_blocks.php, method xos_logos_PageBuilder::buildBlock()
top
g
generateCacheId | in file theme_blocks.php, method xos_logos_PageBuilder::generateCacheId()
top
p
postRender in file theme_blocks.php, method xos_logos_PageBuilder::postRender()
Called after a specific zone is rendered
preRender in file theme_blocks.php, method xos_logos_PageBuilder::preRender()
Called before a specific zone is rendered
top
r
retrieveBlocks | in file theme_blocks.php, method xos_logos_PageBuilder::retrieveBlocks()
top
t
$theme | in file theme_blocks.php, variable xos_logos_PageBuilder::$theme
theme_blocks.php | procedural page theme_blocks.php
top
x
xoInit | in file theme_blocks.php, method xos_logos_PageBuilder::xoInit()
xos_logos_PageBuilder in file theme_blocks.php, class xos_logos_PageBuilder
xos_logos_PageBuilder main class


Class Trees for Package xos_logos

Documentation generated on Tue, 28 Aug 2007 22:56:21 +0200 by phpDocumentor 1.4.0a2


Package XOOPS Element Index

Element index for package XOOPS

Indexes by package:
kernel
default
xos_kernel
PHPMailer
class
Smarty
xos_opal
xos_logos
xoops20
kernal

Index of all elements
g r s x _
top
_
$_methodName | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_methodName
$_param | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_param
$_tempArray | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_tempArray
$_tempMember | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_tempMember
$_tempName | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_tempName
$_tempStruct | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_tempStruct
$_tempValue | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_tempValue
$_workingLevel | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_workingLevel
top
g
getMethodName in file xmlrpcparser.php, method XoopsXmlRpcParser::getMethodName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getParam in file xmlrpcparser.php, method XoopsXmlRpcParser::getParam()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getTempArray in file xmlrpcparser.php, method XoopsXmlRpcParser::getTempArray()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getTempMember in file xmlrpcparser.php, method XoopsXmlRpcParser::getTempMember()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getTempName in file xmlrpcparser.php, method XoopsXmlRpcParser::getTempName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getTempStruct in file xmlrpcparser.php, method XoopsXmlRpcParser::getTempStruct()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getTempValue in file xmlrpcparser.php, method XoopsXmlRpcParser::getTempValue()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getWorkingLevel in file xmlrpcparser.php, method XoopsXmlRpcParser::getWorkingLevel()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
top
r
releaseWorkingLevel in file xmlrpcparser.php, method XoopsXmlRpcParser::releaseWorkingLevel()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
resetTempArray in file xmlrpcparser.php, method XoopsXmlRpcParser::resetTempArray()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
resetTempMember in file xmlrpcparser.php, method XoopsXmlRpcParser::resetTempMember()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
resetTempStruct in file xmlrpcparser.php, method XoopsXmlRpcParser::resetTempStruct()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
resetTempValue in file xmlrpcparser.php, method XoopsXmlRpcParser::resetTempValue()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
top
s
setMethodName in file xmlrpcparser.php, method XoopsXmlRpcParser::setMethodName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setParam in file xmlrpcparser.php, method XoopsXmlRpcParser::setParam()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setTempArray in file xmlrpcparser.php, method XoopsXmlRpcParser::setTempArray()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setTempMember in file xmlrpcparser.php, method XoopsXmlRpcParser::setTempMember()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setTempName in file xmlrpcparser.php, method XoopsXmlRpcParser::setTempName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setTempStruct in file xmlrpcparser.php, method XoopsXmlRpcParser::setTempStruct()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setTempValue in file xmlrpcparser.php, method XoopsXmlRpcParser::setTempValue()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setWorkingLevel in file xmlrpcparser.php, method XoopsXmlRpcParser::setWorkingLevel()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
top
x
xmlrpcparser.php | procedural page xmlrpcparser.php
XoopsXmlRpcParser in file xmlrpcparser.php, method XoopsXmlRpcParser::XoopsXmlRpcParser()
Constructor of the class
XoopsXmlRpcParser in file xmlrpcparser.php, class XoopsXmlRpcParser
Class RSS Parser


Class Trees for Package XOOPS

Documentation generated on Tue, 28 Aug 2007 22:56:21 +0200 by phpDocumentor 1.4.0a2


Docs for page xmlrpcparser.php

File: /xml/rpc/xmlrpcparser.php

filesource

Source Code for this file

Classes in this file:
XoopsXmlRpcParser
Class RSS Parser
RpcMethodNameHandler
*****************************************************************************
RpcIntHandler
*****************************************************************************
RpcDoubleHandler
*****************************************************************************
RpcBooleanHandler
*****************************************************************************
RpcStringHandler
*****************************************************************************
RpcDateTimeHandler
*****************************************************************************
RpcBase64Handler
*****************************************************************************
RpcNameHandler
*****************************************************************************
RpcValueHandler
*****************************************************************************
RpcMemberHandler
*****************************************************************************
RpcArrayHandler
*****************************************************************************
RpcStructHandler
*****************************************************************************

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH.'/class/xml/saxparser.php'
  • require_once = XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php'

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH.'/class/xml/saxparser.php' [line 34]

  • require_once file: = XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php' [line 35]

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:00:29 +0200 by phpDocumentor 1.4.0a2


File Source for xmlrpcparser.php

Source for file xmlrpcparser.php

Documentation is available at xmlrpcparser.php

  • <?php
    •

  • // $Id: xmlrpcparser.php 2 2005-11-02 18:23:29Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined('XOOPS_ROOT_PATH')) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • require_once XOOPS_ROOT_PATH.'/class/xml/saxparser.php';
    •

  • require_once XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php';
    •

  •
    •

  • /**
    •

  • * Class RSS Parser
    •

  • *
    •

  • * This class offers methods to parse RSS Files
    •

  • *
    •

  • * @link      http://www.xoops.org/ Latest release of this class
    •

  • * @package   XOOPS
    •

  • * @copyright Copyright (c) 2001 xoops.org. All rights reserved.
    •

  • * @author    Kazumi Ono <onokazu@xoops.org>
    •

  • * @version   1.6 ($Date: 2005-11-02 14:23:29 -0400 (Wed, 02 Nov 2005) $) $Revision: 2 $
    •

  • * @access    public
    •

  • */
    •

  •
    •

  • class XoopsXmlRpcParser extends SaxParser
    •

  • {
    •

  •
    •

  •     /**
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     * @access private
    •

  •     * @var    array
    •

  •     */
    •

  •     var $_param;
    •

  •
    •

  •     /**
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     * @access private
    •

  •     * @var    string
    •

  •     */
    •

  •     var $_methodName;
    •

  •
    •

  •     /**
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     * @access private
    •

  •     * @var    array
    •

  •     */
    •

  •     var $_tempName;
    •

  •
    •

  •     /**
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     * @access private
    •

  •     * @var    array
    •

  •     */
    •

  •     var $_tempValue;
    •

  •
    •

  •     /**
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     * @access private
    •

  •     * @var    array
    •

  •     */
    •

  •     var $_tempMember;
    •

  •
    •

  •     /**
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     * @access private
    •

  •     * @var    array
    •

  •     */
    •

  •     var $_tempStruct;
    •

  •
    •

  •     /**
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     * @access private
    •

  •     * @var    array
    •

  •     */
    •

  •     var $_tempArray;
    •

  •
    •

  •     /**
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     * @access private
    •

  •     * @var    array
    •

  •     */
    •

  •     var $_workingLevel = array();
    •

  •
    •

  •
    •

  •     /**
    •

  •     * Constructor of the class
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @see
    •

  •     */
    •

  •     function XoopsXmlRpcParser(&$input)
    •

  •     {
    •

  •         $this->SaxParser($input);
    •

  •         $this->addTagHandler(new RpcMethodNameHandler());
    •

  •         $this->addTagHandler(new RpcIntHandler());
    •

  •         $this->addTagHandler(new RpcDoubleHandler());
    •

  •         $this->addTagHandler(new RpcBooleanHandler());
    •

  •         $this->addTagHandler(new RpcStringHandler());
    •

  •         $this->addTagHandler(new RpcDateTimeHandler());
    •

  •         $this->addTagHandler(new RpcBase64Handler());
    •

  •         $this->addTagHandler(new RpcNameHandler());
    •

  •         $this->addTagHandler(new RpcValueHandler());
    •

  •         $this->addTagHandler(new RpcMemberHandler());
    •

  •         $this->addTagHandler(new RpcStructHandler());
    •

  •         $this->addTagHandler(new RpcArrayHandler());
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function setTempName($name)
    •

  •     {
    •

  •         $this->_tempName[$this->getWorkingLevel()] = $name;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getTempName()
    •

  •     {
    •

  •         return $this->_tempName[$this->getWorkingLevel()];
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function setTempValue($value)
    •

  •     {
    •

  •         if (is_array($value)) {
    •

  •             settype($this->_tempValue, 'array');
    •

  •             foreach ($value as $k => $v) {
    •

  •                 $this->_tempValue[$k] = $v;
    •

  •             }
    •

  •         } elseif (is_string($value)) {
    •

  •             if (isset($this->_tempValue)) {
    •

  •                 if (is_string($this->_tempValue)) {
    •

  •                     $this->_tempValue .= $value;
    •

  •                 }
    •

  •             } else {
    •

  •                 $this->_tempValue = $value;
    •

  •             }
    •

  •         } else {
    •

  •             $this->_tempValue = $value;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getTempValue()
    •

  •     {
    •

  •         return $this->_tempValue;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function resetTempValue()
    •

  •     {
    •

  •         unset($this->_tempValue);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function setTempMember($name, $value)
    •

  •     {
    •

  •         $this->_tempMember[$this->getWorkingLevel()][$name] = $value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getTempMember()
    •

  •     {
    •

  •         return $this->_tempMember[$this->getWorkingLevel()];
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function resetTempMember()
    •

  •     {
    •

  •         $this->_tempMember[$this->getCurrentLevel()] = array();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function setWorkingLevel()
    •

  •     {
    •

  •         array_push($this->_workingLevel, $this->getCurrentLevel());
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getWorkingLevel()
    •

  •     {
    •

  •         return $this->_workingLevel[count($this->_workingLevel) - 1];
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function releaseWorkingLevel()
    •

  •     {
    •

  •         array_pop($this->_workingLevel);
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function setTempStruct($member)
    •

  •     {
    •

  •         $key = key($member);
    •

  •         $this->_tempStruct[$this->getWorkingLevel()][$key] = $member[$key];
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getTempStruct()
    •

  •     {
    •

  •         return $this->_tempStruct[$this->getWorkingLevel()];
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function resetTempStruct()
    •

  •     {
    •

  •         $this->_tempStruct[$this->getCurrentLevel()] = array();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function setTempArray($value)
    •

  •     {
    •

  •         $this->_tempArray[$this->getWorkingLevel()][] = $value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getTempArray()
    •

  •     {
    •

  •         return $this->_tempArray[$this->getWorkingLevel()];
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function resetTempArray()
    •

  •     {
    •

  •         $this->_tempArray[$this->getCurrentLevel()] = array();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function setMethodName($methodName)
    •

  •     {
    •

  •         $this->_methodName = $methodName;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getMethodName()
    •

  •     {
    •

  •         return $this->_methodName;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function setParam($value)
    •

  •     {
    •

  •         $this->_param[] = $value;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function &getParam()
    •

  •     {
    •

  •         return $this->_param;
    •

  •     }
    •

  • }
    •

  •
    •

  •
    •

  • class RpcMethodNameHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getName()
    •

  •     {
    •

  •         return 'methodName';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         $parser->setMethodName($data);
    •

  •     }
    •

  • }
    •

  •
    •

  • class RpcIntHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getName()
    •

  •     {
    •

  •         return array('int', 'i4');
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         $parser->setTempValue(intval($data));
    •

  •     }
    •

  • }
    •

  •
    •

  • class RpcDoubleHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getName()
    •

  •     {
    •

  •         return 'double';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         $data = (float)$data;
    •

  •         $parser->setTempValue($data);
    •

  •     }
    •

  • }
    •

  •
    •

  • class RpcBooleanHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getName()
    •

  •     {
    •

  •         return 'boolean';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         $data = (boolean)$data;
    •

  •         $parser->setTempValue($data);
    •

  •     }
    •

  • }
    •

  •
    •

  • class RpcStringHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getName()
    •

  •     {
    •

  •         return 'string';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         $parser->setTempValue(strval($data));
    •

  •     }
    •

  • }
    •

  •
    •

  • class RpcDateTimeHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getName()
    •

  •     {
    •

  •         return 'dateTime.iso8601';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         $matches = array();
    •

  •         if (!preg_match("/^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})$/", $data, $matches)) {
    •

  •             $parser->setTempValue(time());
    •

  •         } else {
    •

  •             $parser->setTempValue(gmmktime($matches[4], $matches[5], $meatches[6], $matches[2], $matches[3], $matches[1]));
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  • class RpcBase64Handler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getName()
    •

  •     {
    •

  •         return 'base64';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         $parser->setTempValue(base64_decode($data));
    •

  •     }
    •

  • }
    •

  •
    •

  • class RpcNameHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getName()
    •

  •     {
    •

  •         return 'name';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'member':
    •

  •             $parser->setTempName($data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  • }
    •

  •
    •

  •
    •

  • class RpcValueHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getName()
    •

  •     {
    •

  •         return 'value';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleCharacterData(&$parser, &$data)
    •

  •     {
    •

  •         switch ($parser->getParentTag()) {
    •

  •         case 'member':
    •

  •             $parser->setTempValue($data);
    •

  •             break;
    •

  •         case 'data':
    •

  •         case 'array':
    •

  •             $parser->setTempValue($data);
    •

  •             break;
    •

  •         default:
    •

  •             break;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleBeginElement(&$parser, &$attributes)
    •

  •     {
    •

  •         //$parser->resetTempValue();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleEndElement(&$parser)
    •

  •     {
    •

  •         switch ($parser->getCurrentTag()) {
    •

  •         case 'member':
    •

  •             $parser->setTempMember($parser->getTempName(), $parser->getTempValue());
    •

  •             break;
    •

  •         case 'array':
    •

  •         case 'data':
    •

  •             $parser->setTempArray($parser->getTempValue());
    •

  •             break;
    •

  •         default:
    •

  •             $parser->setParam($parser->getTempValue());
    •

  •             break;
    •

  •         }
    •

  •         $parser->resetTempValue();
    •

  •     }
    •

  • }
    •

  •
    •

  • class RpcMemberHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getName()
    •

  •     {
    •

  •         return 'member';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleBeginElement(&$parser, &$attributes)
    •

  •     {
    •

  •         $parser->setWorkingLevel();
    •

  •         $parser->resetTempMember();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleEndElement(&$parser)
    •

  •     {
    •

  •         $member =& $parser->getTempMember();
    •

  •         $parser->releaseWorkingLevel();
    •

  •         $parser->setTempStruct($member);
    •

  •     }
    •

  • }
    •

  •
    •

  • class RpcArrayHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getName()
    •

  •     {
    •

  •         return 'array';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleBeginElement(&$parser, &$attributes)
    •

  •     {
    •

  •         $parser->setWorkingLevel();
    •

  •         $parser->resetTempArray();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleEndElement(&$parser)
    •

  •     {
    •

  •         $parser->setTempValue($parser->getTempArray());
    •

  •         $parser->releaseWorkingLevel();
    •

  •     }
    •

  • }
    •

  •
    •

  • class RpcStructHandler extends XmlTagHandler
    •

  • {
    •

  •
    •

  •     /**
    •

  •     *
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function getName()
    •

  •     {
    •

  •         return 'struct';
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     *
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleBeginElement(&$parser, &$attributes)
    •

  •     {
    •

  •         $parser->setWorkingLevel();
    •

  •         $parser->resetTempStruct();
    •

  •     }
    •

  •
    •

  •     /**
    •

  •     *
    •

  •     *
    •

  •     * @access
    •

  •     * @author
    •

  •     * @param
    •

  •     * @return
    •

  •     * @see
    •

  •     */
    •

  •     function handleEndElement(&$parser)
    •

  •     {
    •

  •         $parser->setTempValue($parser->getTempStruct());
    •

  •         $parser->releaseWorkingLevel();
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:00:31 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsXmlRpcParser

Class XoopsXmlRpcParser

[line 50]
SaxParser
   |
   --XoopsXmlRpcParser
Location: /xml/rpc/xmlrpcparser.php

Remarks

Class RSS Parser

This class offers methods to parse RSS Files

author

Kazumi Ono <onokazu@xoops.org>

version

1.6 ($Date: 2005-11-02 14:23:29 -0400 (Wed, 02 Nov 2005) $) $Revision: 2 $

copyright

Copyright (c) 2001 xoops.org. All rights reserved.

link

http://www.xoops.org/ Latest release of this class

access

public

Class Variable Summary

  • $_methodName =
  • $_param =
  • $_tempArray =
  • $_tempMember =
  • $_tempName =
  • $_tempStruct =
  • $_tempValue =
  • $_workingLevel = array()

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class SaxParser

  • SaxParser::$errors = array()
  • SaxParser::$isCaseFolding =
  • SaxParser::$level =
  • SaxParser::$parser =
  • SaxParser::$tagHandlers = array()
  • SaxParser::$tags = array()
  • SaxParser::$targetEncoding =
  • SaxParser::$xmlInput =

Method Summary

Inherited Method Summary

Inherited From Class SaxParser

  • SaxParser::SaxParser()
    **************************************************************************
  • SaxParser::addTagHandler()
    **************************************************************************
  • SaxParser::free()
    **************************************************************************
  • SaxParser::getCurrentLevel()
  • SaxParser::getCurrentTag()
    **************************************************************************
  • SaxParser::getErrors()
    Gets all the error messages
  • SaxParser::getParentTag()
  • SaxParser::getXmlError()
    **************************************************************************
  • SaxParser::handleBeginElement()
    **************************************************************************
  • SaxParser::handleBeginElementDefault()
    The default tag handler method for a tag with no handler
  • SaxParser::handleCharacterData()
    **************************************************************************
  • SaxParser::handleCharacterDataDefault()
    The default tag handler method for a tag with no handler
  • SaxParser::handleDefault()
    **************************************************************************
  • SaxParser::handleEndElement()
    **************************************************************************
  • SaxParser::handleEndElementDefault()
    The default tag handler method for a tag with no handler
  • SaxParser::handleExternalEntityRef()
    **************************************************************************
  • SaxParser::handleNotationDecl()
    **************************************************************************
  • SaxParser::handleProcessingInstruction()
    **************************************************************************
  • SaxParser::handleUnparsedEntityDecl()
    **************************************************************************
  • SaxParser::parse()
    **************************************************************************
  • SaxParser::setCaseFolding()
    **************************************************************************
  • SaxParser::setErrors()
    Sets error messages
  • SaxParser::useAsciiEncoding()
    **************************************************************************
  • SaxParser::useIsoEncoding()
    **************************************************************************
  • SaxParser::useUtfEncoding()
    **************************************************************************

Method Detail

    XoopsXmlRpcParser::XoopsXmlRpcParser

    XoopsXmlRpcParser( &$input );

    Parameters

    &$input

    Remarks

    Constructor of the class

    author

    see

    [ Top ]

    XoopsXmlRpcParser::getMethodName

    getMethodName( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::getParam

    &getParam( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::getTempArray

    getTempArray( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::getTempMember

    getTempMember( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::getTempName

    getTempName( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::getTempStruct

    getTempStruct( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::getTempValue

    getTempValue( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::getWorkingLevel

    getWorkingLevel( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::releaseWorkingLevel

    releaseWorkingLevel( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::resetTempArray

    resetTempArray( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::resetTempMember

    resetTempMember( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::resetTempStruct

    resetTempStruct( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::resetTempValue

    resetTempValue( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::setMethodName

    setMethodName( $methodName );

    Parameters

    $methodName

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::setParam

    setParam( $value );

    Parameters

    $value

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::setTempArray

    setTempArray( $value );

    Parameters

    $value

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::setTempMember

    setTempMember( $name, $value );

    Parameters

    $name

    $value

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::setTempName

    setTempName( $name );

    Parameters

    $name

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::setTempStruct

    setTempStruct( $member );

    Parameters

    $member

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::setTempValue

    setTempValue( $value );

    Parameters

    $value

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

    XoopsXmlRpcParser::setWorkingLevel

    setWorkingLevel( );

    Remarks

    This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.

    author

    see

    [ Top ]

Variable Detail

  • $_methodName = [line 71]
  • Data type: string

    • access

    private

  • $_param = [line 61]
  • Data type: array

    • access

    private

  • $_tempArray = [line 121]
  • Data type: array

    • access

    private

  • $_tempMember = [line 101]
  • Data type: array

    • access

    private

  • $_tempName = [line 81]
  • Data type: array

    • access

    private

  • $_tempStruct = [line 111]
  • Data type: array

    • access

    private

  • $_tempValue = [line 91]
  • Data type: array

    • access

    private

  • $_workingLevel = array() [line 131]
  • Data type: array

    • access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:00:34 +0200 by phpDocumentor 1.4.0a2


File Source for xoopsmailer.php

Source for file xoopsmailer.php

Documentation is available at xoopsmailer.php

  • <?php
    •

  • // $Id: xoopsmailer.php 797 2006-11-08 02:21:38Z skalpa $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Kazumi Ono (AKA onokazu)                                          //
    •

  • // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined("XOOPS_ROOT_PATH")) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • if (isset($GLOBALS['xoopsConfig']['language']) && file_exists(XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/mail.php')) {
    •

  •     include_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/mail.php';
    •

  • } else {
    •

  •     include_once XOOPS_ROOT_PATH.'/language/english/mail.php';
    •

  • }
    •

  •
    •

  • /**
    •

  •  * The new Multimailer class that will carry out the actual sending and will later replace this class.
    •

  •  * If you're writing new code, please use that class instead.
    •

  •  */
    •

  • include_once(XOOPS_ROOT_PATH."/class/mail/xoopsmultimailer.php");
    •

  •
    •

  •
    •

  • /**
    •

  •  * Class for sending mail.
    •

  •  *
    •

  •  * Changed to use the facilities of  {@link XoopsMultiMailer}
    •

  •  *
    •

  •  * @deprecated    use {@link XoopsMultiMailer} instead.
    •

  •  *
    •

  •  * @package        class
    •

  •  * @subpackage    mail
    •

  •  *
    •

  •  * @author        Kazumi Ono    <onokazu@xoops.org>
    •

  •  * @copyright    (c) 2000-2003 The Xoops Project - www.xoops.org
    •

  •  */
    •

  • class XoopsMailer
    •

  • {
    •

  •     /**
    •

  •      * reference to a {@link XoopsMultiMailer}
    •

  •      *
    •

  •      * @var        XoopsMultiMailer
    •

  •      * @access    private
    •

  •      * @since    21.02.2003 14:14:13
    •

  •      */
    •

  •     var $multimailer;
    •

  •
    •

  •     // sender email address
    •

  •     // private
    •

  •     var $fromEmail;
    •

  •
    •

  •     // sender name
    •

  •     // private
    •

  •     var $fromName;
    •

  •
    •

  •     // RMV-NOTIFY
    •

  •     // sender UID
    •

  •     // private
    •

  •     var $fromUser;
    •

  •
    •

  •     // array of user class objects
    •

  •     // private
    •

  •     var $toUsers;
    •

  •
    •

  •     // array of email addresses
    •

  •     // private
    •

  •     var $toEmails;
    •

  •
    •

  •     // custom headers
    •

  •     // private
    •

  •     var $headers;
    •

  •
    •

  •     // subjet of mail
    •

  •     // private
    •

  •     var $subject;
    •

  •
    •

  •     // body of mail
    •

  •     // private
    •

  •     var $body;
    •

  •
    •

  •     // error messages
    •

  •     // private
    •

  •     var $errors;
    •

  •
    •

  •     // messages upon success
    •

  •     // private
    •

  •     var $success;
    •

  •
    •

  •     // private
    •

  •     var $isMail;
    •

  •
    •

  •     // private
    •

  •     var $isPM;
    •

  •
    •

  •     // private
    •

  •     var $assignedTags;
    •

  •
    •

  •     // private
    •

  •     var $template;
    •

  •
    •

  •     // private
    •

  •     var $templatedir;
    •

  •
    •

  •     // protected
    •

  •     var $charSet = 'iso-8859-1';
    •

  •
    •

  •     // protected
    •

  •     var $encoding = '8bit';
    •

  •
    •

  •     function XoopsMailer()
    •

  •     {
    •

  •
    •

  •         $this->multimailer = new XoopsMultiMailer();
    •

  •         $this->reset();
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     // reset all properties to default
    •

  •     function reset()
    •

  •     {
    •

  •         $this->fromEmail = "";
    •

  •         $this->fromName = "";
    •

  •         $this->fromUser = null; // RMV-NOTIFY
    •

  •         $this->priority = '';
    •

  •         $this->toUsers = array();
    •

  •         $this->toEmails = array();
    •

  •         $this->headers = array();
    •

  •         $this->subject = "";
    •

  •         $this->body = "";
    •

  •         $this->errors = array();
    •

  •         $this->success = array();
    •

  •         $this->isMail = false;
    •

  •         $this->isPM = false;
    •

  •         $this->assignedTags = array();
    •

  •         $this->template = "";
    •

  •         $this->templatedir = "";
    •

  •         // Change below to \r\n if you have problem sending mail
    •

  •         $this->LE ="\n";
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function setTemplateDir($value)
    •

  •     {
    •

  •         if ( substr($value, -1, 1) != "/" ) {
    •

  •             $value .= "/";
    •

  •         }
    •

  •         $this->templatedir = $value;
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function setTemplate($value)
    •

  •     {
    •

  •         $this->template = $value;
    •

  •     }
    •

  •
    •

  •     // pupblic
    •

  •     function setFromEmail($value)
    •

  •     {
    •

  •         $this->fromEmail = trim($value);
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function setFromName($value)
    •

  •     {
    •

  •         $this->fromName = trim($value);
    •

  •     }
    •

  •
    •

  •     // RMV-NOTIFY
    •

  •     // public
    •

  •     function setFromUser(&$user)
    •

  •     {
    •

  •         if ( strtolower(get_class($user)) == "xoopsuser" ) {
    •

  •             $this->fromUser =& $user;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function setPriority($value)
    •

  •     {
    •

  •         $this->priority = trim($value);
    •

  •     }
    •

  •
    •

  •
    •

  •     // public
    •

  •     function setSubject($value)
    •

  •     {
    •

  •         $this->subject = trim($value);
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function setBody($value)
    •

  •     {
    •

  •         $this->body = trim($value);
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function useMail()
    •

  •     {
    •

  •         $this->isMail = true;
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function usePM()
    •

  •     {
    •

  •         $this->isPM = true;
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function send($debug = false)
    •

  •     {
    •

  •         global $xoopsConfig;
    •

  •         if ( $this->body == "" && $this->template == "" ) {
    •

  •             if ($debug) {
    •

  •                 $this->errors[] = _MAIL_MSGBODY;
    •

  •             }
    •

  •             return false;
    •

  •         } elseif ( $this->template != "" ) {
    •

  •             $path = ( $this->templatedir != "" ) ? $this->templatedir."".$this->template : (XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/mail_template/".$this->template);
    •

  •             if ( !($fd = @fopen($path, 'r')) ) {
    •

  •                 if ($debug) {
    •

  •                     $this->errors[] = _MAIL_FAILOPTPL;
    •

  •                 }
    •

  •                         return false;
    •

  •                 }
    •

  •             $this->setBody(fread($fd, filesize($path)));
    •

  •         }
    •

  •
    •

  •         // for sending mail only
    •

  •         if ( $this->isMail  || !empty($this->toEmails) ) {
    •

  •             if (!empty($this->priority)) {
    •

  •                 $this->headers[] = "X-Priority: " . $this->priority;
    •

  •             }
    •

  •             //$this->headers[] = "X-Mailer: PHP/".phpversion();
    •

  •             //$this->headers[] = "Return-Path: ".$this->fromEmail;
    •

  •             $headers = join($this->LE, $this->headers);
    •

  •         }
    •

  •
    •

  • // TODO: we should have an option of no-reply for private messages and emails
    •

  • // to which we do not accept replies.  e.g. the site admin doesn't want a
    •

  • // a lot of message from people trying to unsubscribe.  Just make sure to
    •

  • // give good instructions in the message.
    •

  •
    •

  •         // add some standard tags (user-dependent tags are included later)
    •

  •         global $xoopsConfig;
    •

  •         $this->assign ('X_ADMINMAIL', $xoopsConfig['adminmail']);
    •

  •         $this->assign ('X_SITENAME', $xoopsConfig['sitename']);
    •

  •         $this->assign ('X_SITEURL', XOOPS_URL);
    •

  •         // TODO: also X_ADMINNAME??
    •

  •         // TODO: X_SIGNATURE, X_DISCLAIMER ?? - these are probably best
    •

  •         //  done as includes if mail templates ever get this sophisticated
    •

  •
    •

  •         // replace tags with actual values
    •

  •         foreach ( $this->assignedTags as $k => $v ) {
    •

  •             $this->body = str_replace("{".$k."}", $v, $this->body);
    •

  •             $this->subject = str_replace("{".$k."}", $v, $this->subject);
    •

  •         }
    •

  •         $this->body = str_replace("\r\n", "\n", $this->body);
    •

  •         $this->body = str_replace("\r", "\n", $this->body);
    •

  •         $this->body = str_replace("\n", $this->LE, $this->body);
    •

  •
    •

  •         // send mail to specified mail addresses, if any
    •

  •         foreach ( $this->toEmails as $mailaddr ) {
    •

  •             if ( !$this->sendMail($mailaddr, $this->subject, $this->body, $headers) ) {
    •

  •                 if ($debug) {
    •

  •                     $this->errors[] = sprintf(_MAIL_SENDMAILNG, $mailaddr);
    •

  •                 }
    •

  •             } else {
    •

  •                 if ($debug) {
    •

  •                     $this->success[] = sprintf(_MAIL_MAILGOOD, $mailaddr);
    •

  •                 }
    •

  •             }
    •

  •         }
    •

  •
    •

  •         // send message to specified users, if any
    •

  •
    •

  •         // NOTE: we don't send to LIST of recipients, because the tags
    •

  •         // below are dependent on the user identity; i.e. each user
    •

  •         // receives (potentially) a different message
    •

  •
    •

  •         foreach ( $this->toUsers as $user ) {
    •

  •             // set some user specific variables
    •

  •             $subject = str_replace("{X_UNAME}", $user->getVar("uname"), $this->subject );
    •

  •             $text = str_replace("{X_UID}", $user->getVar("uid"), $this->body );
    •

  •             $text = str_replace("{X_UEMAIL}", $user->getVar("email"), $text );
    •

  •             $text = str_replace("{X_UNAME}", $user->getVar("uname"), $text );
    •

  •             $text = str_replace("{X_UACTLINK}", XOOPS_URL."/user.php?op=actv&id=".$user->getVar("uid")."&actkey=".$user->getVar('actkey'), $text );
    •

  •             // send mail
    •

  •             if ( $this->isMail ) {
    •

  •                 if ( !$this->sendMail($user->getVar("email"), $subject, $text, $headers) ) {
    •

  •                     if ($debug) {
    •

  •                         $this->errors[] = sprintf(_MAIL_SENDMAILNG, $user->getVar("uname"));
    •

  •                     }
    •

  •                 } else {
    •

  •                     if ($debug) {
    •

  •                         $this->success[] = sprintf(_MAIL_MAILGOOD, $user->getVar("uname"));
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •             // send private message
    •

  •             if ( $this->isPM ) {
    •

  •                 if ( !$this->sendPM($user->getVar("uid"), $subject, $text) ) {
    •

  •                     if ($debug) {
    •

  •                         $this->errors[] = sprintf(_MAIL_SENDPMNG, $user->getVar("uname"));
    •

  •                     }
    •

  •                 } else {
    •

  •                     if ($debug) {
    •

  •                         $this->success[] = sprintf(_MAIL_PMGOOD, $user->getVar("uname"));
    •

  •                     }
    •

  •                 }
    •

  •             }
    •

  •             flush();
    •

  •         }
    •

  •         if ( count($this->errors) > 0 ) {
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     // private
    •

  •     function sendPM($uid, $subject, $body)
    •

  •     {
    •

  •         global $xoopsUser;
    •

  •         $pm_handler =& xoops_gethandler('privmessage');
    •

  •         $pm =& $pm_handler->create();
    •

  •         $pm->setVar("subject", $subject);
    •

  •         // RMV-NOTIFY
    •

  •         $pm->setVar('from_userid', !empty($this->fromUser) ? $this->fromUser->getVar('uid') : $xoopsUser->getVar('uid'));
    •

  •         $pm->setVar("msg_text", $body);
    •

  •         $pm->setVar("to_userid", $uid);
    •

  •         if (!$pm_handler->insert($pm)) {
    •

  •             return false;
    •

  •         }
    •

  •         return true;
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Send email
    •

  •      *
    •

  •      * Uses the new XoopsMultiMailer
    •

  •      *
    •

  •      * @param    string
    •

  •      * @param    string
    •

  •      * @param    string
    •

  •      * @return    boolean    FALSE on error.
    •

  •      */
    •

  •
    •

  •     function sendMail($email, $subject, $body, $headers)
    •

  •     {
    •

  •         $subject = $this->encodeSubject($subject);
    •

  •         $this->encodeBody($body);
    •

  •         $this->multimailer->ClearAllRecipients();
    •

  •         $this->multimailer->AddAddress($email);
    •

  •         $this->multimailer->Subject = $subject;
    •

  •         $this->multimailer->Body = $body;
    •

  •         $this->multimailer->CharSet = $this->charSet;
    •

  •         $this->multimailer->Encoding = $this->encoding;
    •

  •         if (!empty($this->fromName)) {
    •

  •             $this->multimailer->FromName = $this->encodeFromName($this->fromName);
    •

  •         }
    •

  •         if (!empty($this->fromEmail)) {
    •

  •             $this->multimailer->Sender = $this->multimailer->From = $this->fromEmail;
    •

  •         }
    •

  •
    •

  •         $this->multimailer->ClearCustomHeaders();
    •

  •         foreach ($this->headers as $header) {
    •

  •             $this->multimailer->AddCustomHeader($header);
    •

  •         }
    •

  •         if (!$this->multimailer->Send()) {
    •

  •             $this->errors[] = $this->multimailer->ErrorInfo;
    •

  •             return FALSE;
    •

  •         }
    •

  •         return TRUE;
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function getErrors($ashtml = true)
    •

  •     {
    •

  •         if ( !$ashtml ) {
    •

  •             return $this->errors;
    •

  •         } else {
    •

  •             if ( !empty($this->errors) ) {
    •

  •                 $ret = "<h4>"._ERRORS."</h4>";
    •

  •                 foreach ( $this->errors as $error ) {
    •

  •                     $ret .= $error."<br />";
    •

  •                 }
    •

  •             } else {
    •

  •                 $ret = "";
    •

  •             }
    •

  •             return $ret;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function getSuccess($ashtml = true)
    •

  •     {
    •

  •         if ( !$ashtml ) {
    •

  •             return $this->success;
    •

  •         } else {
    •

  •             $ret = "";
    •

  •             if ( !empty($this->success) ) {
    •

  •                 foreach ( $this->success as $suc ) {
    •

  •                     $ret .= $suc."<br />";
    •

  •                 }
    •

  •             }
    •

  •             return $ret;
    •

  •         }
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function assign($tag, $value=null)
    •

  •     {
    •

  •         if ( is_array($tag) ) {
    •

  •             foreach ( $tag as $k => $v ) {
    •

  •                 $this->assign($k, $v);
    •

  •             }
    •

  •         } else {
    •

  •             if ( !empty($tag) && isset($value) ) {
    •

  •                 $tag = strtoupper(trim($tag));
    •

  • // RMV-NOTIFY
    •

  • // TEMPORARY FIXME: until the X_tags are all in here
    •

  • //                if ( substr($tag, 0, 2) != "X_" ) {
    •

  •                     $this->assignedTags[$tag] = $value;
    •

  • //                }
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function addHeaders($value)
    •

  •     {
    •

  •         $this->headers[] = trim($value).$this->LE;
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function setToEmails($email)
    •

  •     {
    •

  •         if ( !is_array($email) ) {
    •

  •             if (preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i",$email) ) {
    •

  •                 array_push($this->toEmails, $email);
    •

  •             }
    •

  •         } else {
    •

  •             foreach ( $email as $e) {
    •

  •                 $this->setToEmails($e);
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function setToUsers(&$user)
    •

  •     {
    •

  •         if ( !is_array($user) ) {
    •

  •             if ( strtolower(get_class($user)) == "xoopsuser" ) {
    •

  •                 array_push($this->toUsers, $user);
    •

  •             }
    •

  •         } else {
    •

  •             foreach ( $user as $u) {
    •

  •                 $this->setToUsers($u);
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     // public
    •

  •     function setToGroups($group)
    •

  •     {
    •

  •         if ( !is_array($group) ) {
    •

  •             if ( strtolower(get_class($group)) == "xoopsgroup" ) {
    •

  •                 $member_handler =& xoops_gethandler('member');
    •

  •                 $this->setToUsers($member_handler->getUsersByGroup($group->getVar('groupid'), true));
    •

  •             }
    •

  •         } else {
    •

  •             foreach ($group as $g) {
    •

  •                 $this->setToGroups($g);
    •

  •             }
    •

  •         }
    •

  •     }
    •

  •
    •

  •     // abstract
    •

  •     // to be overidden by lang specific mail class, if needed
    •

  •     function encodeFromName($text)
    •

  •     {
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     // abstract
    •

  •     // to be overidden by lang specific mail class, if needed
    •

  •     function encodeSubject($text)
    •

  •     {
    •

  •         return $text;
    •

  •     }
    •

  •
    •

  •     // abstract
    •

  •     // to be overidden by lang specific mail class, if needed
    •

  •     function encodeBody(&$text)
    •

  •     {
    •

  •
    •

  •     }
    •

  • }
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:16 +0200 by phpDocumentor 1.4.0a2


File Source for xoopsmultimailer.php

Source for file xoopsmultimailer.php

Documentation is available at xoopsmultimailer.php

  • <?php
    •

  • // $Id: xoopsmultimailer.php 898 2007-07-29 08:31:26Z phppp $
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //                XOOPS - PHP Content Management System                      //
    •

  • //                    Copyright (c) 2000 XOOPS.org                           //
    •

  • //                       <http://www.xoops.org/>                             //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • //  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.                                      //
    •

  • //                                                                           //
    •

  • //  You may not change or alter any portion of this comment or credits       //
    •

  • //  of supporting developers from this source code or any supporting         //
    •

  • //  source code which is considered copyrighted (c) material of the          //
    •

  • //  original comment or credit authors.                                      //
    •

  • //                                                                           //
    •

  • //  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 //
    •

  • //  ------------------------------------------------------------------------ //
    •

  • // Author: Jochen Büînagel (job@buennagel.com)                               //
    •

  • // URL:  http://www.xoops.org                                                 //
    •

  • // Project: The XOOPS Project                                                //
    •

  • // ------------------------------------------------------------------------- //
    •

  • if (!defined("XOOPS_ROOT_PATH")) {
    •

  •     die("XOOPS root path not defined");
    •

  • }
    •

  • /**
    •

  •  * @package        class
    •

  •  * @subpackage    mail
    •

  •  *
    •

  •  * @filesource
    •

  •  *
    •

  •  * @author        Jochen Büînagel    <jb@buennagel.com>
    •

  •  * @copyright    copyright (c) 2000-2003 The XOOPS Project (http://www.xoops.org)
    •

  •  *
    •

  •  * @version        $Revision: 898 $ - $Date: 2007-07-29 04:31:26 -0400 (Sun, 29 Jul 2007) $
    •

  •  */
    •

  •
    •

  • /**
    •

  •  * load the base class
    •

  •  */
    •

  • require_once(XOOPS_ROOT_PATH.'/class/mail/phpmailer/class.phpmailer.php');
    •

  •
    •

  • /**
    •

  •  * Mailer Class.
    •

  •  *
    •

  •  * At the moment, this does nothing but send email through PHP's "mail()" function,
    •

  •  * but it has the abiltiy to do much more.
    •

  •  *
    •

  •  * If you have problems sending mail with "mail()", you can edit the member variables
    •

  •  * to suit your setting. Later this will be possible through the admin panel.
    •

  •  *
    •

  •  * @todo        Make a page in the admin panel for setting mailer preferences.
    •

  •  *
    •

  •  * @package        class
    •

  •  * @subpackage    mail
    •

  •  *
    •

  •  * @author        Jochen Buennagel    <job@buennagel.com>
    •

  •  * @copyright    (c) 2000-2003 The Xoops Project - www.xoops.org
    •

  •  * @version        $Revision: 898 $ - changed by $Author$ on $Date: 2007-07-29 04:31:26 -0400 (Sun, 29 Jul 2007) $
    •

  •  */
    •

  • class XoopsMultiMailer extends PHPMailer {
    •

  •
    •

  •     /**
    •

  •      * "from" address
    •

  •      * @var     string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $From         = "";
    •

  •
    •

  •     /**
    •

  •      * "from" name
    •

  •      * @var     string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $FromName     = "";
    •

  •
    •

  •     // can be "smtp", "sendmail", or "mail"
    •

  •     /**
    •

  •      * Method to be used when sending the mail.
    •

  •      *
    •

  •      * This can be:
    •

  •      * <li>mail (standard PHP function "mail()") (default)
    •

  •      * <li>smtp    (send through any SMTP server, SMTPAuth is supported.
    •

  •      * You must set {@link $Host}, for SMTPAuth also {@link $SMTPAuth},
    •

  •      * {@link $Username}, and {@link $Password}.)
    •

  •      * <li>sendmail (manually set the path to your sendmail program
    •

  •      * to something different than "mail()" uses in {@link $Sendmail})
    •

  •      *
    •

  •      * @var     string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $Mailer        = "mail";
    •

  •
    •

  •     /**
    •

  •      * set if $Mailer is "sendmail"
    •

  •      *
    •

  •      * Only used if {@link $Mailer} is set to "sendmail".
    •

  •      * Contains the full path to your sendmail program or replacement.
    •

  •      * @var     string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $Sendmail = "/usr/sbin/sendmail";
    •

  •
    •

  •     /**
    •

  •      * SMTP Host.
    •

  •      *
    •

  •      * Only used if {@link $Mailer} is set to "smtp"
    •

  •      * @var     string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $Host        = "";
    •

  •
    •

  •     /**
    •

  •      * Does your SMTP host require SMTPAuth authentication?
    •

  •      * @var     boolean
    •

  •      * @access    private
    •

  •      */
    •

  •     var $SMTPAuth    = FALSE;
    •

  •
    •

  •     /**
    •

  •      * Username for authentication with your SMTP host.
    •

  •      *
    •

  •      * Only used if {@link $Mailer} is "smtp" and {@link $SMTPAuth} is TRUE
    •

  •      * @var     string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $Username    = "";
    •

  •
    •

  •     /**
    •

  •      * Password for SMTPAuth.
    •

  •      *
    •

  •      * Only used if {@link $Mailer} is "smtp" and {@link $SMTPAuth} is TRUE
    •

  •      * @var     string
    •

  •      * @access    private
    •

  •      */
    •

  •     var $Password    = "";
    •

  •
    •

  •     /**
    •

  •      * Constuctor
    •

  •      *
    •

  •      * @access public
    •

  •      * @return void
    •

  •      *
    •

  •      * @global    $xoopsConfig
    •

  •      */
    •

  •     function XoopsMultiMailer(){
    •

  •         global $xoopsConfig;
    •

  •
    •

  •         $config_handler =& xoops_gethandler('config');
    •

  •         $xoopsMailerConfig =& $config_handler->getConfigsByCat(XOOPS_CONF_MAILER);
    •

  •         $this->From = $xoopsMailerConfig['from'];
    •

  •         if ($this->From == '') {
    •

  •             $this->From = $xoopsConfig['adminmail'];
    •

  •         }
    •

  •         $this->Sender = $this->From;
    •

  •
    •

  •         if ($xoopsMailerConfig["mailmethod"] == "smtpauth") {
    •

  •             $this->Mailer = "smtp";
    •

  •             $this->SMTPAuth = TRUE;
    •

  •             $this->Host = $xoopsMailerConfig['smtphost'];
    •

  •             $this->Username = $xoopsMailerConfig['smtpuser'];
    •

  •             $this->Password = $xoopsMailerConfig['smtppass'];
    •

  •         } else {
    •

  •             $this->Mailer = $xoopsMailerConfig['mailmethod'];
    •

  •             $this->SMTPAuth = FALSE;
    •

  •             $this->Sendmail = $xoopsMailerConfig['sendmailpath'];
    •

  •             $this->Host = $xoopsMailerConfig['smtphost'];
    •

  •         }
    •

  •         $this->CharSet = strtolower( _CHARSET );
    •

  •         if ( file_exists( XOOPS_ROOT_PATH . "/language/{$xoopsConfig['language']}/phpmailer.php" ) ) {
    •

  •             include( XOOPS_ROOT_PATH . "/language/{$xoopsConfig['language']}/phpmailer.php" );
    •

  •             $this->language = $PHPMAILER_LANG;
    •

  •         } else {
    •

  •             $this->SetLanguage( 'en', XOOPS_ROOT_PATH . "/class/mail/phpmailer/language/" );
    •

  •         }
    •

  •     }
    •

  •
    •

  •     /**
    •

  •      * Formats an address correctly. This overrides the default addr_format method which does not seem to encode $FromName correctly
    •

  •      * @access private
    •

  •      * @return string
    •

  •      */
    •

  •     function AddrFormat($addr) {
    •

  •         if(empty($addr[1]))
    •

  •             $formatted = $addr[0];
    •

  •         else
    •

  •             $formatted = sprintf('%s <%s>', '=?'.$this->CharSet.'?B?'.base64_encode($addr[1]).'?=', $addr[0]);
    •

  •
    •

  •         return $formatted;
    •

  •     }
    •

  • }
    •

  •
    •

  • ?>
    •
    Documentation generated on Tue, 28 Aug 2007 23:01:19 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsMailer

Class XoopsMailer

[line 60]

Location: /xoopsmailer.php

Remarks

Class for sending mail.

Changed to use the facilities of  XoopsMultiMailer

author

Kazumi Ono    <onokazu@xoops.org>

copyright

(c) 2000-2003 The Xoops Project - www.xoops.org

deprecated

use XoopsMultiMailer instead.

Class Variable Summary

  • $assignedTags =

  • $body =

  • $charSet =  'iso-8859-1'

  • $encoding =  '8bit'

  • $errors =

  • $fromEmail =

  • $fromName =

  • $fromUser =

  • $headers =

  • $isMail =

  • $isPM =

  • $multimailer =

        reference to a XoopsMultiMailer

  • $subject =

  • $success =

  • $template =

  • $templatedir =

  • $toEmails =

  • $toUsers =

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Method Summary

Inherited Method Summary

Method Detail

    XoopsMailer::XoopsMailer

XoopsMailer(
 );

    [ Top ]

    XoopsMailer::addHeaders

addHeaders(

$value );

    Parameters

    $value

    [ Top ]

    XoopsMailer::assign

assign(

$tag, [
$value = null] );

    Parameters

    $tag

    $value

    [ Top ]

    XoopsMailer::encodeBody

encodeBody(

&$text );

    Parameters

    &$text

    [ Top ]

    XoopsMailer::encodeFromName

encodeFromName(

$text );

    Parameters

    $text

    [ Top ]

    XoopsMailer::encodeSubject

encodeSubject(

$text );

    Parameters

    $text

    [ Top ]

    XoopsMailer::getErrors

getErrors(
[
$ashtml = true] );

    Parameters

    $ashtml

    [ Top ]

    XoopsMailer::getSuccess

getSuccess(
[
$ashtml = true] );

    Parameters

    $ashtml

    [ Top ]

    XoopsMailer::reset

reset(
 );

    [ Top ]

    XoopsMailer::send

send(
[
$debug = false] );

    Parameters

    $debug

    [ Top ]

    XoopsMailer::sendMail

sendMail(
string
$email, string
$subject, string
$body,
$headers );

    Parameters

    $email

    $subject

    $body

    $headers

    Returns

    FALSE on error.

    Remarks

    Send email

    Uses the new XoopsMultiMailer

    [ Top ]

    XoopsMailer::sendPM

sendPM(

$uid,
$subject,
$body );

    Parameters

    $uid

    $subject

    $body

    [ Top ]

    XoopsMailer::setBody

setBody(

$value );

    Parameters

    $value

    [ Top ]

    XoopsMailer::setFromEmail

setFromEmail(

$value );

    Parameters

    $value

    [ Top ]

    XoopsMailer::setFromName

setFromName(

$value );

    Parameters

    $value

    [ Top ]

    XoopsMailer::setFromUser

setFromUser(

&$user );

    Parameters

    &$user

    [ Top ]

    XoopsMailer::setPriority

setPriority(

$value );

    Parameters

    $value

    [ Top ]

    XoopsMailer::setSubject

setSubject(

$value );

    Parameters

    $value

    [ Top ]

    XoopsMailer::setTemplate

setTemplate(

$value );

    Parameters

    $value

    [ Top ]

    XoopsMailer::setTemplateDir

setTemplateDir(

$value );

    Parameters

    $value

    [ Top ]

    XoopsMailer::setToEmails

setToEmails(

$email );

    Parameters

    $email

    [ Top ]

    XoopsMailer::setToGroups

setToGroups(

$group );

    Parameters

    $group

    [ Top ]

    XoopsMailer::setToUsers

setToUsers(

&$user );

    Parameters

    &$user

    [ Top ]

    XoopsMailer::useMail

useMail(
 );

    [ Top ]

    XoopsMailer::usePM

usePM(
 );

    [ Top ]

Variable Detail

  • $assignedTags =  [line 119]
    •

  • Data type: mixed
    •

  • $body =  [line 102]
    •

  • Data type: mixed
    •

  • $charSet =  'iso-8859-1' [line 128]
    •

  • Data type: mixed
    •

  • $encoding =  '8bit' [line 131]
    •

  • Data type: mixed
    •

  • $errors =  [line 106]
    •

  • Data type: mixed
    •

  • $fromEmail =  [line 73]
    •

  • Data type: mixed
    •

  • $fromName =  [line 77]
    •

  • Data type: mixed
    •

  • $fromUser =  [line 82]
    •

  • Data type: mixed
    •

  • $headers =  [line 94]
    •

  • Data type: mixed
    •

  • $isMail =  [line 113]
    •

  • Data type: mixed
    •

  • $isPM =  [line 116]
    •

  • Data type: mixed
    •

  • $multimailer =  [line 69]
    •

  • Data type: XoopsMultiMailer
    •

    Remarks

    reference to a XoopsMultiMailer

    since

    21.02.2003 14:14:13

    access

    private

  • $subject =  [line 98]
    •

  • Data type: mixed
    •

  • $success =  [line 110]
    •

  • Data type: mixed
    •

  • $template =  [line 122]
    •

  • Data type: mixed
    •

  • $templatedir =  [line 125]
    •

  • Data type: mixed
    •

  • $toEmails =  [line 90]
    •

  • Data type: mixed
    •

  • $toUsers =  [line 86]
    •

  • Data type: mixed
    •

Class Constant Detail

        Documentation generated on Tue, 28 Aug 2007 23:01:16 +0200 by phpDocumentor 1.4.0a2


Docs For Class XoopsMultiMailer

Class XoopsMultiMailer

[line 69]
PHPMailer
   |
   --XoopsMultiMailer
Location: /mail/xoopsmultimailer.php

Remarks

Mailer Class.

At the moment, this does nothing but send email through PHP's "mail()" function, but it has the abiltiy to do much more.

If you have problems sending mail with "mail()", you can edit the member variables to suit your setting. Later this will be possible through the admin panel.

author

Jochen Buennagel <job@buennagel.com>

version

$Revision: 898 $ - changed by $Author$ on $Date: 2007-07-29 04:31:26 -0400 (Sun, 29 Jul 2007) $

copyright

(c) 2000-2003 The Xoops Project - www.xoops.org

todo

Make a page in the admin panel for setting mailer preferences.

Class Variable Summary

  • $From =  ""
    "from" address
  • $FromName =  ""
    "from" name
  • $Host =  ""
    SMTP Host.
  • $Mailer =  "mail"
    Method to be used when sending the mail.
  • $Password =  ""
    Password for SMTPAuth.
  • $Sendmail =  "/usr/sbin/sendmail"
    set if $Mailer is "sendmail"
  • $SMTPAuth =  FALSE
    Does your SMTP host require SMTPAuth authentication?
  • $Username =  ""
    Username for authentication with your SMTP host.

Class Constant Summary

Inherited Class Constant Summary

Inherited Class Variable Summary

Inherited From Class PHPMailer

  • PHPMailer::$AltBody = ""
    Sets the text-only body of the message. This automatically sets the email to multipart/alternative. This body can be read by mail clients that do not have HTML email capability such as mutt. Clients that can read HTML will view the normal Body.
  • PHPMailer::$attachment = array()
  • PHPMailer::$bcc = array()
  • PHPMailer::$Body = ""
    Sets the Body of the message. This can be either an HTML or text body.
  • PHPMailer::$boundary = array()
  • PHPMailer::$cc = array()
  • PHPMailer::$CharSet = "iso-8859-1"
    Sets the CharSet of the message.
  • PHPMailer::$ConfirmReadingTo = ""
    Sets the email address that a reading confirmation will be sent.
  • PHPMailer::$ContentType = "text/plain"
    Sets the Content-type of the message.
  • PHPMailer::$CustomHeader = array()
  • PHPMailer::$Encoding = "8bit"
    Sets the Encoding of the message. Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable".
  • PHPMailer::$ErrorInfo = ""
    Holds the most recent mailer error message.
  • PHPMailer::$error_count = 0
  • PHPMailer::$Helo = ""
    Sets the SMTP HELO of the message (Default is $Hostname).
  • PHPMailer::$Hostname = ""
    Sets the hostname to use in Message-Id and Received headers and as default HELO string. If empty, the value returned by SERVER_NAME is used or 'localhost.localdomain'.
  • PHPMailer::$language = array()
  • PHPMailer::$LE = "\n"
  • PHPMailer::$message_type = ""
  • PHPMailer::$PluginDir = ""
    Path to PHPMailer plugins. This is now only useful if the SMTP class is in a different directory than the PHP include path.
  • PHPMailer::$Port = 25
    Sets the default SMTP server port.
  • PHPMailer::$Priority = 3
    Email priority (1 = High, 3 = Normal, 5 = low).
  • PHPMailer::$ReplyTo = array()
  • PHPMailer::$Sender = ""
    Sets the Sender email (Return-Path) of the message. If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
  • PHPMailer::$smtp = NULL
  • PHPMailer::$SMTPDebug = false
    Sets SMTP class debugging on or off.
  • PHPMailer::$SMTPKeepAlive = false
    Prevents the SMTP connection from being closed after each mail sending. If this is set to true then to close the connection requires an explicit call to SmtpClose().
  • PHPMailer::$Subject = ""
    Sets the Subject of the message.
  • PHPMailer::$Timeout = 10
    Sets the SMTP server timeout in seconds. This function will not work with the win32 version.
  • PHPMailer::$to = array()
  • PHPMailer::$Version = "1.73"
    Holds PHPMailer version.
  • PHPMailer::$WordWrap = 0
    Sets word wrapping on the body of the message to a given number of characters.

Method Summary

Inherited Method Summary

Inherited From Class PHPMailer

  • PHPMailer::AddAddress()
    Adds a "To" address.
  • PHPMailer::AddAttachment()
    Adds an attachment from a path on the filesystem.
  • PHPMailer::AddBCC()
    Adds a "Bcc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
  • PHPMailer::AddCC()
    Adds a "Cc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
  • PHPMailer::AddCustomHeader()
    Adds a custom header.
  • PHPMailer::AddEmbeddedImage()
    Adds an embedded attachment. This can include images, sounds, and just about any other document. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif".
  • PHPMailer::AddrAppend()
    Creates recipient headers.
  • PHPMailer::AddReplyTo()
    Adds a "Reply-to" address.
  • PHPMailer::AddrFormat()
    Formats an address correctly.
  • PHPMailer::AddStringAttachment()
    Adds a string or binary attachment (non-filesystem) to the list.
  • PHPMailer::AttachAll()
    Attaches all fs, string, and binary attachments to the message.
  • PHPMailer::ClearAddresses()
    Clears all recipients assigned in the TO array. Returns void.
  • PHPMailer::ClearAllRecipients()
    Clears all recipients assigned in the TO, CC and BCC array. Returns void.
  • PHPMailer::ClearAttachments()
    Clears all previously set filesystem, string, and binary attachments. Returns void.
  • PHPMailer::ClearBCCs()
    Clears all recipients assigned in the BCC array. Returns void.
  • PHPMailer::ClearCCs()
    Clears all recipients assigned in the CC array. Returns void.
  • PHPMailer::ClearCustomHeaders()
    Clears all custom headers. Returns void.
  • PHPMailer::ClearReplyTos()
    Clears all recipients assigned in the ReplyTo array. Returns void.
  • PHPMailer::CreateBody()
    Assembles the message body. Returns an empty string on failure.
  • PHPMailer::CreateHeader()
    Assembles message header.
  • PHPMailer::EncodeFile()
    Encodes attachment in requested format. Returns an empty string on failure.
  • PHPMailer::EncodeHeader()
    Encode a header string to best of Q, B, quoted or none.
  • PHPMailer::EncodeQ()
    Encode string to q encoding.
  • PHPMailer::EncodeQP()
    Encode string to quoted-printable.
  • PHPMailer::EncodeString()
    Encodes string to requested format. Returns an empty string on failure.
  • PHPMailer::EndBoundary()
    Returns the end of a message boundary.
  • PHPMailer::FixEOL()
    Changes every end of line from CR or LF to CRLF.
  • PHPMailer::GetBoundary()
    Returns the start of a message boundary.
  • PHPMailer::HeaderLine()
    Returns a formatted header line.
  • PHPMailer::InlineImageExists()
    Returns true if an inline attachment is present.
  • PHPMailer::IsError()
    Returns true if an error occurred.
  • PHPMailer::IsHTML()
    Sets message type to HTML.
  • PHPMailer::IsMail()
    Sets Mailer to send message using PHP mail() function.
  • PHPMailer::IsQmail()
    Sets Mailer to send message using the qmail MTA.
  • PHPMailer::IsSendmail()
    Sets Mailer to send message using the $Sendmail program.
  • PHPMailer::IsSMTP()
    Sets Mailer to send message using SMTP.
  • PHPMailer::Lang()
    Returns a message in the appropriate language.
  • PHPMailer::MailSend()
    Sends mail using the PHP mail() function.
  • PHPMailer::RFCDate()
    Returns the proper RFC 822 formatted date.
  • PHPMailer::Send()
    Creates message and assigns Mailer. If the message is not sent successfully then it returns false. Use the ErrorInfo variable to view description of the error.
  • PHPMailer::SendmailSend()
    Sends mail using the $Sendmail program.
  • PHPMailer::ServerHostname()
    Returns the server hostname or 'localhost.localdomain' if unknown.
  • PHPMailer::ServerVar()
    Returns the appropriate server variable. Should work with both PHP 4.1.0+ as well as older versions. Returns an empty string if nothing is found.
  • PHPMailer::SetError()
    Adds the error message to the error container.
  • PHPMailer::SetLanguage()
    Sets the language for all class error messages. Returns false if it cannot load the language file. The default language type is English.
  • PHPMailer::SetMessageType()
    Sets the message type.
  • PHPMailer::SetWordWrap()
    Set the body wrapping.
  • PHPMailer::SmtpClose()
    Closes the active SMTP session if one exists.
  • PHPMailer::SmtpConnect()
    Initiates a connection to an SMTP server. Returns false if the operation failed.
  • PHPMailer::SmtpSend()
    Sends mail via SMTP using PhpSMTP (Author: Chris Ryan). Returns bool. Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
  • PHPMailer::TextLine()
    Returns a formatted mail line.
  • PHPMailer::WrapText()
    Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable.

Method Detail

    XoopsMultiMailer::XoopsMultiMailer

    XoopsMultiMailer( );

    Remarks

    Constuctor

    global

    $xoopsConfig $xoopsConfig:

    access

    public

    [ Top ]

    XoopsMultiMailer::AddrFormat

    AddrFormat( $addr );

    Overrides PHPMailer::AddrFormat() (Formats an address correctly.)

    Parameters

    $addr

    Remarks

    Formats an address correctly. This overrides the default addr_format method which does not seem to encode $FromName correctly

    access

    private

    [ Top ]

Variable Detail

  • $From =  "" [line 76]
  • Data type: string Overrides: Array

    • Remarks

    "from" address

    access

    private

  • $FromName =  "" [line 83]
  • Data type: string Overrides: Array

    • Remarks

    "from" name

    access

    private

  • $Host =  "" [line 119]
  • Data type: string Overrides: Array

    • Remarks

    SMTP Host.

    Only used if $Mailer is set to "smtp"

    access

    private

  • $Mailer =  "mail" [line 100]
  • Data type: string Overrides: Array

    • Remarks

    Method to be used when sending the mail.

    This can be: <li>mail (standard PHP function "mail()") (default) <li>smtp (send through any SMTP server, SMTPAuth is supported. You must set $Host, for SMTPAuth also $SMTPAuth, $Username, and $Password.) <li>sendmail (manually set the path to your sendmail program to something different than "mail()" uses in $Sendmail)

    access

    private

  • $Password =  "" [line 144]
  • Data type: string Overrides: Array

    • Remarks

    Password for SMTPAuth.

    Only used if $Mailer is "smtp" and $SMTPAuth is TRUE

    access

    private

  • $Sendmail =  "/usr/sbin/sendmail" [line 110]
  • Data type: string Overrides: Array

    • Remarks

    set if $Mailer is "sendmail"

    Only used if $Mailer is set to "sendmail". Contains the full path to your sendmail program or replacement.

    access

    private

  • $SMTPAuth =  FALSE [line 126]
  • Data type: boolean Overrides: Array

    • Remarks

    Does your SMTP host require SMTPAuth authentication?

    access

    private

  • $Username =  "" [line 135]
  • Data type: string Overrides: Array

    • Remarks

    Username for authentication with your SMTP host.

    Only used if $Mailer is "smtp" and $SMTPAuth is TRUE

    access

    private

Class Constant Detail

Documentation generated on Tue, 28 Aug 2007 23:01:19 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopsmailer.php

File: /xoopsmailer.php

filesource

Source Code for this file

Classes in this file:
XoopsMailer
Class for sending mail.

Include Statements Summary

  • include_once = XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/mail.php'
  • include_once = XOOPS_ROOT_PATH.'/language/english/mail.php'
  • include_once = XOOPS_ROOT_PATH."/class/mail/xoopsmultimailer.php"
    The new Multimailer class that will carry out the actual sending and will later replace this class.

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • include_once file: = XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/mail.php' [line 35]

  • include_once file: = XOOPS_ROOT_PATH.'/language/english/mail.php' [line 37]

  • include_once file: = XOOPS_ROOT_PATH."/class/mail/xoopsmultimailer.php" [line 44]

    Remarks

    The new Multimailer class that will carry out the actual sending and will later replace this class.

    If you're writing new code, please use that class instead.

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:01:11 +0200 by phpDocumentor 1.4.0a2


Docs for page xoopsmultimailer.php

File: /mail/xoopsmultimailer.php

author

Jochen Büînagel <jb@buennagel.com>

version

$Revision: 898 $ - $Date: 2007-07-29 04:31:26 -0400 (Sun, 29 Jul 2007) $

copyright

copyright (c) 2000-2003 The XOOPS Project (http://www.xoops.org)

filesource

Source Code for this file

Classes in this file:
XoopsMultiMailer
Mailer Class.

Include Statements Summary

  • require_once = XOOPS_ROOT_PATH.'/class/mail/phpmailer/class.phpmailer.php'
    load the base class

Global Variable Summary

Constant Summary

Function Summary

Include Statements Detail

  • require_once file: = XOOPS_ROOT_PATH.'/class/mail/phpmailer/class.phpmailer.php' [line 49]

    Remarks

    load the base class

Global Variable Detail

Constant Detail

Function Detail

Documentation generated on Tue, 28 Aug 2007 23:01:19 +0200 by phpDocumentor 1.4.0a2


Package class Element Index

Element index for package class

Indexes by package:
kernel
default
xos_kernel
PHPMailer
Smarty
xos_opal
xos_logos
XOOPS
xoops20
kernal

Index of all elements
a b c e f g h i m p r s t u x
top
a
$assignedTags | in file xoopsmailer.php, variable XoopsMailer::$assignedTags
addHeaders | in file xoopsmailer.php, method XoopsMailer::addHeaders()
AddrFormat in file xoopsmultimailer.php, method XoopsMultiMailer::AddrFormat()
Formats an address correctly. This overrides the default addr_format method which does not seem to encode $FromName correctly
assign | in file xoopsmailer.php, method XoopsMailer::assign()
top
b
$body | in file xoopsmailer.php, variable XoopsMailer::$body
top
c
$charSet | in file xoopsmailer.php, variable XoopsMailer::$charSet
top
e
$encoding | in file xoopsmailer.php, variable XoopsMailer::$encoding
$errors | in file xoopsmailer.php, variable XoopsMailer::$errors
encodeBody | in file xoopsmailer.php, method XoopsMailer::encodeBody()
encodeFromName | in file xoopsmailer.php, method XoopsMailer::encodeFromName()
encodeSubject | in file xoopsmailer.php, method XoopsMailer::encodeSubject()
top
f
$From in file xoopsmultimailer.php, variable XoopsMultiMailer::$From
"from" address
$fromEmail | in file xoopsmailer.php, variable XoopsMailer::$fromEmail
$fromName | in file xoopsmailer.php, variable XoopsMailer::$fromName
$FromName in file xoopsmultimailer.php, variable XoopsMultiMailer::$FromName
"from" name
$fromUser | in file xoopsmailer.php, variable XoopsMailer::$fromUser
top
g
getErrors | in file xoopsmailer.php, method XoopsMailer::getErrors()
getSuccess | in file xoopsmailer.php, method XoopsMailer::getSuccess()
top
h
$headers | in file xoopsmailer.php, variable XoopsMailer::$headers
$Host in file xoopsmultimailer.php, variable XoopsMultiMailer::$Host
SMTP Host.
top
i
$isMail | in file xoopsmailer.php, variable XoopsMailer::$isMail
$isPM | in file xoopsmailer.php, variable XoopsMailer::$isPM
top
m
$Mailer in file xoopsmultimailer.php, variable XoopsMultiMailer::$Mailer
Method to be used when sending the mail.
$multimailer in file xoopsmailer.php, variable XoopsMailer::$multimailer
reference to a XoopsMultiMailer
top
p
$Password in file xoopsmultimailer.php, variable XoopsMultiMailer::$Password
Password for SMTPAuth.
top
r
reset | in file xoopsmailer.php, method XoopsMailer::reset()
top
s
$Sendmail in file xoopsmultimailer.php, variable XoopsMultiMailer::$Sendmail
set if $Mailer is "sendmail"
$SMTPAuth in file xoopsmultimailer.php, variable XoopsMultiMailer::$SMTPAuth
Does your SMTP host require SMTPAuth authentication?
$subject | in file xoopsmailer.php, variable XoopsMailer::$subject
$success | in file xoopsmailer.php, variable XoopsMailer::$success
send | in file xoopsmailer.php, method XoopsMailer::send()
sendMail in file xoopsmailer.php, method XoopsMailer::sendMail()
Send email
sendPM | in file xoopsmailer.php, method XoopsMailer::sendPM()
setBody | in file xoopsmailer.php, method XoopsMailer::setBody()
setFromEmail | in file xoopsmailer.php, method XoopsMailer::setFromEmail()
setFromName | in file xoopsmailer.php, method XoopsMailer::setFromName()
setFromUser | in file xoopsmailer.php, method XoopsMailer::setFromUser()
setPriority | in file xoopsmailer.php, method XoopsMailer::setPriority()
setSubject | in file xoopsmailer.php, method XoopsMailer::setSubject()
setTemplate | in file xoopsmailer.php, method XoopsMailer::setTemplate()
setTemplateDir | in file xoopsmailer.php, method XoopsMailer::setTemplateDir()
setToEmails | in file xoopsmailer.php, method XoopsMailer::setToEmails()
setToGroups | in file xoopsmailer.php, method XoopsMailer::setToGroups()
setToUsers | in file xoopsmailer.php, method XoopsMailer::setToUsers()
top
t
$template | in file xoopsmailer.php, variable XoopsMailer::$template
$templatedir | in file xoopsmailer.php, variable XoopsMailer::$templatedir
$toEmails | in file xoopsmailer.php, variable XoopsMailer::$toEmails
$toUsers | in file xoopsmailer.php, variable XoopsMailer::$toUsers
top
u
$Username in file xoopsmultimailer.php, variable XoopsMultiMailer::$Username
Username for authentication with your SMTP host.
useMail | in file xoopsmailer.php, method XoopsMailer::useMail()
usePM | in file xoopsmailer.php, method XoopsMailer::usePM()
top
x
xoopsmultimailer.php | procedural page xoopsmultimailer.php
XoopsMailer | in file xoopsmailer.php, method XoopsMailer::XoopsMailer()
XoopsMailer in file xoopsmailer.php, class XoopsMailer
Class for sending mail.
xoopsmailer.php | procedural page xoopsmailer.php
XoopsMultiMailer in file xoopsmultimailer.php, method XoopsMultiMailer::XoopsMultiMailer()
Constuctor
XoopsMultiMailer in file xoopsmultimailer.php, class XoopsMultiMailer
Mailer Class.


Class Trees for Package class

Documentation generated on Tue, 28 Aug 2007 22:56:21 +0200 by phpDocumentor 1.4.0a2


Element Index

Index of All Elements

Indexes by package:
kernel
default
xos_kernel
PHPMailer
class
Smarty
xos_opal
xos_logos
XOOPS
xoops20
kernal

a b c d e f g h i l m n o p q r s t u v w x z _
top
a
$accept | in file snoopy.php, variable Snoopy::$accept
$activated | in file logger.php, variable XoopsLogger::$activated
$agent | in file snoopy.php, variable Snoopy::$agent
$allowedMimeTypes | in file uploader.php, variable XoopsMediaUploader::$allowedMimeTypes
$allowedThemes in file theme.php, variable xos_opal_ThemeFactory::$allowedThemes
Currently enabled themes (if empty, all the themes in themes/ are allowed)
$allowUnknownTypes in file uploader.php, variable XoopsMediaUploader::$allowUnknownTypes
Flag indicating if unrecognized mimetypes should be allowed (use with precaution ! may lead to security issues )
$allowUserSelection in file theme.php, variable xos_opal_ThemeFactory::$allowUserSelection
If users are allowed to choose a custom theme
$AltBody in file class.phpmailer.php, variable PHPMailer::$AltBody
Sets the text-only body of the message. This automatically sets the email to multipart/alternative. This body can be read by mail clients that do not have HTML email capability such as mutt. Clients that can read HTML will view the normal Body.
$approved | in file xoopsstory.php, variable XoopsStory::$approved
$archiver in file downloader.php, variable XoopsDownloader::$archiver
file information
$assignedTags | in file xoopsmailer.php, variable XoopsMailer::$assignedTags
$attachment | in file class.phpmailer.php, variable PHPMailer::$attachment
$autoload_filters in file Smarty.class.php, variable Smarty::$autoload_filters
This indicates which filters are automatically loaded into Smarty.
activate in file errorhandler.php, method XoopsErrorHandler::activate()
Activate the error handler
add | in file xmlrpctag.php, method XoopsXmlRpcArray::add()
add in file criteria.php, method CriteriaCompo::add()
Add an element
add | in file xmlrpctag.php, method XoopsXmlRpcStruct::add()
add in file auth_provisionning.php, method XoopsAuthProvisionning::add()
Add a new user to the system
add | in file xmlrpctag.php, method XoopsXmlRpcDocument::add()
AddAddress in file class.phpmailer.php, method PHPMailer::AddAddress()
Adds a "To" address.
AddAttachment in file class.phpmailer.php, method PHPMailer::AddAttachment()
Adds an attachment from a path on the filesystem.
AddBCC in file class.phpmailer.php, method PHPMailer::AddBCC()
Adds a "Bcc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
addBinaryFile in file tardownloader.php, method XoopsTarDownloader::addBinaryFile()
Add a binary file to the archive
addBinaryFile in file downloader.php, method XoopsDownloader::addBinaryFile()
XoopsDownloader::addBinaryFile()
addBinaryFile | in file zipdownloader.php, method XoopsZipDownloader::addBinaryFile()
addBinaryFileData | in file zipdownloader.php, method XoopsZipDownloader::addBinaryFileData()
addBinaryFileData in file downloader.php, method XoopsDownloader::addBinaryFileData()
XoopsDownloader::addBinaryFileData()
addBinaryFileData in file tardownloader.php, method XoopsTarDownloader::addBinaryFileData()
Add a binary dummy file to the archive
addBlock in file logger.php, method XoopsLogger::addBlock()
Log display of a block
AddCC in file class.phpmailer.php, method PHPMailer::AddCC()
Adds a "Cc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
AddCustomHeader in file class.phpmailer.php, method PHPMailer::AddCustomHeader()
Adds a custom header.
addDirectory in file class.tar.php, method tar::addDirectory()
Add a directory to this tar archive
addElement in file form.php, method XoopsForm::addElement()
Add an element to the form
addElement in file formelementtray.php, method XoopsFormElementTray::addElement()
Add an element to the group
AddEmbeddedImage in file class.phpmailer.php, method PHPMailer::AddEmbeddedImage()
Adds an embedded attachment. This can include images, sounds, and just about any other document. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif".
addExtra in file logger.php, method XoopsLogger::addExtra()
Log extra information
addFile | in file zipdownloader.php, method XoopsZipDownloader::addFile()
addFile in file tardownloader.php, method XoopsTarDownloader::addFile()
Add a file to the archive
addFile in file class.tar.php, method tar::addFile()
Add a file to the tar archive
addFile in file downloader.php, method XoopsDownloader::addFile()
XoopsDownloader::addFile()
addFile in file class.zipfile.php, method zipfile::addFile()
Adds "file" to archive
addFileData | in file zipdownloader.php, method XoopsZipDownloader::addFileData()
addFileData in file downloader.php, method XoopsDownloader::addFileData()
XoopsDownloader::addFileData()
addFileData in file tardownloader.php, method XoopsTarDownloader::addFileData()
Add a dummy file to the archive
addHeaders | in file xoopsmailer.php, method XoopsMailer::addHeaders()
addHttpMeta in file theme.php, method xos_opal_Theme::addHttpMeta()
Set a meta http-equiv value
addItem in file grouppermform.php, method XoopsGroupPermForm::addItem()
Adds an item to which permission will be assigned
addLink in file theme.php, method xos_opal_Theme::addLink()
Add a <link> to the header
addMeta in file theme.php, method xos_opal_Theme::addMeta()
Change output page meta-information
addOption in file formradio.php, method XoopsFormRadio::addOption()
Add an option
addOption in file formselect.php, method XoopsFormSelect::addOption()
Add an option
addOption in file formcheckbox.php, method XoopsFormCheckBox::addOption()
Add an option
addOptionArray in file formcheckbox.php, method XoopsFormCheckBox::addOptionArray()
Add multiple Options at once
addOptionArray in file formselect.php, method XoopsFormSelect::addOptionArray()
Add multiple options
addOptionArray in file formradio.php, method XoopsFormRadio::addOptionArray()
Adds multiple options
addQuery in file logger.php, method XoopsLogger::addQuery()
Log a database query
AddrAppend in file class.phpmailer.php, method PHPMailer::AddrAppend()
Creates recipient headers.
AddReplyTo in file class.phpmailer.php, method PHPMailer::AddReplyTo()
Adds a "Reply-to" address.
AddrFormat in file xoopsmultimailer.php, method XoopsMultiMailer::AddrFormat()
Formats an address correctly. This overrides the default addr_format method which does not seem to encode $FromName correctly
AddrFormat in file class.phpmailer.php, method PHPMailer::AddrFormat()
Formats an address correctly.
addScript in file theme.php, method xos_opal_Theme::addScript()
Adds script code to the document head
addSlashes in file module.textsanitizer.php, method MyTextSanitizer::addSlashes()
Add slashes to the text if magic_quotes_gpc is turned off.
AddStringAttachment in file class.phpmailer.php, method PHPMailer::AddStringAttachment()
Adds a string or binary attachment (non-filesystem) to the list.
addStylesheet in file theme.php, method xos_opal_Theme::addStylesheet()
Add StyleSheet or CSS code to the document head
addTagHandler in file saxparser.php, method SaxParser::addTagHandler()
**************************************************************************
append in file Smarty.class.php, method Smarty::append()
appends values to template variables
appendTar in file class.tar.php, method tar::appendTar()
Appends a tar file to the end of the currently opened tar file.
append_by_ref in file Smarty.class.php, method Smarty::append_by_ref()
appends values to template variables by reference
assign | in file xoopsmailer.php, method XoopsMailer::assign()
assign in file Smarty.class.php, method Smarty::assign()
assigns values to template variables
assign in file form.php, method XoopsForm::assign()
assign to smarty form template instead of displaying directly
assign_by_ref in file Smarty.class.php, method Smarty::assign_by_ref()
assigns values to template variables by reference
AttachAll in file class.phpmailer.php, method PHPMailer::AttachAll()
Attaches all fs, string, and binary attachments to the message.
auth.php | procedural page auth.php
authfactory.php | procedural page authfactory.php
auth_ads.php | procedural page auth_ads.php
auth_ldap.php | procedural page auth_ldap.php
auth_provisionning.php | procedural page auth_provisionning.php
auth_xoops.php | procedural page auth_xoops.php
authenticate | in file auth.php, method XoopsAuth::authenticate()
authenticate in file auth_xoops.php, method XoopsAuthXoops::authenticate()
Authenticate user
Authenticate in file class.smtp.php, method SMTP::Authenticate()
Performs SMTP authentication. Must be run after running the Hello() method. Returns true if successfully authenticated.
authenticate in file auth_ads.php, method XoopsAuthAds::authenticate()
Authenticate user again LDAP directory (Bind)
authenticate in file auth_ldap.php, method XoopsAuthLdap::authenticate()
Authenticate user again LDAP directory (Bind)
top
b
$bcc | in file class.phpmailer.php, variable PHPMailer::$bcc
$blocks | in file theme_blocks.php, variable xos_logos_PageBuilder::$blocks
$blocks | in file logger.php, variable XoopsLogger::$blocks
$body | in file xoopsmailer.php, variable XoopsMailer::$body
$Body in file class.phpmailer.php, variable PHPMailer::$Body
Sets the Body of the message. This can be either an HTML or text body.
$bodytext | in file xoopsstory.php, variable XoopsStory::$bodytext
$booleanize in file Config_File.class.php, variable Config_File::$booleanize
Controls whether config values of on/true/yes and off/false/no get converted to boolean values automatically.
$boundary | in file class.phpmailer.php, variable PHPMailer::$boundary
$bufferOutput in file theme.php, variable xos_opal_Theme::$bufferOutput
Whether or not the theme engine should include the output generated by php
BloggerApi | in file bloggerapi.php, class BloggerApi
BloggerApi | in file bloggerapi.php, method BloggerApi::BloggerApi()
bodytext | in file xoopsstory.php, method XoopsStory::bodytext()
buildBlock | in file xoopsblock.php, method XoopsBlock::buildBlock()
buildBlock | in file theme_blocks.php, method xos_logos_PageBuilder::buildBlock()
buildContent | in file xoopsblock.php, method XoopsBlock::buildContent()
buildTitle | in file xoopsblock.php, method XoopsBlock::buildTitle()
block.textformat.php | procedural page block.textformat.php
bloggerapi.php | procedural page bloggerapi.php
top
c
$cache_dir in file Smarty.class.php, variable Smarty::$cache_dir
The name of the directory for cache files.
$cache_dir | in file template.php, variable XoopsTpl::$cache_dir
$cache_handler_func in file Smarty.class.php, variable Smarty::$cache_handler_func
The function used for cache file handling. If not set, built-in caching is used.
$cache_lifetime in file Smarty.class.php, variable Smarty::$cache_lifetime
This is the number of seconds cached content will persist.
$cache_modified_check in file Smarty.class.php, variable Smarty::$cache_modified_check
Only used when $caching is enabled. If true, then If-Modified-Since headers are respected with cached content, and appropriate HTTP headers are sent.
$caching in file Smarty.class.php, variable Smarty::$caching
This enables template caching.
$canvasTemplate in file theme.php, variable xos_opal_Theme::$canvasTemplate
Canvas-level template to use
$cc | in file class.phpmailer.php, variable PHPMailer::$cc
$censorConf | in file module.textsanitizer.php, variable MyTextSanitizer::$censorConf
$CharSet in file class.phpmailer.php, variable PHPMailer::$CharSet
Sets the CharSet of the message.
$charSet | in file xoopsmailer.php, variable XoopsMailer::$charSet
$checkImageType | in file uploader.php, variable XoopsMediaUploader::$checkImageType
$column | in file criteria.php, variable Criteria::$column
$comments | in file xoopsstory.php, variable XoopsStory::$comments
$compiler_class in file Smarty.class.php, variable Smarty::$compiler_class
The class used for compiling templates.
$compiler_file in file Smarty.class.php, variable Smarty::$compiler_file
The file that contains the compiler class. This can a full pathname, or relative to the php_include path.
$compile_check in file Smarty.class.php, variable Smarty::$compile_check
This tells Smarty whether to check for recompiling or not. Recompiling does not need to happen unless a template or config file is changed.
$compile_dir | in file template.php, variable XoopsTpl::$compile_dir
$compile_dir in file Smarty.class.php, variable Smarty::$compile_dir
The directory where compiled templates are located.
$compile_id in file Smarty.class.php, variable Smarty::$compile_id
Set this if you want different sets of compiled files for the same templates. This is useful for things like different languages.
$conditions in file criteria.php, variable CriteriaCompo::$conditions
Conditions
$config_booleanize in file Smarty.class.php, variable Smarty::$config_booleanize
This tells whether or not to automatically booleanize config file variables.
$config_class in file Smarty.class.php, variable Smarty::$config_class
The class used to load config vars.
$config_dir in file Smarty.class.php, variable Smarty::$config_dir
The directory where config files are located.
$config_fix_newlines in file Smarty.class.php, variable Smarty::$config_fix_newlines
This tells whether or not automatically fix newlines in config files.
$config_overwrite in file Smarty.class.php, variable Smarty::$config_overwrite
This tells if config file vars of the same name overwrite each other or not.
$config_read_hidden in file Smarty.class.php, variable Smarty::$config_read_hidden
This tells whether hidden sections [.foobar] are readable from the tempalates or not. Normally you would never allow this since that is the point behind hidden sections: the application can access them, but the templates cannot.
$ConfirmReadingTo in file class.phpmailer.php, variable PHPMailer::$ConfirmReadingTo
Sets the email address that a reading confirmation will be sent.
$conn in file mysqldatabase.php, variable XoopsMySQLDatabase::$conn
Database connection
$content in file theme.php, variable xos_opal_Theme::$content
Text content to display right after the contentTemplate output
$contentCacheId | in file theme.php, variable xos_opal_Theme::$contentCacheId
$contentCacheLifetime | in file theme.php, variable xos_opal_Theme::$contentCacheLifetime
$contentTemplate in file theme.php, variable xos_opal_Theme::$contentTemplate
Content-level template to use
$ContentType in file class.phpmailer.php, variable PHPMailer::$ContentType
Sets the Content-type of the message.
$cookies | in file snoopy.php, variable Snoopy::$cookies
$counter | in file xoopsstory.php, variable XoopsStory::$counter
$cp1252_map | in file auth_ldap.php, variable XoopsAuthLdap::$cp1252_map
$created | in file xoopsstory.php, variable XoopsStory::$created
$criteriaElements in file criteria.php, variable CriteriaCompo::$criteriaElements
The elements of the collection
$CRLF in file class.smtp.php, variable SMTP::$CRLF
SMTP reply line ending
$ctable | in file xoopscomments.php, variable XoopsComments::$ctable
$ctrl_dir in file class.zipfile.php, variable zipfile::$ctrl_dir
Central directory
$curl_path | in file snoopy.php, variable Snoopy::$curl_path
$current | in file pagenav.php, variable XoopsPageNav::$current
$CustomHeader | in file class.phpmailer.php, variable PHPMailer::$CustomHeader
$customValidationCode in file formelement.php, variable XoopsFormElement::$customValidationCode
Javascript performing additional validation of this element data
censorString in file module.textsanitizer.php, method MyTextSanitizer::censorString()
Replaces banned words in a string with their replacements
change in file auth_provisionning.php, method XoopsAuthProvisionning::change()
Modify user information
check in file xoopssecurity.php, method XoopsSecurity::check()
Check if there is a valid token in $_REQUEST['XOOPS_TOKEN_REQUEST'] - can be expanded for more wide use, later (Mith)
checkBadips in file xoopssecurity.php, method XoopsSecurity::checkBadips()
Check if visitor's IP address is banned Should be changed to return bool and let the action be up to the calling script
checkCache | in file theme.php, method xos_opal_Theme::checkCache()
checkImageType in file uploader.php, method XoopsMediaUploader::checkImageType()
Check whether or not the uploaded image type is valid
checkMaxFileSize in file uploader.php, method XoopsMediaUploader::checkMaxFileSize()
Is the file the right size?
checkMaxHeight in file uploader.php, method XoopsMediaUploader::checkMaxHeight()
Is the picture the right height?
checkMaxWidth in file uploader.php, method XoopsMediaUploader::checkMaxWidth()
Is the picture the right width?
checkMimeType in file uploader.php, method XoopsMediaUploader::checkMimeType()
Check whether or not the uploaded file type is allowed
checkReferer in file xoopssecurity.php, method XoopsSecurity::checkReferer()
Check the user agent's HTTP REFERER against XOOPS_URL
checkSuperglobals in file xoopssecurity.php, method XoopsSecurity::checkSuperglobals()
Check superglobals for contamination
class.tar.php | procedural page class.tar.php
class.zipfile.php | procedural page class.zipfile.php
clear in file Config_File.class.php, method Config_File::clear()
Clear loaded config data for a certain file or all files.
ClearAddresses in file class.phpmailer.php, method PHPMailer::ClearAddresses()
Clears all recipients assigned in the TO array. Returns void.
ClearAllRecipients in file class.phpmailer.php, method PHPMailer::ClearAllRecipients()
Clears all recipients assigned in the TO, CC and BCC array. Returns void.
ClearAttachments in file class.phpmailer.php, method PHPMailer::ClearAttachments()
Clears all previously set filesystem, string, and binary attachments. Returns void.
ClearBCCs in file class.phpmailer.php, method PHPMailer::ClearBCCs()
Clears all recipients assigned in the BCC array. Returns void.
ClearCCs in file class.phpmailer.php, method PHPMailer::ClearCCs()
Clears all recipients assigned in the CC array. Returns void.
ClearCustomHeaders in file class.phpmailer.php, method PHPMailer::ClearCustomHeaders()
Clears all custom headers. Returns void.
ClearReplyTos in file class.phpmailer.php, method PHPMailer::ClearReplyTos()
Clears all recipients assigned in the ReplyTo array. Returns void.
clearTokens in file xoopssecurity.php, method XoopsSecurity::clearTokens()
Clear all token values from user's session
clear_all_assign in file Smarty.class.php, method Smarty::clear_all_assign()
clear all the assigned template variables.
clear_all_cache in file Smarty.class.php, method Smarty::clear_all_cache()
clear the entire contents of cache (all templates)
clear_assign in file Smarty.class.php, method Smarty::clear_assign()
clear the given assigned template variable.
clear_cache in file Smarty.class.php, method Smarty::clear_cache()
clear cached content for the given template and cache id
clear_compiled_tpl in file Smarty.class.php, method Smarty::clear_compiled_tpl()
clears compiled version of specified template resource, or all compiled template files if one is not specified.
clear_config in file Smarty.class.php, method Smarty::clear_config()
clear configuration values
Close in file class.smtp.php, method SMTP::Close()
Closes the socket and cleans up the state of the class.
close in file mysqldatabase.php, method XoopsMySQLDatabase::close()
Close MySQL connection
codeConv in file module.textsanitizer.php, method MyTextSanitizer::codeConv()
Sanitizing of [code] tag
codePreConv in file module.textsanitizer.php, method MyTextSanitizer::codePreConv()
Sanitizing of [code] tag
codeSanitizer in file module.textsanitizer.php, method MyTextSanitizer::codeSanitizer()
Sanitizing of [code] tag
commentrenderer.php | procedural page commentrenderer.php
comments | in file xoopsstory.php, method XoopsStory::comments()
Config_File in file Config_File.class.php, class Config_File
Config file reading class
Config_File in file Config_File.class.php, method Config_File::Config_File()
Constructs a new config file class.
config_load in file Smarty.class.php, method Smarty::config_load()
load configuration values
connect in file mysqldatabase.php, method XoopsMySQLDatabase::connect()
connect to the database
Connect in file class.smtp.php, method SMTP::Connect()
Connect to the server specified on the port specified.
Connected in file class.smtp.php, method SMTP::Connected()
Returns true if connected to a server otherwise false
containsDirectory in file class.tar.php, method tar::containsDirectory()
Check if this tar archive contains a specific directory
containsFile in file class.tar.php, method tar::containsFile()
Check if this tar archive contains a specific file
counter | in file xoopsstory.php, method XoopsStory::counter()
countSimilarBlocks | in file xoopsblock.php, method XoopsBlock::countSimilarBlocks()
cp1252_to_utf8 | in file auth_ldap.php, method XoopsAuthLdap::cp1252_to_utf8()
CreateBody in file class.phpmailer.php, method PHPMailer::CreateBody()
Assembles the message body. Returns an empty string on failure.
created | in file xoopsstory.php, method XoopsStory::created()
CreateHeader in file class.phpmailer.php, method PHPMailer::CreateHeader()
Assembles message header.
createInstance in file theme.php, method xos_opal_ThemeFactory::createInstance()
Instanciate the specified theme
createToken in file xoopssecurity.php, method XoopsSecurity::createToken()
Create a token in the user's session
Criteria in file criteria.php, method Criteria::Criteria()
Constructor
Criteria in file criteria.php, class Criteria
A single criteria
criteria.php | procedural page criteria.php
CriteriaCompo in file criteria.php, method CriteriaCompo::CriteriaCompo()
Constructor
CriteriaCompo in file criteria.php, class CriteriaCompo
Collection of multiple CriteriaElements
CriteriaElement in file criteria.php, method CriteriaElement::CriteriaElement()
Constructor
CriteriaElement in file criteria.php, class CriteriaElement
A criteria (grammar?) for a database query.
class.phpmailer.php | procedural page class.phpmailer.php
class.smtp.php | procedural page class.smtp.php
Config_File.class.php | procedural page Config_File.class.php
core.assemble_plugin_filepath.php | procedural page core.assemble_plugin_filepath.php
core.assign_smarty_interface.php | procedural page core.assign_smarty_interface.php
core.create_dir_structure.php | procedural page core.create_dir_structure.php
core.display_debug_console.php | procedural page core.display_debug_console.php
core.get_include_path.php | procedural page core.get_include_path.php
core.get_microtime.php | procedural page core.get_microtime.php
core.get_php_resource.php | procedural page core.get_php_resource.php
core.is_secure.php | procedural page core.is_secure.php
core.is_trusted.php | procedural page core.is_trusted.php
core.load_plugins.php | procedural page core.load_plugins.php
core.load_resource_plugin.php | procedural page core.load_resource_plugin.php
core.process_cached_inserts.php | procedural page core.process_cached_inserts.php
core.process_compiled_include.php | procedural page core.process_compiled_include.php
core.read_cache_file.php | procedural page core.read_cache_file.php
core.rmdir.php | procedural page core.rmdir.php
core.rm_auto.php | procedural page core.rm_auto.php
core.run_insert_handler.php | procedural page core.run_insert_handler.php
core.smarty_include_php.php | procedural page core.smarty_include_php.php
core.write_cache_file.php | procedural page core.write_cache_file.php
core.write_compiled_include.php | procedural page core.write_compiled_include.php
core.write_compiled_resource.php | procedural page core.write_compiled_resource.php
core.write_file.php | procedural page core.write_file.php
compiler.assign.php | procedural page compiler.assign.php
compiler.foreachq.php | procedural page compiler.foreachq.php
compiler.includeq.php | procedural page compiler.includeq.php
compiler.xoAppUrl.php | procedural page compiler.xoAppUrl.php
compiler.xoImgUrl.php | procedural page compiler.xoImgUrl.php
top
d
$datasec in file class.zipfile.php, variable zipfile::$datasec
Array to store compressed data
$db | in file xoopstree.php, variable XoopsTree::$db
$db | in file xoopsblock.php, variable XoopsBlock::$db
$db | in file xoopscomments.php, variable XoopsComments::$db
$db | in file xoopsstory.php, variable XoopsStory::$db
$debugging in file Smarty.class.php, variable Smarty::$debugging
If debugging is enabled, a debug console window will display when the page loads (make sure your browser allows unrequested popup windows)
$debugging_ctrl in file Smarty.class.php, variable Smarty::$debugging_ctrl
This determines if debugging is enable-able from the browser.
$debug_tpl in file Smarty.class.php, variable Smarty::$debug_tpl
This is the path to the debug console template. If not set, the default one will be used.
$defaultTheme in file theme.php, variable xos_opal_ThemeFactory::$defaultTheme
Default theme to instanciate if none specified
$default_modifiers in file Smarty.class.php, variable Smarty::$default_modifiers
This is a list of the modifiers to apply to all template variables.
$default_resource_type in file Smarty.class.php, variable Smarty::$default_resource_type
This is the resource type to be used when not specified
$default_template_handler_func in file Smarty.class.php, variable Smarty::$default_template_handler_func
If a template cannot be found, this PHP function will be executed.
$directories in file class.tar.php, variable tar::$directories
Processed Archive Information
$do_debug in file class.smtp.php, variable SMTP::$do_debug
Sets whether debugging is turned on
Data in file class.smtp.php, method SMTP::Data()
Issues a data command and sends the msg_data to the server
Database in file database.php, class Database
Only for backward compatibility
database.php | procedural page database.php
databasefactory.php | procedural page databasefactory.php
delete | in file xoopstopic.php, method XoopsTopic::delete()
delete in file auth_provisionning.php, method XoopsAuthProvisionning::delete()
Modify a user
delete | in file xoopscomments.php, method XoopsComments::delete()
delete | in file xoopsstory.php, method XoopsStory::delete()
delete | in file xoopsblock.php, method XoopsBlock::delete()
deletePost | in file xoopsapi.php, method XoopsApi::deletePost()
deletePost | in file bloggerapi.php, method BloggerApi::deletePost()
DIR_SEP in file Smarty.class.php, constant DIR_SEP
DIR_SEP isn't used anymore, but third party apps might
display in file form.php, method XoopsForm::display()
displays rendered form
display in file Smarty.class.php, method Smarty::display()
executes & displays the template results
displayTarea in file module.textsanitizer.php, method MyTextSanitizer::displayTarea()
Filters textarea form data in DB for display
download in file downloader.php, method XoopsDownloader::download()
XoopsDownloader::download()
download in file tardownloader.php, method XoopsTarDownloader::download()
Send the file to the client
download | in file zipdownloader.php, method XoopsZipDownloader::download()
downloader.php | procedural page downloader.php
dump | in file logger.php, method XoopsLogger::dump()
dumpAll | in file logger.php, method XoopsLogger::dumpAll()
dumpBlocks | in file logger.php, method XoopsLogger::dumpBlocks()
dumpExtra | in file logger.php, method XoopsLogger::dumpExtra()
dumpQueries | in file logger.php, method XoopsLogger::dumpQueries()
dumpTime in file logger.php, method XoopsLogger::dumpTime()
get the current execution time of a timer
top
e
$encoding | in file xoopsmailer.php, variable XoopsMailer::$encoding
$Encoding in file class.phpmailer.php, variable PHPMailer::$Encoding
Sets the Encoding of the message. Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable".
$eof_ctrl_dir in file class.zipfile.php, variable zipfile::$eof_ctrl_dir
End of central directory record
$error | in file snoopy.php, variable Snoopy::$error
$error | in file class.smtp.php, variable SMTP::$error
$ErrorInfo in file class.phpmailer.php, variable PHPMailer::$ErrorInfo
Holds the most recent mailer error message.
$errors | in file xoopsmailer.php, variable XoopsMailer::$errors
$errors | in file xoopssecurity.php, variable XoopsSecurity::$errors
$errors | in file saxparser.php, variable SaxParser::$errors
$errors | in file uploader.php, variable XoopsMediaUploader::$errors
$errors | in file logger.php, variable XoopsLogger::$errors
$error_count | in file class.phpmailer.php, variable PHPMailer::$error_count
$error_reporting in file Smarty.class.php, variable Smarty::$error_reporting
When set, smarty does uses this value as error_reporting-level.
$expandlinks | in file snoopy.php, variable Snoopy::$expandlinks
$expired | in file xoopsstory.php, variable XoopsStory::$expired
$ext in file downloader.php, variable XoopsDownloader::$ext
file information
$extensionsToBeSanitized | in file uploader.php, variable XoopsMediaUploader::$extensionsToBeSanitized
$extensionToMime | in file uploader.php, variable XoopsMediaUploader::$extensionToMime
$extra | in file logger.php, variable XoopsLogger::$extra
editPost | in file xoopsapi.php, method XoopsApi::editPost()
editPost | in file metaweblogapi.php, method MetaWeblogApi::editPost()
editPost | in file bloggerapi.php, method BloggerApi::editPost()
enableRendering in file logger.php, method XoopsLogger::enableRendering()
Enable logger output rendering When output rendering is enabled, the logger will insert its output within the page content.
encode | in file xmlrpctag.php, method XoopsXmlRpcTag::encode()
encodeBody | in file xoopsmailer.php, method XoopsMailer::encodeBody()
EncodeFile in file class.phpmailer.php, method PHPMailer::EncodeFile()
Encodes attachment in requested format. Returns an empty string on failure.
encodeFromName | in file xoopsmailer.php, method XoopsMailer::encodeFromName()
EncodeHeader in file class.phpmailer.php, method PHPMailer::EncodeHeader()
Encode a header string to best of Q, B, quoted or none.
EncodeQ in file class.phpmailer.php, method PHPMailer::EncodeQ()
Encode string to q encoding.
EncodeQP in file class.phpmailer.php, method PHPMailer::EncodeQP()
Encode string to quoted-printable.
EncodeString in file class.phpmailer.php, method PHPMailer::EncodeString()
Encodes string to requested format. Returns an empty string on failure.
encodeSubject | in file xoopsmailer.php, method XoopsMailer::encodeSubject()
EndBoundary in file class.phpmailer.php, method PHPMailer::EndBoundary()
Returns the end of a message boundary.
errno in file mysqldatabase.php, method XoopsMySQLDatabase::errno()
Returns the numerical value of the error message from previous MySQL operation
error in file mysqldatabase.php, method XoopsMySQLDatabase::error()
Returns the text of the error message from previous MySQL operation
ErrorHandler in file module.errorhandler.php, class ErrorHandler
Error Handler class
errorhandler.php | procedural page errorhandler.php
Expand in file class.smtp.php, method SMTP::Expand()
Expand takes the name and asks the server to list all the people who are members of the _list_. Expand will return back and array of the result or false if an error occurs.
expired | in file xoopsstory.php, method XoopsStory::expired()
top
f
$filename in file class.tar.php, variable tar::$filename
Unprocessed Archive Information
$files in file class.tar.php, variable tar::$files
Processed Archive Information
$fix_newlines in file Config_File.class.php, variable Config_File::$fix_newlines
Controls whether or not to fix mac or dos formatted newlines.
$folderName in file theme.php, variable xos_opal_Theme::$folderName
The name of this theme
$force_compile in file Smarty.class.php, variable Smarty::$force_compile
This forces templates to compile every time. Useful for development or debugging.
$From in file class.phpmailer.php, variable PHPMailer::$From
Sets the From email address for the message.
$From in file xoopsmultimailer.php, variable XoopsMultiMailer::$From
"from" address
$fromEmail | in file xoopsmailer.php, variable XoopsMailer::$fromEmail
$fromName | in file xoopsmailer.php, variable XoopsMailer::$fromName
$FromName in file xoopsmultimailer.php, variable XoopsMultiMailer::$FromName
"from" name
$FromName in file class.phpmailer.php, variable PHPMailer::$FromName
Sets the From name of the message.
$fromUser | in file xoopsmailer.php, variable XoopsMailer::$fromUser
$function | in file criteria.php, variable Criteria::$function
fetch | in file snoopy.php, method Snoopy::fetch()
fetch in file Smarty.class.php, method Smarty::fetch()
executes & returns or displays the template results
fetchArray in file mysqldatabase.php, method XoopsMySQLDatabase::fetchArray()
Fetch a result row as an associative array
fetchBoth in file mysqldatabase.php, method XoopsMySQLDatabase::fetchBoth()
Fetch a result row as an associative array
fetchform | in file snoopy.php, method Snoopy::fetchform()
fetchFromData in file template.php, method XoopsTpl::fetchFromData()
Renders output from template data
fetchlinks | in file snoopy.php, method Snoopy::fetchlinks()
fetchMedia in file uploader.php, method XoopsMediaUploader::fetchMedia()
Fetch the uploaded file
fetchRow in file mysqldatabase.php, method XoopsMySQLDatabase::fetchRow()
Get a result row as an enumerated array
fetchtext | in file snoopy.php, method Snoopy::fetchtext()
file in file class.zipfile.php, method zipfile::file()
Dumps out file
filterToken in file xoopssecurity.php, method XoopsSecurity::filterToken()
Check whether a token value is expired or not
FixEOL in file class.phpmailer.php, method PHPMailer::FixEOL()
Changes every end of line from CR or LF to CRLF.
free in file saxparser.php, method SaxParser::free()
**************************************************************************
freeRecordSet in file mysqldatabase.php, method XoopsMySQLDatabase::freeRecordSet()
will free all memory associated with the result identifier result.
function.assign_debug_info.php | procedural page function.assign_debug_info.php
function.config_load.php | procedural page function.config_load.php
function.counter.php | procedural page function.counter.php
function.cycle.php | procedural page function.cycle.php
function.debug.php | procedural page function.debug.php
function.eval.php | procedural page function.eval.php
function.fetch.php | procedural page function.fetch.php
function.html_checkboxes.php | procedural page function.html_checkboxes.php
function.html_image.php | procedural page function.html_image.php
function.html_options.php | procedural page function.html_options.php
function.html_radios.php | procedural page function.html_radios.php
function.html_select_date.php | procedural page function.html_select_date.php
function.html_select_time.php | procedural page function.html_select_time.php
function.html_table.php | procedural page function.html_table.php
function.mailto.php | procedural page function.mailto.php
function.math.php | procedural page function.math.php
function.popup.php | procedural page function.popup.php
function.popup_init.php | procedural page function.popup_init.php
function.xoInboxCount.php | procedural page function.xoInboxCount.php
function.xoops_link.php | procedural page function.xoops_link.php
form.php | procedural page form.php
formbutton.php | procedural page formbutton.php
formcheckbox.php | procedural page formcheckbox.php
formcolorpicker.php | procedural page formcolorpicker.php
formdatetime.php | procedural page formdatetime.php
formdhtmltextarea.php | procedural page formdhtmltextarea.php
formelement.php | procedural page formelement.php
formelementtray.php | procedural page formelementtray.php
formfile.php | procedural page formfile.php
formhidden.php | procedural page formhidden.php
formhiddentoken.php | procedural page formhiddentoken.php
formlabel.php | procedural page formlabel.php
formpassword.php | procedural page formpassword.php
formradio.php | procedural page formradio.php
formradioyn.php | procedural page formradioyn.php
formselect.php | procedural page formselect.php
formselectcountry.php | procedural page formselectcountry.php
formselectgroup.php | procedural page formselectgroup.php
formselectlang.php | procedural page formselectlang.php
formselectmatchoption.php | procedural page formselectmatchoption.php
formselecttheme.php | procedural page formselecttheme.php
formselecttimezone.php | procedural page formselecttimezone.php
formselectuser.php | procedural page formselectuser.php
formtext.php | procedural page formtext.php
formtextarea.php | procedural page formtextarea.php
formtextdateselect.php | procedural page formtextdateselect.php
top
g
$groupby | in file criteria.php, variable CriteriaElement::$groupby
garbageCollection in file xoopssecurity.php, method XoopsSecurity::garbageCollection()
Perform garbage collection, clearing expired tokens
genElementId in file theme.php, method xos_opal_Theme::genElementId()
Generates a unique element ID
generateCacheId in file theme.php, method xos_opal_Theme::generateCacheId()
Generate cache id based on extra information of language and user groups
generateCacheId | in file theme_blocks.php, method xos_logos_PageBuilder::generateCacheId()
genId in file mysqldatabase.php, method XoopsMySQLDatabase::genId()
generate an ID for a new row
get in file Config_File.class.php, method Config_File::get()
Retrieves config info based on the file, section, and variable name.
getAccessKey in file formelement.php, method XoopsFormElement::getAccessKey()
get the "accesskey" attribute for the element
getAccessString in file formelement.php, method XoopsFormElement::getAccessString()
If the accesskey is found in the specified string, underlines it
getAction in file form.php, method XoopsForm::getAction()
get the "action" attribute for the <form> tag
getAffectedRows in file mysqldatabase.php, method XoopsMySQLDatabase::getAffectedRows()
Get number of affected rows
getAllAvatarsList | in file xoopslists.php, method XoopsLists::getAllAvatarsList()
getAllBlocks | in file xoopsblock.php, method XoopsBlock::getAllBlocks()
getAllBlocksByGroup in file xoopsblock.php, method XoopsBlock::getAllBlocksByGroup()
get all the blocks that match the supplied parameters
getAllByGroupModule | in file xoopsblock.php, method XoopsBlock::getAllByGroupModule()
getAllChild in file tree.php, method XoopsObjectTree::getAllChild()
returns an array of all child objects of an object specified by its id
getAllChild | in file xoopstree.php, method XoopsTree::getAllChild()
getAllChildId | in file xoopstree.php, method XoopsTree::getAllChildId()
getAllChildTopics | in file xoopstopic.php, method XoopsTopic::getAllChildTopics()
getAllChildTopicsId | in file xoopstopic.php, method XoopsTopic::getAllChildTopicsId()
getAllComments | in file xoopscomments.php, method XoopsComments::getAllComments()
getAllParent in file tree.php, method XoopsObjectTree::getAllParent()
returns an array of all parent objects.
getAllParentId | in file xoopstree.php, method XoopsTree::getAllParentId()
getAuthConnection in file authfactory.php, method XoopsAuthFactory::getAuthConnection()
Get a reference to the only instance of authentication class
getAvatarsList | in file xoopslists.php, method XoopsLists::getAvatarsList()
GetBoundary in file class.phpmailer.php, method PHPMailer::GetBoundary()
Returns the start of a message boundary.
getByKey in file tree.php, method XoopsObjectTree::getByKey()
returns an object from the tree specified by its id
getByModule | in file xoopsblock.php, method XoopsBlock::getByModule()
getCaption in file formelement.php, method XoopsFormElement::getCaption()
get the caption for the element
getCategories | in file xoopsapi.php, method XoopsApi::getCategories()
getCategories | in file metaweblogapi.php, method MetaWeblogApi::getCategories()
getCategoryList | in file movabletypeapi.php, method MovableTypeApi::getCategoryList()
getChannelData | in file xmlrss2parser.php, method XoopsXmlRss2Parser::getChannelData()
getChildTopicsTreeArray | in file xoopstopic.php, method XoopsTopic::getChildTopicsTreeArray()
getChildTreeArray | in file xoopstree.php, method XoopsTree::getChildTreeArray()
getClass in file formelement.php, method XoopsFormElement::getClass()
get the "class" attribute for the element
getCols in file formtextarea.php, method XoopsFormTextArea::getCols()
Get number of columns
getCommentTree | in file xoopscomments.php, method XoopsComments::getCommentTree()
getContent in file xoopsblock.php, method XoopsBlock::getContent()
do stripslashes/htmlspecialchars according to the needed output
getCountryList | in file xoopslists.php, method XoopsLists::getCountryList()
getCurrentLevel | in file saxparser.php, method SaxParser::getCurrentLevel()
getCurrentTag in file saxparser.php, method SaxParser::getCurrentTag()
**************************************************************************
getDatabase in file databasefactory.php, method XoopsDatabaseFactory::getDatabase()
Gets a reference to the only instance of database class. Currently only being used within the installer.
getDatabaseConnection in file databasefactory.php, method XoopsDatabaseFactory::getDatabaseConnection()
Get a reference to the only instance of database class and connects to DB
getDelimeter in file formelementtray.php, method XoopsFormElementTray::getDelimeter()
Get the delimiter of this group
getDescription in file formelement.php, method XoopsFormElement::getDescription()
get the element's description
getDirectory in file class.tar.php, method tar::getDirectory()
Retrieves information about a directory in the current tar archive
getDirListAsArray | in file xoopslists.php, method XoopsLists::getDirListAsArray()
getElementByName in file form.php, method XoopsForm::getElementByName()
get a reference to a XoopsFormElement object by its "name"
getElementNames in file form.php, method XoopsForm::getElementNames()
get an array of "name" attributes of form elements
getElements in file formelementtray.php, method XoopsFormElementTray::getElements()
Get an array of the elements in this group
getElements in file form.php, method XoopsForm::getElements()
get an array of forms elements
getElementValue in file form.php, method XoopsForm::getElementValue()
Gets the "value" attribute of a form element
getElementValues in file form.php, method XoopsForm::getElementValues()
gets the "value" attribute of all form elements
getErrors in file saxparser.php, method SaxParser::getErrors()
Gets all the error messages
getErrors in file xoopssecurity.php, method XoopsSecurity::getErrors()
Get generated errors
getErrors in file auth.php, method XoopsAuth::getErrors()
return the errors for this object as an array
getErrors | in file xoopsmailer.php, method XoopsMailer::getErrors()
getErrors in file uploader.php, method XoopsMediaUploader::getErrors()
Get generated errors
getExtra in file formelement.php, method XoopsFormElement::getExtra()
Get the extra attributes for the element
getExtra in file form.php, method XoopsForm::getExtra()
get the extra attributes for the <form> tag
getFieldName in file mysqldatabase.php, method XoopsMySQLDatabase::getFieldName()
Get field name
getFieldsNum in file mysqldatabase.php, method XoopsMySQLDatabase::getFieldsNum()
Get number of fields in result
getFieldType in file mysqldatabase.php, method XoopsMySQLDatabase::getFieldType()
Get field type
getFile in file class.tar.php, method tar::getFile()
Retrieves information about a file in the current tar archive
getFileListAsArray | in file xoopslists.php, method XoopsLists::getFileListAsArray()
getFilter in file auth_ldap.php, method XoopsAuthLdap::getFilter()
Load user from XOOPS Database
getFirstChild | in file xoopstree.php, method XoopsTree::getFirstChild()
getFirstChild in file tree.php, method XoopsObjectTree::getFirstChild()
returns an array of all the first child object of an object specified by its id
getFirstChildId | in file xoopstree.php, method XoopsTree::getFirstChildId()
getFirstChildTopics | in file xoopstopic.php, method XoopsTopic::getFirstChildTopics()
getGroupby | in file criteria.php, method CriteriaElement::getGroupby()
getHtmlErrors in file auth.php, method XoopsAuth::getHtmlErrors()
return the errors for this object as html
getHtmlList | in file xoopslists.php, method XoopsLists::getHtmlList()
getHtmlListAsArray | in file xoopslists.php, method XoopsLists::getHtmlListAsArray()
getIdPathFromId | in file xoopstree.php, method XoopsTree::getIdPathFromId()
getImageData | in file xmlrss2parser.php, method XoopsXmlRss2Parser::getImageData()
getImagesData | in file themesetparser.php, method XoopsThemeSetParser::getImagesData()
getImgListAsArray | in file xoopslists.php, method XoopsLists::getImgListAsArray()
getInsertId in file mysqldatabase.php, method XoopsMySQLDatabase::getInsertId()
Get the ID generated from the previous INSERT operation
getInstance in file module.textsanitizer.php, method MyTextSanitizer::getInstance()
Access the only instance of this class
getInstance | in file auth_provisionning.php, method XoopsAuthProvisionning::getInstance()
getInstance | in file database.php, method Database::getInstance()
getItems | in file xmlrss2parser.php, method XoopsXmlRss2Parser::getItems()
getLangList | in file xoopslists.php, method XoopsLists::getLangList()
getLimit | in file criteria.php, method CriteriaElement::getLimit()
getMaxFileSize in file formfile.php, method XoopsFormFile::getMaxFileSize()
Get the maximum filesize
getMaxlength in file formpassword.php, method XoopsFormPassword::getMaxlength()
Get the max length
getMaxlength in file formtext.php, method XoopsFormText::getMaxlength()
Get maximum text length
getMediaName in file uploader.php, method XoopsMediaUploader::getMediaName()
Get the uploaded filename
getMediaSize in file uploader.php, method XoopsMediaUploader::getMediaSize()
Get the size of the uploaded file
getMediaTmpName in file uploader.php, method XoopsMediaUploader::getMediaTmpName()
Get the temporary name that the uploaded file was stored under
getMediaType in file uploader.php, method XoopsMediaUploader::getMediaType()
Get the type of the uploaded file
getMethod in file form.php, method XoopsForm::getMethod()
get the "method" attribute for the <form> tag
getMethodName in file xmlrpcparser.php, method XoopsXmlRpcParser::getMethodName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getModulesList | in file xoopslists.php, method XoopsLists::getModulesList()
getName | in file xmlrss2parser.php, method RssCategoryHandler::getName()
getName | in file xmlrss2parser.php, method RssCommentsHandler::getName()
getName in file xmlrpcparser.php, method RpcIntHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName | in file xmlrss2parser.php, method RssAuthorHandler::getName()
getName | in file xmlrss2parser.php, method RssChannelHandler::getName()
getName | in file xmlrpcparser.php, method RpcStructHandler::getName()
getName in file xmlrpcparser.php, method RpcStringHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName in file xmlrpcparser.php, method RpcNameHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName | in file xmlrss2parser.php, method RssCopyrightHandler::getName()
getName in file xmlrpcparser.php, method RpcMethodNameHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName in file xmlrpcparser.php, method RpcValueHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName in file xmlrpcparser.php, method RpcMemberHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName | in file xmlrss2parser.php, method RssHeightHandler::getName()
getName | in file xmlrss2parser.php, method RssTitleHandler::getName()
getName | in file xmlrss2parser.php, method RssTextInputHandler::getName()
getName | in file xmlrss2parser.php, method RssSourceHandler::getName()
getName | in file xmlrss2parser.php, method RssPubDateHandler::getName()
getName | in file xmlrss2parser.php, method RssTtlHandler::getName()
getName | in file xmlrss2parser.php, method RssUrlHandler::getName()
getName in file xmltaghandler.php, method XmlTagHandler::getName()
**************************************************************************
getName | in file xmlrss2parser.php, method RssWidthHandler::getName()
getName | in file xmlrss2parser.php, method RssWebMasterHandler::getName()
getName | in file xmlrss2parser.php, method RssNameHandler::getName()
getName | in file xmlrss2parser.php, method RssManagingEditorHandler::getName()
getName in file xmlrpcparser.php, method RpcDateTimeHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName | in file xmlrss2parser.php, method RssGuidHandler::getName()
getName | in file xmlrss2parser.php, method RssGeneratorHandler::getName()
getName | in file xmlrss2parser.php, method RssDocsHandler::getName()
getName | in file xmlrss2parser.php, method RssImageHandler::getName()
getName | in file xmlrss2parser.php, method RssItemHandler::getName()
getName | in file xmlrss2parser.php, method RssLinkHandler::getName()
getName | in file xmlrss2parser.php, method RssLastBuildDateHandler::getName()
getName | in file xmlrss2parser.php, method RssLanguageHandler::getName()
getName | in file xmlrss2parser.php, method RssDescriptionHandler::getName()
getName in file xmlrpcparser.php, method RpcDoubleHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName | in file themesetparser.php, method ThemeSetLinkHandler::getName()
getName | in file themesetparser.php, method ThemeSetModuleHandler::getName()
getName | in file themesetparser.php, method ThemeSetNameHandler::getName()
getName | in file themesetparser.php, method ThemeSetTagHandler::getName()
getName | in file themesetparser.php, method ThemeSetImageHandler::getName()
getName | in file themesetparser.php, method ThemeSetFileTypeHandler::getName()
getName | in file themesetparser.php, method ThemeSetAuthorHandler::getName()
getName | in file themesetparser.php, method ThemeSetDateCreatedHandler::getName()
getName | in file themesetparser.php, method ThemeSetDescriptionHandler::getName()
getName | in file themesetparser.php, method ThemeSetEmailHandler::getName()
getName | in file themesetparser.php, method ThemeSetTemplateHandler::getName()
getName | in file themesetparser.php, method ThemeSetGeneratorHandler::getName()
getName in file xmlrpcparser.php, method RpcBooleanHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName in file xmlrpcparser.php, method RpcBase64Handler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getName in file form.php, method XoopsForm::getName()
get the "name" attribute for the <form> tag
getName in file formelement.php, method XoopsFormElement::getName()
get the "name" attribute for the element
getName in file xmlrpcparser.php, method RpcArrayHandler::getName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getNicePathFromId | in file xoopstree.php, method XoopsTree::getNicePathFromId()
getNiceTopicPathFromId | in file xoopstopic.php, method XoopsTopic::getNiceTopicPathFromId()
getNonGroupedBlocks | in file xoopsblock.php, method XoopsBlock::getNonGroupedBlocks()
getOptions in file formselect.php, method XoopsFormSelect::getOptions()
Get all options
getOptions in file formcheckbox.php, method XoopsFormCheckBox::getOptions()
Get an array with all the options
getOptions in file formradio.php, method XoopsFormRadio::getOptions()
Gets the options
getOptions in file xoopsblock.php, method XoopsBlock::getOptions()
gets html form for editting block options
getOrder | in file criteria.php, method CriteriaElement::getOrder()
getParam in file xmlrpcparser.php, method XoopsXmlRpcParser::getParam()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getParentTag | in file saxparser.php, method SaxParser::getParentTag()
getPathFromId | in file xoopstree.php, method XoopsTree::getPathFromId()
getPost | in file metaweblogapi.php, method MetaWeblogApi::getPost()
getPost | in file xoopsapi.php, method XoopsApi::getPost()
getPost | in file bloggerapi.php, method BloggerApi::getPost()
getPostCategories | in file movabletypeapi.php, method MovableTypeApi::getPostCategories()
getRecentPosts | in file metaweblogapi.php, method MetaWeblogApi::getRecentPosts()
getRecentPosts | in file xoopsapi.php, method XoopsApi::getRecentPosts()
getRecentPosts | in file bloggerapi.php, method BloggerApi::getRecentPosts()
getRequired in file form.php, method XoopsForm::getRequired()
get an array of "required" form elements
getRequired in file formelementtray.php, method XoopsFormElementTray::getRequired()
get an array of "required" form elements
getRows in file formtextarea.php, method XoopsFormTextArea::getRows()
get number of rows
getRowsNum in file mysqldatabase.php, method XoopsMySQLDatabase::getRowsNum()
Get number of rows in result
getSavedDestination in file uploader.php, method XoopsMediaUploader::getSavedDestination()
Get the destination the file is saved to
getSavedFileName in file uploader.php, method XoopsMediaUploader::getSavedFileName()
Get the saved filename
getSize in file formtext.php, method XoopsFormText::getSize()
Get size
getSize in file formpassword.php, method XoopsFormPassword::getSize()
Get the field size
getSize in file formselect.php, method XoopsFormSelect::getSize()
Get the size
getSmileys in file module.textsanitizer.php, method MyTextSanitizer::getSmileys()
Get the smileys
getSort | in file criteria.php, method CriteriaElement::getSort()
getStart | in file criteria.php, method CriteriaElement::getStart()
getStory | in file xoopsstory.php, method XoopsStory::getStory()
getSubjectsList | in file xoopslists.php, method XoopsLists::getSubjectsList()
getSuccess | in file xoopsmailer.php, method XoopsMailer::getSuccess()
getTempArr | in file xmlrss2parser.php, method XoopsXmlRss2Parser::getTempArr()
getTempArr | in file themesetparser.php, method XoopsThemeSetParser::getTempArr()
getTempArray in file xmlrpcparser.php, method XoopsXmlRpcParser::getTempArray()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getTemplate | in file bloggerapi.php, method BloggerApi::getTemplate()
getTemplatesData | in file themesetparser.php, method XoopsThemeSetParser::getTemplatesData()
getTempMember in file xmlrpcparser.php, method XoopsXmlRpcParser::getTempMember()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getTempName in file xmlrpcparser.php, method XoopsXmlRpcParser::getTempName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getTempStruct in file xmlrpcparser.php, method XoopsXmlRpcParser::getTempStruct()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getTempValue in file xmlrpcparser.php, method XoopsXmlRpcParser::getTempValue()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getThemeSetData | in file themesetparser.php, method XoopsThemeSetParser::getThemeSetData()
getThemesList | in file xoopslists.php, method XoopsLists::getThemesList()
getTimeZoneList | in file xoopslists.php, method XoopsLists::getTimeZoneList()
getTitle in file form.php, method XoopsForm::getTitle()
return the title of the form
getTokenHTML in file xoopssecurity.php, method XoopsSecurity::getTokenHTML()
Get the HTML code for a XoopsFormHiddenToken object - used in forms that do not use XoopsForm elements
getTopic | in file xoopstopic.php, method XoopsTopic::getTopic()
getTopicsList | in file xoopstopic.php, method XoopsTopic::getTopicsList()
getTree in file tree.php, method XoopsObjectTree::getTree()
Get the tree
getType in file formbutton.php, method XoopsFormButton::getType()
Get the type
getUPN in file auth_ads.php, method XoopsAuthAds::getUPN()
Return the UPN = userPrincipalName (Active Directory) userPrincipalName = guyt@CP.com Often abbreviated to UPN, and looks like an email address. Very useful for logging on especially in a large Forest. Note UPN must be unique in the forest.
getUserDN in file auth_ldap.php, method XoopsAuthLdap::getUserDN()
Compose the user DN with the configuration.
getUserInfo | in file bloggerapi.php, method BloggerApi::getUserInfo()
getUserRankList | in file xoopslists.php, method XoopsLists::getUserRankList()
getUsersBlogs | in file bloggerapi.php, method BloggerApi::getUsersBlogs()
getValue in file formhidden.php, method XoopsFormHidden::getValue()
Get the "value" attribute
getValue in file formcheckbox.php, method XoopsFormCheckBox::getValue()
Get the "value"
getValue in file formbutton.php, method XoopsFormButton::getValue()
Get the initial value
getValue in file formpassword.php, method XoopsFormPassword::getValue()
Get the initial value
getValue in file formtext.php, method XoopsFormText::getValue()
Get initial text value
getValue in file formlabel.php, method XoopsFormLabel::getValue()
Get the text
getValue in file formselect.php, method XoopsFormSelect::getValue()
Get an array of pre-selected values
getValue in file formtextarea.php, method XoopsFormTextArea::getValue()
Get initial content
getValue in file formradio.php, method XoopsFormRadio::getValue()
Get the pre-selected value
getWorkingLevel in file xmlrpcparser.php, method XoopsXmlRpcParser::getWorkingLevel()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
getXmlError in file saxparser.php, method SaxParser::getXmlError()
**************************************************************************
getXoopsUser in file auth_provisionning.php, method XoopsAuthProvisionning::getXoopsUser()
Return a Xoops User Object
get_config_vars in file Smarty.class.php, method Smarty::get_config_vars()
Returns an array containing config variables
get_file_names in file Config_File.class.php, method Config_File::get_file_names()
Get all loaded config file names.
get_key in file Config_File.class.php, method Config_File::get_key()
Retrieves config info based on the key.
get_lines in file class.smtp.php, method SMTP::get_lines()
Read in as many lines as possible either before eof or socket timeout occurs on the operation.
get_registered_object in file Smarty.class.php, method Smarty::get_registered_object()
return a reference to a registered object
get_section_names in file Config_File.class.php, method Config_File::get_section_names()
Get all section names from a loaded file.
get_template_vars in file Smarty.class.php, method Smarty::get_template_vars()
Returns an array containing template variables
get_var_names in file Config_File.class.php, method Config_File::get_var_names()
Get all global or section variable names.
grouppermform.php | procedural page grouppermform.php
top
h
$headers | in file snoopy.php, variable Snoopy::$headers
$headers | in file xoopsmailer.php, variable XoopsMailer::$headers
$Helo in file class.phpmailer.php, variable PHPMailer::$Helo
Sets the SMTP HELO of the message (Default is $Hostname).
$helo_rply | in file class.smtp.php, variable SMTP::$helo_rply
$hometext | in file xoopsstory.php, variable XoopsStory::$hometext
$Host in file class.phpmailer.php, variable PHPMailer::$Host
Sets the SMTP hosts. All hosts must be separated by a semicolon. You can also specify a different port for each host by using this format: [hostname:port] (e.g. "smtp1.example.com:25;smtp2.example.com").
$host in file snoopy.php, variable Snoopy::$host
** Public variables ***
$Host in file xoopsmultimailer.php, variable XoopsMultiMailer::$Host
SMTP Host.
$hostname | in file xoopsstory.php, variable XoopsStory::$hostname
$Hostname in file class.phpmailer.php, variable PHPMailer::$Hostname
Sets the hostname to use in Message-Id and Received headers and as default HELO string. If empty, the value returned by SERVER_NAME is used or 'localhost.localdomain'.
$htmlEditor in file formdhtmltextarea.php, variable XoopsFormDhtmlTextArea::$htmlEditor
Extended HTML editor definition
$htmlHeadStrings in file theme.php, variable xos_opal_Theme::$htmlHeadStrings
Array of strings to be inserted in the head tag of HTML documents
handleBeginElement | in file xmlrss2parser.php, method RssSourceHandler::handleBeginElement()
handleBeginElement | in file xmlrss2parser.php, method RssItemHandler::handleBeginElement()
handleBeginElement | in file themesetparser.php, method ThemeSetImageHandler::handleBeginElement()
handleBeginElement | in file themesetparser.php, method ThemeSetTemplateHandler::handleBeginElement()
handleBeginElement in file xmlrpcparser.php, method RpcArrayHandler::handleBeginElement()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleBeginElement | in file themesetparser.php, method ThemeSetAuthorHandler::handleBeginElement()
handleBeginElement | in file xmlrss2parser.php, method RssTextInputHandler::handleBeginElement()
handleBeginElement | in file xmlrpcparser.php, method RpcStructHandler::handleBeginElement()
handleBeginElement in file xmltaghandler.php, method XmlTagHandler::handleBeginElement()
**************************************************************************
handleBeginElement in file saxparser.php, method SaxParser::handleBeginElement()
**************************************************************************
handleBeginElement in file xmlrpcparser.php, method RpcMemberHandler::handleBeginElement()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleBeginElement in file xmlrpcparser.php, method RpcValueHandler::handleBeginElement()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleBeginElementDefault in file saxparser.php, method SaxParser::handleBeginElementDefault()
The default tag handler method for a tag with no handler
handleCharacterData | in file xmlrss2parser.php, method RssDocsHandler::handleCharacterData()
handleCharacterData in file xmlrpcparser.php, method RpcStringHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData | in file xmlrss2parser.php, method RssDescriptionHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssCommentsHandler::handleCharacterData()
handleCharacterData in file xmlrpcparser.php, method RpcValueHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData | in file xmlrss2parser.php, method RssGeneratorHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssCategoryHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssAuthorHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssCopyrightHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssPubDateHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssTtlHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssTitleHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssUrlHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssWebMasterHandler::handleCharacterData()
handleCharacterData in file xmltaghandler.php, method XmlTagHandler::handleCharacterData()
**************************************************************************
handleCharacterData | in file xmlrss2parser.php, method RssWidthHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssSourceHandler::handleCharacterData()
handleCharacterData in file xmlrpcparser.php, method RpcNameHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData | in file xmlrss2parser.php, method RssLanguageHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssHeightHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssLastBuildDateHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssLinkHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssNameHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssManagingEditorHandler::handleCharacterData()
handleCharacterData | in file xmlrss2parser.php, method RssGuidHandler::handleCharacterData()
handleCharacterData in file xmlrpcparser.php, method RpcDoubleHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData | in file themesetparser.php, method ThemeSetGeneratorHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetLinkHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetModuleHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetNameHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetFileTypeHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetEmailHandler::handleCharacterData()
handleCharacterData in file saxparser.php, method SaxParser::handleCharacterData()
**************************************************************************
handleCharacterData in file xmlrpcparser.php, method RpcMethodNameHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData | in file themesetparser.php, method ThemeSetDescriptionHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetTagHandler::handleCharacterData()
handleCharacterData | in file themesetparser.php, method ThemeSetDateCreatedHandler::handleCharacterData()
handleCharacterData in file xmlrpcparser.php, method RpcBooleanHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData in file xmlrpcparser.php, method RpcDateTimeHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData in file xmlrpcparser.php, method RpcBase64Handler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterData in file xmlrpcparser.php, method RpcIntHandler::handleCharacterData()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleCharacterDataDefault in file saxparser.php, method SaxParser::handleCharacterDataDefault()
The default tag handler method for a tag with no handler
handleDefault in file saxparser.php, method SaxParser::handleDefault()
**************************************************************************
handleEndElement in file xmlrpcparser.php, method RpcMemberHandler::handleEndElement()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleEndElement | in file xmlrss2parser.php, method RssTextInputHandler::handleEndElement()
handleEndElement in file saxparser.php, method SaxParser::handleEndElement()
**************************************************************************
handleEndElement in file xmltaghandler.php, method XmlTagHandler::handleEndElement()
**************************************************************************
handleEndElement | in file themesetparser.php, method ThemeSetTemplateHandler::handleEndElement()
handleEndElement | in file xmlrpcparser.php, method RpcStructHandler::handleEndElement()
handleEndElement in file xmlrpcparser.php, method RpcArrayHandler::handleEndElement()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleEndElement | in file themesetparser.php, method ThemeSetImageHandler::handleEndElement()
handleEndElement | in file xmlrss2parser.php, method RssItemHandler::handleEndElement()
handleEndElement | in file themesetparser.php, method ThemeSetAuthorHandler::handleEndElement()
handleEndElement in file xmlrpcparser.php, method RpcValueHandler::handleEndElement()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
handleEndElementDefault in file saxparser.php, method SaxParser::handleEndElementDefault()
The default tag handler method for a tag with no handler
handleError in file logger.php, method XoopsLogger::handleError()
Error handling callback (called by the zend engine)
handleExternalEntityRef in file saxparser.php, method SaxParser::handleExternalEntityRef()
**************************************************************************
handleNotationDecl in file saxparser.php, method SaxParser::handleNotationDecl()
**************************************************************************
handleProcessingInstruction in file saxparser.php, method SaxParser::handleProcessingInstruction()
**************************************************************************
handleUnparsedEntityDecl in file saxparser.php, method SaxParser::handleUnparsedEntityDecl()
**************************************************************************
headContent | in file theme.php, method xos_opal_Theme::headContent()
HeaderLine in file class.phpmailer.php, method PHPMailer::HeaderLine()
Returns a formatted header line.
Hello in file class.smtp.php, method SMTP::Hello()
Sends the HELO command to the smtp server.
Help in file class.smtp.php, method SMTP::Help()
Gets help information on the keyword specified. If the keyword
hometext | in file xoopsstory.php, method XoopsStory::hometext()
hostname | in file xoopsstory.php, method XoopsStory::hostname()
htmlSpecialChars | in file module.textsanitizer.php, method MyTextSanitizer::htmlSpecialChars()
top
i
$id | in file xoopstree.php, variable XoopsTree::$id
$ihome | in file xoopsstory.php, variable XoopsStory::$ihome
$imageExtensions | in file uploader.php, variable XoopsMediaUploader::$imageExtensions
$imagesData | in file themesetparser.php, variable XoopsThemeSetParser::$imagesData
$isadmin | in file xmlrpcapi.php, variable XoopsXmlRpcApi::$isadmin
$isCaseFolding | in file saxparser.php, variable SaxParser::$isCaseFolding
$isGzipped in file class.tar.php, variable tar::$isGzipped
Unprocessed Archive Information
$isMail | in file xoopsmailer.php, variable XoopsMailer::$isMail
$isPM | in file xoopsmailer.php, variable XoopsMailer::$isPM
ihome | in file xoopsstory.php, method XoopsStory::ihome()
InlineImageExists in file class.phpmailer.php, method PHPMailer::InlineImageExists()
Returns true if an inline attachment is present.
insertBreak in file form.php, method XoopsForm::insertBreak()
insert a break in the form
insertBreak in file themeform.php, method XoopsThemeForm::insertBreak()
Insert an empty row in the table to serve as a seperator.
instance in file commentrenderer.php, method XoopsCommentRenderer::instance()
Access the only instance of this class
instance in file logger.php, method XoopsLogger::instance()
Get a reference to the only instance of this class
isContainer in file formelementtray.php, method XoopsFormElementTray::isContainer()
Is this element a container of other elements?
isContainer in file formelement.php, method XoopsFormElement::isContainer()
Is this element a container of other elements?
isCustom | in file xoopsblock.php, method XoopsBlock::isCustom()
IsError in file class.phpmailer.php, method PHPMailer::IsError()
Returns true if an error occurred.
isFault | in file xmlrpctag.php, method XoopsXmlRpcTag::isFault()
isHidden in file formelement.php, method XoopsFormElement::isHidden()
Find out if an element is "hidden".
IsHTML in file class.phpmailer.php, method PHPMailer::IsHTML()
Sets message type to HTML.
IsMail in file class.phpmailer.php, method PHPMailer::IsMail()
Sets Mailer to send message using PHP mail() function.
isMultiple in file formselect.php, method XoopsFormSelect::isMultiple()
Are multiple selections allowed?
IsQmail in file class.phpmailer.php, method PHPMailer::IsQmail()
Sets Mailer to send message using the qmail MTA.
isRequired in file formelementtray.php, method XoopsFormElementTray::isRequired()
Find out if there are required elements.
isRequired in file formelement.php, method XoopsFormElement::isRequired()
Find out if an element is required.
IsSendmail in file class.phpmailer.php, method PHPMailer::IsSendmail()
Sets Mailer to send message using the $Sendmail program.
IsSMTP in file class.phpmailer.php, method PHPMailer::IsSMTP()
Sets Mailer to send message using SMTP.
isThemeAllowed in file theme.php, method xos_opal_ThemeFactory::isThemeAllowed()
Checks if the specified theme is enabled or not
is_cached in file Smarty.class.php, method Smarty::is_cached()
test to see if valid cache exists for this template
top
l
$language | in file class.phpmailer.php, variable PHPMailer::$language
$lastredirectaddr | in file snoopy.php, variable Snoopy::$lastredirectaddr
$ldap_base_dn | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_base_dn
$ldap_givenname_attr | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_givenname_attr
$ldap_loginldap_attr | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_loginldap_attr
$ldap_loginname_asdn | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_loginname_asdn
$ldap_mail_attr | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_mail_attr
$ldap_manager_dn | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_manager_dn
$ldap_manager_pass | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_manager_pass
$ldap_name_attr | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_name_attr
$ldap_port | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_port
$ldap_server | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_server
$ldap_surname_attr | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_surname_attr
$ldap_version | in file auth_ldap.php, variable XoopsAuthLdap::$ldap_version
$LE | in file class.phpmailer.php, variable PHPMailer::$LE
$left_delimiter in file Smarty.class.php, variable Smarty::$left_delimiter
The left delimiter used for the template tags.
$left_delimiter | in file template.php, variable XoopsTpl::$left_delimiter
$level | in file saxparser.php, variable SaxParser::$level
$limit in file criteria.php, variable CriteriaElement::$limit
Number of records to retrieve
$logend | in file logger.php, variable XoopsLogger::$logend
$logger in file database.php, variable XoopsDatabase::$logger
reference to a XoopsLogger object
$logstart | in file logger.php, variable XoopsLogger::$logstart
Lang in file class.phpmailer.php, method PHPMailer::Lang()
Returns a message in the appropriate language.
load | in file xoopsblock.php, method XoopsBlock::load()
load | in file xoopscomments.php, method XoopsComments::load()
loadXoopsUser | in file auth_ldap.php, method XoopsAuthLdap::loadXoopsUser()
load_file in file Config_File.class.php, method Config_File::load_file()
Load a configuration file manually.
load_filter in file Smarty.class.php, method Smarty::load_filter()
load a filter of specified type and name
logger.php | procedural page logger.php
logger_render.php | procedural page logger_render.php
top
m
$Mailer in file xoopsmultimailer.php, variable XoopsMultiMailer::$Mailer
Method to be used when sending the mail.
$Mailer in file class.phpmailer.php, variable PHPMailer::$Mailer
Method to send mail: ("mail", "sendmail", or "smtp").
$maxFileSize | in file uploader.php, variable XoopsMediaUploader::$maxFileSize
$maxframes | in file snoopy.php, variable Snoopy::$maxframes
$maxHeight | in file uploader.php, variable XoopsMediaUploader::$maxHeight
$maxlength | in file snoopy.php, variable Snoopy::$maxlength
$maxredirs | in file snoopy.php, variable Snoopy::$maxredirs
$maxWidth | in file uploader.php, variable XoopsMediaUploader::$maxWidth
$mediaError | in file uploader.php, variable XoopsMediaUploader::$mediaError
$mediaName | in file uploader.php, variable XoopsMediaUploader::$mediaName
$mediaRealType | in file uploader.php, variable XoopsMediaUploader::$mediaRealType
$mediaSize | in file uploader.php, variable XoopsMediaUploader::$mediaSize
$mediaTmpName | in file uploader.php, variable XoopsMediaUploader::$mediaTmpName
$mediaType | in file uploader.php, variable XoopsMediaUploader::$mediaType
$message_type | in file class.phpmailer.php, variable PHPMailer::$message_type
$metas in file theme.php, variable xos_opal_Theme::$metas
Array containing the document meta-information
$methodName | in file xmlrpctag.php, variable XoopsXmlRpcRequest::$methodName
$mid | in file xoopstopic.php, variable XoopsTopic::$mid
$mimetype in file downloader.php, variable XoopsDownloader::$mimetype
file information
$module | in file xmlrpcapi.php, variable XoopsXmlRpcApi::$module
$multimailer in file xoopsmailer.php, variable XoopsMailer::$multimailer
reference to a XoopsMultiMailer
mysqldatabase.php | procedural page mysqldatabase.php
Mail in file class.smtp.php, method SMTP::Mail()
Starts a mail transaction from the email address specified in $from. Returns true if successful or false otherwise. If True the mail transaction is started and then one or more Recipient commands may be called followed by a Data command.
MailSend in file class.phpmailer.php, method PHPMailer::MailSend()
Sends mail using the PHP mail() function.
makeClickable in file module.textsanitizer.php, method MyTextSanitizer::makeClickable()
Make links in the text clickable
makeMySelBox | in file xoopstree.php, method XoopsTree::makeMySelBox()
makeSelBox in file tree.php, method XoopsObjectTree::makeSelBox()
Make a select box with options from the tree
makeStory | in file xoopsstory.php, method XoopsStory::makeStory()
makeTareaData4Edit | in file module.textsanitizer.php, method MyTextSanitizer::makeTareaData4Edit()
makeTareaData4InsideQuotes | in file module.textsanitizer.php, method MyTextSanitizer::makeTareaData4InsideQuotes()
makeTareaData4Preview | in file module.textsanitizer.php, method MyTextSanitizer::makeTareaData4Preview()
makeTareaData4PreviewInForm | in file module.textsanitizer.php, method MyTextSanitizer::makeTareaData4PreviewInForm()
makeTareaData4Save | in file module.textsanitizer.php, method MyTextSanitizer::makeTareaData4Save()
makeTareaData4Show | in file module.textsanitizer.php, method MyTextSanitizer::makeTareaData4Show()
makeTboxData4Edit | in file module.textsanitizer.php, method MyTextSanitizer::makeTboxData4Edit()
makeTboxData4Preview | in file module.textsanitizer.php, method MyTextSanitizer::makeTboxData4Preview()
makeTboxData4PreviewInForm | in file module.textsanitizer.php, method MyTextSanitizer::makeTboxData4PreviewInForm()
makeTboxData4Save | in file module.textsanitizer.php, method MyTextSanitizer::makeTboxData4Save()
makeTboxData4Show | in file module.textsanitizer.php, method MyTextSanitizer::makeTboxData4Show()
makeTopic | in file xoopstopic.php, method XoopsTopic::makeTopic()
makeTopicSelBox | in file xoopstopic.php, method XoopsTopic::makeTopicSelBox()
MetaWeblogApi | in file metaweblogapi.php, class MetaWeblogApi
MetaWeblogApi | in file metaweblogapi.php, method MetaWeblogApi::MetaWeblogApi()
microtime in file logger.php, method XoopsLogger::microtime()
Returns the current microtime in seconds.
mimetypes.inc.php | procedural page mimetypes.inc.php
module.errorhandler.php | procedural page module.errorhandler.php
module.textsanitizer.php | procedural page module.textsanitizer.php
MovableTypeApi | in file movabletypeapi.php, method MovableTypeApi::MovableTypeApi()
MovableTypeApi | in file movabletypeapi.php, class MovableTypeApi
MyTextSanitizer in file module.textsanitizer.php, class MyTextSanitizer
Class to "clean up" text for various uses
MyTextSanitizer | in file module.textsanitizer.php, method MyTextSanitizer::MyTextSanitizer()
modifier.capitalize.php | procedural page modifier.capitalize.php
modifier.cat.php | procedural page modifier.cat.php
modifier.count_characters.php | procedural page modifier.count_characters.php
modifier.count_paragraphs.php | procedural page modifier.count_paragraphs.php
modifier.count_sentences.php | procedural page modifier.count_sentences.php
modifier.count_words.php | procedural page modifier.count_words.php
modifier.date_format.php | procedural page modifier.date_format.php
modifier.debug_print_var.php | procedural page modifier.debug_print_var.php
modifier.default.php | procedural page modifier.default.php
modifier.escape.php | procedural page modifier.escape.php
modifier.indent.php | procedural page modifier.indent.php
modifier.lower.php | procedural page modifier.lower.php
modifier.nl2br.php | procedural page modifier.nl2br.php
modifier.regex_replace.php | procedural page modifier.regex_replace.php
modifier.replace.php | procedural page modifier.replace.php
modifier.spacify.php | procedural page modifier.spacify.php
modifier.string_format.php | procedural page modifier.string_format.php
modifier.strip.php | procedural page modifier.strip.php
modifier.strip_tags.php | procedural page modifier.strip_tags.php
modifier.truncate.php | procedural page modifier.truncate.php
modifier.upper.php | procedural page modifier.upper.php
modifier.wordwrap.php | procedural page modifier.wordwrap.php
modifier.debug_print_var.php | procedural page modifier.debug_print_var.php
metaweblogapi.php | procedural page metaweblogapi.php
movabletypeapi.php | procedural page movabletypeapi.php
top
n
$nohtml | in file xoopsstory.php, variable XoopsStory::$nohtml
$nosmiley | in file xoopsstory.php, variable XoopsStory::$nosmiley
$notifypub | in file xoopsstory.php, variable XoopsStory::$notifypub
$numDirectories in file class.tar.php, variable tar::$numDirectories
Processed Archive Information
$numFiles in file class.tar.php, variable tar::$numFiles
Processed Archive Information
newPost | in file bloggerapi.php, method BloggerApi::newPost()
newPost | in file xoopsapi.php, method XoopsApi::newPost()
newPost | in file metaweblogapi.php, method MetaWeblogApi::newPost()
nl2Br in file module.textsanitizer.php, method MyTextSanitizer::nl2Br()
Convert linebreaks to
tags
nohtml | in file xoopsstory.php, method XoopsStory::nohtml()
Noop in file class.smtp.php, method SMTP::Noop()
Sends the command NOOP to the SMTP server.
nosmiley | in file xoopsstory.php, method XoopsStory::nosmiley()
notifypub | in file xoopsstory.php, method XoopsStory::notifypub()
top
o
$offsiteok | in file snoopy.php, variable Snoopy::$offsiteok
$old_offset in file class.zipfile.php, variable zipfile::$old_offset
Last offset position
$operator | in file criteria.php, variable Criteria::$operator
$order | in file xoopstree.php, variable XoopsTree::$order
$order in file criteria.php, variable CriteriaElement::$order
Sort order
$overwrite in file Config_File.class.php, variable Config_File::$overwrite
Controls whether variables with the same name overwrite each other.
oopsAddSlashes | in file module.textsanitizer.php, method MyTextSanitizer::oopsAddSlashes()
oopsHtmlSpecialChars | in file module.textsanitizer.php, method MyTextSanitizer::oopsHtmlSpecialChars()
oopsNl2Br | in file module.textsanitizer.php, method MyTextSanitizer::oopsNl2Br()
oopsStripSlashesGPC | in file module.textsanitizer.php, method MyTextSanitizer::oopsStripSlashesGPC()
oopsStripSlashesRT | in file module.textsanitizer.php, method MyTextSanitizer::oopsStripSlashesRT()
openTAR in file class.tar.php, method tar::openTAR()
Open a TAR file
outputfilter.trimwhitespace.php | procedural page outputfilter.trimwhitespace.php
top
p
$params | in file xmlrpcapi.php, variable XoopsXmlRpcApi::$params
$parser | in file saxparser.php, variable SaxParser::$parser
$pass | in file snoopy.php, variable Snoopy::$pass
$passcookies | in file snoopy.php, variable Snoopy::$passcookies
$Password in file xoopsmultimailer.php, variable XoopsMultiMailer::$Password
Password for SMTPAuth.
$Password in file class.phpmailer.php, variable PHPMailer::$Password
Sets SMTP password.
$path in file theme.php, variable xos_opal_Theme::$path
Physical path of this theme folder
$perpage | in file pagenav.php, variable XoopsPageNav::$perpage
$php_handling in file Smarty.class.php, variable Smarty::$php_handling
This determines how Smarty handles "<?php ... ?>" tags in templates.
$pid | in file xoopstree.php, variable XoopsTree::$pid
$PluginDir in file class.phpmailer.php, variable PHPMailer::$PluginDir
Path to PHPMailer plugins. This is now only useful if the SMTP class is in a different directory than the PHP include path.
$plugins in file theme.php, variable xos_opal_Theme::$plugins
Page construction plug-ins to use
$plugins_dir in file Smarty.class.php, variable Smarty::$plugins_dir
An array of directories searched for plugins.
$port | in file snoopy.php, variable Snoopy::$port
$Port in file class.phpmailer.php, variable PHPMailer::$Port
Sets the default SMTP server port.
$prefix | in file criteria.php, variable Criteria::$prefix
$prefix | in file xoopstopic.php, variable XoopsTopic::$prefix
$prefix | in file uploader.php, variable XoopsMediaUploader::$prefix
$prefix in file database.php, variable XoopsDatabase::$prefix
Prefix for tables in the database
$Priority in file class.phpmailer.php, variable PHPMailer::$Priority
Email priority (1 = High, 3 = Normal, 5 = low).
$proxy_host | in file snoopy.php, variable Snoopy::$proxy_host
$proxy_pass | in file snoopy.php, variable Snoopy::$proxy_pass
$proxy_port | in file snoopy.php, variable Snoopy::$proxy_port
$proxy_user | in file snoopy.php, variable Snoopy::$proxy_user
$published | in file xoopsstory.php, variable XoopsStory::$published
phpmailer.lang-en.php | procedural page phpmailer.lang-en.php
pagenav.php | procedural page pagenav.php
parse in file saxparser.php, method SaxParser::parse()
**************************************************************************
parse_contents in file Config_File.class.php, method Config_File::parse_contents()
parse the source of a configuration file manually.
PHPMailer in file class.phpmailer.php, class PHPMailer
PHPMailer - PHP email transport class
postRender in file theme_blocks.php, method xos_logos_PageBuilder::postRender()
Called after a specific zone is rendered
prefix in file database.php, method XoopsDatabase::prefix()
attach the prefix.'_' to a given tablename
prefix | in file xoopstopic.php, method XoopsTopic::prefix()
prefixQuery in file sqlutility.php, method SqlUtility::prefixQuery()
add a prefix.'_' to all tablenames in a query
preRender in file theme_blocks.php, method xos_logos_PageBuilder::preRender()
Called before a specific zone is rendered
previewTarea in file module.textsanitizer.php, method MyTextSanitizer::previewTarea()
Filters textarea form data submitted for preview
printNavBar | in file xoopscomments.php, method XoopsComments::printNavBar()
published | in file xoopsstory.php, method XoopsStory::published()
top
q
$queries | in file logger.php, variable XoopsLogger::$queries
query in file mysqldatabase.php, method XoopsMySQLDatabaseSafe::query()
perform a query on the database
query in file mysqldatabase.php, method XoopsMySQLDatabase::query()
perform a query
query in file mysqldatabase.php, method XoopsMySQLDatabaseProxy::query()
perform a query on the database
queryF in file mysqldatabase.php, method XoopsMySQLDatabase::queryF()
perform a query on the database
queryFromFile in file mysqldatabase.php, method XoopsMySQLDatabase::queryFromFile()
perform queries from SQL dump file in a batch
Quit in file class.smtp.php, method SMTP::Quit()
Sends the quit command to the server and then closes the socket if there is no error or the $close_on_error argument is true.
quoteString in file mysqldatabase.php, method XoopsMySQLDatabase::quoteString()
Returns escaped string text with single quotes around it to be safely stored in database
top
r
$rawheaders | in file snoopy.php, variable Snoopy::$rawheaders
$read_hidden in file Config_File.class.php, variable Config_File::$read_hidden
Controls whether hidden config sections/vars are read from the file.
$read_timeout | in file snoopy.php, variable Snoopy::$read_timeout
$referer | in file snoopy.php, variable Snoopy::$referer
$renderCount | in file theme.php, variable xos_opal_Theme::$renderCount
$renderingEnabled | in file logger.php, variable XoopsLogger::$renderingEnabled
$ReplyTo | in file class.phpmailer.php, variable PHPMailer::$ReplyTo
$request_use_auto_globals in file Smarty.class.php, variable Smarty::$request_use_auto_globals
Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false)
$request_vars_order in file Smarty.class.php, variable Smarty::$request_vars_order
The order in which request variables are registered, similar to variables_order in php.ini E = Environment, G = GET, P = POST, C = Cookies, S = Server
$response | in file xmlrpcapi.php, variable XoopsXmlRpcApi::$response
$response_code | in file snoopy.php, variable Snoopy::$response_code
$results | in file snoopy.php, variable Snoopy::$results
$right_delimiter in file Smarty.class.php, variable Smarty::$right_delimiter
The right delimiter used for the template tags.
$right_delimiter | in file template.php, variable XoopsTpl::$right_delimiter
Recipient in file class.smtp.php, method SMTP::Recipient()
Sends the command RCPT to the SMTP server with the TO: argument of $to.
register_block in file Smarty.class.php, method Smarty::register_block()
Registers block function to be used in templates
register_compiler_function in file Smarty.class.php, method Smarty::register_compiler_function()
Registers compiler function
register_function in file Smarty.class.php, method Smarty::register_function()
Registers custom function to be used in templates
register_modifier in file Smarty.class.php, method Smarty::register_modifier()
Registers modifier to be used in templates
register_object in file Smarty.class.php, method Smarty::register_object()
Registers object to be used in templates
register_outputfilter in file Smarty.class.php, method Smarty::register_outputfilter()
Registers an output filter function to apply to a template output
register_postfilter in file Smarty.class.php, method Smarty::register_postfilter()
Registers a postfilter function to apply to a compiled template after compilation
register_prefilter in file Smarty.class.php, method Smarty::register_prefilter()
Registers a prefilter function to apply to a template before compiling
register_resource in file Smarty.class.php, method Smarty::register_resource()
Registers a resource to fetch a template
releaseWorkingLevel in file xmlrpcparser.php, method XoopsXmlRpcParser::releaseWorkingLevel()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
removeDirectory in file class.tar.php, method tar::removeDirectory()
Remove a directory from the tar archive
removeFile in file class.tar.php, method tar::removeFile()
Remove a file from the tar archive
render | in file xmlrpctag.php, method XoopsXmlRpcInt::render()
render in file logger.php, method XoopsLogger::render()
Output buffering callback inserting logger dump in page output
render | in file xmlrpctag.php, method XoopsXmlRpcStruct::render()
render in file grouppermform.php, method XoopsGroupPermForm::render()
Renders the form
render | in file xmlrpctag.php, method XoopsXmlRpcResponse::render()
render | in file xmlrpctag.php, method XoopsXmlRpcTag::render()
render | in file xmlrpctag.php, method XoopsXmlRpcDocument::render()
render | in file xmlrpctag.php, method XoopsXmlRpcArray::render()
render | in file xmlrpctag.php, method XoopsXmlRpcBase64::render()
render | in file xmlrpctag.php, method XoopsXmlRpcDatetime::render()
render | in file xmlrpctag.php, method XoopsXmlRpcBoolean::render()
render in file themeform.php, method XoopsThemeForm::render()
create HTML to output the form as a theme-enabled table with validation.
render in file theme.php, method xos_opal_Theme::render()
Render the page
render | in file xmlrpctag.php, method XoopsXmlRpcFault::render()
render | in file xmlrpctag.php, method XoopsXmlRpcRequest::render()
render | in file xmlrpctag.php, method XoopsXmlRpcDouble::render()
render in file tableform.php, method XoopsTableForm::render()
create HTML to output the form as a table
render in file grouppermform.php, method XoopsGroupFormCheckBox::render()
Renders checkbox options for this group
render | in file xmlrpctag.php, method XoopsXmlRpcString::render()
render in file simpleform.php, method XoopsSimpleForm::render()
create HTML to output the form with minimal formatting
render in file formpassword.php, method XoopsFormPassword::render()
Prepare HTML for output
render in file formlabel.php, method XoopsFormLabel::render()
Prepare HTML for output
render in file formradio.php, method XoopsFormRadio::render()
Prepare HTML for output
render in file formselect.php, method XoopsFormSelect::render()
Prepare HTML for output
render in file formtext.php, method XoopsFormText::render()
Prepare HTML for output
render in file formhidden.php, method XoopsFormHidden::render()
Prepare HTML for output
render in file formfile.php, method XoopsFormFile::render()
prepare HTML for output
render | in file formcolorpicker.php, method XoopsFormColorPicker::render()
render in file formelement.php, method XoopsFormElement::render()
Generates output for the element.
render in file formcheckbox.php, method XoopsFormCheckBox::render()
prepare HTML for output
render in file formelementtray.php, method XoopsFormElementTray::render()
prepare HTML to output this group
render in file formtextarea.php, method XoopsFormTextArea::render()
prepare HTML for output
render | in file formtextdateselect.php, method XoopsFormTextDateSelect::render()
render in file criteria.php, method Criteria::render()
Make a sql condition string
render in file formdhtmltextarea.php, method XoopsFormDhtmlTextArea::render()
Prepare HTML for output
render in file criteria.php, method CriteriaCompo::render()
Make the criteria into a query string
render in file form.php, method XoopsForm::render()
returns renderered form
render in file formbutton.php, method XoopsFormButton::render()
prepare HTML for output
render in file criteria.php, method CriteriaElement::render()
Render the criteria element
renderAttributes in file theme.php, method xos_opal_Theme::renderAttributes()
Transform an attributes collection to an XML string
renderErrors in file errorhandler.php, method XoopsErrorHandler::renderErrors()
Render the list of errors
renderFlatView in file commentrenderer.php, method XoopsCommentRenderer::renderFlatView()
Render the comments in flat view
renderImageNav in file pagenav.php, method XoopsPageNav::renderImageNav()
Create navigation with images
renderLdap in file criteria.php, method CriteriaCompo::renderLdap()
Generate an LDAP filter from criteria
renderLdap in file criteria.php, method Criteria::renderLdap()
Generate an LDAP filter from criteria
renderMetas | in file theme.php, method xos_opal_Theme::renderMetas()
renderNav in file pagenav.php, method XoopsPageNav::renderNav()
Create text navigation
renderNestView in file commentrenderer.php, method XoopsCommentRenderer::renderNestView()
Render comments in nested view
renderSelect in file pagenav.php, method XoopsPageNav::renderSelect()
Create a navigational dropdown list
renderThreadView in file commentrenderer.php, method XoopsCommentRenderer::renderThreadView()
Render the comments in thread view
renderValidationJS in file formcolorpicker.php, method XoopsFormColorPicker::renderValidationJS()
Returns custom validation Javascript
renderValidationJS in file formelement.php, method XoopsFormElement::renderValidationJS()
Render custom javascript validation code
renderValidationJS | in file formdhtmltextarea.php, method XoopsFormDhtmlTextArea::renderValidationJS()
renderValidationJS in file form.php, method XoopsForm::renderValidationJS()
Renders the Javascript function needed for client-side for validation
renderWhere in file criteria.php, method CriteriaCompo::renderWhere()
Make the criteria into a SQL "WHERE" clause
renderWhere in file criteria.php, method Criteria::renderWhere()
Make a SQL "WHERE" clause
Reset in file class.smtp.php, method SMTP::Reset()
Sends the RSET command to abort and transaction that is currently in progress. Returns true if successful false otherwise.
reset | in file xoopsmailer.php, method XoopsMailer::reset()
resetpwd in file auth_provisionning.php, method XoopsAuthProvisionning::resetpwd()
Add a new user to the system
resetTempArr | in file xmlrss2parser.php, method XoopsXmlRss2Parser::resetTempArr()
resetTempArr | in file themesetparser.php, method XoopsThemeSetParser::resetTempArr()
resetTempArray in file xmlrpcparser.php, method XoopsXmlRpcParser::resetTempArray()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
resetTempMember in file xmlrpcparser.php, method XoopsXmlRpcParser::resetTempMember()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
resetTempStruct in file xmlrpcparser.php, method XoopsXmlRpcParser::resetTempStruct()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
resetTempValue in file xmlrpcparser.php, method XoopsXmlRpcParser::resetTempValue()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
resourcePath in file theme.php, method xos_opal_Theme::resourcePath()
Return a themable file resource path
restore in file auth_provisionning.php, method XoopsAuthProvisionning::restore()
Restore a user
retrieveBlocks | in file theme_blocks.php, method xos_logos_PageBuilder::retrieveBlocks()
RFCDate in file class.phpmailer.php, method PHPMailer::RFCDate()
Returns the proper RFC 822 formatted date.
RpcArrayHandler in file xmlrpcparser.php, class RpcArrayHandler
*****************************************************************************
RpcBase64Handler in file xmlrpcparser.php, class RpcBase64Handler
*****************************************************************************
RpcBooleanHandler in file xmlrpcparser.php, class RpcBooleanHandler
*****************************************************************************
RpcDateTimeHandler in file xmlrpcparser.php, class RpcDateTimeHandler
*****************************************************************************
RpcDoubleHandler in file xmlrpcparser.php, class RpcDoubleHandler
*****************************************************************************
RpcIntHandler in file xmlrpcparser.php, class RpcIntHandler
*****************************************************************************
RpcMemberHandler in file xmlrpcparser.php, class RpcMemberHandler
*****************************************************************************
RpcMethodNameHandler in file xmlrpcparser.php, class RpcMethodNameHandler
*****************************************************************************
RpcNameHandler in file xmlrpcparser.php, class RpcNameHandler
*****************************************************************************
RpcStringHandler in file xmlrpcparser.php, class RpcStringHandler
*****************************************************************************
RpcStructHandler in file xmlrpcparser.php, class RpcStructHandler
*****************************************************************************
RpcValueHandler in file xmlrpcparser.php, class RpcValueHandler
*****************************************************************************
RssAuthorHandler in file xmlrss2parser.php, class RssAuthorHandler
*****************************************************************************
RssCategoryHandler | in file xmlrss2parser.php, method RssCategoryHandler::RssCategoryHandler()
RssCategoryHandler in file xmlrss2parser.php, class RssCategoryHandler
*****************************************************************************
RssChannelHandler | in file xmlrss2parser.php, method RssChannelHandler::RssChannelHandler()
RssChannelHandler in file xmlrss2parser.php, class RssChannelHandler
*****************************************************************************
RssCommentsHandler in file xmlrss2parser.php, class RssCommentsHandler
*****************************************************************************
RssCommentsHandler | in file xmlrss2parser.php, method RssCommentsHandler::RssCommentsHandler()
RssCopyrightHandler in file xmlrss2parser.php, class RssCopyrightHandler
*****************************************************************************
RssCopyrightHandler | in file xmlrss2parser.php, method RssCopyrightHandler::RssCopyrightHandler()
RssDescriptionHandler in file xmlrss2parser.php, class RssDescriptionHandler
*****************************************************************************
RssDescriptionHandler | in file xmlrss2parser.php, method RssDescriptionHandler::RssDescriptionHandler()
RssDocsHandler in file xmlrss2parser.php, class RssDocsHandler
*****************************************************************************
RssDocsHandler | in file xmlrss2parser.php, method RssDocsHandler::RssDocsHandler()
RssGeneratorHandler | in file xmlrss2parser.php, method RssGeneratorHandler::RssGeneratorHandler()
RssGeneratorHandler in file xmlrss2parser.php, class RssGeneratorHandler
*****************************************************************************
RssGuidHandler | in file xmlrss2parser.php, method RssGuidHandler::RssGuidHandler()
RssGuidHandler | in file xmlrss2parser.php, method RssAuthorHandler::RssGuidHandler()
RssGuidHandler in file xmlrss2parser.php, class RssGuidHandler
*****************************************************************************
RssHeightHandler in file xmlrss2parser.php, class RssHeightHandler
*****************************************************************************
RssHeightHandler | in file xmlrss2parser.php, method RssHeightHandler::RssHeightHandler()
RssImageHandler in file xmlrss2parser.php, class RssImageHandler
*****************************************************************************
RssImageHandler | in file xmlrss2parser.php, method RssImageHandler::RssImageHandler()
RssItemHandler in file xmlrss2parser.php, class RssItemHandler
*****************************************************************************
RssItemHandler | in file xmlrss2parser.php, method RssItemHandler::RssItemHandler()
RssLanguageHandler | in file xmlrss2parser.php, method RssLanguageHandler::RssLanguageHandler()
RssLanguageHandler in file xmlrss2parser.php, class RssLanguageHandler
*****************************************************************************
RssLastBuildDateHandler | in file xmlrss2parser.php, method RssLastBuildDateHandler::RssLastBuildDateHandler()
RssLastBuildDateHandler in file xmlrss2parser.php, class RssLastBuildDateHandler
*****************************************************************************
RssLinkHandler in file xmlrss2parser.php, class RssLinkHandler
*****************************************************************************
RssLinkHandler | in file xmlrss2parser.php, method RssLinkHandler::RssLinkHandler()
RssManagingEditorHandler in file xmlrss2parser.php, class RssManagingEditorHandler
*****************************************************************************
RssManagingEditorHandler | in file xmlrss2parser.php, method RssManagingEditorHandler::RssManagingEditorHandler()
RssNameHandler | in file xmlrss2parser.php, method RssNameHandler::RssNameHandler()
RssNameHandler in file xmlrss2parser.php, class RssNameHandler
*****************************************************************************
RssPubDateHandler | in file xmlrss2parser.php, method RssPubDateHandler::RssPubDateHandler()
RssPubDateHandler in file xmlrss2parser.php, class RssPubDateHandler
*****************************************************************************
RssSourceHandler | in file xmlrss2parser.php, method RssSourceHandler::RssSourceHandler()
RssSourceHandler in file xmlrss2parser.php, class RssSourceHandler
*****************************************************************************
RssTextInputHandler in file xmlrss2parser.php, class RssTextInputHandler
*****************************************************************************
RssTitleHandler | in file xmlrss2parser.php, method RssTitleHandler::RssTitleHandler()
RssTitleHandler in file xmlrss2parser.php, class RssTitleHandler
*****************************************************************************
RssTtlHandler | in file xmlrss2parser.php, method RssTtlHandler::RssTtlHandler()
RssTtlHandler in file xmlrss2parser.php, class RssTtlHandler
*****************************************************************************
RssUrlHandler in file xmlrss2parser.php, class RssUrlHandler
*****************************************************************************
RssUrlHandler | in file xmlrss2parser.php, method RssUrlHandler::RssUrlHandler()
RssWebMasterHandler in file xmlrss2parser.php, class RssWebMasterHandler
*****************************************************************************
RssWebMasterHandler | in file xmlrss2parser.php, method RssTextInputHandler::RssWebMasterHandler()
RssWebMasterHandler | in file xmlrss2parser.php, method RssWebMasterHandler::RssWebMasterHandler()
RssWidthHandler | in file xmlrss2parser.php, method RssWidthHandler::RssWidthHandler()
RssWidthHandler in file xmlrss2parser.php, class RssWidthHandler
*****************************************************************************
resource.db.php | procedural page resource.db.php
top
s
$savedDestination | in file uploader.php, variable XoopsMediaUploader::$savedDestination
$savedFileName | in file uploader.php, variable XoopsMediaUploader::$savedFileName
$secure_dir in file Smarty.class.php, variable Smarty::$secure_dir
This is the list of template directories that are considered secure. This is used only if $security is enabled. One directory per array element. $template_dir is in this list implicitly.
$security in file Smarty.class.php, variable Smarty::$security
This enables template security. When enabled, many things are restricted
$security_settings in file Smarty.class.php, variable Smarty::$security_settings
These are the security settings for Smarty. They are used only when $security is enabled.
$Sender in file class.phpmailer.php, variable PHPMailer::$Sender
Sets the Sender email (Return-Path) of the message. If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
$Sendmail in file xoopsmultimailer.php, variable XoopsMultiMailer::$Sendmail
set if $Mailer is "sendmail"
$Sendmail in file class.phpmailer.php, variable PHPMailer::$Sendmail
Sets the path of the sendmail program.
$smileys | in file module.textsanitizer.php, variable MyTextSanitizer::$smileys
$smtp | in file class.phpmailer.php, variable PHPMailer::$smtp
$SMTPAuth in file class.phpmailer.php, variable PHPMailer::$SMTPAuth
Sets SMTP authentication. Utilizes the Username and Password variables.
$SMTPAuth in file xoopsmultimailer.php, variable XoopsMultiMailer::$SMTPAuth
Does your SMTP host require SMTPAuth authentication?
$SMTPDebug in file class.phpmailer.php, variable PHPMailer::$SMTPDebug
Sets SMTP class debugging on or off.
$SMTPKeepAlive in file class.phpmailer.php, variable PHPMailer::$SMTPKeepAlive
Prevents the SMTP connection from being closed after each mail sending. If this is set to true then to close the connection requires an explicit call to SmtpClose().
$smtp_conn | in file class.smtp.php, variable SMTP::$smtp_conn
$SMTP_PORT in file class.smtp.php, variable SMTP::$SMTP_PORT
SMTP server port
$sort | in file criteria.php, variable CriteriaElement::$sort
$start in file criteria.php, variable CriteriaElement::$start
Offset of first record
$status | in file snoopy.php, variable Snoopy::$status
$storyid | in file xoopsstory.php, variable XoopsStory::$storyid
$subject | in file xoopsmailer.php, variable XoopsMailer::$subject
$Subject in file class.phpmailer.php, variable PHPMailer::$Subject
Sets the Subject of the message.
$success | in file xoopsmailer.php, variable XoopsMailer::$success
sqlutility.php | procedural page sqlutility.php
sanitizeForDisplay | in file module.textsanitizer.php, method MyTextSanitizer::sanitizeForDisplay()
sanitizeForPreview | in file module.textsanitizer.php, method MyTextSanitizer::sanitizeForPreview()
sanitizeMultipleExtensions in file uploader.php, method XoopsMediaUploader::sanitizeMultipleExtensions()
Sanitize executable filename with multiple extensions
sanitizePath | in file logger.php, method XoopsLogger::sanitizePath()
saveTar in file class.tar.php, method tar::saveTar()
Write the currently loaded tar archive to disk
SaxParser in file saxparser.php, class SaxParser
*****************************************************************************
SaxParser in file saxparser.php, method SaxParser::SaxParser()
**************************************************************************
Send in file class.phpmailer.php, method PHPMailer::Send()
Creates message and assigns Mailer. If the message is not sent successfully then it returns false. Use the ErrorInfo variable to view description of the error.
send | in file xoopsmailer.php, method XoopsMailer::send()
Send in file class.smtp.php, method SMTP::Send()
Starts a mail transaction from the email address specified in
SendAndMail in file class.smtp.php, method SMTP::SendAndMail()
Starts a mail transaction from the email address specified in
SendHello in file class.smtp.php, method SMTP::SendHello()
Sends a HELO/EHLO command.
sendMail in file xoopsmailer.php, method XoopsMailer::sendMail()
Send email
SendmailSend in file class.phpmailer.php, method PHPMailer::SendmailSend()
Sends mail using the $Sendmail program.
SendOrMail in file class.smtp.php, method SMTP::SendOrMail()
Starts a mail transaction from the email address specified in
sendPM | in file xoopsmailer.php, method XoopsMailer::sendPM()
ServerHostname in file class.phpmailer.php, method PHPMailer::ServerHostname()
Returns the server hostname or 'localhost.localdomain' if unknown.
ServerVar in file class.phpmailer.php, method PHPMailer::ServerVar()
Returns the appropriate server variable. Should work with both PHP 4.1.0+ as well as older versions. Returns an empty string if nothing is found.
setAccessKey in file formelement.php, method XoopsFormElement::setAccessKey()
set the "accesskey" attribute for the element
setApproved | in file xoopsstory.php, method XoopsStory::setApproved()
setBody | in file xoopsmailer.php, method XoopsMailer::setBody()
setBodytext | in file xoopsstory.php, method XoopsStory::setBodytext()
setCaption in file formelement.php, method XoopsFormElement::setCaption()
set the caption for the element
setCaseFolding in file saxparser.php, method SaxParser::setCaseFolding()
**************************************************************************
setChannelData | in file xmlrss2parser.php, method XoopsXmlRss2Parser::setChannelData()
setClass in file formelement.php, method XoopsFormElement::setClass()
set the "class" attribute for the element
setComments in file commentrenderer.php, method XoopsCommentRenderer::setComments()
Accessor
setComments | in file xoopsstory.php, method XoopsStory::setComments()
setcookies | in file snoopy.php, method Snoopy::setcookies()
setDescription in file formelement.php, method XoopsFormElement::setDescription()
set the element's description
setElementValue in file form.php, method XoopsForm::setElementValue()
Sets the "value" attribute of a form element
setElementValues in file form.php, method XoopsForm::setElementValues()
Sets the "value" attribute of form elements in a batch
SetError in file class.phpmailer.php, method PHPMailer::SetError()
Adds the error message to the error container.
setErrors in file uploader.php, method XoopsMediaUploader::setErrors()
Add an error
setErrors in file saxparser.php, method SaxParser::setErrors()
Sets error messages
setErrors in file xoopssecurity.php, method XoopsSecurity::setErrors()
Add an error
setErrors in file auth.php, method XoopsAuth::setErrors()
add an error
setExpired | in file xoopsstory.php, method XoopsStory::setExpired()
setExtra in file formelement.php, method XoopsFormElement::setExtra()
Add extra attributes to the element.
setExtra in file form.php, method XoopsForm::setExtra()
set the extra attributes for the <form> tag
setFault | in file xmlrpctag.php, method XoopsXmlRpcTag::setFault()
setFromEmail | in file xoopsmailer.php, method XoopsMailer::setFromEmail()
setFromName | in file xoopsmailer.php, method XoopsMailer::setFromName()
setFromUser | in file xoopsmailer.php, method XoopsMailer::setFromUser()
setGroupby | in file criteria.php, method CriteriaElement::setGroupby()
setHidden in file formelement.php, method XoopsFormElement::setHidden()
flag the element as "hidden"
setHometext | in file xoopsstory.php, method XoopsStory::setHometext()
setHostname | in file xoopsstory.php, method XoopsStory::setHostname()
setIhome | in file xoopsstory.php, method XoopsStory::setIhome()
setImageData | in file xmlrss2parser.php, method XoopsXmlRss2Parser::setImageData()
setImagesData | in file themesetparser.php, method XoopsThemeSetParser::setImagesData()
setItems | in file xmlrss2parser.php, method XoopsXmlRss2Parser::setItems()
SetLanguage in file class.phpmailer.php, method PHPMailer::SetLanguage()
Sets the language for all class error messages. Returns false if it cannot load the language file. The default language type is English.
setLimit | in file criteria.php, method CriteriaElement::setLimit()
setLogger in file database.php, method XoopsDatabase::setLogger()
assign a XoopsLogger object to the database
SetMessageType in file class.phpmailer.php, method PHPMailer::SetMessageType()
Sets the message type.
setMethodName in file xmlrpcparser.php, method XoopsXmlRpcParser::setMethodName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setName in file formelement.php, method XoopsFormElement::setName()
set the "name" attribute for the element
setNohtml | in file xoopsstory.php, method XoopsStory::setNohtml()
setNosmiley | in file xoopsstory.php, method XoopsStory::setNosmiley()
setNotifyPub | in file xoopsstory.php, method XoopsStory::setNotifyPub()
setOptionTree in file grouppermform.php, method XoopsGroupFormCheckBox::setOptionTree()
Sets the tree structure of items
setOrder | in file criteria.php, method CriteriaElement::setOrder()
setParam in file xmlrpcparser.php, method XoopsXmlRpcParser::setParam()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setPostCategories | in file movabletypeapi.php, method MovableTypeApi::setPostCategories()
setPrefix in file uploader.php, method XoopsMediaUploader::setPrefix()
Set the prefix
setPrefix in file database.php, method XoopsDatabase::setPrefix()
set the prefix for tables in the database
setPriority | in file xoopsmailer.php, method XoopsMailer::setPriority()
setPublished | in file xoopsstory.php, method XoopsStory::setPublished()
setRequired in file form.php, method XoopsForm::setRequired()
make an element "required"
setSort | in file criteria.php, method CriteriaElement::setSort()
setStart | in file criteria.php, method CriteriaElement::setStart()
setStoryId | in file xoopsstory.php, method XoopsStory::setStoryId()
setSubject | in file xoopsmailer.php, method XoopsMailer::setSubject()
setTargetFileName in file uploader.php, method XoopsMediaUploader::setTargetFileName()
Set the target filename
setTempArr | in file xmlrss2parser.php, method XoopsXmlRss2Parser::setTempArr()
setTempArr | in file themesetparser.php, method XoopsThemeSetParser::setTempArr()
setTempArray in file xmlrpcparser.php, method XoopsXmlRpcParser::setTempArray()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setTemplate | in file xoopsmailer.php, method XoopsMailer::setTemplate()
setTemplate | in file bloggerapi.php, method BloggerApi::setTemplate()
setTemplateDir | in file xoopsmailer.php, method XoopsMailer::setTemplateDir()
setTemplatesData | in file themesetparser.php, method XoopsThemeSetParser::setTemplatesData()
setTempMember in file xmlrpcparser.php, method XoopsXmlRpcParser::setTempMember()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setTempName in file xmlrpcparser.php, method XoopsXmlRpcParser::setTempName()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setTempStruct in file xmlrpcparser.php, method XoopsXmlRpcParser::setTempStruct()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setTempValue in file xmlrpcparser.php, method XoopsXmlRpcParser::setTempValue()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
setThemeSetData | in file themesetparser.php, method XoopsThemeSetParser::setThemeSetData()
setTitle | in file xoopsstory.php, method XoopsStory::setTitle()
setToEmails | in file xoopsmailer.php, method XoopsMailer::setToEmails()
setToGroups | in file xoopsmailer.php, method XoopsMailer::setToGroups()
setTopicalign | in file xoopsstory.php, method XoopsStory::setTopicalign()
setTopicdisplay | in file xoopsstory.php, method XoopsStory::setTopicdisplay()
setTopicId | in file xoopsstory.php, method XoopsStory::setTopicId()
setTopicImgurl | in file xoopstopic.php, method XoopsTopic::setTopicImgurl()
setTopicPid | in file xoopstopic.php, method XoopsTopic::setTopicPid()
setTopicTitle | in file xoopstopic.php, method XoopsTopic::setTopicTitle()
setToUsers | in file xoopsmailer.php, method XoopsMailer::setToUsers()
setType | in file xoopsstory.php, method XoopsStory::setType()
setUid | in file xoopsstory.php, method XoopsStory::setUid()
setValue in file grouppermform.php, method XoopsGroupFormCheckBox::setValue()
Sets pre-selected values
setValue in file formselect.php, method XoopsFormSelect::setValue()
Set pre-selected values
setValue in file formhidden.php, method XoopsFormHidden::setValue()
Sets the "value" attribute
setValue in file formpassword.php, method XoopsFormPassword::setValue()
Set the initial value
setValue in file formcheckbox.php, method XoopsFormCheckBox::setValue()
Set the "value"
setValue in file formbutton.php, method XoopsFormButton::setValue()
Set the initial value
setValue in file formtext.php, method XoopsFormText::setValue()
Set initial text value
setValue in file formradio.php, method XoopsFormRadio::setValue()
Set the pre-selected value
setValue in file formtextarea.php, method XoopsFormTextArea::setValue()
Set initial content
SetWordWrap in file class.phpmailer.php, method PHPMailer::SetWordWrap()
Set the body wrapping.
setWorkingLevel in file xmlrpcparser.php, method XoopsXmlRpcParser::setWorkingLevel()
This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
set_file_contents in file Config_File.class.php, method Config_File::set_file_contents()
Store the contents of a file manually.
set_path in file Config_File.class.php, method Config_File::set_path()
Set the path where configuration files can be found.
set_submit_multipart | in file snoopy.php, method Snoopy::set_submit_multipart()
set_submit_normal | in file snoopy.php, method Snoopy::set_submit_normal()
set_submit_xml | in file snoopy.php, method Snoopy::set_submit_xml()
show in file module.errorhandler.php, method ErrorHandler::show()
Show an error message
showThreadFoot | in file xoopscomments.php, method XoopsComments::showThreadFoot()
showThreadHead | in file xoopscomments.php, method XoopsComments::showThreadHead()
showThreadPost | in file xoopscomments.php, method XoopsComments::showThreadPost()
showTreeFoot | in file xoopscomments.php, method XoopsComments::showTreeFoot()
showTreeHead | in file xoopscomments.php, method XoopsComments::showTreeHead()
showTreeItem | in file xoopscomments.php, method XoopsComments::showTreeItem()
Smarty | in file Smarty.class.php, class Smarty
Smarty in file Smarty.class.php, method Smarty::Smarty()
The class constructor.
shared.escape_special_chars.php | procedural page shared.escape_special_chars.php
shared.make_timestamp.php | procedural page shared.make_timestamp.php
Smarty.class.php | procedural page Smarty.class.php
Smarty_Compiler.class.php | procedural page Smarty_Compiler.class.php
smarty_block_textformat in file block.textformat.php, function smarty_block_textformat()
Smarty {textformat}{/textformat} block plugin
Smarty_Compiler in file Smarty_Compiler.class.php, class Smarty_Compiler
Template compiling class
Smarty_Compiler in file Smarty_Compiler.class.php, method Smarty_Compiler::Smarty_Compiler()
The class constructor.
smarty_compiler_assign in file compiler.assign.php, function smarty_compiler_assign()
Smarty {assign} compiler function plugin
smarty_compiler_foreachq in file compiler.foreachq.php, function smarty_compiler_foreachq()
Quick foreach template plug-in
smarty_compiler_includeq in file compiler.includeq.php, function smarty_compiler_includeq()
Quick include template plug-in
smarty_compiler_xoAppUrl in file compiler.xoAppUrl.php, function smarty_compiler_xoAppUrl()
Inserts the URL of an application page
smarty_compiler_xoImgUrl in file compiler.xoImgUrl.php, function smarty_compiler_xoImgUrl()
Inserts the URL of a file resource customizable by themes
smarty_core_assemble_plugin_filepath in file core.assemble_plugin_filepath.php, function smarty_core_assemble_plugin_filepath()
assemble filepath of requested plugin
smarty_core_assign_smarty_interface in file core.assign_smarty_interface.php, function smarty_core_assign_smarty_interface()
Smarty assign_smarty_interface core plugin
smarty_core_create_dir_structure in file core.create_dir_structure.php, function smarty_core_create_dir_structure()
create full directory structure
SMARTY_CORE_DIR | in file Smarty.class.php, constant SMARTY_CORE_DIR
smarty_core_display_debug_console in file core.display_debug_console.php, function smarty_core_display_debug_console()
Smarty debug_console function plugin
smarty_core_get_include_path in file core.get_include_path.php, function smarty_core_get_include_path()
Get path to file from include_path
smarty_core_get_microtime in file core.get_microtime.php, function smarty_core_get_microtime()
Get seconds and microseconds
smarty_core_get_php_resource in file core.get_php_resource.php, function smarty_core_get_php_resource()
Retrieves PHP script resource
smarty_core_is_secure in file core.is_secure.php, function smarty_core_is_secure()
determines if a resource is secure or not.
smarty_core_is_trusted in file core.is_trusted.php, function smarty_core_is_trusted()
determines if a resource is trusted or not
smarty_core_load_plugins in file core.load_plugins.php, function smarty_core_load_plugins()
Load requested plugins
smarty_core_load_resource_plugin in file core.load_resource_plugin.php, function smarty_core_load_resource_plugin()
load a resource plugin
smarty_core_process_cached_inserts in file core.process_cached_inserts.php, function smarty_core_process_cached_inserts()
Replace cached inserts with the actual results
smarty_core_process_compiled_include in file core.process_compiled_include.php, function smarty_core_process_compiled_include()
Replace nocache-tags by results of the corresponding non-cacheable functions and return it
smarty_core_read_cache_file in file core.read_cache_file.php, function smarty_core_read_cache_file()
read a cache file, determine if it needs to be regenerated or not
smarty_core_rmdir in file core.rmdir.php, function smarty_core_rmdir()
delete a dir recursively (level=0 -> keep root) WARNING: no tests, it will try to remove what you tell it!
smarty_core_rm_auto in file core.rm_auto.php, function smarty_core_rm_auto()
delete an automagically created file by name and id
smarty_core_run_insert_handler in file core.run_insert_handler.php, function smarty_core_run_insert_handler()
Handle insert tags
smarty_core_smarty_include_php in file core.smarty_include_php.php, function smarty_core_smarty_include_php()
called for included php files within templates
smarty_core_write_cache_file in file core.write_cache_file.php, function smarty_core_write_cache_file()
Prepend the cache information to the cache file and write it
smarty_core_write_compiled_include in file core.write_compiled_include.php, function smarty_core_write_compiled_include()
Extract non-cacheable parts out of compiled template and write it
smarty_core_write_compiled_resource in file core.write_compiled_resource.php, function smarty_core_write_compiled_resource()
write the compiled resource
smarty_core_write_file in file core.write_file.php, function smarty_core_write_file()
write out a file to disk
SMARTY_DIR in file Smarty.class.php, constant SMARTY_DIR
set SMARTY_DIR to absolute path to Smarty library files.
smarty_function_assign_debug_info in file function.assign_debug_info.php, function smarty_function_assign_debug_info()
Smarty {assign_debug_info} function plugin
smarty_function_config_load in file function.config_load.php, function smarty_function_config_load()
Smarty {config_load} function plugin
smarty_function_counter in file function.counter.php, function smarty_function_counter()
Smarty {counter} function plugin
smarty_function_cycle in file function.cycle.php, function smarty_function_cycle()
Smarty {cycle} function plugin
smarty_function_debug in file function.debug.php, function smarty_function_debug()
Smarty {debug} function plugin
smarty_function_escape_special_chars in file shared.escape_special_chars.php, function smarty_function_escape_special_chars()
escape_special_chars common function
smarty_function_eval in file function.eval.php, function smarty_function_eval()
Smarty {eval} function plugin
smarty_function_fetch in file function.fetch.php, function smarty_function_fetch()
Smarty {fetch} plugin
smarty_function_html_checkboxes in file function.html_checkboxes.php, function smarty_function_html_checkboxes()
Smarty {html_checkboxes} function plugin
smarty_function_html_checkboxes_output | in file function.html_checkboxes.php, function smarty_function_html_checkboxes_output()
smarty_function_html_image in file function.html_image.php, function smarty_function_html_image()
Smarty {html_image} function plugin
smarty_function_html_options in file function.html_options.php, function smarty_function_html_options()
Smarty {html_options} function plugin
smarty_function_html_options_optgroup | in file function.html_options.php, function smarty_function_html_options_optgroup()
smarty_function_html_options_optoutput | in file function.html_options.php, function smarty_function_html_options_optoutput()
smarty_function_html_radios in file function.html_radios.php, function smarty_function_html_radios()
Smarty {html_radios} function plugin
smarty_function_html_radios_output | in file function.html_radios.php, function smarty_function_html_radios_output()
smarty_function_html_select_date in file function.html_select_date.php, function smarty_function_html_select_date()
Smarty {html_select_date} plugin
smarty_function_html_select_time in file function.html_select_time.php, function smarty_function_html_select_time()
Smarty {html_select_time} function plugin
smarty_function_html_table in file function.html_table.php, function smarty_function_html_table()
Smarty {html_table} function plugin
smarty_function_html_table_cycle | in file function.html_table.php, function smarty_function_html_table_cycle()
smarty_function_mailto in file function.mailto.php, function smarty_function_mailto()
Smarty {mailto} function plugin
smarty_function_math in file function.math.php, function smarty_function_math()
Smarty {math} function plugin
smarty_function_popup in file function.popup.php, function smarty_function_popup()
Smarty {popup} function plugin
smarty_function_popup_init in file function.popup_init.php, function smarty_function_popup_init()
Smarty {popup_init} function plugin
smarty_function_xoInboxCount | in file function.xoInboxCount.php, function smarty_function_xoInboxCount()
smarty_function_xoops_link | in file function.xoops_link.php, function smarty_function_xoops_link()
smarty_make_timestamp in file shared.make_timestamp.php, function smarty_make_timestamp()
Function: smarty_make_timestamp
Purpose: used by other smarty functions to make a timestamp from a string.
smarty_modifier_capitalize in file modifier.capitalize.php, function smarty_modifier_capitalize()
Smarty capitalize modifier plugin
smarty_modifier_capitalize_ucfirst | in file modifier.capitalize.php, function smarty_modifier_capitalize_ucfirst()
smarty_modifier_cat in file modifier.cat.php, function smarty_modifier_cat()
Smarty cat modifier plugin
smarty_modifier_count_characters in file modifier.count_characters.php, function smarty_modifier_count_characters()
Smarty count_characters modifier plugin
smarty_modifier_count_paragraphs in file modifier.count_paragraphs.php, function smarty_modifier_count_paragraphs()
Smarty count_paragraphs modifier plugin
smarty_modifier_count_sentences in file modifier.count_sentences.php, function smarty_modifier_count_sentences()
Smarty count_sentences modifier plugin
smarty_modifier_count_words in file modifier.count_words.php, function smarty_modifier_count_words()
Smarty count_words modifier plugin
smarty_modifier_date_format in file modifier.date_format.php, function smarty_modifier_date_format()
Smarty date_format modifier plugin
smarty_modifier_debug_print_var in file modifier.debug_print_var.php, function smarty_modifier_debug_print_var()
Smarty debug_print_var modifier plugin
smarty_modifier_default in file modifier.default.php, function smarty_modifier_default()
Smarty default modifier plugin
smarty_modifier_escape in file modifier.escape.php, function smarty_modifier_escape()
Smarty escape modifier plugin
smarty_modifier_indent in file modifier.indent.php, function smarty_modifier_indent()
Smarty indent modifier plugin
smarty_modifier_lower in file modifier.lower.php, function smarty_modifier_lower()
Smarty lower modifier plugin
smarty_modifier_nl2br in file modifier.nl2br.php, function smarty_modifier_nl2br()
Smarty plugin
smarty_modifier_regex_replace in file modifier.regex_replace.php, function smarty_modifier_regex_replace()
Smarty regex_replace modifier plugin
smarty_modifier_replace in file modifier.replace.php, function smarty_modifier_replace()
Smarty replace modifier plugin
smarty_modifier_spacify in file modifier.spacify.php, function smarty_modifier_spacify()
Smarty spacify modifier plugin
smarty_modifier_string_format in file modifier.string_format.php, function smarty_modifier_string_format()
Smarty string_format modifier plugin
smarty_modifier_strip in file modifier.strip.php, function smarty_modifier_strip()
Smarty strip modifier plugin
smarty_modifier_strip_tags in file modifier.strip_tags.php, function smarty_modifier_strip_tags()
Smarty strip_tags modifier plugin
smarty_modifier_truncate in file modifier.truncate.php, function smarty_modifier_truncate()
Smarty truncate modifier plugin
smarty_modifier_upper in file modifier.upper.php, function smarty_modifier_upper()
Smarty upper modifier plugin
smarty_modifier_wordwrap in file modifier.wordwrap.php, function smarty_modifier_wordwrap()
Smarty wordwrap modifier plugin
smarty_outputfilter_trimwhitespace in file outputfilter.trimwhitespace.php, function smarty_outputfilter_trimwhitespace()
Smarty trimwhitespace outputfilter plugin
smarty_outputfilter_trimwhitespace_replace | in file outputfilter.trimwhitespace.php, function smarty_outputfilter_trimwhitespace_replace()
SMARTY_PHP_ALLOW | in file Smarty.class.php, constant SMARTY_PHP_ALLOW
SMARTY_PHP_PASSTHRU | in file Smarty.class.php, constant SMARTY_PHP_PASSTHRU
SMARTY_PHP_QUOTE | in file Smarty.class.php, constant SMARTY_PHP_QUOTE
SMARTY_PHP_REMOVE | in file Smarty.class.php, constant SMARTY_PHP_REMOVE
smarty_resource_db_secure | in file resource.db.php, function smarty_resource_db_secure()
smarty_resource_db_source | in file resource.db.php, function smarty_resource_db_source()
smarty_resource_db_timestamp | in file resource.db.php, function smarty_resource_db_timestamp()
smarty_resource_db_tplinfo | in file resource.db.php, function smarty_resource_db_tplinfo()
smarty_resource_db_trusted | in file resource.db.php, function smarty_resource_db_trusted()
smiley in file module.textsanitizer.php, method MyTextSanitizer::smiley()
Replace emoticons in the message with smiley images
SMTP in file class.smtp.php, method SMTP::SMTP()
Initialize the class so that the data is in a known state.
SMTP in file class.smtp.php, class SMTP
SMTP is rfc 821 compliant and implements all the rfc 821 SMTP commands except TURN which will always return a not implemented error. SMTP also provides some utility methods for sending mail to an SMTP server.
SmtpClose in file class.phpmailer.php, method PHPMailer::SmtpClose()
Closes the active SMTP session if one exists.
SmtpConnect in file class.phpmailer.php, method PHPMailer::SmtpConnect()
Initiates a connection to an SMTP server. Returns false if the operation failed.
SmtpSend in file class.phpmailer.php, method PHPMailer::SmtpSend()
Sends mail via SMTP using PhpSMTP (Author: Chris Ryan). Returns bool. Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
Snoopy in file snoopy.php, class Snoopy
***********************************************
snoopy.php | procedural page snoopy.php
splitMySqlFile in file sqlutility.php, method SqlUtility::splitMySqlFile()
Function from phpMyAdmin (http://phpwizard.net/projects/phpMyAdmin/)
SqlUtility in file sqlutility.php, class SqlUtility
provide some utility methods for databases
startTime in file logger.php, method XoopsLogger::startTime()
Start a timer
stopTime in file logger.php, method XoopsLogger::stopTime()
Stop a timer
store | in file xoopstopic.php, method XoopsTopic::store()
store | in file xoopscomments.php, method XoopsComments::store()
store | in file xoopsblock.php, method XoopsBlock::store()
store | in file xoopsstory.php, method XoopsStory::store()
Story | in file xoopsstory.php, method XoopsStory::Story()
storyid | in file xoopsstory.php, method XoopsStory::storyid()
stripSlashesGPC | in file module.textsanitizer.php, method MyTextSanitizer::stripSlashesGPC()
submit | in file snoopy.php, method Snoopy::submit()
submitlinks | in file snoopy.php, method Snoopy::submitlinks()
submittext | in file snoopy.php, method Snoopy::submittext()
supportedMethods | in file movabletypeapi.php, method MovableTypeApi::supportedMethods()
suspend in file auth_provisionning.php, method XoopsAuthProvisionning::suspend()
Suspend a user
sync in file auth_provisionning.php, method XoopsAuthProvisionning::sync()
Launch the synchronisation process
saxparser.php | procedural page saxparser.php
simpleform.php | procedural page simpleform.php
top
t
$table | in file xoopstopic.php, variable XoopsTopic::$table
$table | in file xoopstree.php, variable XoopsTree::$table
$table | in file xoopsstory.php, variable XoopsStory::$table
$tagHandlers | in file saxparser.php, variable SaxParser::$tagHandlers
$tags | in file saxparser.php, variable SaxParser::$tags
$targetEncoding | in file saxparser.php, variable SaxParser::$targetEncoding
$targetFileName | in file uploader.php, variable XoopsMediaUploader::$targetFileName
$tar_file in file class.tar.php, variable tar::$tar_file
Unprocessed Archive Information
$tempArr | in file themesetparser.php, variable XoopsThemeSetParser::$tempArr
$template in file theme.php, variable xos_opal_Theme::$template
Pointer to the theme template engine
$template | in file xoopsmailer.php, variable XoopsMailer::$template
$templatedir | in file xoopsmailer.php, variable XoopsMailer::$templatedir
$templatesData | in file themesetparser.php, variable XoopsThemeSetParser::$templatesData
$templateVars in file theme.php, variable xos_opal_Theme::$templateVars
Custom variables that will always be assigned to the template
$template_dir in file Smarty.class.php, variable Smarty::$template_dir
The name of the directory where templates are located.
$template_dir | in file template.php, variable XoopsTpl::$template_dir
$temp_dir | in file snoopy.php, variable Snoopy::$temp_dir
$theme | in file theme_blocks.php, variable xos_logos_PageBuilder::$theme
$themeSetData | in file themesetparser.php, variable XoopsThemeSetParser::$themeSetData
$timed_out | in file snoopy.php, variable Snoopy::$timed_out
$Timeout in file class.phpmailer.php, variable PHPMailer::$Timeout
Sets the SMTP server timeout in seconds. This function will not work with the win32 version.
$title | in file xoopsstory.php, variable XoopsStory::$title
$title | in file xoopstree.php, variable XoopsTree::$title
$to | in file class.phpmailer.php, variable PHPMailer::$to
$toEmails | in file xoopsmailer.php, variable XoopsMailer::$toEmails
$topicalign | in file xoopsstory.php, variable XoopsStory::$topicalign
$topicdisplay | in file xoopsstory.php, variable XoopsStory::$topicdisplay
$topicid | in file xoopsstory.php, variable XoopsStory::$topicid
$topicstable | in file xoopsstory.php, variable XoopsStory::$topicstable
$topic_id | in file xoopstopic.php, variable XoopsTopic::$topic_id
$topic_imgurl | in file xoopstopic.php, variable XoopsTopic::$topic_imgurl
$topic_pid | in file xoopstopic.php, variable XoopsTopic::$topic_pid
$topic_title | in file xoopstopic.php, variable XoopsTopic::$topic_title
$total | in file pagenav.php, variable XoopsPageNav::$total
$toUsers | in file xoopsmailer.php, variable XoopsMailer::$toUsers
$trusted_dir in file Smarty.class.php, variable Smarty::$trusted_dir
This is an array of directories where trusted php scripts reside.
$type | in file xoopsstory.php, variable XoopsStory::$type
tar in file class.tar.php, method tar::tar()
Class Constructor -- Does nothing...
tar in file class.tar.php, class tar
tar Class
tardownloader.php | procedural page tardownloader.php
template.php | procedural page template.php
template_exists in file Smarty.class.php, method Smarty::template_exists()
Checks whether requested template exists.
TextLine in file class.phpmailer.php, method PHPMailer::TextLine()
Returns a formatted mail line.
theme.php | procedural page theme.php
ThemeSetAuthorHandler | in file themesetparser.php, method ThemeSetAuthorHandler::ThemeSetAuthorHandler()
ThemeSetAuthorHandler in file themesetparser.php, class ThemeSetAuthorHandler
*****************************************************************************
ThemeSetDateCreatedHandler in file themesetparser.php, class ThemeSetDateCreatedHandler
*****************************************************************************
ThemeSetDateCreatedHandler | in file themesetparser.php, method ThemeSetDateCreatedHandler::ThemeSetDateCreatedHandler()
ThemeSetDescriptionHandler | in file themesetparser.php, method ThemeSetDescriptionHandler::ThemeSetDescriptionHandler()
ThemeSetDescriptionHandler in file themesetparser.php, class ThemeSetDescriptionHandler
*****************************************************************************
ThemeSetEmailHandler in file themesetparser.php, class ThemeSetEmailHandler
*****************************************************************************
ThemeSetEmailHandler | in file themesetparser.php, method ThemeSetEmailHandler::ThemeSetEmailHandler()
ThemeSetFileTypeHandler in file themesetparser.php, class ThemeSetFileTypeHandler
*****************************************************************************
ThemeSetFileTypeHandler | in file themesetparser.php, method ThemeSetFileTypeHandler::ThemeSetFileTypeHandler()
ThemeSetGeneratorHandler | in file themesetparser.php, method ThemeSetGeneratorHandler::ThemeSetGeneratorHandler()
ThemeSetGeneratorHandler in file themesetparser.php, class ThemeSetGeneratorHandler
*****************************************************************************
ThemeSetImageHandler in file themesetparser.php, class ThemeSetImageHandler
*****************************************************************************
ThemeSetImageHandler | in file themesetparser.php, method ThemeSetImageHandler::ThemeSetImageHandler()
ThemeSetLinkHandler | in file themesetparser.php, method ThemeSetLinkHandler::ThemeSetLinkHandler()
ThemeSetLinkHandler in file themesetparser.php, class ThemeSetLinkHandler
*****************************************************************************
ThemeSetModuleHandler | in file themesetparser.php, method ThemeSetModuleHandler::ThemeSetModuleHandler()
ThemeSetModuleHandler in file themesetparser.php, class ThemeSetModuleHandler
*****************************************************************************
ThemeSetNameHandler in file themesetparser.php, class ThemeSetNameHandler
*****************************************************************************
ThemeSetNameHandler | in file themesetparser.php, method ThemeSetNameHandler::ThemeSetNameHandler()
ThemeSetTagHandler in file themesetparser.php, class ThemeSetTagHandler
*****************************************************************************
ThemeSetTagHandler | in file themesetparser.php, method ThemeSetTagHandler::ThemeSetTagHandler()
ThemeSetTemplateHandler | in file themesetparser.php, method ThemeSetTemplateHandler::ThemeSetTemplateHandler()
ThemeSetTemplateHandler in file themesetparser.php, class ThemeSetTemplateHandler
*****************************************************************************
theme_blocks.php | procedural page theme_blocks.php
title | in file xoopsstory.php, method XoopsStory::title()
topic | in file xoopsstory.php, method XoopsStory::topic()
topicalign | in file xoopsstory.php, method XoopsStory::topicalign()
topicdisplay | in file xoopsstory.php, method XoopsStory::topicdisplay()
topicExists | in file xoopstopic.php, method XoopsTopic::topicExists()
topicid | in file xoopsstory.php, method XoopsStory::topicid()
topic_id | in file xoopstopic.php, method XoopsTopic::topic_id()
topic_imgurl | in file xoopstopic.php, method XoopsTopic::topic_imgurl()
topic_pid | in file xoopstopic.php, method XoopsTopic::topic_pid()
topic_title | in file xoopstopic.php, method XoopsTopic::topic_title()
toTar in file class.tar.php, method tar::toTar()
Saves tar archive to a different file than the current file
toTarOutput in file class.tar.php, method tar::toTarOutput()
Sends tar archive to stdout
touch | in file template.php, method XoopsTpl::touch()
tree.php | procedural page tree.php
trigger_error in file Smarty.class.php, method Smarty::trigger_error()
trigger Smarty error
Turn in file class.smtp.php, method SMTP::Turn()
This is an optional command for SMTP that this class does not support. This method is here to make the RFC821 Definition complete for this class and __may__ be implimented in the future
type | in file xoopsstory.php, method XoopsStory::type()
themesetparser.php | procedural page themesetparser.php
tableform.php | procedural page tableform.php
themeform.php | procedural page themeform.php
top
u
$uid | in file xoopsstory.php, variable XoopsStory::$uid
$uploadDir | in file uploader.php, variable XoopsMediaUploader::$uploadDir
$url | in file theme.php, variable xos_opal_Theme::$url
$url | in file pagenav.php, variable XoopsPageNav::$url
$usePopup | in file logger.php, variable XoopsLogger::$usePopup
$user | in file snoopy.php, variable Snoopy::$user
$user | in file xmlrpcapi.php, variable XoopsXmlRpcApi::$user
$Username in file xoopsmultimailer.php, variable XoopsMultiMailer::$Username
Username for authentication with your SMTP host.
$Username in file class.phpmailer.php, variable PHPMailer::$Username
Sets SMTP username.
$use_extra_cache_id in file theme.php, variable xos_opal_Theme::$use_extra_cache_id
User extra information for cache id, like language, user groups
$use_permission | in file xoopstopic.php, variable XoopsTopic::$use_permission
$use_sub_dirs in file Smarty.class.php, variable Smarty::$use_sub_dirs
This tells Smarty whether or not to use sub dirs in the cache/ and templates_c/ directories. sub directories better organized, but may not work well with PHP safe mode enabled.
uid | in file xoopsstory.php, method XoopsStory::uid()
uname | in file xoopsstory.php, method XoopsStory::uname()
undoHtmlSpecialChars in file module.textsanitizer.php, method MyTextSanitizer::undoHtmlSpecialChars()
Reverses htmlSpecialChars()
unix2DosTime in file class.zipfile.php, method zipfile::unix2DosTime()
Converts an Unix timestamp to a four byte DOS date and time format (date in high two bytes, time in low two bytes allowing magnitude comparison).
unregister_block in file Smarty.class.php, method Smarty::unregister_block()
Unregisters block function
unregister_compiler_function in file Smarty.class.php, method Smarty::unregister_compiler_function()
Unregisters compiler function
unregister_function in file Smarty.class.php, method Smarty::unregister_function()
Unregisters custom function
unregister_modifier in file Smarty.class.php, method Smarty::unregister_modifier()
Unregisters modifier
unregister_object in file Smarty.class.php, method Smarty::unregister_object()
Unregisters object
unregister_outputfilter in file Smarty.class.php, method Smarty::unregister_outputfilter()
Unregisters an outputfilter function
unregister_postfilter in file Smarty.class.php, method Smarty::unregister_postfilter()
Unregisters a postfilter function
unregister_prefilter in file Smarty.class.php, method Smarty::unregister_prefilter()
Unregisters a prefilter function
unregister_resource in file Smarty.class.php, method Smarty::unregister_resource()
Unregisters a resource
updateComments | in file xoopsstory.php, method XoopsStory::updateComments()
updateCounter | in file xoopsstory.php, method XoopsStory::updateCounter()
upload in file uploader.php, method XoopsMediaUploader::upload()
Check the file and copy it to the destination
uploader.php | procedural page uploader.php
useAsciiEncoding in file saxparser.php, method SaxParser::useAsciiEncoding()
**************************************************************************
useIsoEncoding in file saxparser.php, method SaxParser::useIsoEncoding()
**************************************************************************
useMail | in file xoopsmailer.php, method XoopsMailer::useMail()
usePermission | in file xoopstopic.php, method XoopsTopic::usePermission()
usePM | in file xoopsmailer.php, method XoopsMailer::usePM()
useUtfEncoding in file saxparser.php, method SaxParser::useUtfEncoding()
**************************************************************************
top
v
$value | in file criteria.php, variable Criteria::$value
$Version in file class.phpmailer.php, variable PHPMailer::$Version
Holds PHPMailer version.
validateToken in file xoopssecurity.php, method XoopsSecurity::validateToken()
Check if a token is valid. If no token is specified, $_REQUEST['XOOPS_TOKEN_REQUEST'] is checked
Verify in file class.smtp.php, method SMTP::Verify()
Verifies that the name is recognized by the server.
top
w
$WordWrap in file class.phpmailer.php, variable PHPMailer::$WordWrap
Sets word wrapping on the body of the message to a given number of characters.
WrapText in file class.phpmailer.php, method PHPMailer::WrapText()
Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable.
top
x
$xmlInput | in file saxparser.php, variable SaxParser::$xmlInput
$xoBundleIdentifier | in file theme.php, variable xos_opal_ThemeFactory::$xoBundleIdentifier
$xoopsTagMap | in file xmlrpcapi.php, variable XoopsXmlRpcApi::$xoopsTagMap
xoopsmultimailer.php | procedural page xoopsmultimailer.php
xmlrpcapi.php | procedural page xmlrpcapi.php
xmlrpcparser.php | procedural page xmlrpcparser.php
xmlrpctag.php | procedural page xmlrpctag.php
xoopsapi.php | procedural page xoopsapi.php
xmlrss2parser.php | procedural page xmlrss2parser.php
xmltaghandler.php | procedural page xmltaghandler.php
XmlTagHandler in file xmltaghandler.php, class XmlTagHandler
*****************************************************************************
XmlTagHandler in file xmltaghandler.php, method XmlTagHandler::XmlTagHandler()
**************************************************************************
xoInit in file theme.php, method xos_opal_Theme::xoInit()
Initializes this theme
xoInit | in file theme_blocks.php, method xos_logos_PageBuilder::xoInit()
XoopsApi | in file xoopsapi.php, method XoopsApi::XoopsApi()
XoopsApi | in file xoopsapi.php, class XoopsApi
XoopsAuth | in file auth.php, class XoopsAuth
XoopsAuth in file auth.php, method XoopsAuth::XoopsAuth()
Authentication Service constructor
XoopsAuthAds in file auth_ads.php, method XoopsAuthAds::XoopsAuthAds()
Authentication Service constructor
XoopsAuthAds | in file auth_ads.php, class XoopsAuthAds
XoopsAuthFactory | in file authfactory.php, class XoopsAuthFactory
XoopsAuthLdap | in file auth_ldap.php, class XoopsAuthLdap
XoopsAuthLdap in file auth_ldap.php, method XoopsAuthLdap::XoopsAuthLdap()
Authentication Service constructor
XoopsAuthProvisionning | in file auth_provisionning.php, class XoopsAuthProvisionning
XoopsAuthProvisionning in file auth_provisionning.php, method XoopsAuthProvisionning::XoopsAuthProvisionning()
Authentication Service constructor
XoopsAuthXoops in file auth_xoops.php, method XoopsAuthXoops::XoopsAuthXoops()
Authentication Service constructor
XoopsAuthXoops | in file auth_xoops.php, class XoopsAuthXoops
XoopsBlock | in file xoopsblock.php, class XoopsBlock
XoopsBlock | in file xoopsblock.php, method XoopsBlock::XoopsBlock()
xoopsblock.php | procedural page xoopsblock.php
xoopsCodeDecode in file module.textsanitizer.php, method MyTextSanitizer::xoopsCodeDecode()
Replace XoopsCodes with their equivalent HTML formatting
XoopsCommentRenderer in file commentrenderer.php, method XoopsCommentRenderer::XoopsCommentRenderer()
Constructor
XoopsCommentRenderer in file commentrenderer.php, class XoopsCommentRenderer
Display comments
XoopsComments | in file xoopscomments.php, class XoopsComments
XoopsComments | in file xoopscomments.php, method XoopsComments::XoopsComments()
xoopscomments.php | procedural page xoopscomments.php
XoopsDatabase in file database.php, method XoopsDatabase::XoopsDatabase()
constructor
XoopsDatabase in file database.php, class XoopsDatabase
Abstract base class for Database access classes
XoopsDatabaseFactory | in file databasefactory.php, class XoopsDatabaseFactory
XoopsDatabaseFactory | in file databasefactory.php, method XoopsDatabaseFactory::XoopsDatabaseFactory()
XoopsDownloader in file downloader.php, class XoopsDownloader
Sends non HTML files through a http socket
XoopsDownloader in file downloader.php, method XoopsDownloader::XoopsDownloader()
Constructor
XoopsErrorHandler in file errorhandler.php, class XoopsErrorHandler
Backward compatibility code, do not use this class directly
XoopsErrorHandler_HandleError | in file logger.php, function XoopsErrorHandler_HandleError()
XoopsForm in file form.php, method XoopsForm::XoopsForm()
constructor
XoopsForm in file form.php, class XoopsForm
Abstract base class for forms
XoopsFormButton in file formbutton.php, method XoopsFormButton::XoopsFormButton()
Constructor
XoopsFormButton in file formbutton.php, class XoopsFormButton
A button
XoopsFormCheckBox in file formcheckbox.php, class XoopsFormCheckBox
One or more Checkbox(es)
XoopsFormCheckBox in file formcheckbox.php, method XoopsFormCheckBox::XoopsFormCheckBox()
Constructor
XoopsFormColorPicker in file formcolorpicker.php, class XoopsFormColorPicker
XoopsFormColorPicker component class file
XoopsFormColorPicker | in file formcolorpicker.php, method XoopsFormColorPicker::XoopsFormColorPicker()
XoopsFormDateTime in file formdatetime.php, class XoopsFormDateTime
Date and time selection field
XoopsFormDateTime | in file formdatetime.php, method XoopsFormDateTime::XoopsFormDateTime()
XoopsFormDhtmlTextArea in file formdhtmltextarea.php, class XoopsFormDhtmlTextArea
A textarea with xoopsish formatting and smilie buttons
XoopsFormDhtmlTextArea in file formdhtmltextarea.php, method XoopsFormDhtmlTextArea::XoopsFormDhtmlTextArea()
Constructor
XoopsFormElement in file formelement.php, method XoopsFormElement::XoopsFormElement()
constructor
XoopsFormElement in file formelement.php, class XoopsFormElement
Abstract base class for form elements
XoopsFormElementTray in file formelementtray.php, method XoopsFormElementTray::XoopsFormElementTray()
constructor
XoopsFormElementTray in file formelementtray.php, class XoopsFormElementTray
A group of form elements
XoopsFormFile in file formfile.php, method XoopsFormFile::XoopsFormFile()
Constructor
XoopsFormFile in file formfile.php, class XoopsFormFile
A file upload field
XoopsFormHidden in file formhidden.php, class XoopsFormHidden
A hidden field
XoopsFormHidden in file formhidden.php, method XoopsFormHidden::XoopsFormHidden()
Constructor
XoopsFormHiddenToken in file formhiddentoken.php, class XoopsFormHiddenToken
A hidden token field
XoopsFormHiddenToken in file formhiddentoken.php, method XoopsFormHiddenToken::XoopsFormHiddenToken()
Constructor
XoopsFormLabel in file formlabel.php, method XoopsFormLabel::XoopsFormLabel()
Constructor
XoopsFormLabel in file formlabel.php, class XoopsFormLabel
A text label
xoopsformloader.php | procedural page xoopsformloader.php
XoopsFormPassword in file formpassword.php, class XoopsFormPassword
A password field
XoopsFormPassword in file formpassword.php, method XoopsFormPassword::XoopsFormPassword()
Constructor
XoopsFormRadio in file formradio.php, method XoopsFormRadio::XoopsFormRadio()
Constructor
XoopsFormRadio in file formradio.php, class XoopsFormRadio
A Group of radiobuttons
XoopsFormRadioYN in file formradioyn.php, method XoopsFormRadioYN::XoopsFormRadioYN()
Constructor
XoopsFormRadioYN in file formradioyn.php, class XoopsFormRadioYN
Yes/No radio buttons.
XoopsFormSelect in file formselect.php, class XoopsFormSelect
A select field
XoopsFormSelect in file formselect.php, method XoopsFormSelect::XoopsFormSelect()
Constructor
XoopsFormSelectCountry in file formselectcountry.php, method XoopsFormSelectCountry::XoopsFormSelectCountry()
Constructor
XoopsFormSelectCountry in file formselectcountry.php, class XoopsFormSelectCountry
A select field with countries
XoopsFormSelectGroup in file formselectgroup.php, class XoopsFormSelectGroup
A select field with a choice of available groups
XoopsFormSelectGroup in file formselectgroup.php, method XoopsFormSelectGroup::XoopsFormSelectGroup()
Constructor
XoopsFormSelectLang in file formselectlang.php, method XoopsFormSelectLang::XoopsFormSelectLang()
Constructor
XoopsFormSelectLang in file formselectlang.php, class XoopsFormSelectLang
A select field with available languages
XoopsFormSelectMatchOption in file formselectmatchoption.php, class XoopsFormSelectMatchOption
A selection box with options for matching search terms.
XoopsFormSelectMatchOption in file formselectmatchoption.php, method XoopsFormSelectMatchOption::XoopsFormSelectMatchOption()
Constructor
XoopsFormSelectTheme in file formselecttheme.php, class XoopsFormSelectTheme
A select box with available themes
XoopsFormSelectTheme in file formselecttheme.php, method XoopsFormSelectTheme::XoopsFormSelectTheme()
Constructor
XoopsFormSelectTimezone in file formselecttimezone.php, method XoopsFormSelectTimezone::XoopsFormSelectTimezone()
Constructor
XoopsFormSelectTimezone in file formselecttimezone.php, class XoopsFormSelectTimezone
A select box with timezones
XoopsFormSelectUser in file formselectuser.php, class XoopsFormSelectUser
A group of form elements
XoopsFormSelectUser in file formselectuser.php, method XoopsFormSelectUser::XoopsFormSelectUser()
Constructor
XoopsFormText in file formtext.php, class XoopsFormText
A simple text field
XoopsFormText in file formtext.php, method XoopsFormText::XoopsFormText()
Constructor
XoopsFormTextArea in file formtextarea.php, method XoopsFormTextArea::XoopsFormTextArea()
Constuctor
XoopsFormTextArea in file formtextarea.php, class XoopsFormTextArea
A textarea
XoopsFormTextDateSelect | in file formtextdateselect.php, method XoopsFormTextDateSelect::XoopsFormTextDateSelect()
XoopsFormTextDateSelect in file formtextdateselect.php, class XoopsFormTextDateSelect
A text field with calendar popup
XoopsGroupFormCheckBox in file grouppermform.php, method XoopsGroupFormCheckBox::XoopsGroupFormCheckBox()
Constructor
XoopsGroupFormCheckBox in file grouppermform.php, class XoopsGroupFormCheckBox
Renders checkbox options for a group permission form
XoopsGroupPermForm in file grouppermform.php, method XoopsGroupPermForm::XoopsGroupPermForm()
Constructor
XoopsGroupPermForm in file grouppermform.php, class XoopsGroupPermForm
Renders a form for setting module specific group permissions
XoopsLists | in file xoopslists.php, class XoopsLists
xoopslists.php | procedural page xoopslists.php
XoopsLogger in file logger.php, class XoopsLogger
Collects information for a page request
XoopsLogger | in file logger.php, method XoopsLogger::XoopsLogger()
XoopsMailer in file xoopsmailer.php, class XoopsMailer
Class for sending mail.
XoopsMailer | in file xoopsmailer.php, method XoopsMailer::XoopsMailer()
xoopsmailer.php | procedural page xoopsmailer.php
XoopsMediaUploader in file uploader.php, method XoopsMediaUploader::XoopsMediaUploader()
Constructor
XoopsMediaUploader in file uploader.php, class XoopsMediaUploader
Upload Media files
xoopsmodule.php | procedural page xoopsmodule.php
XoopsMultiMailer in file xoopsmultimailer.php, method XoopsMultiMailer::XoopsMultiMailer()
Constuctor
XoopsMultiMailer in file xoopsmultimailer.php, class XoopsMultiMailer
Mailer Class.
XoopsMySQLDatabase in file mysqldatabase.php, class XoopsMySQLDatabase
connection to a mysql database
XoopsMySQLDatabaseProxy in file mysqldatabase.php, class XoopsMySQLDatabaseProxy
Read-Only connection to a MySQL database.
XoopsMySQLDatabaseSafe in file mysqldatabase.php, class XoopsMySQLDatabaseSafe
Safe Connection to a MySQL database.
xoopsobject.php | procedural page xoopsobject.php
XoopsObjectTree in file tree.php, class XoopsObjectTree
A tree structures with XoopsObjects as nodes
XoopsObjectTree in file tree.php, method XoopsObjectTree::XoopsObjectTree()
Constructor
XoopsPageNav in file pagenav.php, method XoopsPageNav::XoopsPageNav()
Constructor
XoopsPageNav in file pagenav.php, class XoopsPageNav
Class to facilitate navigation in a multi page document/list
XoopsSecurity | in file xoopssecurity.php, class XoopsSecurity
XoopsSecurity in file xoopssecurity.php, method XoopsSecurity::XoopsSecurity()
Constructor
xoopssecurity.php | procedural page xoopssecurity.php
XoopsSimpleForm in file simpleform.php, class XoopsSimpleForm
Form that will output as a simple HTML form with minimum formatting
XoopsStory | in file xoopsstory.php, class XoopsStory
xoopsstory.php | procedural page xoopsstory.php
XoopsTableForm in file tableform.php, class XoopsTableForm
Form that will output formatted as a HTML table
XoopsTarDownloader in file tardownloader.php, method XoopsTarDownloader::XoopsTarDownloader()
Constructor
XoopsTarDownloader in file tardownloader.php, class XoopsTarDownloader
Send tar files through a http socket
XoopsThemeForm in file themeform.php, class XoopsThemeForm
Form that will output as a theme-enabled HTML table
XoopsThemeSetParser | in file themesetparser.php, method XoopsThemeSetParser::XoopsThemeSetParser()
XoopsThemeSetParser in file themesetparser.php, class XoopsThemeSetParser
*****************************************************************************
XoopsTopic | in file xoopstopic.php, method XoopsTopic::XoopsTopic()
XoopsTopic | in file xoopstopic.php, class XoopsTopic
xoopstopic.php | procedural page xoopstopic.php
XoopsTpl | in file template.php, method XoopsTpl::XoopsTpl()
XoopsTpl in file template.php, class XoopsTpl
Template engine
XoopsTree | in file xoopstree.php, method XoopsTree::XoopsTree()
XoopsTree | in file xoopstree.php, class XoopsTree
xoopstree.php | procedural page xoopstree.php
xoopsuser.php | procedural page xoopsuser.php
XoopsXmlRpcApi | in file xmlrpcapi.php, class XoopsXmlRpcApi
XoopsXmlRpcApi | in file xmlrpcapi.php, method XoopsXmlRpcApi::XoopsXmlRpcApi()
XoopsXmlRpcArray | in file xmlrpctag.php, method XoopsXmlRpcArray::XoopsXmlRpcArray()
XoopsXmlRpcArray | in file xmlrpctag.php, class XoopsXmlRpcArray
XoopsXmlRpcBase64 | in file xmlrpctag.php, class XoopsXmlRpcBase64
XoopsXmlRpcBase64 | in file xmlrpctag.php, method XoopsXmlRpcBase64::XoopsXmlRpcBase64()
XoopsXmlRpcBoolean | in file xmlrpctag.php, class XoopsXmlRpcBoolean
XoopsXmlRpcBoolean | in file xmlrpctag.php, method XoopsXmlRpcBoolean::XoopsXmlRpcBoolean()
XoopsXmlRpcDatetime | in file xmlrpctag.php, method XoopsXmlRpcDatetime::XoopsXmlRpcDatetime()
XoopsXmlRpcDatetime | in file xmlrpctag.php, class XoopsXmlRpcDatetime
XoopsXmlRpcDocument | in file xmlrpctag.php, class XoopsXmlRpcDocument
XoopsXmlRpcDocument | in file xmlrpctag.php, method XoopsXmlRpcDocument::XoopsXmlRpcDocument()
XoopsXmlRpcDouble | in file xmlrpctag.php, class XoopsXmlRpcDouble
XoopsXmlRpcDouble | in file xmlrpctag.php, method XoopsXmlRpcDouble::XoopsXmlRpcDouble()
XoopsXmlRpcFault | in file xmlrpctag.php, class XoopsXmlRpcFault
XoopsXmlRpcFault | in file xmlrpctag.php, method XoopsXmlRpcFault::XoopsXmlRpcFault()
XoopsXmlRpcInt | in file xmlrpctag.php, class XoopsXmlRpcInt
XoopsXmlRpcInt | in file xmlrpctag.php, method XoopsXmlRpcInt::XoopsXmlRpcInt()
XoopsXmlRpcParser in file xmlrpcparser.php, class XoopsXmlRpcParser
Class RSS Parser
XoopsXmlRpcParser in file xmlrpcparser.php, method XoopsXmlRpcParser::XoopsXmlRpcParser()
Constructor of the class
XoopsXmlRpcRequest | in file xmlrpctag.php, method XoopsXmlRpcRequest::XoopsXmlRpcRequest()
XoopsXmlRpcRequest | in file xmlrpctag.php, class XoopsXmlRpcRequest
XoopsXmlRpcResponse | in file xmlrpctag.php, class XoopsXmlRpcResponse
XoopsXmlRpcString | in file xmlrpctag.php, class XoopsXmlRpcString
XoopsXmlRpcString | in file xmlrpctag.php, method XoopsXmlRpcString::XoopsXmlRpcString()
XoopsXmlRpcStruct | in file xmlrpctag.php, class XoopsXmlRpcStruct
XoopsXmlRpcStruct | in file xmlrpctag.php, method XoopsXmlRpcStruct::XoopsXmlRpcStruct()
XoopsXmlRpcTag | in file xmlrpctag.php, method XoopsXmlRpcTag::XoopsXmlRpcTag()
XoopsXmlRpcTag | in file xmlrpctag.php, class XoopsXmlRpcTag
XoopsXmlRss2Parser | in file xmlrss2parser.php, method XoopsXmlRss2Parser::XoopsXmlRss2Parser()
XoopsXmlRss2Parser in file xmlrss2parser.php, class XoopsXmlRss2Parser
*****************************************************************************
XoopsZipDownloader in file zipdownloader.php, class XoopsZipDownloader
Sends non HTML files through a http socket
XoopsZipDownloader | in file zipdownloader.php, method XoopsZipDownloader::XoopsZipDownloader()
xoops_canUpdateFromFile | in file template.php, method XoopsTpl::xoops_canUpdateFromFile()
XOOPS_C_DATABASE_INCLUDED in file database.php, constant XOOPS_C_DATABASE_INCLUDED
make sure this is only included once!
XOOPS_C_ERRORHANDLER_INCLUDED | in file module.errorhandler.php, constant XOOPS_C_ERRORHANDLER_INCLUDED
xoops_fetchFromData | in file template.php, method XoopsTpl::xoops_fetchFromData()
xoops_getTemplateDir | in file template.php, method XoopsTpl::xoops_getTemplateDir()
XOOPS_LISTS_INCLUDED | in file xoopslists.php, constant XOOPS_LISTS_INCLUDED
xoops_setCacheDir | in file template.php, method XoopsTpl::xoops_setCacheDir()
xoops_setCacheTime | in file template.php, method XoopsTpl::xoops_setCacheTime()
xoops_setCaching | in file template.php, method XoopsTpl::xoops_setCaching()
xoops_setCompileDir | in file template.php, method XoopsTpl::xoops_setCompileDir()
xoops_setDebugging | in file template.php, method XoopsTpl::xoops_setDebugging()
xoops_setTemplateDir | in file template.php, method XoopsTpl::xoops_setTemplateDir()
xoops_template_clear_module_cache in file template.php, function xoops_template_clear_module_cache()
Clear the module cache
xoops_template_touch in file template.php, function xoops_template_touch()
function to update compiled template file in templates_c folder
xos_logos_PageBuilder in file theme_blocks.php, class xos_logos_PageBuilder
xos_logos_PageBuilder main class
xos_opal_Theme | in file theme.php, class xos_opal_Theme
xos_opal_ThemeFactory in file theme.php, class xos_opal_ThemeFactory
xos_opal_ThemeFactory
top
z
zipdownloader.php | procedural page zipdownloader.php
zipfile | in file class.zipfile.php, class zipfile
top
_
$_accesskey in file formelement.php, variable XoopsFormElement::$_accesskey
Accesskey for this element
$_action in file form.php, variable XoopsForm::$_action
"action" attribute for the html form
$_additional_newline | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_additional_newline
$_auth_instance | in file auth_provisionning.php, variable XoopsAuthProvisionning::$_auth_instance
$_avar_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_avar_regexp
$_cacheable_state | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_cacheable_state
$_cache_attrs_count | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_cache_attrs_count
$_cache_include in file Smarty.class.php, variable Smarty::$_cache_include
name of optional cache include file
$_cache_include | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_cache_include
$_cache_including in file Smarty.class.php, variable Smarty::$_cache_including
indicate if the current code is used in a compiled include
$_cache_info in file Smarty.class.php, variable Smarty::$_cache_info
info that makes up a cache file
$_cache_serial | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_cache_serial
$_cache_serials in file Smarty.class.php, variable Smarty::$_cache_serials
cache serials
$_caption in file formelement.php, variable XoopsFormElement::$_caption
caption of the element
$_capture_stack | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_capture_stack
$_channelData | in file xmlrss2parser.php, variable XoopsXmlRss2Parser::$_channelData
$_class in file formelement.php, variable XoopsFormElement::$_class
HTML class for this element
$_code | in file xmlrpctag.php, variable XoopsXmlRpcFault::$_code
$_cols in file formtextarea.php, variable XoopsFormTextArea::$_cols
number of columns
$_comments | in file commentrenderer.php, variable XoopsCommentRenderer::$_comments
$_compile_id in file Smarty.class.php, variable Smarty::$_compile_id
for different compiled templates
$_config in file Smarty.class.php, variable Smarty::$_config
loaded configuration settings
$_config_data | in file Config_File.class.php, variable Config_File::$_config_data
$_config_path | in file Config_File.class.php, variable Config_File::$_config_path
$_conf_obj in file Smarty.class.php, variable Smarty::$_conf_obj
configuration object
$_current_file | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_current_file
$_current_line_no | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_current_line_no
$_cvar_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_cvar_regexp
$_dao | in file auth.php, variable XoopsAuth::$_dao
$_db_qstr_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_db_qstr_regexp
$_delimeter in file formelementtray.php, variable XoopsFormElementTray::$_delimeter
HTML to seperate the elements
$_description in file formelement.php, variable XoopsFormElement::$_description
description of the field
$_dir_perms in file Smarty.class.php, variable Smarty::$_dir_perms
default dir permissions
$_doIconCheck | in file commentrenderer.php, variable XoopsCommentRenderer::$_doIconCheck
$_ds | in file auth_ldap.php, variable XoopsAuthLdap::$_ds
$_dvar_guts_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_dvar_guts_regexp
$_dvar_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_dvar_regexp
$_elements in file form.php, variable XoopsForm::$_elements
array of XoopsFormElement objects
$_elements in file formelementtray.php, variable XoopsFormElementTray::$_elements
array of form element objects
$_errors | in file auth.php, variable XoopsAuth::$_errors
$_extra in file formelement.php, variable XoopsFormElement::$_extra
extra attributes to go in the tag
$_extra | in file xmlrpctag.php, variable XoopsXmlRpcFault::$_extra
$_extra in file form.php, variable XoopsForm::$_extra
extra information for the <form> tag
$_fault | in file xmlrpctag.php, variable XoopsXmlRpcTag::$_fault
$_file_perms in file Smarty.class.php, variable Smarty::$_file_perms
default file permissions
$_folded_blocks | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_folded_blocks
$_foreach in file Smarty.class.php, variable Smarty::$_foreach
keeps track of foreach blocks
$_fp_timeout | in file snoopy.php, variable Snoopy::$_fp_timeout
$_framedepth | in file snoopy.php, variable Snoopy::$_framedepth
$_frameurls | in file snoopy.php, variable Snoopy::$_frameurls
$_func_call_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_func_call_regexp
$_func_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_func_regexp
$_groupId in file grouppermform.php, variable XoopsGroupFormCheckBox::$_groupId
Group ID
$_hidden in file formelement.php, variable XoopsFormElement::$_hidden
hidden?
$_hiddenText in file formdhtmltextarea.php, variable XoopsFormDhtmlTextArea::$_hiddenText
Hidden text
$_httpmethod | in file snoopy.php, variable Snoopy::$_httpmethod
$_httpversion | in file snoopy.php, variable Snoopy::$_httpversion
$_imageData | in file xmlrss2parser.php, variable XoopsXmlRss2Parser::$_imageData
$_inclusion_depth in file Smarty.class.php, variable Smarty::$_inclusion_depth
current template inclusion depth
$_init_smarty_vars | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_init_smarty_vars
$_isproxy | in file snoopy.php, variable Snoopy::$_isproxy
$_items | in file xmlrss2parser.php, variable XoopsXmlRss2Parser::$_items
$_itemTree in file grouppermform.php, variable XoopsGroupPermForm::$_itemTree
Tree structure of items
$_maxFileSize in file formfile.php, variable XoopsFormFile::$_maxFileSize
Maximum size for an uploaded file
$_maxlength in file formpassword.php, variable XoopsFormPassword::$_maxlength
Maximum length of the text
$_maxlength in file formtext.php, variable XoopsFormText::$_maxlength
Maximum length of the text
$_maxlinelen in file snoopy.php, variable Snoopy::$_maxlinelen
** Private variables ***
$_memberHandler | in file commentrenderer.php, variable XoopsCommentRenderer::$_memberHandler
$_method in file form.php, variable XoopsForm::$_method
"method" attribute for the form.
$_methodName | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_methodName
$_mime_boundary | in file snoopy.php, variable Snoopy::$_mime_boundary
$_modid in file grouppermform.php, variable XoopsGroupPermForm::$_modid
Module ID
$_mod_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_mod_regexp
$_multiple in file formselect.php, variable XoopsFormSelect::$_multiple
Allow multiple selections?
$_myId | in file tree.php, variable XoopsObjectTree::$_myId
$_name in file formelement.php, variable XoopsFormElement::$_name
"name" attribute of the element
$_name in file form.php, variable XoopsForm::$_name
"name" attribute of the form
$_nocache_count | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_nocache_count
$_num_const_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_num_const_regexp
$_objects | in file tree.php, variable XoopsObjectTree::$_objects
$_obj_call_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_obj_call_regexp
$_obj_ext_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_obj_ext_regexp
$_obj_params_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_obj_params_regexp
$_obj_start_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_obj_start_regexp
$_options in file formselect.php, variable XoopsFormSelect::$_options
Options
$_options in file formradio.php, variable XoopsFormRadio::$_options
Array of Options
$_options in file formcheckbox.php, variable XoopsFormCheckBox::$_options
Availlable options
$_optionTree in file grouppermform.php, variable XoopsGroupFormCheckBox::$_optionTree
Option tree
$_param | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_param
$_parenth_param_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_parenth_param_regexp
$_parentId | in file tree.php, variable XoopsObjectTree::$_parentId
$_permDesc in file grouppermform.php, variable XoopsGroupPermForm::$_permDesc
Description of permission
$_permitted_tokens | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_permitted_tokens
$_permName in file grouppermform.php, variable XoopsGroupPermForm::$_permName
Name of permission
$_plugins in file Smarty.class.php, variable Smarty::$_plugins
table keeping track of plugins
$_plugin_info | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_plugin_info
$_qstr_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_qstr_regexp
$_redirectaddr | in file snoopy.php, variable Snoopy::$_redirectaddr
$_redirectdepth | in file snoopy.php, variable Snoopy::$_redirectdepth
$_reg_objects in file Smarty.class.php, variable Smarty::$_reg_objects
registered objects
$_reg_obj_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_reg_obj_regexp
$_required in file formelement.php, variable XoopsFormElement::$_required
required field?
$_required in file formelementtray.php, variable XoopsFormElementTray::$_required
required elements
$_required in file form.php, variable XoopsForm::$_required
required elements
$_rootId | in file tree.php, variable XoopsObjectTree::$_rootId
$_rows in file formtextarea.php, variable XoopsFormTextArea::$_rows
number of rows
$_sections in file Smarty.class.php, variable Smarty::$_sections
keeps track of sections
$_size in file formselect.php, variable XoopsFormSelect::$_size
Number of rows. "1" makes a dropdown list.
$_size in file formtext.php, variable XoopsFormText::$_size
Size
$_size in file formpassword.php, variable XoopsFormPassword::$_size
Size of the field.
$_si_qstr_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_si_qstr_regexp
$_smarty_debug_id in file Smarty.class.php, variable Smarty::$_smarty_debug_id
text in URL to enable debug mode
$_smarty_debug_info in file Smarty.class.php, variable Smarty::$_smarty_debug_info
debugging information for debug console
$_smarty_md5 in file Smarty.class.php, variable Smarty::$_smarty_md5
md5 checksum of the string 'Smarty'
$_smarty_vars in file Smarty.class.php, variable Smarty::$_smarty_vars
stores run-time $smarty.* vars
$_statusText | in file commentrenderer.php, variable XoopsCommentRenderer::$_statusText
$_strip_depth | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_strip_depth
$_submit_method | in file snoopy.php, variable Snoopy::$_submit_method
$_submit_type | in file snoopy.php, variable Snoopy::$_submit_type
$_svar_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_svar_regexp
$_tags | in file xmlrpctag.php, variable XoopsXmlRpcStruct::$_tags
$_tags | in file xmlrpctag.php, variable XoopsXmlRpcArray::$_tags
$_tags | in file xmlrpctag.php, variable XoopsXmlRpcDocument::$_tags
$_tag_stack in file Smarty.class.php, variable Smarty::$_tag_stack
keeps track of tag hierarchy
$_tempArr | in file xmlrss2parser.php, variable XoopsXmlRss2Parser::$_tempArr
$_tempArray | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_tempArray
$_tempMember | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_tempMember
$_tempName | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_tempName
$_tempStruct | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_tempStruct
$_tempValue | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_tempValue
$_title in file form.php, variable XoopsForm::$_title
title for the form
$_tpl | in file commentrenderer.php, variable XoopsCommentRenderer::$_tpl
$_tpl_vars in file Smarty.class.php, variable Smarty::$_tpl_vars
where assigned template vars are kept
$_tree | in file tree.php, variable XoopsObjectTree::$_tree
$_type in file formbutton.php, variable XoopsFormButton::$_type
Type of the button. This could be either "button", "submit", or "reset"
$_useIcons | in file commentrenderer.php, variable XoopsCommentRenderer::$_useIcons
$_value in file formcheckbox.php, variable XoopsFormCheckBox::$_value
pre-selected values in array
$_value in file formpassword.php, variable XoopsFormPassword::$_value
Initial content of the field.
$_value in file formbutton.php, variable XoopsFormButton::$_value
Value
$_value | in file xmlrpctag.php, variable XoopsXmlRpcDatetime::$_value
$_value in file formtext.php, variable XoopsFormText::$_value
Initial text
$_value in file formselect.php, variable XoopsFormSelect::$_value
Pre-selcted values
$_value in file formlabel.php, variable XoopsFormLabel::$_value
Text
$_value in file formhidden.php, variable XoopsFormHidden::$_value
Value
$_value in file formtextarea.php, variable XoopsFormTextArea::$_value
initial content
$_value | in file xmlrpctag.php, variable XoopsXmlRpcBoolean::$_value
$_value | in file xmlrpctag.php, variable XoopsXmlRpcString::$_value
$_value | in file xmlrpctag.php, variable XoopsXmlRpcInt::$_value
$_value in file formradio.php, variable XoopsFormRadio::$_value
Pre-selected value
$_value in file grouppermform.php, variable XoopsGroupFormCheckBox::$_value
Pre-selected value(s)
$_value | in file xmlrpctag.php, variable XoopsXmlRpcBase64::$_value
$_value | in file xmlrpctag.php, variable XoopsXmlRpcDouble::$_value
$_var_bracket_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_var_bracket_regexp
$_var_regexp | in file Smarty_Compiler.class.php, variable Smarty_Compiler::$_var_regexp
$_version in file Smarty.class.php, variable Smarty::$_version
Smarty version number
$_workingLevel | in file xmlrpcparser.php, variable XoopsXmlRpcParser::$_workingLevel
_add_plugin in file Smarty_Compiler.class.php, method Smarty_Compiler::_add_plugin()
add plugin
_checkAdmin | in file xmlrpcapi.php, method XoopsXmlRpcApi::_checkAdmin()
_checkUser | in file xmlrpcapi.php, method XoopsXmlRpcApi::_checkUser()
_check_timeout | in file snoopy.php, method Snoopy::_check_timeout()
_compile_arg_list | in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_arg_list()
_compile_block_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_block_tag()
compile block function tag
_compile_capture_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_capture_tag()
Compile {capture} .. {/capture} tags
_compile_compiler_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_compiler_tag()
compile the custom compiler tag
_compile_custom_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_custom_tag()
compile custom function tag
_compile_file in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_file()
compile a resource
_compile_foreach_start in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_foreach_start()
Compile {foreach ...} tag.
_compile_if_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_if_tag()
Compile {if ...} tag
_compile_include_php_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_include_php_tag()
Compile {include ...} tag
_compile_include_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_include_tag()
Compile {include ...} tag
_compile_insert_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_insert_tag()
Compile {insert ...} tag
_compile_plugin_call in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_plugin_call()
compiles call to plugin of type $type with name $name
_compile_registered_object_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_registered_object_tag()
compile a registered object tag
_compile_resource in file Smarty.class.php, method Smarty::_compile_resource()
compile the template
_compile_section_start in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_section_start()
Compile {section ...} tag
_compile_smarty_ref in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_smarty_ref()
Compiles references of type $smarty.foo
_compile_source in file Smarty.class.php, method Smarty::_compile_source()
compile the given source
_compile_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_compile_tag()
Compile a template tag
_connect | in file snoopy.php, method Snoopy::_connect()
_copyFile in file uploader.php, method XoopsMediaUploader::_copyFile()
Copy the file to its destination
_dequote in file Smarty.class.php, method Smarty::_dequote()
Remove starting and ending quotes from the string
_disconnect | in file snoopy.php, method Snoopy::_disconnect()
_eval in file Smarty.class.php, method Smarty::_eval()
wrapper for eval() retaining $this
_expandlinks | in file snoopy.php, method Snoopy::_expandlinks()
_expand_quoted_text in file Smarty_Compiler.class.php, method Smarty_Compiler::_expand_quoted_text()
expand quoted text with embedded variables
_fetch_resource_info in file Smarty.class.php, method Smarty::_fetch_resource_info()
fetch the template info. Gets timestamp, and source if get_source is true
_getPosterArray in file commentrenderer.php, method XoopsCommentRenderer::_getPosterArray()
Get an array with info about the poster
_getPosterName in file commentrenderer.php, method XoopsCommentRenderer::_getPosterName()
Get the name of the poster
_getPostFields | in file xmlrpcapi.php, method XoopsXmlRpcApi::_getPostFields()
_getTagCdata | in file xmlrpcapi.php, method XoopsXmlRpcApi::_getTagCdata()
_getTitleIcon in file commentrenderer.php, method XoopsCommentRenderer::_getTitleIcon()
Get the IMG tag for the title icon
_getXoopsApi | in file xmlrpcapi.php, method XoopsXmlRpcApi::_getXoopsApi()
_getXoopsTagMap | in file xmlrpcapi.php, method XoopsXmlRpcApi::_getXoopsTagMap()
_get_auto_filename in file Smarty.class.php, method Smarty::_get_auto_filename()
get a concrete filename for automagically created content
_get_auto_id in file Smarty.class.php, method Smarty::_get_auto_id()
returns an auto_id for auto-file-functions
_get_compile_path in file Smarty.class.php, method Smarty::_get_compile_path()
Get the compile path for this resource
_get_plugin_filepath in file Smarty.class.php, method Smarty::_get_plugin_filepath()
get filepath of requested plugin
_header in file downloader.php, method XoopsDownloader::_header()
Send the HTTP header
_httprequest | in file snoopy.php, method Snoopy::_httprequest()
_httpsrequest | in file snoopy.php, method Snoopy::_httpsrequest()
_include in file Smarty.class.php, method Smarty::_include()
wrapper for include() retaining $this
_initialize in file tree.php, method XoopsObjectTree::_initialize()
Initialize the object
_is_compiled in file Smarty.class.php, method Smarty::_is_compiled()
test if resource needs compiling
_loadAllChildItemIds in file grouppermform.php, method XoopsGroupPermForm::_loadAllChildItemIds()
Loads all child ids for an item to be used in javascript
_load_filters in file Smarty_Compiler.class.php, method Smarty_Compiler::_load_filters()
load pre- and post-filters
_makeSelBoxOptions in file tree.php, method XoopsObjectTree::_makeSelBoxOptions()
Make options for a select box from
_parse_attrs in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_attrs()
Parse attribute string
_parse_conf_var in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_conf_var()
parse configuration variable expression into PHP code
_parse_is_expr in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_is_expr()
Parse is expression
_parse_modifiers in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_modifiers()
parse modifier chain into PHP code
_parse_parenth_args in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_parenth_args()
parse arguments in function call parenthesis
_parse_resource_name in file Smarty.class.php, method Smarty::_parse_resource_name()
parse out the type and name from the resource
_parse_section_prop in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_section_prop()
parse section property expression into PHP code
_parse_var in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_var()
parse variable expression into PHP code
_parse_vars_props in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_vars_props()
compile multiple variables and section properties tokens into PHP code
_parse_var_props in file Smarty_Compiler.class.php, method Smarty_Compiler::_parse_var_props()
compile single variable and section properties token into PHP code
_pop_cacheable_state in file Smarty_Compiler.class.php, method Smarty_Compiler::_pop_cacheable_state()
check if the compilation changes from non-cacheable to cacheable state with the end of the current plugin return php-code to reflect the transition.
_pop_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_pop_tag()
pop closing tag-name
_prepare_post_body | in file snoopy.php, method Snoopy::_prepare_post_body()
_process_compiled_include_callback in file Smarty.class.php, method Smarty::_process_compiled_include_callback()
callback function for preg_replace, to call a non-cacheable block
_push_cacheable_state in file Smarty_Compiler.class.php, method Smarty_Compiler::_push_cacheable_state()
check if the compilation changes from cacheable to non-cacheable state with the beginning of the current plugin. return php-code to reflect the transition.
_push_tag in file Smarty_Compiler.class.php, method Smarty_Compiler::_push_tag()
push opening tag-name, file-name and line-number on the tag-stack
_quote_replace in file Smarty_Compiler.class.php, method Smarty_Compiler::_quote_replace()
Quote subpattern references
_read_file in file Smarty.class.php, method Smarty::_read_file()
read in a file
_renderNestReplies in file commentrenderer.php, method XoopsCommentRenderer::_renderNestReplies()
Render replies in nested view
_renderOptionTree in file grouppermform.php, method XoopsGroupFormCheckBox::_renderOptionTree()
Renders checkbox options for an item tree
_renderSmileys in file formdhtmltextarea.php, method XoopsFormDhtmlTextArea::_renderSmileys()
prepare HTML for output of the smiley list.
_renderThreadReplies in file commentrenderer.php, method XoopsCommentRenderer::_renderThreadReplies()
Render replies to a thread
_run_mod_handler in file Smarty.class.php, method Smarty::_run_mod_handler()
Handle modifiers
_setUser | in file xmlrpcapi.php, method XoopsXmlRpcApi::_setUser()
_setXoopsTagMap | in file xmlrpcapi.php, method XoopsXmlRpcApi::_setXoopsTagMap()
_set_config_var | in file Config_File.class.php, method Config_File::_set_config_var()
_smarty_cache_attrs in file Smarty.class.php, method Smarty::_smarty_cache_attrs()
get or set an array of cached attributes for function that is
_smarty_include in file Smarty.class.php, method Smarty::_smarty_include()
called for included templates
_smarty_sort_length in file Smarty_Compiler.class.php, function _smarty_sort_length()
compare to values by their string length
_stripform | in file snoopy.php, method Snoopy::_stripform()
_striplinks | in file snoopy.php, method Snoopy::_striplinks()
_striptext | in file snoopy.php, method Snoopy::_striptext()
_syntax_error in file Smarty_Compiler.class.php, method Smarty_Compiler::_syntax_error()
display Smarty syntax error
_trigger_error_msg | in file Config_File.class.php, method Config_File::_trigger_error_msg()
_trigger_fatal_error in file Smarty.class.php, method Smarty::_trigger_fatal_error()
trigger Smarty plugin error
_unlink in file Smarty.class.php, method Smarty::_unlink()
unlink a file, possibly using expiration time
__computeUnsignedChecksum in file class.tar.php, method tar::__computeUnsignedChecksum()
Computes the unsigned Checksum of a file's header to try to ensure valid file
__generateTAR in file class.tar.php, method tar::__generateTAR()
Generates a TAR file from the processed data
__parseNullPaddedString in file class.tar.php, method tar::__parseNullPaddedString()
Converts a NULL padded string to a non-NULL padded string
__parseTar in file class.tar.php, method tar::__parseTar()
This function parses the current TAR file
__readTar in file class.tar.php, method tar::__readTar()
Read a non gzipped tar file in for processing.


Generated Documentation

Welcome to default!

This documentation was generated by phpDocumentor v1.4.0a2


Todo List

class

XoopsMultiMailer

  • Make a page in the admin panel for setting mailer preferences.
Documentation generated on Tue, 28 Aug 2007 23:01:32 +0200 by phpDocumentor 1.4.0a2


phpDocumentor Parser Errors and Warnings

 Post-parsing
authfactory.php
auth_ads.php
auth_ldap.php
auth_provisionning.php
auth_xoops.php
bloggerapi.php
class.phpmailer.php
class.smtp.php
class.tar.php
class.zipfile.php
commentrenderer.php
compiler.assign.php
database.php
databasefactory.php
downloader.php
errorhandler.php
formcolorpicker.php
formelement.php
formhidden.php
formhiddentoken.php
formpassword.php
formselectuser.php
function.html_select_time.php
function.xoInboxCount.php
function.xoops_link.php
grouppermform.php
logger.php
logger_render.php
metaweblogapi.php
mimetypes.inc.php
module.errorhandler.php
module.textsanitizer.php
movabletypeapi.php
pagenav.php
phpmailer.lang-en.php
resource.db.php
saxparser.php
snoopy.php
tardownloader.php
template.php
theme.php
themesetparser.php
tree.php
uploader.php
xmlrpcapi.php
xmlrpcparser.php
xmlrpctag.php
xmlrss2parser.php
xmltaghandler.php
xoopsapi.php
xoopsblock.php
xoopscomments.php
xoopsformloader.php
xoopslists.php
xoopsmailer.php
xoopsmodule.php
xoopsmultimailer.php
xoopssecurity.php
xoopsstory.php
xoopstopic.php
xoopstree.php
xoopsuser.php
zipdownloader.php

Post-parsing

Warnings:

Warning - Class XoopsBlock parent XoopsObject not found
Warning - Class XoopsComments parent XoopsObject not found
Warning - duplicate function element "smarty_modifier_debug_print_var" in file D:\xampp\htdocs\xoops2017\class\smarty\xoops_plugins\modifier.debug_print_var.php will be ignored. Use an @ignore tag on the original if you want this case to be documented.

auth.php

Warnings:

Warning on line 34 - Unknown tag "@description" used
Warning on line 34 - DocBlock would be page-level, but precedes class "XoopsAuth", use another DocBlock to document the file

authfactory.php

Warnings:

Warning on line 34 - Unknown tag "@description" used
Warning on line 35 - DocBlock would be page-level, but precedes class "XoopsAuthFactory", use another DocBlock to document the file

auth_ads.php

Warnings:

Warning on line 34 - Unknown tag "@description" used
Warning on line 34 - Page-level DocBlock precedes "include_once XOOPS_ROOT_PATH.'/class/auth/auth_ldap.php'", use another DocBlock to document the source element
Warning on line 36 - no @package tag was used in a DocBlock for class XoopsAuthAds

auth_ldap.php

Warnings:

Warning on line 34 - Unknown tag "@description" used
Warning on line 34 - Page-level DocBlock precedes "include_once XOOPS_ROOT_PATH.'/class/auth/auth_provisionning.php'", use another DocBlock to document the source element
Warning on line 36 - no @package tag was used in a DocBlock for class XoopsAuthLdap

auth_provisionning.php

Warnings:

Warning on line 35 - Unknown tag "@description" used
Warning on line 35 - DocBlock would be page-level, but precedes class "XoopsAuthProvisionning", use another DocBlock to document the file

auth_xoops.php

Warnings:

Warning on line 34 - DocBlock would be page-level, but precedes class "XoopsAuthXoops", use another DocBlock to document the file
Warning on line 34 - Unknown tag "@description" used

bloggerapi.php

Warnings:

Warning on line 36 - no @package tag was used in a DocBlock for class BloggerApi
Warning on line 296 - File "D:\xampp\htdocs\xoops2017\class\xml\rpc\bloggerapi.php" has no page-level DocBlock, use @package in the first DocBlock to create one

class.phpmailer.php

Warnings:

Warning on line 20 - DocBlock would be page-level, but precedes class "PHPMailer", use another DocBlock to document the file

class.smtp.php

Warnings:

Warning on line 24 - DocBlock would be page-level, but precedes class "SMTP", use another DocBlock to document the file

class.tar.php

Warnings:

Warning on line 93 - DocBlock would be page-level, but precedes class "tar", use another DocBlock to document the file

class.zipfile.php

Warnings:

Warning on line 32 - no @package tag was used in a DocBlock for class zipfile
Warning on line 195 - File "D:\xampp\htdocs\xoops2017\class\class.zipfile.php" has no page-level DocBlock, use @package in the first DocBlock to create one

commentrenderer.php

Warnings:

Warning on line 39 - DocBlock would be page-level, but precedes class "XoopsCommentRenderer", use another DocBlock to document the file

Errors:

Error on line 76 - "@return" tag was used without any parameters, illegal

compiler.assign.php

Warnings:

Warning on line 20 - Unknown tag "@auther" used

database.php

Warnings:

Warning on line 123 - no @package tag was used in a DocBlock for class Database

databasefactory.php

Warnings:

Warning on line 2 - no @package tag was used in a DocBlock for class XoopsDatabaseFactory
Warning on line 65 - File "D:\xampp\htdocs\xoops2017\class\database\databasefactory.php" has no page-level DocBlock, use @package in the first DocBlock to create one

downloader.php

Warnings:

Warning on line 40 - DocBlock would be page-level, but precedes class "XoopsDownloader", use another DocBlock to document the file

errorhandler.php

Warnings:

Warning on line 34 - no @package tag was used in a DocBlock for class XoopsErrorHandler
Warning on line 50 - File "D:\xampp\htdocs\xoops2017\class\errorhandler.php" has no page-level DocBlock, use @package in the first DocBlock to create one

formcolorpicker.php

Warnings:

Warning on line 23 - DocBlock would be page-level, but precedes class "XoopsFormColorPicker", use another DocBlock to document the file

formelement.php

Warnings:

Warning on line 309 - Unknown tag "@seealso" used

formhidden.php

Warnings:

Warning on line 85 - Unknown tag "@patam" used

formhiddentoken.php

Warnings:

Warning on line 43 - no @package tag was used in a DocBlock for file D:\xampp\htdocs\xoops2017\class\xoopsform\formhiddentoken.php
Warning on line 43 - no @package tag was used in a DocBlock for class XoopsFormHiddenToken

formpassword.php

Warnings:

Warning on line 124 - Unknown tag "@patam" used

formselectuser.php

Warnings:

Warning on line 16 - Page-level DocBlock precedes "include_once XOOPS_ROOT_PATH."/class/xoopsform/formelementtray.php"", use another DocBlock to document the source element
Warning on line 20 - no @package tag was used in a DocBlock for class XoopsFormSelectUser

Errors:

Error on line 16 - include_once include's DocBlock has @package tag, illegal. ignoring tag "@package kernal"

function.html_select_time.php

Warnings:

Warning on line 23 - Unknown tag "@credits" used

function.xoInboxCount.php

Warnings:

Warning on line 28 - File "D:\xampp\htdocs\xoops2017\class\smarty\xoops_plugins\function.xoInboxCount.php" has no page-level DocBlock, use @package in the first DocBlock to create one

function.xoops_link.php

Warnings:

Warning on line 101 - File "D:\xampp\htdocs\xoops2017\class\smarty\xoops_plugins\function.xoops_link.php" has no page-level DocBlock, use @package in the first DocBlock to create one

grouppermform.php

Warnings:

Warning on line 323 - File "D:\xampp\htdocs\xoops2017\class\xoopsform\grouppermform.php" has no page-level DocBlock, use @package in the first DocBlock to create one

logger.php

Warnings:

Warning on line 189 - Unknown tag "@protected" used

logger_render.php

Warnings:

Warning on line 176 - File "D:\xampp\htdocs\xoops2017\class\logger_render.php" has no page-level DocBlock, use @package in the first DocBlock to create one

metaweblogapi.php

Warnings:

Warning on line 36 - no @package tag was used in a DocBlock for class MetaWeblogApi
Warning on line 276 - File "D:\xampp\htdocs\xoops2017\class\xml\rpc\metaweblogapi.php" has no page-level DocBlock, use @package in the first DocBlock to create one

mimetypes.inc.php

Warnings:

Warning on line 234 - File "D:\xampp\htdocs\xoops2017\class\mimetypes.inc.php" has no page-level DocBlock, use @package in the first DocBlock to create one

module.errorhandler.php

Warnings:

Warning on line 122 - File "D:\xampp\htdocs\xoops2017\class\module.errorhandler.php" has no page-level DocBlock, use @package in the first DocBlock to create one

Errors:

Error on line 51 - incorrect @global syntax. Should be @global vartype $varname or @global vartype description

module.textsanitizer.php

Warnings:

Warning on line 44 - DocBlock would be page-level, but precedes class "MyTextSanitizer", use another DocBlock to document the file

movabletypeapi.php

Warnings:

Warning on line 36 - no @package tag was used in a DocBlock for class MovableTypeApi
Warning on line 81 - File "D:\xampp\htdocs\xoops2017\class\xml\rpc\movabletypeapi.php" has no page-level DocBlock, use @package in the first DocBlock to create one

pagenav.php

Warnings:

Warning on line 41 - DocBlock would be page-level, but precedes class "XoopsPageNav", use another DocBlock to document the file

phpmailer.lang-en.php

Warnings:

Warning on line 22 - File "D:\xampp\htdocs\xoops2017\class\mail\phpmailer\language\phpmailer.lang-en.php" has no page-level DocBlock, use @package in the first DocBlock to create one

resource.db.php

Warnings:

Warning on line 86 - File "D:\xampp\htdocs\xoops2017\class\smarty\xoops_plugins\resource.db.php" has no page-level DocBlock, use @package in the first DocBlock to create one

saxparser.php

Warnings:

Warning on line 16 - no @package tag was used in a DocBlock for class SaxParser
Warning on line 372 - File "D:\xampp\htdocs\xoops2017\class\xml\saxparser.php" has no page-level DocBlock, use @package in the first DocBlock to create one

snoopy.php

Warnings:

Warning on line 38 - no @package tag was used in a DocBlock for class Snoopy
Warning on line 1275 - File "D:\xampp\htdocs\xoops2017\class\snoopy.php" has no page-level DocBlock, use @package in the first DocBlock to create one

tardownloader.php

Warnings:

Warning on line 176 - File "D:\xampp\htdocs\xoops2017\class\tardownloader.php" has no page-level DocBlock, use @package in the first DocBlock to create one

template.php

Warnings:

Warning on line 174 - File "D:\xampp\htdocs\xoops2017\class\template.php" has no page-level DocBlock, use @package in the first DocBlock to create one

Errors:

Error on line 160 - "@return" tag was used without any parameters, illegal

theme.php

Warnings:

Warning on line 76 - no @package tag was used in a DocBlock for class xos_opal_Theme
Warning on line 172 - Unknown tag "@tasktype" used
Warning on line 394 - Unknown tag "@tasktype" used
Warning on line 563 - docblock template never terminated with /**#@-*/

themesetparser.php

Warnings:

Warning on line 38 - no @package tag was used in a DocBlock for class XoopsThemeSetParser
Warning on line 121 - no @package tag was used in a DocBlock for class ThemeSetDateCreatedHandler
Warning on line 146 - no @package tag was used in a DocBlock for class ThemeSetAuthorHandler
Warning on line 169 - no @package tag was used in a DocBlock for class ThemeSetDescriptionHandler
Warning on line 196 - no @package tag was used in a DocBlock for class ThemeSetGeneratorHandler
Warning on line 220 - no @package tag was used in a DocBlock for class ThemeSetNameHandler
Warning on line 247 - no @package tag was used in a DocBlock for class ThemeSetEmailHandler
Warning on line 271 - no @package tag was used in a DocBlock for class ThemeSetLinkHandler
Warning on line 295 - no @package tag was used in a DocBlock for class ThemeSetTemplateHandler
Warning on line 319 - no @package tag was used in a DocBlock for class ThemeSetImageHandler
Warning on line 343 - no @package tag was used in a DocBlock for class ThemeSetModuleHandler
Warning on line 368 - no @package tag was used in a DocBlock for class ThemeSetFileTypeHandler
Warning on line 392 - no @package tag was used in a DocBlock for class ThemeSetTagHandler
Warning on line 414 - File "D:\xampp\htdocs\xoops2017\class\xml\themesetparser.php" has no page-level DocBlock, use @package in the first DocBlock to create one

tree.php

Warnings:

Warning on line 40 - DocBlock would be page-level, but precedes class "XoopsObjectTree", use another DocBlock to document the file

Errors:

Error on line 184 - "@return" tag was used without any parameters, illegal

uploader.php

Warnings:

Warning on line 84 - DocBlock would be page-level, but precedes class "XoopsMediaUploader", use another DocBlock to document the file

xmlrpcapi.php

Warnings:

Warning on line 33 - no @package tag was used in a DocBlock for class XoopsXmlRpcApi
Warning on line 166 - File "D:\xampp\htdocs\xoops2017\class\xml\rpc\xmlrpcapi.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xmlrpcparser.php

Warnings:

Warning on line 473 - no @package tag was used in a DocBlock for class RpcMethodNameHandler
Warning on line 505 - no @package tag was used in a DocBlock for class RpcIntHandler
Warning on line 537 - no @package tag was used in a DocBlock for class RpcDoubleHandler
Warning on line 570 - no @package tag was used in a DocBlock for class RpcBooleanHandler
Warning on line 603 - no @package tag was used in a DocBlock for class RpcStringHandler
Warning on line 635 - no @package tag was used in a DocBlock for class RpcDateTimeHandler
Warning on line 672 - no @package tag was used in a DocBlock for class RpcBase64Handler
Warning on line 704 - no @package tag was used in a DocBlock for class RpcNameHandler
Warning on line 743 - no @package tag was used in a DocBlock for class RpcValueHandler
Warning on line 825 - no @package tag was used in a DocBlock for class RpcMemberHandler
Warning on line 874 - no @package tag was used in a DocBlock for class RpcArrayHandler
Warning on line 922 - no @package tag was used in a DocBlock for class RpcStructHandler
Warning on line 968 - File "D:\xampp\htdocs\xoops2017\class\xml\rpc\xmlrpcparser.php" has no page-level DocBlock, use @package in the first DocBlock to create one

Errors:

Error on line 143 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 169 - "@return" tag was used without any parameters, illegal
Error on line 169 - "@param" tag was used without any parameters, illegal
Error on line 169 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 183 - "@return" tag was used without any parameters, illegal
Error on line 183 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 183 - "@param" tag was used without any parameters, illegal
Error on line 197 - "@param" tag was used without any parameters, illegal
Error on line 197 - "@return" tag was used without any parameters, illegal
Error on line 197 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 226 - "@return" tag was used without any parameters, illegal
Error on line 226 - "@param" tag was used without any parameters, illegal
Error on line 226 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 240 - "@return" tag was used without any parameters, illegal
Error on line 240 - "@param" tag was used without any parameters, illegal
Error on line 240 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 254 - "@param" tag was used without any parameters, illegal
Error on line 254 - "@return" tag was used without any parameters, illegal
Error on line 254 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 268 - "@return" tag was used without any parameters, illegal
Error on line 268 - "@param" tag was used without any parameters, illegal
Error on line 268 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 282 - "@param" tag was used without any parameters, illegal
Error on line 282 - "@return" tag was used without any parameters, illegal
Error on line 282 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 296 - "@return" tag was used without any parameters, illegal
Error on line 296 - "@param" tag was used without any parameters, illegal
Error on line 296 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 310 - "@return" tag was used without any parameters, illegal
Error on line 310 - "@param" tag was used without any parameters, illegal
Error on line 310 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 324 - "@return" tag was used without any parameters, illegal
Error on line 324 - "@param" tag was used without any parameters, illegal
Error on line 324 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 338 - "@return" tag was used without any parameters, illegal
Error on line 338 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 338 - "@param" tag was used without any parameters, illegal
Error on line 353 - "@param" tag was used without any parameters, illegal
Error on line 353 - "@return" tag was used without any parameters, illegal
Error on line 353 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 367 - "@return" tag was used without any parameters, illegal
Error on line 367 - "@param" tag was used without any parameters, illegal
Error on line 367 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 381 - "@return" tag was used without any parameters, illegal
Error on line 381 - "@param" tag was used without any parameters, illegal
Error on line 381 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 395 - "@param" tag was used without any parameters, illegal
Error on line 395 - "@return" tag was used without any parameters, illegal
Error on line 395 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 409 - "@return" tag was used without any parameters, illegal
Error on line 409 - "@param" tag was used without any parameters, illegal
Error on line 409 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 423 - "@param" tag was used without any parameters, illegal
Error on line 423 - "@return" tag was used without any parameters, illegal
Error on line 423 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 437 - "@param" tag was used without any parameters, illegal
Error on line 437 - "@return" tag was used without any parameters, illegal
Error on line 437 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 451 - "@return" tag was used without any parameters, illegal
Error on line 451 - "@param" tag was used without any parameters, illegal
Error on line 451 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 465 - "@param" tag was used without any parameters, illegal
Error on line 465 - "@return" tag was used without any parameters, illegal
Error on line 465 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 484 - "@return" tag was used without any parameters, illegal
Error on line 484 - "@param" tag was used without any parameters, illegal
Error on line 484 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 498 - "@return" tag was used without any parameters, illegal
Error on line 498 - "@param" tag was used without any parameters, illegal
Error on line 498 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 516 - "@return" tag was used without any parameters, illegal
Error on line 516 - "@param" tag was used without any parameters, illegal
Error on line 516 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 530 - "@return" tag was used without any parameters, illegal
Error on line 530 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 530 - "@param" tag was used without any parameters, illegal
Error on line 548 - "@param" tag was used without any parameters, illegal
Error on line 548 - "@return" tag was used without any parameters, illegal
Error on line 548 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 562 - "@return" tag was used without any parameters, illegal
Error on line 562 - "@param" tag was used without any parameters, illegal
Error on line 562 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 581 - "@return" tag was used without any parameters, illegal
Error on line 581 - "@param" tag was used without any parameters, illegal
Error on line 581 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 595 - "@param" tag was used without any parameters, illegal
Error on line 595 - "@return" tag was used without any parameters, illegal
Error on line 595 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 614 - "@return" tag was used without any parameters, illegal
Error on line 614 - "@param" tag was used without any parameters, illegal
Error on line 614 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 628 - "@param" tag was used without any parameters, illegal
Error on line 628 - "@return" tag was used without any parameters, illegal
Error on line 628 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 646 - "@param" tag was used without any parameters, illegal
Error on line 646 - "@return" tag was used without any parameters, illegal
Error on line 646 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 660 - "@return" tag was used without any parameters, illegal
Error on line 660 - "@param" tag was used without any parameters, illegal
Error on line 660 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 683 - "@param" tag was used without any parameters, illegal
Error on line 683 - "@return" tag was used without any parameters, illegal
Error on line 683 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 697 - "@return" tag was used without any parameters, illegal
Error on line 697 - "@param" tag was used without any parameters, illegal
Error on line 697 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 715 - "@return" tag was used without any parameters, illegal
Error on line 715 - "@param" tag was used without any parameters, illegal
Error on line 715 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 729 - "@return" tag was used without any parameters, illegal
Error on line 729 - "@param" tag was used without any parameters, illegal
Error on line 729 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 754 - "@return" tag was used without any parameters, illegal
Error on line 754 - "@param" tag was used without any parameters, illegal
Error on line 754 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 768 - "@param" tag was used without any parameters, illegal
Error on line 768 - "@return" tag was used without any parameters, illegal
Error on line 768 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 792 - "@return" tag was used without any parameters, illegal
Error on line 792 - "@param" tag was used without any parameters, illegal
Error on line 792 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 806 - "@return" tag was used without any parameters, illegal
Error on line 806 - "@param" tag was used without any parameters, illegal
Error on line 806 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 836 - "@param" tag was used without any parameters, illegal
Error on line 836 - "@return" tag was used without any parameters, illegal
Error on line 836 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 850 - "@return" tag was used without any parameters, illegal
Error on line 850 - "@param" tag was used without any parameters, illegal
Error on line 850 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 865 - "@param" tag was used without any parameters, illegal
Error on line 865 - "@return" tag was used without any parameters, illegal
Error on line 865 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 885 - "@param" tag was used without any parameters, illegal
Error on line 885 - "@return" tag was used without any parameters, illegal
Error on line 885 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 899 - "@return" tag was used without any parameters, illegal
Error on line 899 - "@param" tag was used without any parameters, illegal
Error on line 899 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 914 - "@param" tag was used without any parameters, illegal
Error on line 914 - "@return" tag was used without any parameters, illegal
Error on line 914 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 933 - "@return" tag was used without any parameters, illegal
Error on line 933 - "@param" tag was used without any parameters, illegal
Error on line 933 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 947 - "@return" tag was used without any parameters, illegal
Error on line 947 - "@param" tag was used without any parameters, illegal
Error on line 947 - @access was passed neither "public" nor "private." Was passed: ""
Error on line 962 - "@return" tag was used without any parameters, illegal
Error on line 962 - "@param" tag was used without any parameters, illegal
Error on line 962 - @access was passed neither "public" nor "private." Was passed: ""

xmlrpctag.php

Warnings:

Warning on line 32 - no @package tag was used in a DocBlock for class XoopsXmlRpcDocument
Warning on line 53 - no @package tag was used in a DocBlock for class XoopsXmlRpcResponse
Warning on line 70 - no @package tag was used in a DocBlock for class XoopsXmlRpcRequest
Warning on line 91 - no @package tag was used in a DocBlock for class XoopsXmlRpcTag
Warning on line 121 - no @package tag was used in a DocBlock for class XoopsXmlRpcFault
Warning on line 179 - no @package tag was used in a DocBlock for class XoopsXmlRpcInt
Warning on line 195 - no @package tag was used in a DocBlock for class XoopsXmlRpcDouble
Warning on line 211 - no @package tag was used in a DocBlock for class XoopsXmlRpcBoolean
Warning on line 227 - no @package tag was used in a DocBlock for class XoopsXmlRpcString
Warning on line 243 - no @package tag was used in a DocBlock for class XoopsXmlRpcDatetime
Warning on line 263 - no @package tag was used in a DocBlock for class XoopsXmlRpcBase64
Warning on line 279 - no @package tag was used in a DocBlock for class XoopsXmlRpcArray
Warning on line 304 - no @package tag was used in a DocBlock for class XoopsXmlRpcStruct
Warning on line 325 - File "D:\xampp\htdocs\xoops2017\class\xml\rpc\xmlrpctag.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xmlrss2parser.php

Warnings:

Warning on line 37 - no @package tag was used in a DocBlock for class XoopsXmlRss2Parser
Warning on line 141 - no @package tag was used in a DocBlock for class RssChannelHandler
Warning on line 155 - no @package tag was used in a DocBlock for class RssTitleHandler
Warning on line 187 - no @package tag was used in a DocBlock for class RssLinkHandler
Warning on line 219 - no @package tag was used in a DocBlock for class RssDescriptionHandler
Warning on line 251 - no @package tag was used in a DocBlock for class RssGeneratorHandler
Warning on line 276 - no @package tag was used in a DocBlock for class RssCopyrightHandler
Warning on line 301 - no @package tag was used in a DocBlock for class RssNameHandler
Warning on line 326 - no @package tag was used in a DocBlock for class RssManagingEditorHandler
Warning on line 351 - no @package tag was used in a DocBlock for class RssLanguageHandler
Warning on line 376 - no @package tag was used in a DocBlock for class RssWebMasterHandler
Warning on line 401 - no @package tag was used in a DocBlock for class RssDocsHandler
Warning on line 426 - no @package tag was used in a DocBlock for class RssTtlHandler
Warning on line 451 - no @package tag was used in a DocBlock for class RssTextInputHandler
Warning on line 475 - no @package tag was used in a DocBlock for class RssLastBuildDateHandler
Warning on line 500 - no @package tag was used in a DocBlock for class RssImageHandler
Warning on line 513 - no @package tag was used in a DocBlock for class RssUrlHandler
Warning on line 534 - no @package tag was used in a DocBlock for class RssWidthHandler
Warning on line 555 - no @package tag was used in a DocBlock for class RssHeightHandler
Warning on line 575 - no @package tag was used in a DocBlock for class RssItemHandler
Warning on line 600 - no @package tag was used in a DocBlock for class RssCategoryHandler
Warning on line 627 - no @package tag was used in a DocBlock for class RssCommentsHandler
Warning on line 648 - no @package tag was used in a DocBlock for class RssPubDateHandler
Warning on line 676 - no @package tag was used in a DocBlock for class RssGuidHandler
Warning on line 697 - no @package tag was used in a DocBlock for class RssAuthorHandler
Warning on line 718 - no @package tag was used in a DocBlock for class RssSourceHandler
Warning on line 744 - File "D:\xampp\htdocs\xoops2017\class\xml\rss\xmlrss2parser.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xmltaghandler.php

Warnings:

Warning on line 13 - no @package tag was used in a DocBlock for class XmlTagHandler
Warning on line 55 - File "D:\xampp\htdocs\xoops2017\class\xml\xmltaghandler.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xoopsapi.php

Warnings:

Warning on line 36 - no @package tag was used in a DocBlock for class XoopsApi
Warning on line 348 - File "D:\xampp\htdocs\xoops2017\class\xml\rpc\xoopsapi.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xoopsblock.php

Warnings:

Warning on line 37 - no @package tag was used in a DocBlock for class XoopsBlock
Warning on line 537 - File "D:\xampp\htdocs\xoops2017\class\xoopsblock.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xoopscomments.php

Warnings:

Warning on line 38 - no @package tag was used in a DocBlock for class XoopsComments
Warning on line 347 - File "D:\xampp\htdocs\xoops2017\class\xoopscomments.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xoopsformloader.php

Warnings:

Warning on line 37 - File "D:\xampp\htdocs\xoops2017\class\xoopsformloader.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xoopslists.php

Warnings:

Warning on line 35 - no @package tag was used in a DocBlock for class XoopsLists
Warning on line 530 - File "D:\xampp\htdocs\xoops2017\class\xoopslists.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xoopsmailer.php

Warnings:

Warning on line 520 - File "D:\xampp\htdocs\xoops2017\class\xoopsmailer.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xoopsmodule.php

Warnings:

Warning on line 12 - no @package tag was used in a DocBlock for file D:\xampp\htdocs\xoops2017\class\xoopsmodule.php

xoopssecurity.php

Warnings:

Warning on line 40 - no @package tag was used in a DocBlock for class XoopsSecurity
Warning on line 255 - File "D:\xampp\htdocs\xoops2017\class\xoopssecurity.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xoopsstory.php

Warnings:

Warning on line 37 - no @package tag was used in a DocBlock for class XoopsStory
Warning on line 433 - File "D:\xampp\htdocs\xoops2017\class\xoopsstory.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xoopstopic.php

Warnings:

Warning on line 36 - no @package tag was used in a DocBlock for class XoopsTopic
Warning on line 339 - File "D:\xampp\htdocs\xoops2017\class\xoopstopic.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xoopstree.php

Warnings:

Warning on line 32 - no @package tag was used in a DocBlock for class XoopsTree
Warning on line 256 - File "D:\xampp\htdocs\xoops2017\class\xoopstree.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xoopsuser.php

Warnings:

Warning on line 7 - File "D:\xampp\htdocs\xoops2017\class\xoopsuser.php" has no page-level DocBlock, use @package in the first DocBlock to create one

zipdownloader.php

Warnings:

Warning on line 37 - no @package tag was used in a DocBlock for class XoopsZipDownloader
Warning on line 81 - File "D:\xampp\htdocs\xoops2017\class\zipdownloader.php" has no page-level DocBlock, use @package in the first DocBlock to create one

xoopsmultimailer.php

Errors:

Error on line 153 - incorrect @global syntax. Should be @global vartype $varname or @global vartype description
Documentation generated on Tue, 28 Aug 2007 23:01:32 +0200 by phpDocumentor 1.4.0a2


Documentation generated on Tue, 28 Aug 2007 22:56:20 +0200 by phpDocumentor 1.4.0a2