|
1
|
|
|
<?php |
|
2
|
|
|
// ------------------------------------------------------------------------ // |
|
3
|
|
|
// BOOKSHOP - MODULE FOR XOOPS 2 // |
|
4
|
|
|
// Copyright (c) 2007, 2008 Instant Zero // |
|
5
|
|
|
// <http://www.instant-zero.com/> // |
|
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
|
|
|
defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
|
28
|
|
|
|
|
29
|
|
|
include_once XOOPS_ROOT_PATH . '/kernel/object.php'; |
|
30
|
|
|
if (!class_exists('Bookshop_XoopsPersistableObjectHandler')) { |
|
31
|
|
|
include_once XOOPS_ROOT_PATH . '/modules/bookshop/class/PersistableObjectHandler.php'; |
|
32
|
|
|
} |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* Class bookshop_booksauthors |
|
36
|
|
|
*/ |
|
37
|
|
|
class bookshop_booksauthors extends Bookshop_Object |
|
38
|
|
|
{ |
|
39
|
|
|
public function __construct() |
|
40
|
|
|
{ |
|
41
|
|
|
$this->initVar('ba_id', XOBJ_DTYPE_INT, null, false); |
|
42
|
|
|
$this->initVar('ba_book_id', XOBJ_DTYPE_INT, null, false); |
|
43
|
|
|
$this->initVar('ba_auth_id', XOBJ_DTYPE_INT, null, false); |
|
44
|
|
|
$this->initVar('ba_type', XOBJ_DTYPE_INT, null, false); |
|
45
|
|
|
// Pour autoriser le html |
|
46
|
|
|
$this->initVar('dohtml', XOBJ_DTYPE_INT, 1, false); |
|
47
|
|
|
} |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
|
/** |
|
51
|
|
|
* Class BookshopBookshop_booksauthorsHandler |
|
52
|
|
|
*/ |
|
53
|
|
|
class BookshopBookshop_booksauthorsHandler extends Bookshop_XoopsPersistableObjectHandler |
|
54
|
|
|
{ |
|
55
|
|
|
/** |
|
56
|
|
|
* @param $db |
|
57
|
|
|
*/ |
|
58
|
|
|
public function __construct($db) |
|
59
|
|
|
{ // Table Classe Id |
|
60
|
|
|
parent::__construct($db, 'bookshop_booksauthors', 'bookshop_booksauthors', 'ba_id'); |
|
61
|
|
|
} |
|
62
|
|
|
} |
|
63
|
|
|
|