![]() |
|---|
| [ Index ] |
Source Code Reference for V1.00 |
[Summary view] [Print] [Text view]
1 <?php /* $Id: setup.php 102 2008-03-18 19:52:59Z pedroix $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/trunk/modules/projectdesigner/setup.php $ */ 2 if (!defined('W2P_BASE_DIR')) { 3 die('You should not access this file directly.'); 4 } 5 6 // MODULE CONFIGURATION DEFINITION 7 $config = array(); 8 $config['mod_name'] = 'ProjectDesigner'; 9 $config['mod_version'] = '1.0'; 10 $config['mod_directory'] = 'projectdesigner'; 11 $config['mod_setup_class'] = 'projectDesigner'; 12 $config['mod_type'] = 'user'; 13 $config['mod_ui_name'] = 'ProjectDesigner'; 14 $config['mod_ui_icon'] = 'projectdesigner.jpg'; 15 $config['mod_description'] = 'A module to design projects'; 16 $config['mod_config'] = true; 17 18 if ($a == 'setup') { 19 echo dPshowModuleConfig($config); 20 } 21 22 class projectDesigner { 23 24 function install() { 25 $success = 1; 26 27 $bulk_sql[] = ' 28 CREATE TABLE project_designer_options ( 29 pd_option_id INT(11) NOT NULL auto_increment, 30 pd_option_user INT(11) NOT NULL default 0 UNIQUE, 31 pd_option_view_project INT(1) NOT NULL default 1, 32 pd_option_view_gantt INT(1) NOT NULL default 1, 33 pd_option_view_tasks INT(1) NOT NULL default 1, 34 pd_option_view_actions INT(1) NOT NULL default 1, 35 pd_option_view_addtasks INT(1) NOT NULL default 1, 36 pd_option_view_files INT(1) NOT NULL default 1, 37 PRIMARY KEY (pd_option_id) 38 ) TYPE=MyISAM;'; 39 foreach ($bulk_sql as $s) { 40 db_exec($s); 41 42 if (db_error()) { 43 $success = 0; 44 } 45 } 46 return $success; 47 } 48 49 function remove() { 50 $success = 1; 51 52 $bulk_sql[] = 'DROP TABLE project_designer_options'; 53 foreach ($bulk_sql as $s) { 54 db_exec($s); 55 if (db_error()) { 56 $success = 0; 57 } 58 } 59 return $success; 60 } 61 62 function upgrade() { 63 return null; 64 } 65 66 function configure() { 67 global $AppUI; 68 69 $AppUI->redirect('m=projectdesigner&a=configure'); 70 71 return true; 72 } 73 74 } 75 76 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Jan 9 03:00:02 2009 | Cross-referenced by PHPXref 0.7 |