[ Index ]

PHP Cross Reference of Xoops v2.4.5 code documentation

title

Body

[close]

/modules/profile/class/ -> regstep.php (source)

   1  <?php
   2  /**

   3   * Extended User Profile

   4   *

   5   * You may not change or alter any portion of this comment or credits

   6   * of supporting developers from this source code or any supporting source code

   7   * which is considered copyrighted (c) material of the original comment or credit authors.

   8   * This program is distributed in the hope that it will be useful,

   9   * but WITHOUT ANY WARRANTY; without even the implied warranty of

  10   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  11   *

  12   * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/

  13   * @license         http://www.fsf.org/copyleft/gpl.html GNU public license

  14   * @package         profile

  15   * @since           2.3.0

  16   * @author          Jan Pedersen

  17   * @author          Taiwen Jiang <phppp@users.sourceforge.net>

  18   * @version         $Id: regstep.php 4361 2010-02-09 23:36:33Z trabis $

  19   */
  20  
  21  defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
  22  
  23  class ProfileRegstep extends XoopsObject
  24  {
  25      function __construct()
  26      {
  27          $this->initVar('step_id', XOBJ_DTYPE_INT);
  28          $this->initVar('step_name', XOBJ_DTYPE_TXTBOX);
  29          $this->initVar('step_desc', XOBJ_DTYPE_TXTAREA);
  30          $this->initVar('step_order', XOBJ_DTYPE_INT, 1);
  31          $this->initVar('step_save', XOBJ_DTYPE_INT, 0);
  32      }
  33  
  34      function ProfileRegstep()
  35      {
  36          $this->__construct();
  37      }
  38  }
  39  
  40  class ProfileRegstepHandler extends XoopsPersistableObjectHandler
  41  {
  42      function ProfileRegstepHandler(&$db)
  43      {
  44          $this->__construct($db);
  45      }
  46  
  47      function __construct($db)
  48      {
  49          parent::__construct($db, 'profile_regstep', 'profileregstep', 'step_id', 'step_name');
  50      }
  51  
  52      /**

  53       * Delete an object from the database

  54       * @see XoopsPersistableObjectHandler

  55       *

  56       * @param profileRegstep $obj

  57       * @param bool $force

  58       *

  59       * @return bool

  60       */
  61      function delete($obj, $force = false)
  62      {
  63          if (parent::delete($obj, $force)) {
  64              $field_handler =& xoops_getmodulehandler('field');
  65              return $field_handler->updateAll('step_id', 0, new Criteria('step_id', $obj->getVar('step_id')));
  66          }
  67          return false;
  68      }
  69  }
  70  ?>


Generated: Sun Aug 1 01:39:09 2010
Open Source related documentation for developers.