source: temp/test-xoops.ec-cube.net/html/class/xoopsform/formtoken.php @ 405

Revision 405, 2.5 KB checked in by root, 20 years ago (diff)
Line 
1<?php
2// $Id: formtoken.php,v 1.1.2.2 2005/05/13 10:25:39 minahito Exp $ //  ------------------------------------------------------------------------ //
3//                XOOPS - PHP Content Management System                      //
4//                    Copyright (c) 2000 XOOPS.org                           //
5//                       <http://www.xoops.org/>                             //
6//  ------------------------------------------------------------------------ //
7//  This program is free software; you can redistribute it and/or modify     //
8//  it under the terms of the GNU General Public License as published by     //
9//  the Free Software Foundation; either version 2 of the License, or        //
10//  (at your option) any later version.                                      //
11//                                                                           //
12//  You may not change or alter any portion of this comment or credits       //
13//  of supporting developers from this source code or any supporting         //
14//  source code which is considered copyrighted (c) material of the          //
15//  original comment or credit authors.                                      //
16//                                                                           //
17//  This program is distributed in the hope that it will be useful,          //
18//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
19//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
20//  GNU General Public License for more details.                             //
21//                                                                           //
22//  You should have received a copy of the GNU General Public License        //
23//  along with this program; if not, write to the Free Software              //
24//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA // //  ------------------------------------------------------------------------ //
25
26/**
27 * A hidden token field by XoopsToken instance.
28 * This is a trial code.
29 *
30 * @author  minahito<[email protected]>
31 * @copyright   copyright (c) 2000-2005 XOOPS.org
32*/
33class XoopsFormToken extends XoopsFormHidden {
34    /**
35     * Constructor
36     *
37     * @param object    $token  XoopsToken instance
38    */
39    function XoopsFormToken($token)
40    {
41        if(is_object($token)) {
42            parent::XoopsFormHidden($token->getTokenName(), $token->getTokenValue());
43        }
44        else {
45            parent::XoopsFormHidden('','');
46        }
47    }
48}
49?>
Note: See TracBrowser for help on using the repository browser.