[ Index ] |
|
Code source de GeekLog 1.4.1 |
1 <?php 2 3 /* Reminder: always indent with 4 spaces (no tabs). */ 4 // +---------------------------------------------------------------------------+ 5 // | Polls Plugin 1.0 | 6 // +---------------------------------------------------------------------------+ 7 // | Installation SQL | 8 // +---------------------------------------------------------------------------+ 9 // | Copyright (C) 2000-2006 by the following authors: | 10 // | | 11 // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | 12 // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net | 13 // | Jason Whittenburg - jwhitten AT securitygeeks DOT com | 14 // | Dirk Haun - dirk AT haun-online DOT de | 15 // | Trinity Bays - trinity AT steubentech DOT com | 16 // | Randy Kolenko - randy AT nextide DOT ca | 17 // +---------------------------------------------------------------------------+ 18 // | | 19 // | This program is licensed under the terms of the GNU General Public License| 20 // | as published by the Free Software Foundation; either version 2 | 21 // | of the License, or (at your option) any later version. | 22 // | | 23 // | This program is distributed in the hope that it will be useful, | 24 // | but WITHOUT ANY WARRANTY; without even the implied warranty of | 25 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 26 // | See the GNU General Public License for more details. | 27 // | | 28 // | You should have received a copy of the GNU General Public License | 29 // | along with this program; if not, write to the Free Software Foundation, | 30 // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 31 // | | 32 // +---------------------------------------------------------------------------+ 33 // 34 35 36 37 $_SQL[] = " 38 CREATE TABLE [dbo].[{$_TABLES['pollanswers']}] ( 39 [qid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , 40 [aid] [tinyint] NOT NULL , 41 [answer] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , 42 [votes] [numeric](8, 0) NULL , 43 [remark] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , 44 ) ON [PRIMARY] 45 "; 46 47 48 $_SQL[] = " 49 CREATE TABLE [dbo].[{$_TABLES['pollquestions']}] ( 50 [qid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , 51 [question] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , 52 [voters] [numeric](8, 0) NULL , 53 [date] [datetime] NULL , 54 [display] [smallint] NOT NULL , 55 [commentcode] [smallint] NOT NULL , 56 [statuscode] [smallint] NOT NULL , 57 [owner_id] [numeric](8, 0) NOT NULL , 58 [group_id] [numeric](8, 0) NOT NULL , 59 [perm_owner] [tinyint] NOT NULL , 60 [perm_group] [tinyint] NOT NULL , 61 [perm_members] [tinyint] NULL , 62 [perm_anon] [tinyint] NULL 63 ) ON [PRIMARY] 64 "; 65 66 67 $_SQL[] = " 68 CREATE TABLE [dbo].[{$_TABLES['pollvoters']}] ( 69 [id] [numeric](10, 0) IDENTITY (1, 1) NOT NULL , 70 [qid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , 71 [ipaddress] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , 72 [date] [numeric](10, 0) NULL 73 ) ON [PRIMARY] 74 "; 75 76 77 78 79 $_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['pollanswers']}] ADD 80 CONSTRAINT [PK_gl_pollanswers] PRIMARY KEY CLUSTERED 81 ( 82 [qid], 83 [aid] 84 ) ON [PRIMARY] 85 "; 86 87 $_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['pollquestions']}] ADD 88 CONSTRAINT [PK_gl_pollquestions] PRIMARY KEY CLUSTERED 89 ( 90 [qid] 91 ) ON [PRIMARY] 92 "; 93 94 $_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['pollvoters']}] ADD 95 CONSTRAINT [PK_gl_pollvoters] PRIMARY KEY CLUSTERED 96 ( 97 [id] 98 ) ON [PRIMARY] 99 "; 100 101 102 103 104 $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (qid, aid, answer, votes) VALUES ('geeklogfeaturepoll',1,'Trackbacks',0)"; 105 $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (qid, aid, answer, votes) VALUES ('geeklogfeaturepoll',2,'Links and Polls plugins',0)"; 106 $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (qid, aid, answer, votes) VALUES ('geeklogfeaturepoll',3,'Revamped admin areas',0)"; 107 $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (qid, aid, answer, votes) VALUES ('geeklogfeaturepoll',4,'FCKeditor included',0)"; 108 $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (qid, aid, answer, votes) VALUES ('geeklogfeaturepoll',5,'Remote user authentication',0)"; 109 $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (qid, aid, answer, votes) VALUES ('geeklogfeaturepoll',6,'Other',0)"; 110 111 $_SQL[] = "INSERT INTO {$_TABLES['blocks']} (is_enabled, name, type, title, tid, blockorder, content, onleft, phpblockfn, owner_id, group_id, perm_owner, perm_group) VALUES (1,'polls_block','phpblock','Poll','all',30,'',0,'phpblock_polls',{$_USER['uid']},#group#,3,3)"; 112 113 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 12:27:40 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |