예제 #1
0
/**
 * This function is called internally by the core whenever the module is
 * loaded.  It adds in the information
 */
function Feeds_tables()
{
    // Initialise table array
    $dbtable = array();

    // Full table definition
    $dbtable['feeds'] = 'feeds';
    $dbtable['feeds_column'] = array('fid'       => 'fid',
                                     'name'      => 'name',
                                     'urltitle'  => 'urltitle',
                                     'url'       => 'url');
    $dbtable['feeds_column_def'] = array('fid'      => 'I(10) NOTNULL AUTOINCREMENT PRIMARY',
                                         'name'     => "C(255) NOTNULL DEFAULT ''",
                                         'urltitle' => "C(255) NOTNULL DEFAULT ''",
                                         'url'      => "C(255) NOTNULL DEFAULT ''");

    // Enable categorization services
    $dbtable['feeds_db_extra_enable_categorization'] = ModUtil::getVar('Feeds', 'enablecategorization');
    $dbtable['feeds_primary_key_column'] = 'fid';

    // add standard data fields
    ObjectUtil::addStandardFieldsToTableDefinition($dbtable['feeds_column']);
    ObjectUtil::addStandardFieldsToTableDataDefinition($dbtable['feeds_column_def']);

    // Return the table information
    return $dbtable;
}
예제 #2
0
/**
 * Define module tables
 * @author Albert Pérez Monfort (intraweb@xtec.cat)
 * @return module tables information
 */
function IWwebbox_tables() {
    // Initialise table array
    $table = array();

    // IWwebbox table definition
    $table['IWwebbox'] = DBUtil::getLimitedTablename('IWwebbox');
    $table['IWwebbox_column'] = array('pid' => 'iw_pid',
                                      'url' => 'iw_url',
                                      'ref' => 'iw_ref',
                                      'scrolls' => 'iw_scrolls',
                                      'description' => 'iw_description',
                                      'width' => 'iw_width',
                                      'height' => 'iw_height',
                                      'widthunit' => 'iw_widthunit');

    $table['IWwebbox_column_def'] = array('pid' => "I NOTNULL AUTO PRIMARY",
                                          'url' => "C(255) NOTNULL DEFAULT ''",
                                          'ref' => "C(10) NOTNULL DEFAULT ''",
                                          'scrolls' => "I(1) NOTNULL DEFAULT '1'",
                                          'description' => "C(255) NOTNULL DEFAULT ''",
                                          'width' => "I NOTNULL DEFAULT '100'",
                                          'height' => "I NOTNULL DEFAULT '600'",
                                          'widthunit' => "C(10) NOTNULL DEFAULT '%'");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWwebbox_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWwebbox_column_def'], 'iw_');

    // Return the table information
    return $table;
}
예제 #3
0
/**
 * AddressBook
 *
 * @copyright (c) AddressBook Development Team
 * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
 * @package AddressBook
 */
function AddressBook_tables()
{
    // Initialise table array
    $tables = array();
    $tables['addressbook_address'] = 'addressbook_address';
    $tables['addressbook_address_column'] = array('id' => 'adr_id', 'cat_id' => 'adr_catid', 'prefix' => 'adr_prefix', 'lname' => 'adr_name', 'fname' => 'adr_fname', 'sortname' => 'adr_sortname', 'title' => 'adr_title', 'company' => 'adr_company', 'sortcompany' => 'adr_sortcompany', 'img' => 'adr_img', 'zip' => 'adr_zip', 'city' => 'adr_city', 'address1' => 'adr_address1', 'address2' => 'adr_address2', 'state' => 'adr_state', 'country' => 'adr_country', 'geodata' => 'adr_geodata', 'contact_1' => 'adr_contact_1', 'contact_2' => 'adr_contact_2', 'contact_3' => 'adr_contact_3', 'contact_4' => 'adr_contact_4', 'contact_5' => 'adr_contact_5', 'c_label_1' => 'adr_c_label_1', 'c_label_2' => 'adr_c_label_2', 'c_label_3' => 'adr_c_label_3', 'c_label_4' => 'adr_c_label_4', 'c_label_5' => 'adr_c_label_5', 'c_main' => 'adr_c_main', 'custom_1' => 'adr_custom_1', 'custom_2' => 'adr_custom_2', 'custom_3' => 'adr_custom_3', 'custom_4' => 'adr_custom_4', 'note' => 'adr_note', 'user_id' => 'adr_user', 'private' => 'adr_private', 'date' => 'adr_date', 'counter' => 'adr_counter', 'language' => 'adr_language', 'status' => 'adr_status');
    // Enable categorization services
    $tables['addressbook_address_db_extra_enable_categorization'] = ModUtil::getVar('AddressBook', 'enablecategorization');
    $tables['addressbook_address_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition($tables['addressbook_address_column'], 'adr_');
    // add potential custom_fields
    addCustomFieldsToTableDefinition($tables['addressbook_address_column']);
    $tables['addressbook_address_column_def'] = array('id' => "I AUTO PRIMARY", 'cat_id' => "I  NOTNULL DEFAULT 0", 'prefix' => "I  NOTNULL DEFAULT 0", 'lname' => "C(100) DEFAULT NULL", 'fname' => "C(60) DEFAULT NULL", 'sortname' => "C(180) DEFAULT NULL", 'title' => "C(100) DEFAULT NULL", 'company' => "C(100) DEFAULT NULL", 'sortcompany' => "C(100) DEFAULT NULL", 'img' => "C(100) DEFAULT NULL", 'zip' => "C(30) DEFAULT NULL", 'city' => "C(100) DEFAULT NULL", 'address1' => "C(100) DEFAULT NULL", 'address2' => "C(100) DEFAULT NULL", 'state' => "C(60) DEFAULT NULL", 'country' => "C(60) DEFAULT NULL", 'geodata' => "C(180) DEFAULT NULL", 'contact_1' => "C(100) DEFAULT NULL", 'contact_2' => "C(100) DEFAULT NULL", 'contact_3' => "C(100) DEFAULT NULL", 'contact_4' => "C(100) DEFAULT NULL", 'contact_5' => "C(100) DEFAULT NULL", 'c_label_1' => "I2 DEFAULT NULL", 'c_label_2' => "I2 DEFAULT NULL", 'c_label_3' => "I2 DEFAULT NULL", 'c_label_4' => "I2 DEFAULT NULL", 'c_label_5' => "I2 DEFAULT NULL", 'c_main' => "I2 DEFAULT NULL", 'custom_1' => "X DEFAULT NULL", 'custom_2' => "X DEFAULT NULL", 'custom_3' => "X DEFAULT NULL", 'custom_4' => "X DEFAULT NULL", 'note' => "X DEFAULT NULL", 'user_id' => "I DEFAULT NULL", 'private' => "I2 DEFAULT NULL", 'date' => "I  NOTNULL DEFAULT 0", 'counter' => "I  NOTNULL DEFAULT 0", 'language' => "C(30) NOTNULL DEFAULT ''", 'status' => "I1 DEFAULT '1'");
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['addressbook_address_column_def'], 'adr_');
    $tables['addressbook_labels'] = 'addressbook_labels';
    $tables['addressbook_labels_column'] = array('id' => 'lab_id', 'name' => 'lab_name', 'name1' => 'lab_name1');
    $tables['addressbook_labels_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition($tables['addressbook_labels_column'], 'lab_');
    $tables['addressbook_labels_column_def'] = array('id' => "I AUTO PRIMARY", 'name' => "C(30) DEFAULT NULL", 'name1' => "C(30) DEFAULT NULL");
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['addressbook_labels_column_def'], 'lab_');
    $tables['addressbook_customfields'] = 'addressbook_customfields';
    $tables['addressbook_customfields_column'] = array('id' => 'cus_id', 'name' => 'cus_name', 'name1' => 'cus_name1', 'type' => 'cus_type', 'position' => 'cus_pos', 'option' => 'cus_option');
    $tables['addressbook_customfields_primary_key_column'] = 'id';
    ObjectUtil::addStandardFieldsToTableDefinition($tables['addressbook_customfields_column'], 'cus_');
    $tables['addressbook_customfields_column_def'] = array('id' => "I AUTO PRIMARY", 'name' => "C(30) DEFAULT NULL", 'name1' => "C(30) DEFAULT NULL", 'type' => "C(30) DEFAULT NULL", 'position' => "I NOTNULL DEFAULT 0", 'option' => "X DEFAULT NULL");
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['addressbook_customfields_column_def'], 'cus_');
    $tables['addressbook_favourites'] = 'addressbook_favourites';
    $tables['addressbook_favourites_column'] = array('favadr_id' => 'fav_adr_id', 'favuser_id' => 'fav_user_id');
    $tables['addressbook_favourites_column_def'] = array('favadr_id' => "I NOTNULL DEFAULT 0", 'favuser_id' => "I NOTNULL DEFAULT 0");
    // Return the table information
    return $tables;
}
예제 #4
0
/**
 * Content
 *
 * @copyright (C) 2007-2010, Content Development Team
 * @link http://github.com/zikula-modules/Content
 * @license See license.txt
 */
function content_tables()
{
    $tables = array();
    // Page setup (pages can be nested beneath each other)
    $tables['content_page'] = 'content_page';
    $tables['content_page_column'] = array('id' => 'page_id', 'parentPageId' => 'page_ppid', 'title' => 'page_title', 'showTitle' => 'page_showtitle', 'urlname' => 'page_urlname', 'metadescription' => 'page_metadescription', 'metakeywords' => 'page_metakeywords', 'nohooks' => 'page_nohooks', 'layout' => 'page_layout', 'categoryId' => 'page_categoryid', 'views' => 'page_views', 'active' => 'page_active', 'activeFrom' => 'page_activefrom', 'activeTo' => 'page_activeto', 'inMenu' => 'page_inmenu', 'position' => 'page_pos', 'level' => 'page_level', 'setLeft' => 'page_setleft', 'setRight' => 'page_setright', 'language' => 'page_language', 'optionalString1' => 'page_optString1', 'optionalString2' => 'page_optString2', 'optionalText' => 'page_optText');
    $tables['content_page_column_def'] = array('id' => "I NOTNULL AUTO PRIMARY", 'parentPageId' => "I NOTNULL DEFAULT 0", 'title' => "C(255) NOTNULL DEFAULT ''", 'showTitle' => "I1 NOTNULL DEFAULT 1", 'urlname' => "C(255) NOTNULL DEFAULT ''", 'metadescription' => "X NOTNULL DEFAULT ''", 'metakeywords' => "X NOTNULL DEFAULT ''", 'nohooks' => "I1 NOTNULL DEFAULT 0", 'layout' => "C(100) NOTNULL", 'categoryId' => "I NOT NULL DEFAULT 0", 'views' => "I NOT NULL DEFAULT 0", 'active' => "I1 NOTNULL DEFAULT 1", 'activeFrom' => "T", 'activeTo' => "T", 'inMenu' => "I1 NOTNULL DEFAULT 1", 'position' => 'I NOTNULL DEFAULT 0', 'level' => 'I NOTNULL DEFAULT 0', 'setLeft' => 'I NOTNULL DEFAULT 0', 'setRight' => 'I NOTNULL DEFAULT 0', 'language' => 'C(10)', 'optionalString1' => "C(255) NOTNULL DEFAULT ''", 'optionalString2' => "C(255) NOTNULL DEFAULT ''", 'optionalText' => "X NOTNULL DEFAULT ''");
    $tables['content_page_primary_key_column'] = 'id';
    // add standard data fields
    ObjectUtil::addStandardFieldsToTableDefinition($tables['content_page_column'], 'page_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['content_page_column_def']);
    // additional indexes
    $tables['content_page_column_idx'] = array('parentPageId' => array('parentPageId', 'position'), 'leftright' => array('setLeft', 'setRight'), 'categoryId' => 'categoryId', 'urlname' => array('urlname', 'parentPageId'));
    // Content setup (multiple content items on each page)
    $tables['content_content'] = 'content_content';
    $tables['content_content_column'] = array('id' => 'con_id', 'pageId' => 'con_pageid', 'areaIndex' => 'con_areaindex', 'position' => 'con_position', 'module' => 'con_module', 'type' => 'con_type', 'data' => 'con_data', 'active' => 'con_active', 'visiblefor' => 'con_visiblefor', 'stylePosition' => 'con_stylepos', 'styleWidth' => 'con_stylewidth', 'styleClass' => 'con_styleclass');
    $tables['content_content_column_def'] = array('id' => "I NOTNULL AUTO PRIMARY", 'pageId' => "I NOTNULL DEFAULT 0", 'areaIndex' => "I NOTNULL DEFAULT 0", 'position' => "I NOTNULL DEFAULT 0", 'module' => "C(100) NOTNULL DEFAULT ''", 'type' => "C(100) NOTNULL DEFAULT ''", 'data' => "XL", 'active' => "I1 NOTNULL DEFAULT 1", 'visiblefor' => "I1 NOTNULL DEFAULT 1", 'stylePosition' => "C(20) NOTNULL DEFAULT 'none'", 'styleWidth' => "C(20) NOTNULL DEFAULT 'wauto'", 'styleClass' => "C(100) NOTNULL DEFAULT ''");
    $tables['content_content_primary_key_column'] = 'id';
    // add standard data fields
    ObjectUtil::addStandardFieldsToTableDefinition($tables['content_content_column'], 'con_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['content_content_column_def']);
    // additional indexes
    $tables['content_content_column_idx'] = array('pageActive' => array('pageId', 'active'), 'pagePosition' => array('pageId', 'areaIndex', 'position'));
    // Multiple category relation
    $tables['content_pagecategory'] = 'content_pagecategory';
    $tables['content_pagecategory_column'] = array('pageId' => 'con_pageid', 'categoryId' => 'con_categoryid');
    $tables['content_pagecategory_column_def'] = array('pageId' => 'I NOTNULL DEFAULT 0', 'categoryId' => 'I NOTNULL DEFAULT 0');
    // additional indexes
    $tables['content_pagecategory_column_idx'] = array('pageId' => 'pageId');
    // Searchable text from content plugins
    $tables['content_searchable'] = 'content_searchable';
    $tables['content_searchable_column'] = array('searchableId' => 'search_sid', 'contentId' => 'search_cid', 'text' => 'search_text', 'language' => 'search_language');
    $tables['content_searchable_column_def'] = array('searchableId' => 'I NOTNULL AUTO PRIMARY', 'contentId' => 'I NOTNULL DEFAULT 0', 'text' => 'X', 'language' => 'C(10) NOTNULL');
    $tables['content_searchable_primary_key_column'] = 'searchableId';
    // Translated pages
    $tables['content_translatedpage'] = 'content_translatedpage';
    $tables['content_translatedpage_column'] = array('pageId' => 'transp_pid', 'language' => 'transp_lang', 'title' => 'transp_title', 'metadescription' => 'transp_metadescription', 'metakeywords' => 'transp_metakeywords');
    $tables['content_translatedpage_column_def'] = array('pageId' => 'I NOTNULL DEFAULT 0', 'language' => 'C(10) NOTNULL', 'title' => 'C(255) NOTNULL', 'metadescription' => "X NOTNULL DEFAULT ''", 'metakeywords' => "X NOTNULL DEFAULT ''");
    ObjectUtil::addStandardFieldsToTableDefinition($tables['content_translatedpage_column'], 'transp_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['content_translatedpage_column_def']);
    // additional indexes
    $tables['content_translatedpage_column_idx'] = array('entry' => array('pageId', 'language'));
    // Translated content plugins
    $tables['content_translatedcontent'] = 'content_translatedcontent';
    $tables['content_translatedcontent_column'] = array('contentId' => 'transc_cid', 'language' => 'transc_lang', 'data' => 'transc_data');
    $tables['content_translatedcontent_column_def'] = array('contentId' => 'I NOTNULL DEFAULT 0', 'language' => 'C(10) NOTNULL', 'data' => 'XL');
    ObjectUtil::addStandardFieldsToTableDefinition($tables['content_translatedcontent_column'], 'transc_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['content_translatedcontent_column_def']);
    // additional indexes
    $tables['content_translatedcontent_column_idx'] = array('entry' => array('contentId', 'language'));
    // History
    $tables['content_history'] = 'content_history';
    $tables['content_history_column'] = array('id' => 'ch_id', 'pageId' => 'ch_pageid', 'data' => 'ch_data', 'revisionNo' => 'ch_revisionno', 'action' => 'ch_action', 'date' => 'ch_date', 'ipno' => 'ch_ipno', 'userId' => 'ch_userid');
    $tables['content_history_column_def'] = array('id' => "I NOTNULL AUTO PRIMARY", 'pageId' => "I NOTNULL DEFAULT 0", 'data' => "XL NOTNULL DEFAULT ''", 'revisionNo' => "I NOTNULL DEFAULT 0", 'action' => "C(255) NOTNULL DEFAULT ''", 'date' => "T NOTNULL DEFAULT ''", 'ipno' => "C(30) NOTNULL DEFAULT ''", 'userId' => "I NOTNULL DEFAULT 0");
    // additional indexes
    $tables['content_history_column_idx'] = array('entry' => array('pageId', 'revisionNo'), 'action' => 'action');
    return $tables;
}
예제 #5
0
/**
 * pages table information
*/
function Pages_tables()
{
    // Initialise table array
    $table = array();

    // Full table definition
    $table['pages'] = 'pages';
    $table['pages_column'] = array ('pageid'         => 'pageid',
                                      'title'          => 'title',
                                      'metadescription'   => 'metadescription',
                                      'metakeywords'      => 'metakeywords',
                                      'urltitle'       => 'urltitle',
                                      'content'        => 'content',
                                      'counter'        => 'counter',
                                      'displaywrapper' => 'displaywrapper',
                                      'displaytitle'   => 'displaytitle',
                                      'displaycreated' => 'displaycreated',
                                      'displayupdated' => 'displayupdated',
                                      'displaytextinfo' => 'displaytextinfo',
                                      'displayprint'   => 'displayprint',
                                      'language'       => 'language');
    $table['pages_column_def'] = array('pageid'         => 'I AUTOINCREMENT PRIMARY',
                                         'title'          => "X NOTNULL DEFAULT ''",
                                         'metadescription'   => "X NOTNULL DEFAULT ''",
                                         'metakeywords'      => "X NOTNULL DEFAULT ''",
                                         'urltitle'       => "X NOTNULL DEFAULT ''",
                                         'content'        => "X NOTNULL DEFAULT ''",
                                         'counter'        => "I NOTNULL DEFAULT '0'",
                                         'displaywrapper' => "I1 NOTNULL DEFAULT '1'",
                                         'displaytitle'   => "I1 NOTNULL DEFAULT '1'",
                                         'displaycreated' => "I1 NOTNULL DEFAULT '1'",
                                         'displayupdated' => "I1 NOTNULL DEFAULT '1'",
                                         'displaytextinfo' => "I1 NOTNULL DEFAULT '1'",
                                         'displayprint'   => "I1 NOTNULL DEFAULT '1'",
                                         'language'       => "C(30) NOTNULL DEFAULT ''");

    // Enable categorization services
    $table['pages_db_extra_enable_categorization'] = ModUtil::getVar('Pages', 'enablecategorization');
    $table['pages_primary_key_column'] = 'pageid';

    // add standard data fields
    ObjectUtil::addStandardFieldsToTableDefinition($table['pages_column']);
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['pages_column_def']);

    // old tables for upgrade/renaming purposes
    $table['seccont']  = DBUtil::getLimitedTablename('seccont');
    $table['sections'] = DBUtil::getLimitedTablename('sections');

    return $table;
}
예제 #6
0
/**
 * Define module tables
 * @author Albert Pérez Monfort (aperezm@xtec.cat)
 * @return module tables information
 */
function IWmessages_tables() {
    // Initialise table array
    $table = array();

    // iw_noteboard table definition
    $table['IWmessages'] = DBUtil::getLimitedTablename('IWmessages');
    $table['IWmessages_column'] = array('msg_id' => 'iw_msg_id',
        'msg_image' => 'iw_msg_image',
        'subject' => 'iw_subject',
        'from_userid' => 'iw_from_userid',
        'to_userid' => 'iw_to_userid',
        'msg_time' => 'iw_msg_time',
        'msg_readtime' => 'iw_msg_readtime',
        'msg_text' => 'iw_msg_text',
        'read_msg' => 'iw_read_msg',
        'del_msg_to' => 'iw_del_msg_to',
        'del_msg_from' => 'iw_del_msg_from',
        'marcat' => 'iw_marcat',
        'reply' => 'iw_reply',
        'file1' => 'iw_file1',
        'file2' => 'iw_file2',
        'file3' => 'iw_file3',
        'replied' => 'iw_replied');

    $table['IWmessages_column_def'] = array('msg_id' => "I NOTNULL AUTO PRIMARY",
        'msg_image' => "C(100) NOTNULL DEFAULT ''",
        'subject' => "C(100) NOTNULL DEFAULT ''",
        'from_userid' => "I(10) NOTNULL DEFAULT '0'",
        'to_userid' => "I(10) NOTNULL DEFAULT '0'",
        'msg_time' => "C(20) NOTNULL DEFAULT ''",
        'msg_readtime' => "C(20) NOTNULL DEFAULT ''",
        'msg_text' => "X NOTNULL",
        'read_msg' => "I(4) NOTNULL DEFAULT '0'",
        'del_msg_to' => "I(4) NOTNULL DEFAULT '0'",
        'del_msg_from' => "I(4) NOTNULL DEFAULT '0'",
        'marcat' => "I(1) NOTNULL DEFAULT '0'",
        'reply' => "X NOTNULL",
        'file1' => "C(100) NOTNULL DEFAULT ''",
        'file2' => "C(100) NOTNULL DEFAULT ''",
        'file3' => "C(100) NOTNULL DEFAULT ''",
        'replied' => "I(1) NOTNULL DEFAULT '0'");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWmessages_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWmessages_column_def'], 'iw_');

    // Return the table information
    return $table;
}
예제 #7
0
/**
 * Define module tables
 * @author Albert Pérez Monfort (aperezm@xtec.cat)
 * @return module tables information
 */
function IWvhmenu_tables() {
    // Initialise table array
    $table = array();

    // iw_main table definition
    $table['IWvhmenu'] = DBUtil::getLimitedTablename('IWvhmenu');

    //Noms dels camps
    $table['IWvhmenu_column'] = array('mid' => 'iw_mid',
        'text' => 'iw_text',
        'url' => 'iw_url',
        'bg_image' => 'iw_bg_image',
        'height' => 'iw_height',
        'width' => 'iw_width',
        'id_parent' => 'iw_id_parent',
        'groups' => 'iw_groups',
        'active' => 'iw_active',
        'target' => 'iw_target',
        'descriu' => 'iw_descriu',
        'iorder' => 'iw_iorder',
        'grafic' => 'iw_grafic',
        'image1' => 'iw_image1',
        'image2' => 'iw_image2');

    $table['IWvhmenu_column_def'] = array('mid' => "I NOTNULL AUTO PRIMARY",
        'text' => "C(50) NOTNULL DEFAULT ''",
        'url' => "C(255) NOTNULL DEFAULT ''",
        'bg_image' => "C(20) NOTNULL DEFAULT ''",
        'height' => "I(3) NOTNULL DEFAULT '25'",
        'width' => "I(3) NOTNULL DEFAULT '125'",
        'id_parent' => "INT(11) NOTNULL DEFAULT '0'",
        'groups' => "X NOTNULL",
        'active' => "I(1) NOTNULL DEFAULT '0'",
        'target' => "I(1) NOTNULL DEFAULT '0'",
        'descriu' => "X NOTNULL",
        'iorder' => "I NOTNULL DEFAULT '0'",
        'grafic' => "I(1) NOTNULL DEFAULT '0'",
        'image1' => "C(20) NOTNULL DEFAULT ''",
        'image2' => "C(20) NOTNULL DEFAULT ''");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWvhmenu_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWvhmenu_column_def'], 'iw_');


    // Return the table information
    return $table;
}
예제 #8
0
/**
 * Zikula Application Framework
 * @copyright  (c) Zikula Development Team
 * @license    GNU/GPL
 *
 * Get Ephemerides table array
 * @return       array with table information.
*/
function Ephemerides_tables()
{
    // initialise table array
    $tables = array();
    // full table definition
    $tables['ephem'] = 'ephem';
    $tables['ephem_column'] = array('eid' => 'eid', 'did' => 'did', 'mid' => 'mid', 'yid' => 'yid', 'content' => 'content', 'language' => 'language', 'status' => 'status', 'type' => 'type');
    $tables['ephem_column_def'] = array('eid' => 'I NOTNULL AUTO PRIMARY', 'did' => "I1 NOTNULL DEFAULT '0'", 'mid' => "I1 NOTNULL DEFAULT '0'", 'yid' => "I2 NOTNULL DEFAULT '0'", 'content' => 'X NOTNULL', 'language' => "C(30) NOTNULL DEFAULT ''", 'status' => "I1 DEFAULT '1'", 'type' => "I1 DEFAULT '1'");
    // enable categorization services
    $tables['ephem_db_extra_enable_categorization'] = ModUtil::getVar('Ephemerides', 'enablecategorization', true);
    $tables['ephem_primary_key_column'] = 'eid';
    // add standard data fields
    ObjectUtil::addStandardFieldsToTableDefinition($tables['ephem_column'], '');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['ephem_column_def']);
    // return table information
    return $tables;
}
예제 #9
0
파일: tables.php 프로젝트: Silwereth/core
/**
 * Populate tables array for Categories module.
 *
 * @return array Array of informations related to the Categories module tables.
 */
function ZikulaCategoriesModule_tables()
{
    // Initialise table array
    $dbtable = array();
    $table = 'categories_category';
    $dbtable['categories_category'] = $table;
    $columns = array('id' => 'id', 'parent_id' => 'parent_id', 'is_locked' => 'is_locked', 'is_leaf' => 'is_leaf', 'name' => 'name', 'value' => 'value', 'sort_value' => 'sort_value', 'display_name' => 'display_name', 'display_desc' => 'display_desc', 'path' => 'path', 'ipath' => 'ipath', 'status' => 'status');
    ObjectUtil::addStandardFieldsToTableDefinition($columns);
    $dbtable['categories_category_column'] = $columns;
    // Enable attribution services
    $dbtable['categories_category_db_extra_enable_attribution'] = true;
    $pathType = 'X';
    $dbType = strtolower(Doctrine_Manager::getInstance()->getCurrentConnection()->getDriverName());
    // mssql can't sort on fields of type text
    if ($dbType == 'mssql') {
        $pathType = 'C(8000)';
    }
    $tabledef = array('id' => 'I4 NOTNULL PRIMARY AUTO', 'parent_id' => 'I4 NOTNULL DEFAULT 1', 'is_locked' => 'I1 NOTNULL DEFAULT 0', 'is_leaf' => 'I1 NOTNULL DEFAULT 0', 'name' => "C(255) NOTNULL DEFAULT ''", 'value' => "C(255) NOTNULL DEFAULT ''", 'sort_value' => 'I4 NOTNULL DEFAULT 2147483647', 'display_name' => "X NOTNULL DEFAULT ''", 'display_desc' => "X NOTNULL DEFAULT ''", 'path' => "{$pathType} NOTNULL DEFAULT ''", 'ipath' => "C(255) NOTNULL DEFAULT ''", 'status' => "C(1) NOTNULL DEFAULT 'A'");
    ObjectUtil::addStandardFieldsToTableDataDefinition($tabledef);
    $dbtable['categories_category_column_def'] = $tabledef;
    $table = 'categories_mapmeta';
    $dbtable['categories_mapmeta'] = $table;
    $columns = array('id' => 'id', 'meta_id' => 'meta_id', 'category_id' => 'category_id');
    ObjectUtil::addStandardFieldsToTableDefinition($columns);
    $dbtable['categories_mapmeta_column'] = $columns;
    $tabledef = array('id' => 'I4 PRIMARY AUTO', 'meta_id' => 'I4 NOTNULL DEFAULT 0', 'category_id' => 'I4  NOTNULL DEFAULT 0');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tabledef);
    $dbtable['categories_mapmeta_column_def'] = $tabledef;
    $table = 'categories_mapobj';
    $dbtable['categories_mapobj'] = $table;
    $columns = array('id' => 'id', 'modname' => 'modname', 'table' => 'tablename', 'obj_id' => 'obj_id', 'obj_idcolumn' => 'obj_idcolumn', 'reg_id' => 'reg_id', 'reg_property' => 'reg_property', 'category_id' => 'category_id');
    ObjectUtil::addStandardFieldsToTableDefinition($columns);
    $dbtable['categories_mapobj_column'] = $columns;
    $tabledef = array('id' => 'I4 PRIMARY AUTO', 'modname' => "C(60) NOTNULL DEFAULT ''", 'table' => "C(60) NOTNULL DEAULT ''", 'obj_id' => 'I4 NOTNULL DEFAULT 0', 'obj_idcolumn' => "C(60) NOTNULL DEFAULT 'id'", 'reg_id' => 'I4 NOTNULL DEFAULT 0', 'reg_property' => "C(60) NOTNULL DEFAULT ''", 'category_id' => 'I4 NOTNULL DEFAULT 0');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tabledef);
    $dbtable['categories_mapobj_column_def'] = $tabledef;
    $table = 'categories_registry';
    $dbtable['categories_registry'] = $table;
    $columns = array('id' => 'id', 'modname' => 'modname', 'table' => 'entityname', 'property' => 'property', 'category_id' => 'category_id');
    ObjectUtil::addStandardFieldsToTableDefinition($columns);
    $dbtable['categories_registry_column'] = $columns;
    $tabledef = array('id' => 'I4 PRIMARY AUTO', 'modname' => "C(60) NOTNULL DEFAULT ''", 'table' => "C(60) NOTNULL DEFAULT ''", 'property' => "C(60) NOTNULL DEFAULT ''", 'category_id' => 'I4 NOTNULL DEFAULT 0');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tabledef);
    $dbtable['categories_registry_column_def'] = $tabledef;
    return $dbtable;
}
예제 #10
0
파일: tables.php 프로젝트: nmpetkov/Quotes
/**
 * Zikula Application Framework
 * @copyright  (c) Zikula Development Team
 * @license    GNU/GPL
 *
 * Get Quotes table array
 * @return       array with table information.
*/
function Quotes_tables()
{
    // initialise table array
    $tables = array();
    // full table definition
    $tables['quotes'] = 'quotes';
    $tables['quotes_column'] = array('qid' => 'qid', 'quote' => 'quote', 'author' => 'author', 'status' => 'status');
    $tables['quotes_column_def'] = array('qid' => 'I4 NOTNULL AUTO PRIMARY', 'quote' => 'X', 'author' => 'C(150) NOTNULL', 'status' => "I1 DEFAULT '1'");
    // enable categorization services
    $tables['quotes_db_extra_enable_categorization'] = ModUtil::getVar('Quotes', 'enablecategorization', true);
    $tables['quotes_primary_key_column'] = 'qid';
    // add standard data fields
    ObjectUtil::addStandardFieldsToTableDefinition($tables['quotes_column'], '');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['quotes_column_def']);
    // return table information
    return $tables;
}
예제 #11
0
파일: tables.php 프로젝트: Silwereth/core
/**
 * Populate dbtables array for settings module.
 *
 * @return array dbtables array.
 */
function ZikulaSettingsModule_tables()
{
    // Initialise table array
    $dbtables = array();
    $table = 'objectdata_attributes';
    $dbtables['objectdata_attributes'] = $table;
    $columns = array('id' => 'id', 'attribute_name' => 'attribute_name', 'object_id' => 'object_id', 'object_type' => 'object_type', 'value' => 'value');
    ObjectUtil::addStandardFieldsToTableDefinition($columns);
    $dbtables['objectdata_attributes_column'] = $columns;
    $dbtables['objectdata_attributes_column_idx'] = array('object_type' => 'object_type', 'object_id' => 'object_id');
    $tabledef = array('id' => 'I4 PRIMARY AUTO', 'attribute_name' => "C(80) NOTNULL DEFAULT ''", 'object_id' => 'I4 NOTNULL DEFAULT 0', 'object_type' => "C(80) NOTNULL DEFAULT ''", 'value' => "X NOTNULL DEFAULT ''");
    ObjectUtil::addStandardFieldsToTableDataDefinition($tabledef);
    $dbtables['objectdata_attributes_column_def'] = $tabledef;
    $table = 'objectdata_log';
    $dbtables['objectdata_log'] = $table;
    $columns = array('id' => 'id', 'object_type' => 'object_type', 'object_id' => 'object_id', 'op' => 'op', 'diff' => 'diff');
    ObjectUtil::addStandardFieldsToTableDefinition($columns);
    $dbtables['objectdata_log_column'] = $columns;
    $tabledef = array('id' => 'I4 PRIMARY AUTO', 'object_type' => "C(80) NOTNULL DEFAULT ''", 'object_id' => 'I4 NOTNULL DEFAULT 0', 'op' => "C(16) NOTNULL DEFAULT ''", 'diff' => "X NOT NULL DEFAULT ''");
    ObjectUtil::addStandardFieldsToTableDataDefinition($tabledef, 'obl_');
    $dbtables['objectdata_log_column_def'] = $tabledef;
    $table = 'objectdata_meta';
    $dbtables['objectdata_meta'] = $table;
    $columns = array('id' => 'id', 'module' => 'module', 'table' => 'tablename', 'idcolumn' => 'idcolumn', 'obj_id' => 'obj_id', 'permissions' => 'permissions', 'dc_title' => 'dc_title', 'dc_author' => 'dc_author', 'dc_subject' => 'dc_subject', 'dc_keywords' => 'dc_keywords', 'dc_description' => 'dc_description', 'dc_publisher' => 'dc_publisher', 'dc_contributor' => 'dc_contributor', 'dc_startdate' => 'dc_startdate', 'dc_enddate' => 'dc_enddate', 'dc_type' => 'dc_type', 'dc_format' => 'dc_format', 'dc_uri' => 'dc_uri', 'dc_source' => 'dc_source', 'dc_language' => 'dc_language', 'dc_relation' => 'dc_relation', 'dc_coverage' => 'dc_coverage', 'dc_entity' => 'dc_entity', 'dc_comment' => 'dc_comment', 'dc_extra' => 'dc_extra');
    ObjectUtil::addStandardFieldsToTableDefinition($columns);
    $dbtables['objectdata_meta_column'] = $columns;
    $tabledef = array('id' => 'I4 PRIMARY AUTO', 'module' => "C(40) NOTNULL DEFAULT ''", 'table' => "C(40) NOTNULL DEFAULT ''", 'idcolumn' => "C(40) NOTNULL DEFAULT ''", 'obj_id' => 'I4 NOTNULL DEFAULT 0', 'permissions' => "C(255) DEFAULT ''", 'dc_title' => "C(80) DEFAULT ''", 'dc_author' => "C(80) DEFAULT ''", 'dc_subject' => "C(255) DEFAULT ''", 'dc_keywords' => "C(128) DEFAULT ''", 'dc_description' => "C(255) DEFAULT ''", 'dc_publisher' => "C(128) DEFAULT ''", 'dc_contributor' => "C(128) DEFAULT ''", 'dc_startdate' => "T DEFAULT '1970-01-01 00:00:00'", 'dc_enddate' => "T DEFAULT '1970-01-01 00:00:00'", 'dc_type' => "C(128) DEFAULT ''", 'dc_format' => "C(128) DEFAULT ''", 'dc_uri' => "C(255) DEFAULT ''", 'dc_source' => "C(128) DEFAULT ''", 'dc_language' => "C(32) DEFAULT ''", 'dc_relation' => "C(255) DEFAULT ''", 'dc_coverage' => "C(64) DEFAULT ''", 'dc_entity' => "C(64) DEFAULT ''", 'dc_comment' => "C(255) DEFAULT ''", 'dc_extra' => "C(255) DEFAULT ''");
    ObjectUtil::addStandardFieldsToTableDataDefinition($tabledef);
    $dbtables['objectdata_meta_column_def'] = $tabledef;
    // workflow
    $dbtables['workflows'] = 'workflows';
    $dbtables['workflows_column'] = array('id' => 'id', 'metaid' => 'metaid', 'module' => 'module', 'schemaname' => 'schemaname', 'state' => 'state', 'type' => 'type', 'obj_table' => 'obj_table', 'obj_idcolumn' => 'obj_idcolumn', 'obj_id' => 'obj_id', 'busy' => 'busy', 'debug' => 'debug');
    $dbtables['workflows_column_def'] = array('id' => 'I NOTNULL AUTO PRIMARY', 'metaid' => 'I NOTNULL DEFAULT 0', 'module' => "C(255) NOTNULL DEFAULT ''", 'schemaname' => "C(255) NOTNULL DEFAULT ''", 'state' => "C(255) NOTNULL DEFAULT ''", 'type' => 'I2 NOTNULL DEFAULT 1', 'obj_table' => "C(40) NOTNULL DEFAULT ''", 'obj_idcolumn' => "C(40) NOTNULL DEFAULT ''", 'obj_id' => 'I4 NOTNULL DEFAULT 0', 'busy' => 'I NOTNULL DEFAULT 0', 'debug' => 'XL');
    // addtitional indexes
    $dbtables['workflows_column_idx'] = array('obj_table' => 'obj_table', 'obj_idcolumn' => 'obj_idcolumn', 'obj_id' => 'obj_id');
    return $dbtables;
}
예제 #12
0
/**
 * Define module tables
 * @author Albert Pérez Monfort
 * @return module tables information
 */
function IWdocmanager_tables() {
    // Initialise table array
    $table = array();

    // define downloads table
    $table['IWdocmanager'] = DBUtil::getLimitedTablename('IWdocmanager');
    $table['IWdocmanager_column'] = array('documentId' => 'documentId',
        'documentName' => 'documentName',
        'categoryId' => 'categoryId',
        'fileName' => 'fileName',
        'description' => 'description',
        'filesize' => 'filesize',
        'author' => 'author',
        'nClicks' => 'nClicks',
        'validated' => 'validated',
        'version' => 'version',
        'authorName' => 'authorName',
        'documentLink' => 'documentLink',
        'fileOriginalName' => 'fileOriginalName',
        'versioned' => 'versioned',
        'versionFrom' => 'versionFrom',
    );

    $table['IWdocmanager_column_def'] = array('documentId' => "I NOTNULL AUTO PRIMARY",
        'documentName' => "C(200) NOTNULL DEFAULT ''",
        'categoryId' => "I NOTNULL DEFAULT 0",
        'fileName' => "C(10) NOTNULL DEFAULT ''",
        'description' => "X NOTNULL",
        'filesize' => "C(10) NOTNULL DEFAULT ''",
        'author' => "I NOTNULL DEFAULT 0",
        'nClicks' => "I NOTNULL DEFAULT '0'",
        'validated' => "I(4) NOTNULL DEFAULT '0'",
        'version' => "C(30) NOTNULL DEFAULT ''",
        'authorName' => "C(120) NOTNULL DEFAULT ''",
        'documentLink' => "C(200) NOTNULL DEFAULT ''",
        'fileOriginalName' => "C(100) NOTNULL DEFAULT ''",
        'versioned' => "I NOTNULL DEFAULT '0'",
        'versionFrom' => "C(255) NOTNULL DEFAULT ''",
    );

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWdocmanager_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWdocmanager_column_def'], 'iw_');

    // define categories table
    $table['IWdocmanager_categories'] = DBUtil::getLimitedTablename('IWdocmanager_categories');
    $table['IWdocmanager_categories_column'] = array('categoryId' => 'categoryId',
        'categoryName' => 'categoryName',
        'description' => 'description',
        'groups' => 'groups',
        'nDocuments' => 'nDocuments',
        'nDocumentsNV' => 'nDocumentsNV',
        'active' => 'active',
        'parentId' => 'parentId',
        'groupsAdd' => 'groupsAdd',
    );

    $table['IWdocmanager_categories_column_def'] = array('categoryId' => "I NOTNULL AUTO PRIMARY",
        'categoryName' => "C(200) NOTNULL DEFAULT ''",
        'description' => "X NOTNULL",
        'groups' => "X NOTNULL DEFAULT ''",
        'nDocuments' => "I NOTNULL DEFAULT '0'",
        'nDocumentsNV' => "I NOTNULL DEFAULT '0'",
        'active' => "I(4) NOTNULL DEFAULT '0'",
        'parentId' => "I NOTNULL DEFAULT '0'",
        'groupsAdd' => "X NOTNULL DEFAULT ''",
    );

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWdocmanager_categories_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWdocmanager_categories_column_def'], 'iw_');

    // Return the table information
    return $table;
}
예제 #13
0
/**
 * @authors Josep Ferràndiz Farré <*****@*****.**>
 * @authors Jordi Fons Vilardell  <*****@*****.**>
 * @authors Joan Guillén Pelegay  <*****@*****.**> 
 * 
 * @par Llicència: 
 * GNU/GPL - http://www.gnu.org/copyleft/gpl.html
 * @package Cataleg
 * @version 1.0
 * @copyright Departament d'Ensenyament. Generalitat de Catalunya 2012-2013
 */

function Cataleg_tables() {
    // Initialise table array
    $tables = array();
    
// CATALEG ************************************************************************************************* 
    // Cataleg: definició de la taula
    //          Contindrà la informació general del catàleg i l'estat 
    //          L'estat ens indica la visualització del catàleg. Cada estat incrementa la visualització
    //          0-Només el veuen els gestors
    //          1-El veuen els editors a 'les meves activitats'
    //		2-El veuen els editors en format 'catàleg' sense activitats
    //          3-El veuen els editors en format 'catàleg' complert
    //          4-El veuen els lectors
    //		Nota: els estats definits apareixen a la 1.0 (les versions anteriors tenien un altre sistema d'estats')
    $tables['cataleg'] = DBUtil::getLimitedTablename('cataleg');
    $tables['cataleg_column'] = array(
                'catId'   => 'catId',
                'anyAcad' => 'anyAcad', // Exemple: 2012-2013
                'nom'     => 'nom',	// Exemple: Catàleg unificat de formació del curs 2012-2013
                'estat'   => 'estat',   // Estat de visualització: 0, 1, 2, 3 o 4
                'editable'=> 'editable' // True si és el catàleg és editable (en les versions inicials(abans de la 1.0) hi havia el camp actiu)
            );

    $tables['cataleg_column_def'] = array(
                'catId'   => "I NOTNULL AUTO PRIMARY",
                'anyAcad' => "C(9) NOTNULL DEFAULT ''",
                'nom'     => "C(255) NOTNULL DEFAULT ''",
                'estat'   => "I1",
                'editable'=> "L NOTNULL DEFAULT 0"
            );
    // Afegir camps estàndard
    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_column_def'],'');
    
// EIXOS *************************************************************************************************   
    // eixos: definició de taula
    //                Contindrà informació relativa als eixos de les orientacions. 
    //                Cada prioritat s'enmarca en un eix
    $tables['cataleg_eixos'] = DBUtil::getLimitedTablename('cataleg_eixos');
    $tables['cataleg_eixos_column'] = array(
                'eixId'     => 'eixId',
                'catId'     => 'catId',
                'nom'       => 'nom',
                'nomCurt'   => 'nomCurt',
                'descripcio'=> 'descripcio',
                'ordre'     => 'ordre',
                'visible'   => 'visible'
            );

    $tables['cataleg_eixos_column_def'] = array(
                'eixId'     => "I NOTNULL AUTO PRIMARY",
                'catId'     => "I NOTNULL",
                'nom'       => "C(255)",
                'nomCurt'   => "C(100)" ,
                'descripcio'=> "X",
                'ordre'     => "C(2)",
                'visible'   => "L DEFAULT 1"
            );
    // Afegir camps estàndard
    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_eixos_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_eixos_column_def']);
    
// PRIORITATS *************************************************************************************************
    // prioritats:  definició de taula
    //              Recollirà la informació relativa a les prioritats i les orientacions
    $tables['cataleg_prioritats'] = DBUtil::getLimitedTablename('cataleg_prioritats');
    $tables['cataleg_prioritats_column'] = array(
                'priId'        => 'priId',
                'eixId'        => 'eixId',
                'nom'          => 'nom',
                'nomCurt'      => 'nomCurt',
                'orientacions' => 'orientacions',
                'recursos'     => 'recursos',
                'ordre'        => 'ordre',
                'visible'      => 'visible'
            );

    $tables['cataleg_prioritats_column_def'] = array(
                'priId'        => "I NOTNULL AUTO PRIMARY",
                'eixId'        => "I",
                'nom'          => "X",
                'nomCurt'      => "C(200)",
                'orientacions' => "X",
                'recursos'     => "X" ,
                'ordre'        => "I",
                'visible'      => "L DEFAULT 1"
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_prioritats_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_prioritats_column_def']);

// UNITATS IMPLICADES *************************************************************************************************    
    // unitatsImplicades:  definició de taula
    //              Recollirà llista d'unitats implicades en una prioritat
    //              i les dades de les persones responsables
    $tables['cataleg_unitatsImplicades'] = DBUtil::getLimitedTablename('cataleg_unitatsImplicades');
    $tables['cataleg_unitatsImplicades_column'] = array(
                'impunitId'     => 'impunitId',       // Camp id de la taula d'unitats implicades   
                'priId'         => 'priId',          // Id prioritat relacionada
                'uniId'         => 'uniId',          // Id Unitat implicada
                'tematica'      => 'tematica',       // Opcional. Indicació temàtica específica de la prioritat
                'pContacte'     => 'pContacte',      // Persona de contacte
                'email'		=> 'email',	     // Correu electrònic de la persona de contacte
                'telContacte'   => 'telContacte',    // Telèfon/extensió persona de contacte
                'dispFormador'  => 'dispFormador'    // La unitat organitzadora disposa de persones formadores                
            );

    $tables['cataleg_unitatsImplicades_column_def'] = array(
                'impunitId'     => "I NOTNULL AUTO PRIMARY", //Afegit a la versió 1.0
                'priId'         => "I NOTNULL ",
                'uniId'         => "I NOTNULL ",
                'tematica'      => "C(50)",          // Opcional. Indicació temàtica específica de la prioritat
                'pContacte'     => "C(120)",         // Persona de contacte
                'email'		=> "C(50)",	     // Correu electrònic de la persona de contacte
                'telContacte'   => "C(20)",          // Telefon/extensió persona de contacte
                'dispFormador'  => "L NOTNULL DEFAULT 0"    // La unitat organitzadora disposa de persones formadores  
        
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_unitatsImplicades_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_unitatsImplicades_column_def']);    
    
// SUBPRIORITATS *************************************************************************************************
    // subprioritats:  definició de taula
    //                 Recollirà llista de subprioritats
    $tables['cataleg_subprioritats'] = DBUtil::getLimitedTablename('cataleg_subprioritats');
    $tables['cataleg_subprioritats_column'] = array(
                'sprId'   => 'sprId',
                'priId'   => 'priId',  // Id de la prioritat mare
                'nom'     => 'nom',
                'nomCurt' => 'nomCurt',
                'ordre'   => 'ordre',  //a, b, c, ...
                'visible' => 'visible'
            );

    $tables['cataleg_subprioritats_column_def'] = array(
                'sprId'   => "I NOTNULL AUTO PRIMARY",
                'priId'   => "I NOTNULL",
                'nom'     => "X",
                'nomCurt' => "C(200)",
                'ordre'   => "C(4)",
                'visible' => "L DEFAULT 1"
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_subprioritats_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_subprioritats_column_def']);
    
// ACTIVITATS *************************************************************************************************    
    // activitats: definició de taula
    //             Recollirà informació relativa a les activitats proposades
    $tables['cataleg_activitats'] = DBUtil::getLimitedTablename('cataleg_activitats');
    $tables['cataleg_activitats_column'] = array(
                'actId'         => 'actId',                 
                'priId'         => 'priId',                 // Id de prioritat
                'sprId'         => 'sprId',                 // Id de subprioritat
                'uniId'         => 'uniId',                 // id del grup propietari de la fitxa (unitat)
                'titol'         => 'titol',                 // Títol activitat
                'prioritaria'   => 'prioritaria',           // Indica si l'activitat està prioritzada pel Dept.
                'tGTAF'         => 'tGTAF',                 // Tipologia GTAF
                'destinataris'  => 'destinataris',          // serialització dels id's a qui s'adreça(taula auxiliar/mode = "d")
                'observacions'  => 'observacions',          // perfil de les persones destinatàries
                'curs'          => 'curs',                  // curs, taller, seminari...
                'presencialitat'=> 'presencialitat',        // presencial, semipresencial, no presencial
                'abast'         => 'abast',                 // al centre, diversos centres
                'hores'         => 'hores',                 // Hores totals activitat
                'objectius'     => 'objectius',             // serialització d'objectius
                'continguts'    => 'continguts',            // serialització de continguts
                'gestio'        => 'gestio',                // serialització de les opcions de gestió: ID taula auxiliar tipus "gest"
                'estat'         => 'estat',                 // 
                'ordre'         => 'ordre',                 // Per si es vol forçar alguna ordenació no alfabètica 
                'validador'     => 'validador',             // uid de la persona que valida la fitxa
                'dataVal'       => 'dataVal',               // Data de validació              
                'dataModif'     => 'dataModif',             // Data de modificació per publicitar
                'obs_validador' => 'obs_validador',         // Notes del validador a l'editor
                'obs_editor'    => 'obs_editor',            // Notes de l'editor al validador
                'centres'       => 'centres',               // Relació de centres (serialitzat)
                'info'          => 'info',                  // Observacions generals - visibles a la fitxa
                'activa'        => 'activa'
            );

    $tables['cataleg_activitats_column_def'] = array(
                'actId'         => "I NOTNULL AUTO PRIMARY", 
                'priId'         => "I",            
                'sprId'         => "I",             
                'uniId'         => "I",          // id del grup propietari de la fitxa (unitat)
                'titol'         => "C(255)", 
                'prioritaria'   => "L DEFAULT 0",
                'tGTAF'         => "C(4)",       // Tipologia GTAF
                'destinataris'  => "C(255)",     // serialització dels id's a qui s'adreça(taula destinataris)
                                                 //(taula destinataris) ID taula auxiliar tipus "dest"	
                'observacions'  => "C(255)",     // perfil de les persones destinatàries
                'curs'          => "I",          // ID taula auxiliar tipus:"curs" curs, taller, seminari...
                'presencialitat'=> "I",          // ID taula auxiliar tipus:"pres" presencial, semi, no presencial
                'abast'         => "I",          // ID taula auxiliar tipus:"abast" al centre, diversos centres
                'hores'		=> "I2 UNSIGNED",// Durada en hores de l'activitat
                'objectius'     => "X",          // serialització d'objectius
                'continguts'    => "X",          // serialització de continguts
                'gestio'        => "X",     // serialització de les opcions de gestió: ID taula auxiliar tipus "gest"
                                                 // tipus "gest" + gesId taula gestioActivitatDefaults
                'estat'         => "I1 DEFAULT 0",  // Estat de la fitxa codificat: 
						    // 0 -> esborrany;
						    // 1 -> enviada
						    // 2 -> cal revisar
						    // 3 -> validada
						    // 4 -> modificada
                                                    // 5 -> anul·lada
     		'ordre'   	=> "I2 UNSIGNED",// Per si es vol forçar alguna ordenació no alfabètica
                'validador'     => "I",          // uid de la persona que valida la fitxa
                'dataVal'       => "T",          // Datetime o timestamp de validació
                'dataModif'     => "T",          // Datetime de la validació de modificació per publicitar
		'obs_validador' => "X",          // Text per observacions de pers. validadora a editora
		'obs_editor'    => "X",          // Text per observacions de pers. editora a validadora 
                'centres'       => "X",
                'info'          => "X",          // Text per a observacions generals - camp ordinari de la fitxa
		'activa'        => "L DEFAULT 1"
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_activitats_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_activitats_column_def']);

// ACTIVITATS ZONA *************************************************************************************************    
    // activitatsZona: definició de taula
    //            per a cada activitat recollir distribució territorial
    //            Relació amb la taula activitats pel camp actId 
    $tables['cataleg_activitatsZona'] = DBUtil::getLimitedTablename('cataleg_activitatsZona');
    $tables['cataleg_activitatsZona_column'] = array(
                'actId'   => 'actId',      // Id activitat relacionada
                'lloc'    => 'lloc',       // lloc o Id del lloc de realització
                'qtty'    => 'qtty',       // Quantitat d'activitats previstes
                'mesInici'=> 'mesInici'    // Mes d'inici de l'activitat                
            );

    $tables['cataleg_activitatsZona_column_def'] = array(
                'actId'   => "I NOTNULL PRIMARY",
                'lloc'    => "I PRIMARY",         // Id del lloc de realització (taula auxiliar: tipus "c"
                'qtty'    => "C(3)",                // Quantitat d'activitats previstes                
                'mesInici'=> "C(10)"              // Mes d'inici de l'activitat
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_activitatsZona_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_activitatsZona_column_def']);    
    
// UNITATS *************************************************************************************************    
    // unitats:  definició de taula
    //           Recollirà llista de subprioritats
    $tables['cataleg_unitats'] = DBUtil::getLimitedTablename('cataleg_unitats');
    $tables['cataleg_unitats_column'] = array(
                'uniId'      => 'uniId',
                'gzId'       => 'gzId',        // Identificador del grup Zikula ambpermís per gestionar aquesta unitat
                'catId'      => 'catId',
                'nom'        => 'nom',
                'descripcio' => 'descripcio',
                'activa'     => 'activa'
            );

    $tables['cataleg_unitats_column_def'] = array(
                'uniId'      => "I NOTNULL AUTO PRIMARY",
                'gzId'       => "I",
                'catId'      => "I",                        
                'nom'        => "C(255)",
                'descripcio' => "X",                
                'activa'     => "L DEFAULT 1"
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_unitats_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_unitats_column_def']);
    

// RESPONSABLES *************************************************************************************************    
    // responsables: definició de taula
    //               recull informació de les persones responsable d'una unitat o servei
    // UNITATS <---- RESPONSABLES (camp relacionats: uniId, uniId)
    $tables['cataleg_responsables'] = DBUtil::getLimitedTablename('cataleg_responsables');
    $tables['cataleg_responsables_column'] = array(
                'respunitId'  => 'respunitId',   //Id de la taula  
                'uniId'       => 'uniId',       // Id de la unitat de la persona responsable
                'responsable' => 'responsable', // Nom i cognoms de la persona responsable
                'email'       => 'email',       // Correu electrònic de la pers. responsable
                'telefon'     => 'telefon'      // Telefon i extensió
            );

    $tables['cataleg_responsables_column_def'] = array(
                'respunitId'  => "I NOTNULL AUTO PRIMARY", //Afegit ala versió 1.0
                'uniId'       => "I NOTNULL",
                'responsable' => "C(120)",      // Nom i cognoms de la persona responsable
                'email'       => "C(50)",       // Correu electrònic de la pers. responsable
                'telefon'     => "C(20)"        // Telefon i extensió        
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_responsables_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_responsables_column_def']);    
    
// CONTACTES *************************************************************************************************    
    // contactes: definició de taula
    //               recull informació de les persones de contacte relacionades amb una activitat
    //               Fitxa: activitats
    //               
    // ACTIVITATS <---- CONTACTES (camp relacionats: actId, actId)
    $tables['cataleg_contactes'] = DBUtil::getLimitedTablename('cataleg_contactes');
    $tables['cataleg_contactes_column'] = array(
                'actId'       => 'actId',       // Id de la unitat de la persona responsable
                'pContacte'   => 'pContacte', // Nom i cognoms de la persona responsable
                'email'       => 'email',       // Correu electrònic de la pers. responsable
                'telefon'     => 'telefon'      // Telefon i extensió
            );

    $tables['cataleg_contactes_column_def'] = array(
                'actId'       => "I",
                'pContacte'   => "C(120)",      // Nom i cognoms de la persona responsable
                'email'       => "C(50)",       // Correu electrònic de la pers. responsable
                'telefon'     => "C(20)"        // Telefon i extensió        
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_contactes_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_contactes_column_def']);    
    
// AUXILIAR *************************************************************************************************    
    // auxiliar: definició de taula
    //           Contindrà informació ítul en llistats o desplegables agrupats per "tipus"
    //           tipus "dest": possibles distinatris de la formació (Infantil, Primària, CdA, ...)
    //		 tipus "abast": abast de la formació (al centre / diversos centres)
    //		 tipus "pres": modalitat de la formació (semi/presencial/no presencial)
    //		 tipus "curs": tipologia de la formació (curs, taller, seminari, jornada, ...)
    //           tipus "sstt": llistat de comarques (SSTT)
    //           tipus "gest": (gestió) Servei educatiu, Servei territorial, Unitat, PEEE, ...
    $tables['cataleg_auxiliar'] = DBUtil::getLimitedTablename('cataleg_auxiliar');
    $tables['cataleg_auxiliar_column'] = array(
                'auxId'   => 'auxId',
                'nom'     => 'nom',       
                'nomCurt' => 'nomCurt',
                'tipus'   => 'tipus',       // tipus "dest": possibles distinatris de la formació (Infantil, Primària, CdA, ...)
                                            // tipus "abast": abast de la formació (al centre / diversos centres)
                                            // tipus "pres": modalitat de la formació (semi/presencial/no presencial)
                                            // tipus "curs": tipologia de la formació (curs, taller, seminari, jornada, ...)
                                            // tipus "sstt": llistat de comarques (SSTT)
                                            // tipus "gest": (gestió) Servei educatiu, Servei territorial, Unitat, PEEE, ...
                'ordre'   => 'ordre',
                'visible' => 'visible'
                
            );

    $tables['cataleg_auxiliar_column_def'] = array(
                'auxId'   => "I NOTNULL AUTO PRIMARY",
                'nom'     => "C(50) NOTNULL",
                'nomCurt' => "C(10)",
                'tipus'   => "C(5)",
		'ordre'   => "I1 UNSIGNED DEFAULT 125",
                'visible' => "L DEFAULT 1"
        
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_auxiliar_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_auxiliar_column_def']);   

// GESTIÓ *************************************************************************************************    
    // gestio: definició de taula
    //         opcions per defecte i elements de gestió d'una activitat
    $tables['cataleg_gestioActivitatDefaults'] = DBUtil::getLimitedTablename('cataleg_gestioActivitatDefaults');
    $tables['cataleg_gestioActivitatDefaults_column'] = array(
                'gesId'    => 'gesId',
                'text'     => 'text',       //Cerca el lloc..., Difusió, Donar d'alta al GTAF, ...
                'opcions'  => 'opcions',    //Serialització dels elements a mostrar en la llista desplegable: 
                                            //ID taula auxiliar: tipus "gest" -> SE, ST, ...
                'opSE'     => 'opSE',       // Default per a servei educatiu Id
                'opST'     => 'opST',       // Default per a servei territorial Id
                'opUN'     => 'opUN',       // Default per a Unitat Id
                'ordre'    => 'ordre',      // Ordre per mostrar els diferents elements de gestió
                'visible'  => 'visible'                
            );

    $tables['cataleg_gestioActivitatDefaults_column_def'] = array(
                'gesId'    => "I NOTNULL AUTO PRIMARY",
                'text'     => "C(50)",      //Cerca el lloc..., Difusió, Donar d'alta al GTAF, ...
                'opcions'  => "C(255)",     //Serialització dels elements a mostrar en la llista desplegable: 
                                            //ID taula auxiliar: tipus "gest" -> SE, ST, ...
                'opSE'     => "I",          // Default per a servei educatiu Id
                'opST'     => "I",          // Default per a servei territorial Id
                'opUN'     => "I",          // Default per a Unitat Id
                'ordre'    => "I1 UNSIGNED",// (0 -  255) Ordre per mostrar els diferents elements de gestió
                'visible'  => "L DEFAULT 1"
        
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_gestioActivitat_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_gestioActivitat_column_def']);    
    
// CENTRESACTIVITAT *************************************************************************************************    
    // centresActivitat: definició de taula
    //         opcions per defecte i elements de gestió d'una activitat
    $tables['cataleg_centresActivitat'] = DBUtil::getLimitedTablename('cataleg_centresActivitat');
    $tables['cataleg_centresActivitat_column'] = array(
                'actId'    => 'actId',
                'centre'   => 'centre'        
            );

    $tables['cataleg_centresActivitat_column_def'] = array(
                'actId'    => "I NOTNULL PRIMARY",
                'centre'   => "C(8) NOTNULL PRIMARY"
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_centresActivitat_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_centresActivitat_column_def']);    

// CENTRES *************************************************************************************************    
    // centres: definició de taula
    // importació de la informació del GTAF per tenir la informació dels centres de Catalunya
    $tables['cataleg_centres'] = DBUtil::getLimitedTablename('cataleg_centres');
    $tables['cataleg_centres_column'] = array(
        'CODI_ENTITAT'      => 'CODI_ENTITAT',
        'CODI_TIPUS_ENTITAT'=> 'CODI_TIPUS_ENTITAT',
	'NOM_ENTITAT'       => 'NOM_ENTITAT',
	'NOM_LOCALITAT'     => 'NOM_LOCALITAT',
	'NOM_DT'            => 'NOM_DT',
	'CODI_DT'           => 'CODI_DT',
	'NOM_TIPUS_ENTITAT' => 'NOM_TIPUS_ENTITAT'
     );

    $tables['cataleg_centres_column_def'] = array(
        'CODI_ENTITAT'      => "C(8) NOTNULL PRIMARY",
        'CODI_TIPUS_ENTITAT'=> "C(5)",
	'NOM_ENTITAT'       => "C(50)",
	'NOM_LOCALITAT'     => "C(50)",
	'NOM_DT'            => "C(50)",
	'CODI_DT'           => "C(1)",
	'NOM_TIPUS_ENTITAT' => "C(30)"
    );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_centres_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_centres_column_def']);    

// importTaules *************************************************************************************************    
    // Recull les correspondències definides entre catàlegs per a poder importar activitats
    // 
    $tables['cataleg_importTaules'] = DBUtil::getLimitedTablename('cataleg_importTaules');
    $tables['cataleg_importTaules_column'] = array(
        'importId'  => 'importId',
        'catIdOri'  => 'catIdOri',
	'catIdDest' => 'catIdDest'
	            );

    $tables['cataleg_importTaules_column_def'] = array(
        'importId'  => "I NOTNULL AUTO PRIMARY", //index, es fa servir com a referència a cataleg_importAssign
        'catIdOri'  => "I", //catId del Catàleg origen de la importació
	'catIdDest' => "I" //catId del Catàleg destinació de la importació
		            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_importTaules_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_importTaules_column_def']);
    $tables['cataleg_importTaules_column_idx'] = array ('catsId' => array('columns' => array('catIdOri', 'catIdDest'),'options' => array('UNIQUE' => true)));
// Taula cataleg_importAssign *************************************************************************************************    
    // Recull les relacions entre prioritat-subprioritat d'un catàleg i un altre
    // Permet fer l'assignació de valors en importar activitats entre dos catàlegs
    $tables['cataleg_importAssign'] = DBUtil::getLimitedTablename('cataleg_importAssign');
    $tables['cataleg_importAssign_column'] = array(
        'importId' => 'importId',
        'idsOri'   => 'idsOri',
	'idsDest'  => 'idsDest'
     );

    $tables['cataleg_importAssign_column_def'] = array(
        'importId' => "I NOTNULL", // index de la taula cataleg_importTaules on s'estableix la correspondència
        'idsOri'   => "C(25) NOTNULL PRIMARY", //priId$$sprId del catàleg origen
	'idsDest'  => "C(25) NOTNULL PRIMARY" //priId$$sprId del catàleg destinació
    );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['cataleg_importAssign_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['cataleg_importAssign_column_def']);    

// Taula cataleg_gtafEntities *************************************************************************************************
    // Recull les entitats de gtaf utilitzaces per a l'assignació dels usuaris
    // Corresponen a unitats (ex-> 0552), st (ex-> 7) i crp (ex-> 702)
    // El camp tipus podrà ser UNI, ST o SE
    $tables['cataleg_gtafEntities'] = DBUtil::getLimitedTablename('cataleg_gtafEntities');
    $tables['cataleg_gtafEntities_column'] = array(
        'gtafEntityId'  => 'gtafEntityId',
        'nom'           => 'nom',
        'tipus'         => 'tipus',
        'gtafGroupId'   => 'gtafGroupId'
    );
    $tables['cataleg_gtafEntities_column_def'] = array(
        'gtafEntityId'  => 'C(5) NOTNULL PRIMARY',
        'nom'           => 'C(100) NOTNULL',
        'tipus'         => 'C(5) NOTNULL',
        'gtafGroupId'   => 'C(5) NOTNULL'
    );
// Taula cataleg_gtafGroups ***************************************************************************************************
    // Recull les agrupacions d'enitats de gtaf amb la seva dependència orgànica
    // Utilitzarem els mateixos codis que té la seva entitat (gtafEnitityId) principal
    $tables['cataleg_gtafGroups'] = DBUtil::getLimitedTablename('cataleg_gtafGroups');
    $tables['cataleg_gtafGroups_column'] = array(
        'gtafGroupId'   => 'gtafGroupId',
        'nom'           => 'nom',
        'resp_uid'      => 'resp_uid'
    );
    $tables['cataleg_gtafGroups_column_def'] = array(
        'gtafGroupId'   => 'C(5) NOTNULL PRIMARY',
        'nom'           => 'C(100) NOTNULL',
        'resp_uid'      => 'I'
    );

    // Inclusió de la definició de la taula IWusers 
    $tables['IWusers'] = DBUtil::getLimitedTablename('IWusers');
    $tables['IWusers_column'] = array(
        'suid'        => 'iw_suid',
        'uid'         => 'iw_uid',
        'id'          => 'iw_id',
        'nom'         => 'iw_nom',
        'cognom1'     => 'iw_cognom1',
        'cognom2'     => 'iw_cognom2',
        'naixement'   => 'iw_naixement',
        'accio'       => 'iw_accio',
        'sex'         => 'iw_sex',
        'description' => 'iw_description',
        'avatar'      => 'iw_avatar',
        'newavatar'   => 'iw_newavatar',
        'code'        => 'iw_code'
    );
    $tables['IWusers_column_def'] = array('suid' => "I NOTNULL AUTO PRIMARY",
        'uid' => "I NOTNULL DEFAULT '0'",
        'id' => "C(50) NOTNULL DEFAULT ''",
        'nom' => "C(25) NOTNULL DEFAULT ''",
        'cognom1' => "C(25) NOTNULL DEFAULT ''",
        'cognom2' => "C(25) NOTNULL DEFAULT ''",
        'naixement' => "C(8) NOTNULL DEFAULT ''",
        'accio' => "I(1) NOTNULL DEFAULT '0'",
        'sex' => "C(1) NOTNULL DEFAULT ''",
        'description' => "X NOTNULL",
        'avatar' => "C(50) NOTNULL DEFAULT ''",
        'newavatar' => "C(50) NOTNULL DEFAULT ''",
        'code'      => "C(5)"
    );

    //Returns informació de les taules
    return $tables;
}
예제 #14
0
/**
 * @authors Josep Ferràndiz Farré <*****@*****.**>
 * @authors Jordi Fons Vilardell  <*****@*****.**>
 * @authors Joan Guillén Pelegay  <*****@*****.**>
 *
 * @par Llicència:
 * GNU/GPL - http://www.gnu.org/copyleft/gpl.html
 * @package Llicencies
 * @version 1.0
 * @copyright Departament d'Ensenyament. Generalitat de Catalunya 2013-2014
 */

function Llicencies_tables() {
    // Initialise table array
    $tables = array();

// LLICENCIES *************************************************************************************************
    // llicencies: 
    //          Contindrà la informació de les llicències d'estudi realitzades i l'estat de finalització
    
    $tables['llicencies'] = DBUtil::getLimitedTablename('llicencies');
    $tables['llicencies_column'] = array(
                'codi_treball'     => 'codi_treball',
                'titol'            => 'titol',
                'caracteristiques' => 'caracteristiques',
                'orientacio'       => 'orientacio',
                'nivell'           => 'nivell' ,
                'resum'            => 'resum' ,
                'annexos'          => 'annexos' ,
                'web'              => 'web' ,
                'altres'           => 'altres' ,
                'tema'             => 'tema' ,
                'subtema'          => 'subtema' ,
                'tipus'            => 'tipus',
                'curs'             => 'curs',
                'capsa'            => 'capsa',
                'url'              => 'url',
                'modalitat'        => 'modalitat',
                'cognoms'          => 'cognoms',
                'nom'              => 'nom',
                'correuel'         => 'correuel',
                'estat'            => 'estat'                                
            );

    $tables['llicencies_column_def'] = array(
                'codi_treball'     => "I NOTNULL AUTO PRIMARY",
                'titol'            => "C(255) NOTNULL",
                'caracteristiques' => "X",
                'orientacio'       => "X",
                'nivell'           => "C(255)",
                'resum'            => "X",
                'annexos'          => "C(255)" ,
                'web'              => "C(255)" ,
                'altres'           => "C(255)" ,
                'tema'             => "I" ,
                'subtema'          => "I" ,
                'tipus'            => "I" ,
                'curs'             => "C(10)",
                'capsa'            => "C(10)",
                'url'              => "C(255)" ,
                'modalitat'        => "C(3)" ,
                'cognoms'          => "C(255)" ,
                'nom'              => "C(100)" ,
                'correuel'         => "C(255)",
                'estat'            => "I"            
            );
    // Afegir camps estàndard
    ObjectUtil::addStandardFieldsToTableDefinition($tables['llicencies_column']);
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['llicencies_column_def']);

// CURS *************************************************************************************************
    // curs: llistat de cursos disponibles format yyyy/yy
    $tables['llicencies_curs'] = DBUtil::getLimitedTablename('llicencies_curs');
    $tables['llicencies_curs_column'] = array(
                'curs'     => 'curs'
            );

    $tables['llicencies_curs_column_def'] = array(
                'curs'     => "C(10) NOTNULL PRIMARY"
            );
    // Afegir camps estàndard
    ObjectUtil::addStandardFieldsToTableDefinition($tables['llicencies_curs_column']);
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['llicencies_curs_column_def']);

// MODALITAT *************************************************************************************************
// modalitat de llicència A, B1, B2, B3 o C
    $tables['llicencies_modalitat'] = DBUtil::getLimitedTablename('llicencies_modalitat');
    $tables['llicencies_modalitat_column'] = array(
                'id_mod'     => 'id_mod',
                'descripcio' => 'descripcio'
            );

    $tables['llicencies_modalitat_column_def'] = array(
                'id_mod'     => "C(3) NOTNULL PRIMARY",
                'descripcio' => "C(255) NOTNULL"
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['llicencies_modalitat_column']);
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['llicencies_modalitat_column_def']);


// TEMA *************************************************************************************************
    $tables['llicencies_tema'] = DBUtil::getLimitedTablename('llicencies_tema');
    $tables['llicencies_tema_column'] = array(
                'codi_tema' => 'codi_tema',
                'nom'       => 'nom'
            );

    $tables['llicencies_tema_column_def'] = array(
                'codi_tema' => "I NOTNULL PRIMARY",
                'nom'       => "C(255) NOTNULL"
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['llicencies_tema_column']);
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['llicencies_tema_column_def']);

// SUBTEMA *************************************************************************************************
    $tables['llicencies_subtema'] = DBUtil::getLimitedTablename('llicencies_subtema');
    $tables['llicencies_subtema_column'] = array(
                'codi_subt' => 'codi_subt',
                'nom'          => 'nom'
            );

    $tables['llicencies_subtema_column_def'] = array(
                'codi_subt' => "I NOTNULL PRIMARY",
                'nom'          => "C(255) NOTNULL"
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['llicencies_subtema_column']);
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['llicencies_subtema_column_def']);
    
// TIPUS *************************************************************************************************
//     Més categories relatives a l'àmbit del treball
    $tables['llicencies_tipus'] = DBUtil::getLimitedTablename('llicencies_tipus');
    $tables['llicencies_tipus_column'] = array(
                'codi_tipus'   => 'codi_tipus',
                'nom'          => 'nom'
            );

    $tables['llicencies_tipus_column_def'] = array(
                'codi_tipus'   => "I NOTNULL PRIMARY",
                'nom'          => "C(255) NOTNULL"
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['llicencies_tipus_column']);
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['llicencies_tipus_column_def']);

// ESTATS *************************************************************************************************
// estat de la llicència: 
// sense memòria pdf, preparada, pròrroga, renúncia, expedient, desapareguda, pendent, en elaboració
    
    $tables['llicencies_estats'] = DBUtil::getLimitedTablename('llicencies_estats');
    $tables['llicencies_estats_column'] = array(
                'id_estat'   => 'id_estat',
                'descripcio' => 'descripcio'
            );

    $tables['llicencies_estats_column_def'] = array(
                'id_estat'   => "I NOTNULL PRIMARY",
                'descripcio' => "C(255) NOTNULL"
            );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['llicencies_estats_column']);
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['llicencies_estats_column_def']);

    //Returns informació de les taules
    return $tables;
}
예제 #15
0
/**
 * Define module tables
 * @author Albert Pérez Monfort (aperezm@xtec.cat)
 * @author Josep Ferràndiz Farré (jferran6@xtec.cat)
 * @return module tables information
 */
function IWbookings_tables() {
    // Initialize table array
    $table = array();

    // IWbookings table definition
    $table['IWbookings'] = DBUtil::getLimitedTablename('IWbookings');
    $table['IWbookings_column'] = array('bid' => 'bid',
        'user' => 'user',
        'sid' => 'sid',
        'start' => 'start',
        'end' => 'end',
        'usrgroup' => 'usrgroup',
        'dayofweek' => 'dayofweek',
        'temp' => 'temp',
        'cancel' => 'cancel',
        'reason' => 'reason',
        'bkey' => 'bkey');

    $table['IWbookings_column_def'] = array('bid' => "I NOTNULL AUTO PRIMARY",
        'sid' => "I NOTNULL DEFAULT '0'",
        'user' => "I NOTNULL DEFAULT '0'",
        'start' => "T NOTNULL DEFAULT '0000-00-00 00:00:00'",
        'end' => "T NOTNULL DEFAULT '0000-00-00 00:00:00'",
        'usrgroup' => "C(30) NOTNULL DEFAULT ''",
        'reason' => "C(255) NOTNULL DEFAULT ''",
        'dayofweek' => "I(1) NOTNULL DEFAULT '0'",
        'temp' => "I(1) NOTNULL DEFAULT '0'",
        'cancel' => "I(1) NOTNULL DEFAULT '0'",
        'bkey' => "I(10) NOTNULL DEFAULT '0'");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWbookings_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWbookings_column_def'], 'iw_');

    // IWbookings_spaces table definition
    $table['IWbookings_spaces'] = DBUtil::getLimitedTablename('IWbookings_spaces');
    $table['IWbookings_spaces_column'] = array('sid' => 'sid',
        'space_name' => 'space_name',
        'description' => 'description',
        'mdid' => 'mdid',
        'vertical' => 'vertical',
        'color' => 'color',
        'active' => 'active');

    $table['IWbookings_spaces_column_def'] = array('sid' => "I NOTNULL AUTO PRIMARY",
        'space_name' => "C(100) NOTNULL DEFAULT ''",
        'description' => "C(255) NOTNULL DEFAULT ''",
        'mdid' => "I NOTNULL DEFAULT '0'",
        'vertical' => "I(1) NOTNULL DEFAULT '0'",
        'color' => "C(7) NOT NULL DEFAULT '#FFFFFF'",
        'active' => "I(1) NOTNULL DEFAULT '0'");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWbookings_spaces_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWbookings_spaces_column_def'], 'iw_');

      // IWmain table definition needed in this module
        $table['IWmain'] = DBUtil::getLimitedTablename('IWmain');
        $table['IWmain_column'] = array('id' => 'iw_id',
        'uid' => 'iw_uid',
        'module' => 'iw_module',
        'name' => 'iw_name',
        'value' => 'iw_value',
        'lifetime' => 'iw_lifetime');

      // iw_timeframes table definition needed in this module
        // IWtimeframes table definition
            $table['IWtimeframes'] = DBUtil::getLimitedTablename('IWtimeframes');
            $table['IWtimeframes_column'] = array('hid' => 'hid',
                                                  'mdid' => 'mdid', //identifica el marc horari
                                                  'start' => 'start',
                                                  'end' => 'end',
                                                  'descriu' => 'descriu');

            $table['IWtimeframes_definition'] = DBUtil::getLimitedTablename('IWtimeframes_definition');
            $table['IWtimeframes_definition_column'] = array('mdid' => 'mdid',
                                                     'nom_marc' => 'nom_marc',
                                                     'descriu' => 'descriu');
            $table['IWtimeframes_definition_column_def'] = array('mdid' => "I NOTNULL AUTO PRIMARY",
                                                         'nom_marc' => "C(50) NOTNULL DEFAULT ''",
                                                         'descriu' => "C(255) NOTNULL DEFAULT ''");

    // Return the table information
    return $table;
}
예제 #16
0
/**
 * Populate tables array for News module
 * 
 * This function is called internally by the core whenever the module is
 * loaded. It delivers the table information to the core.
 * It can be loaded explicitly using the ModUtil::dbInfoLoad() API function.
 * 
 * @return       array       The table information.
 */
function News_tables()
{
    // Initialise table array
    $tables = array();

    // Full table definition
    $tables['news'] = 'news';
    $tables['news_column'] = array(
        'sid'              => 'sid',
        'title'            => 'title',
        'urltitle'         => 'urltitle',
        'hometext'         => 'hometext',
        'bodytext'         => 'bodytext',
        'counter'          => 'counter',
        'contributor'      => 'contributor',
        'approver'         => 'approver',
        'notes'            => 'notes',
        'displayonindex'   => 'displayonindex',
        'language'         => 'language',
        'allowcomments'    => 'allowcomments',
        'format_type'      => 'format_type',
        'published_status' => 'published_status',
        'from'             => 'ffrom', //not a typo! from is a reserved sql word
        'to'               => 'tto', //not a typo! to is a reserved sql word
        'weight'           => 'weight',
        'pictures'         => 'pictures'
    );
    $tables['news_column_def'] = array(
        'sid'              => 'I NOTNULL AUTO PRIMARY',
        'title'            => 'C(255) DEFAULT NULL',
        'urltitle'         => 'C(255) DEFAULT NULL',
        'hometext'         => 'XL NOTNULL',
        'bodytext'         => 'XL NOTNULL',
        'counter'          => 'I DEFAULT 0',
        'contributor'      => "C(25) NOTNULL DEFAULT ''",
        'approver'         => 'I DEFAULT 0',
        'notes'            => 'X NOTNULL',
        'displayonindex'   => 'I1 NOTNULL DEFAULT 0',
        'language'         => "C(30) NOTNULL DEFAULT ''",
        'allowcomments'    => 'I1 NOTNULL DEFAULT 0',
        'format_type'      => 'I1 NOTNULL DEFAULT 0',
        'published_status' => 'I1 DEFAULT 0',
        'from'             => 'T DEFAULT NULL',
        'to'               => 'T DEFAULT NULL',
        'weight'           => 'I1 DEFAULT 0',
        'pictures'         => 'I DEFAULT 0'
    );

    // Enable categorization services
    $tables['news_db_extra_enable_categorization'] = ModUtil::getVar('News', 'enablecategorization');
    $tables['news_primary_key_column'] = 'sid';

    // Enable attribution services
    $tables['news_db_extra_enable_attribution'] = ModUtil::getVar('News', 'enableattribution');

    // add standard data fields
    ObjectUtil::addStandardFieldsToTableDefinition ($tables['news_column']);
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['news_column_def']);

    // old tables for upgrading
    $tables['comments'] = DBUtil::getLimitedTablename('comments');
    $tables['autonews'] = DBUtil::getLimitedTablename('autonews');
    $tables['queue'] = DBUtil::getLimitedTablename('queue');
    $tables['stories'] = DBUtil::getLimitedTablename('stories');
    $tables['stories_cat'] = DBUtil::getLimitedTablename('stories_cat');
    $tables['topics'] = DBUtil::getLimitedTablename('topics');

    return $tables;
}
예제 #17
0
function IWbooks_tables() {
    // Initialise table array
    $table = array();

    $table['IWbooks'] = DBUtil::getLimitedTablename('IWbooks');

    $table['IWbooks_column'] = array(
        'tid' => 'pn_tid',
        'autor' => 'pn_autor',
        'titol' => 'pn_titol',
        'editorial' => 'pn_editorial',
        'any_publi' => 'pn_any_publi',
        'isbn' => 'pn_isbn',
        'codi_mat' => 'pn_codi_mat',
        'lectura' => 'pn_lectura',
        'any' => 'pn_any',
        'etapa' => 'pn_etapa',
        'nivell' => 'pn_nivell',
        'avaluacio' => 'pn_avaluacio',
        'optativa' => 'pn_optativa',
        'observacions' => 'pn_observacions',
        'materials' => 'pn_materials'
    );

    $table['IWbooks_column_def'] = array(
        'tid' => "I NOTNULL AUTO PRIMARY",
        'autor' => "C(50) NOT NULL DEFAULT ''",
        'titol' => "C(50) NOT NULL DEFAULT ''",
        'editorial' => "C(50) NOT NULL DEFAULT ''",
        'any_publi' => "C(4)  NOT NULL DEFAULT ''",
        'isbn' => "C(20) NOT NULL DEFAULT ''",
        'codi_mat' => "C(3)  NOT NULL DEFAULT ''",
        'lectura' => "I(1)  NOT NULL DEFAULT 0",
        'any' => "C(4)  NOT NULL DEFAULT ''",
        'etapa' => "C(32) NOT NULL DEFAULT ''",
        'nivell' => "C(15) NOT NULL DEFAULT ''",
        'avaluacio' => "C(1) NOT NULL DEFAULT ''",
        'optativa' => "I(1)  NOT NULL DEFAULT 0",
        'observacions' => "C(100) NOT NULL DEFAULT ''",
        'materials' => "X NOT NULL"
    );

    $table['IWbooks_column_idx'] = array('tid' => 'tid');

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWbooks_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWbooks_column_def'], 'pn_');


    $table['IWbooks_materies'] = DBUtil::getLimitedTablename('IWbooks_materies');
    $table['IWbooks_materies_column'] = array(
        'tid' => 'pn_tid',
        'codi_mat' => 'pn_codi_mat',
        'materia' => 'pn_materia'
    );

    $table['IWbooks_materies_column_def'] = array(
        'tid' => "I NOTNULL AUTO PRIMARY",
        'codi_mat' => "C(3) NOT NULL default ''",
        'materia' => "C(50) NOT NULL default ''"
    );

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWbooks_materies_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWbooks_materies_column_def'], 'pn_');

    return $table;
}
예제 #18
0
/**
 * Define module tables
 *
 * @return module tables information
 */
function IWagendas_tables()
{
    // Initialise table array
    $table = array();

    // IWagendas table definition
    $table['IWagendas'] = DBUtil::getLimitedTablename('IWagendas');
    $table['IWagendas_column'] = array(
        'aid' => 'aid',
        'usuari' => 'usuari',
        'data' => 'data',
        'completa' => 'completa',
        'c1' => 'c1',
        'c2' => 'c2',
        'c3' => 'c3',
        'c4' => 'c4',
        'c5' => 'c5',
        'c6' => 'c6',
        'totdia' => 'totdia',
        'tasca' => 'tasca',
        'nivell' => 'nivell',
        'rid' => 'rid',
        'daid' => 'daid',
        'nova' => 'nova',
        'vcalendar' => 'vcalendar',
        'dataanota' => 'dataanota',
        'fitxer' => 'fitxer',
        'origen' => 'origen',
        'protegida' => 'protegida',
        'origenid' => 'origenid',
        'modified' => 'modified',
        'deleted' => 'deleted',
        'deletedByUser' => 'deletedByUser',
        'completedByUser' => 'completedByUser',
        'gCalendarEventId' => 'gCalendarEventId',
        'data1' => 'data1'
    );
    $table['IWagendas_column_def'] = array(
        'aid' => "I NOTNULL AUTO PRIMARY",
        'usuari' => "I NOTNULL DEFAULT '0'",
        'data' => "C(20) NOTNULL DEFAULT ''",
        'completa' => "I(1) NOTNULL DEFAULT '0'",
        'c1' => "X NOTNULL",
        'c2' => "X NOTNULL",
        'c3' => "X NOTNULL",
        'c4' => "X NOTNULL",
        'c5' => "X NOTNULL",
        'c6' => "X NOTNULL",
        'totdia' => "I(1) NOTNULL DEFAULT '0'",
        'tasca' => "I(1) NOTNULL DEFAULT '0'",
        'nivell' => "I(1) NOTNULL DEFAULT '0'",
        'rid' => "I NOTNULL DEFAULT '0'",
        'daid' => "I NOTNULL DEFAULT '0'",
        'nova' => "X NOTNULL",
        'vcalendar' => "I(1) NOTNULL DEFAULT '0'",
        'dataanota' => "C(20) NOTNULL DEFAULT ''",
        'fitxer' => "C(50) NOTNULL DEFAULT ''",
        'origen' => "C(50) NOTNULL DEFAULT ''",
        'protegida' => "I(1) NOTNULL DEFAULT '0'",
        'origenid' => "I NOTNULL DEFAULT '0'",
        'modified' => "I(1) NOTNULL DEFAULT '0'",
        'deleted' => "I(1) NOTNULL DEFAULT '0'",
        'deletedByUser' => "X NOTNULL",
        'completedByUser' => "X NOTNULL",
        'gCalendarEventId' => "C(150) NOTNULL DEFAULT ''",
        'data1' => "C(20) NOTNULL DEFAULT ''"
    );
    ObjectUtil::addStandardFieldsToTableDefinition($table['IWagendas_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWagendas_column_def'], 'iw_');

    // IWagendas_definition table definition
    $table['IWagendas_definition'] = DBUtil::getLimitedTablename('IWagendas_definition');
    $table['IWagendas_definition_column'] = array(
        'daid' => 'daid',
        'nom_agenda' => 'nom_agenda',
        'descriu' => 'descriu',
        'c1' => 'c1',
        'c2' => 'c2',
        'c3' => 'c3',
        'c4' => 'c4',
        'c5' => 'c5',
        'c6' => 'c6',
        'tc1' => 'tc1',
        'tc2' => 'tc2',
        'tc3' => 'tc3',
        'tc4' => 'tc4',
        'tc5' => 'tc5',
        'tc6' => 'tc6',
        'op2' => 'op2',
        'op3' => 'op3',
        'op4' => 'op4',
        'op5' => 'op5',
        'op6' => 'op6',
        'grup' => 'grup',
        'resp' => 'resp',
        'activa' => 'activa',
        'adjunts' => 'adjunts',
        'protegida' => 'protegida',
        'color' => 'color',
        'gCalendarId' => 'gCalendarId',
        'gAccessLevel' => 'gAccessLevel',
        'gColor' => 'gColor'
    );
    $table['IWagendas_definition_column_def'] = array(
        'daid' => "I NOTNULL AUTO PRIMARY",
        'nom_agenda' => "C(50) NOTNULL DEFAULT ''",
        'descriu' => "C(50) NOTNULL DEFAULT ''",
        'c1' => "C(50) NOTNULL DEFAULT ''",
        'c2' => "C(50) NOTNULL DEFAULT ''",
        'c3' => "C(50) NOTNULL DEFAULT ''",
        'c4' => "C(50) NOTNULL DEFAULT ''",
        'c5' => "C(50) NOTNULL DEFAULT ''",
        'c6' => "C(50) NOTNULL DEFAULT ''",
        'tc1' => "I(1) NOTNULL DEFAULT '0'",
        'tc2' => "I(1) NOTNULL DEFAULT '0'",
        'tc3' => "I(1) NOTNULL DEFAULT '0'",
        'tc4' => "I(1) NOTNULL DEFAULT '0'",
        'tc5' => "I(1) NOTNULL DEFAULT '0'",
        'tc6' => "I(1) NOTNULL DEFAULT '0'",
        'op2' => "C(255) NOTNULL DEFAULT ''",
        'op3' => "C(255) NOTNULL DEFAULT ''",
        'op4' => "C(255) NOTNULL DEFAULT ''",
        'op5' => "C(255) NOTNULL DEFAULT ''",
        'op6' => "C(255) NOTNULL DEFAULT ''",
        'grup' => "X NOTNULL",
        'resp' => "X NOTNULL",
        'activa' => "I(1) NOTNULL DEFAULT '0'",
        'adjunts' => "I(1) NOTNULL DEFAULT '0'",
        'protegida' => "I(1) NOTNULL DEFAULT '0'",
        'color' => "C(7) NOTNULL DEFAULT '#FFFFFF'",
        'gCalendarId' => "C(150) NOTNULL DEFAULT ''",
        'gAccessLevel' => "X NOTNULL",
        'gColor' => "X NOTNULL"
    );
    ObjectUtil::addStandardFieldsToTableDefinition($table['IWagendas_definition_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWagendas_definition_column_def'], 'iw_');

    // IWagendas_subs table definition
    $table['IWagendas_subs'] = DBUtil::getLimitedTablename('IWagendas_subs');
    $table['IWagendas_subs_column'] = array(
        'said' => 'said',
        'daid' => 'daid',
        'uid' => 'uid',
        'donadabaixa' => 'donadabaixa',
        'llistat' => 'llistat',
        'avisos' => 'avisos'
    );
    $table['IWagendas_subs_column_def'] = array(
        'said' => "I NOTNULL AUTO PRIMARY",
        'daid' => "I NOTNULL DEFAULT '0'",
        'uid' => "I NOTNULL DEFAULT '0'",
        'donadabaixa' => "I(1) NOTNULL DEFAULT '0'",
        'llistat' => "I(1) NOTNULL DEFAULT '-1'",
        'avisos' => "I(1) NOTNULL DEFAULT '0'"
    );
    ObjectUtil::addStandardFieldsToTableDefinition($table['IWagendas_subs_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWagendas_subs_column_def'], 'iw_');

    // returns tables information
    return $table;
}
예제 #19
0
/**
 * Define module tables
 * @author Albert Pérez Monfort (aperezm@xtec.cat)
 * @return module tables information
 */
function IWjclic_tables() {
    // Initialise table array
    $table = array();

    // IWjclic table definition
    $table['IWjclic'] = DBUtil::getLimitedTablename('IWjclic');
    $table['IWjclic_column'] = array('jid' => 'iw_jid', //era el camp id a Moodle
        'user' => 'iw_user', //era el course a la taula del Moodle
        'name' => 'iw_name',
        'description' => 'iw_description',
        'url' => 'iw_url',
        'file' => 'iw_file',
        'skin' => 'iw_skin',
        'maxattempts' => 'iw_maxattempts',
        'width' => 'iw_width',
        'height' => 'iw_height',
        'scoreToOptain' => 'iw_scoreToOptain',
        'solvedToOptain' => 'iw_solvedToOptain',
        'active' => 'iw_active',
        'date' => 'iw_date',
        'observations' => 'iw_observations',
        'limitDate' => 'iw_limitDate',
        'initDate' => 'iw_initDate',
        'extended' => 'iw_extended');

    $table['IWjclic_column_def'] = array('jid' => "I NOTNULL AUTO PRIMARY",
        'user' => "I NOTNULL DEFAULT '0'",
        'name' => "C(255) NOTNULL DEFAULT ''",
        'description' => "X NOTNULL",
        'url' => "C(255) NOTNULL DEFAULT ''",
        'file' => "C(30) NOTNULL DEFAULT ''",
        'skin' => "C(20) NOTNULL DEFAULT ''",
        'maxattempts' => "I(3) NOTNULL DEFAULT '0'",
        'width' => "I(5) NOTNULL DEFAULT '600'",
        'height' => "I(5) NOTNULL DEFAULT '400'",
        'scoreToOptain' => "C(5) DEFAULT NULL",
        'solvedToOptain' => "C(5) DEFAULT NULL",
        'active' => "I(1) NOTNULL DEFAULT '0'",
        'date' => "C(20) NOTNULL DEFAULT ''",
        'observations' => "X NOTNULL",
        'limitDate' => "C(20) NOTNULL DEFAULT ''",
        'initDate' => "C(20) NOTNULL DEFAULT ''",
        'extended' => "X NOTNULL");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWjclic_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWjclic_column_def'], 'iw_');

    // IWjclic_activities table definition
    $table['IWjclic_activities'] = DBUtil::getLimitedTablename('IWjclic_activities');
    $table['IWjclic_activities_column'] = array('jaid' => 'iw_jaid', //era el camp id a Moodle
        'session_id' => 'iw_session_id',
        'activity_id' => 'iw_activity_id',
        'activity_name' => 'iw_activity_name',
        'num_actions' => 'iw_num_actions',
        'score' => 'iw_score',
        'activity_solved' => 'iw_activity_solved',
        'qualification' => 'iw_qualification',
        'total_time' => 'iw_total_time',
        'activity_code' => 'iw_activity_code');

    $table['IWjclic_activities_column_def'] = array('jaid' => "I NOTNULL AUTO PRIMARY",
        'session_id' => "C(50) NOTNULL DEFAULT ''",
        'activity_id' => "I(5) NOTNULL DEFAULT '0'",
        'activity_name' => "C(50) NOTNULL DEFAULT ''",
        'num_actions' => "I(4) DEFAULT NULL",
        'score' => "I(4) DEFAULT NULL",
        'activity_solved' => "I(1) DEFAULT NULL",
        'qualification' => "I(3) DEFAULT NULL",
        'total_time' => "I(5) DEFAULT NULL",
        'activity_code' => "C(50) DEFAULT NULL");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWjclic_activities_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWjclic_activities_column_def'], 'iw_');

    // IWjclic_sessions table definition
    $table['IWjclic_sessions'] = DBUtil::getLimitedTablename('IWjclic_sessions');
    $table['IWjclic_sessions_column'] = array('jsid' => 'iw_jsid',
        'jclicid' => 'iw_jclicid',
        'session_id' => 'iw_session_id',
        'user_id' => 'iw_user_id',
        'session_datetime' => 'iw_session_datetime',
        'project_name' => 'iw_project_name',
        'session_key' => 'iw_session_key',
        'session_code' => 'iw_session_code',
        'session_context' => 'iw_session_context');

    $table['IWjclic_sessions_column_def'] = array('jsid' => "I NOTNULL AUTO PRIMARY",
        'jclicid' => "I NOTNULL DEFAULT '0'",
        'session_id' => "C(50) NOTNULL DEFAULT ''",
        'user_id' => "I NOTNULL",
        'session_datetime' => "T DEFDATETIME NOTNULL DEFAULT '1970-01-01 00:00:00'",
        'project_name' => "C(100) NOTNULL DEFAULT ''",
        'session_key' => "C(50) DEFAULT NULL",
        'session_code' => "C(50) DEFAULT NULL",
        'session_context' => "C(50) DEFAULT NULL");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWjclic_sessions_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWjclic_sessions_column_def'], 'iw_');

    // IWjclic_groups table definition
    $table['IWjclic_groups'] = DBUtil::getLimitedTablename('IWjclic_groups');
    $table['IWjclic_groups_column'] = array('jgid' => 'iw_jgid', //era id a Moodle
        'jid' => 'iw_jid',
        'group_id' => 'iw_group_id',
        'group_name' => 'iw_group_name',
        'group_description' => 'iw_group_description',
        'group_icon' => 'iw_group_icon',
        'group_code' => 'iw_group_code',
        'group_keywords' => 'iw_group_keywords');

    $table['IWjclic_groups_column_def'] = array('jgid' => "I NOTNULL AUTO PRIMARY",
        'jid' => "I NOTNULL DEFAULT '0'",
        'group_id' => "I NOTNULL DEFAULT '0'",
        'group_name' => "C(80) NOTNULL DEFAULT ''",
        'group_description' => "C(255) NOTNULL DEFAULT ''",
        'group_icon' => "C(255) NOTNULL DEFAULT ''",
        'group_code' => "C(50) NOTNULL DEFAULT ''",
        'group_keywords' => "C(255) NOTNULL DEFAULT ''");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWjclic_groups_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWjclic_groups_column_def'], 'iw_');

    // IWjclic_users table definition
    $table['IWjclic_users'] = DBUtil::getLimitedTablename('IWjclic_users');
    $table['IWjclic_users_column'] = array('juid' => 'iw_juid',
        'jid' => 'iw_jid',
        'user_id' => 'iw_user_id',
        'group_id' => 'iw_group_id',
        'user_name' => 'iw_user_name',
        'user_pwd' => 'iw_user_pwd',
        'user_icon' => 'iw_user_icon',
        'user_code' => 'iw_user_code',
        'user_keywords' => 'iw_user_keywords',
        'observations' => 'iw_observations',
        'renotes' => 'iw_renotes');

    $table['IWjclic_users_column_def'] = array('juid' => "I NOTNULL AUTO PRIMARY",
        'jid' => "I NOTNULL DEFAULT '0'",
        'user_id' => "I NOTNULL DEFAULT '0'",
        'group_id' => "I NOTNULL DEFAULT '0'",
        'user_name' => "C(80) NOTNULL DEFAULT ''",
        'user_pwd' => "C(255) NOTNULL DEFAULT ''",
        'user_icon' => "C(255) NOTNULL DEFAULT ''",
        'user_code' => "C(50) NOTNULL DEFAULT ''",
        'user_keywords' => "C(255) NOTNULL DEFAULT ''",
        'observations' => "X NOTNULL",
        'renotes' => "X NOTNULL");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWjclic_users_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWjclic_users_column_def'], 'iw_');

    // IWjclic_settings table definition
    $table['IWjclic_settings'] = DBUtil::getLimitedTablename('IWjclic_settings');
    $table['IWjclic_settings_column'] = array('jsid' => 'iw_jsid',
        'setting_key' => 'iw_setting_key',
        'setting_value' => 'iw_setting_value');

    $table['IWjclic_settings_column_def'] = array('jsid' => "I NOTNULL AUTO PRIMARY",
        'setting_key' => "C(255) NOTNULL DEFAULT ''",
        'setting_value' => "C(255) NOTNULL DEFAULT ''");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWjclic_settings_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWjclic_settings_column_def'], 'iw_');

    //Returns tables information
    return $table;
}
예제 #20
0
/**
 * Define module tables
 * @author Albert Pérez Monfort (aperezm@xtec.cat)
 * @return module tables information
 */
function IWforms_tables() {
    // Initialise table array
    $tables = array();

    // IWforms_def table definition
    $tables['IWforms_definition'] = DBUtil::getLimitedTablename('IWforms_definition');
    $tables['IWforms_definition_column'] = array('fid' => 'iw_fid',
        'formName' => 'iw_formName',
        'description' => 'iw_description',
        'active' => 'iw_active',
        'title' => 'iw_title',
        'new' => 'iw_new',
        'cid' => 'iw_cid',
        'caducity' => 'iw_caducity',
        'annonimous' => 'iw_annonimous',
        'unique' => 'iw_unique',
        'answare' => 'iw_answare',
        'characters' => 'iw_characters',
        'closeableNotes' => 'iw_closeableNotes',
        'closeInsert' => 'iw_closeInsert',
        'closeableInsert' => 'iw_closeableInsert',
        'unregisterednotusersview' => 'iw_unregisterednotusersview',
        'unregisterednotexport' => 'iw_unregisterednotexport',
        'publicResponse' => 'iw_publicResponse',
        'skin' => 'iw_skin',
        'skincss' => 'iw_skincss',
        'showFormName' => 'iw_showFormName',
        'showNotesTitle' => 'iw_showNotesTitle',
        'skinForm' => 'iw_skinForm',
        'skinNote' => 'iw_skinNote',
        'expertMode' => 'iw_expertMode',
        'skinByTemplate' => 'iw_skinByTemplate',
        'skinFormTemplate' => 'iw_skinFormTemplate',
        'skinTemplate' => 'iw_skinTemplate',
        'skinNoteTemplate' => 'iw_skinNoteTemplate',
        'allowComments' => 'iw_allowComments',
        'allowCommentsModerated' => 'iw_allowCommentsModerated',
        'returnURL' => 'iw_returnURL',
        'filesFolder' => 'iw_filesFolder',
        'lang' => 'iw_lang',
        'defaultNumberOfNotes' => 'iw_defaultNumberOfNotes',
        'defaultOrderForNotes' => 'iw_defaultOrderForNotes',
        'orderFormField' => 'iw_orderFormField',
    );

    $tables['IWforms_definition_column_def'] = array('fid' => "I NOTNULL AUTO PRIMARY",
        'formName' => "C(70) NOTNULL DEFAULT ''",
        'description' => "C(255) NOTNULL DEFAULT ''",
        'active' => "I(1) NOTNULL DEFAULT '0'",
        'title' => "C(255) NOTNULL DEFAULT ''",
        'new' => "T NOTNULL",
        'cid' => "I NOTNULL DEFAULT '0'",
        'caducity' => "T NOTNULL",
        'annonimous' => "I(1) NOTNULL DEFAULT '0'",
        'unique' => "I(1) NOTNULL DEFAULT '0'",
        'answare' => "X NOTNULL",
        'characters' => "I(3) NOTNULL DEFAULT '0'",
        'closeableNotes' => "I(1) NOTNULL DEFAULT '0'",
        'closeInsert' => "I(1) NOTNULL DEFAULT '0'",
        'closeableInsert' => "I(1) NOTNULL DEFAULT '0'",
        'unregisterednotusersview' => "I(1) NOTNULL DEFAULT '1'",
        'unregisterednotexport' => "I(1) NOTNULL DEFAULT '1'",
        'publicResponse' => "I(1) NOTNULL DEFAULT '0'",
        'skin' => "X NOTNULL",
        'skincss' => "C(150) NOTNULL DEFAULT ''",
        'showFormName' => "I(1) NOTNULL DEFAULT '1'",
        'showNotesTitle' => "I(1) NOTNULL DEFAULT '1'",
        'skinForm' => "X NOTNULL",
        'skinNote' => "X NOTNULL",
        'expertMode' => "I(1) NOTNULL DEFAULT '0'",
        'skinByTemplate' => "I(1) NOTNULL DEFAULT '0'",
        'skinFormTemplate' => "C(70) NOTNULL DEFAULT 'IWforms_user_new.tpl'",
        'skinTemplate' => "C(70) NOTNULL DEFAULT 'IWforms_user_read.tpl'",
        'skinNoteTemplate' => "C(70) NOTNULL DEFAULT 'IWforms_user_read.tpl'",
        'allowComments' => "I(1) NOTNULL DEFAULT '0'",
        'allowCommentsModerated' => "I(1) NOTNULL DEFAULT '0'",
        'returnURL' => "C(150) NOTNULL DEFAULT ''",
        'filesFolder' => "C(25) NOTNULL DEFAULT ''",
        'lang' => "C(2) NOTNULL DEFAULT ''",
        'defaultNumberOfNotes' => "I(1) NOTNULL DEFAULT '0'",
        'defaultOrderForNotes' => "I(1) NOTNULL DEFAULT '0'",
        'orderFormField' => "I NOTNULL DEFAULT '0'",
    );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWforms_definition_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWforms_definition_column_def'], 'iw_');

    // IWforms_def table definition
    $tables['IWforms_cat'] = DBUtil::getLimitedTablename('IWforms_cat');
    $tables['IWforms_cat_column'] = array('cid' => 'iw_cid',
        'catName' => 'catName',
        'description' => 'iw_description');

    $tables['IWforms_cat_column_def'] = array('cid' => "I NOTNULL AUTO PRIMARY",
        'catName' => "C(70) NOTNULL DEFAULT ''",
        'description' => "C(255) NOTNULL DEFAULT ''");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWforms_cat_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWforms_cat_column_def'], 'iw_');


    // IWforms table definition
    $tables['IWforms'] = DBUtil::getLimitedTablename('IWforms');
    $tables['IWforms_column'] = array('fmid' => 'iw_fmid',
        'user' => 'iw_user',
        'observations' => 'iw_observations',
        'renote' => 'iw_renote',
        'state' => 'iw_state',
        'time' => 'iw_time',
        'validate' => 'iw_validate',
        'fid' => 'iw_fid',
        'annonimous' => 'iw_annonimous',
        'mark' => 'iw_mark',
        'deluser' => 'iw_deluser',
        'viewed' => 'iw_viewed',
        'closed' => 'iw_closed',
        'publicResponse' => 'iw_publicResponse');

    $tables['IWforms_column_def'] = array('fmid' => "I NOTNULL AUTO PRIMARY",
        'user' => "C(20) NOTNULL DEFAULT ''",
        'observations' => "X NOTNULL",
        'renote' => "X NOTNULL",
        'state' => "I(1) NOTNULL DEFAULT '0'",
        'time' => "C(20) NOTNULL DEFAULT ''",
        'validate' => "I(1) NOTNULL DEFAULT '0'",
        'fid' => "I NOTNULL DEFAULT '0'",
        'annonimous' => "I(1) NOTNULL DEFAULT '0'",
        'mark' => "X NOTNULL",
        'deluser' => "I(1) NOTNULL DEFAULT '0'",
        'viewed' => "X NOTNULL",
        'closed' => "I(1) NOTNULL DEFAULT '0'",
        'publicResponse' => "I(1) NOTNULL DEFAULT '0'");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWforms_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWforms_column_def'], 'iw_');

    // IWforms_note table definition
    $tables['IWforms_note'] = DBUtil::getLimitedTablename('IWforms_note');
    $tables['IWforms_note_column'] = array('fnid' => 'iw_fnid',
        'fmid' => 'iw_fmid',
        'fndid' => 'iw_fndid',
        'content' => 'iw_content',
        'validate' => 'iw_validate');

    $tables['IWforms_note_column_def'] = array('fnid' => "I NOTNULL AUTO PRIMARY",
        'fmid' => "I NOTNULL DEFAULT '0'",
        'fndid' => "I NOTNULL DEFAULT '0'",
        'content' => "X NOTNULL",
        'validate' => "I(1) NOTNULL DEFAULT '0'");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWforms_note_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWforms_note_column_def'], 'iw_');

    // IWforms_note_def table definition
    $tables['IWforms_note_definition'] = DBUtil::getLimitedTablename('IWforms_note_definition');
    $tables['IWforms_note_definition_column'] = array('fndid' => 'iw_fndid',
        'fid' => 'iw_fid',
        'fieldType' => 'iw_fieldType',
        'required' => 'iw_required',
        'description' => 'iw_description',
        'fieldName' => 'iw_fieldName',
        'feedback' => 'iw_feedback',
        'order' => 'iw_order',
        'active' => 'iw_active',
        'dependance' => 'iw_dependance', //id of the dependance
        'rfid' => 'iw_rfid', //ids of the managers validators
        'validationNeeded' => 'iw_validationNeeded', //id of the manager validator
        'notify' => 'iw_notify',
        'size' => 'iw_size', //Only for text fields
        'cols' => 'iw_cols', //only fot textarea fields
        'rows' => 'iw_rows', //only for textarea fields
        'editor' => 'iw_editor', //only for textarea fields
        'checked' => 'iw_checked', //only for checkbox fields
        'options' => 'iw_options', //only for list fields
        'calendar' => 'iw_calendar', //only for date fields
        'height' => 'iw_height', // only for line fields
        'color' => 'iw_color', // only for line fields
        'colorf' => 'iw_colorf', // only for line fields
        'accessType' => 'iw_accessType',
        'editable' => 'iw_editable',
        'collapse' => 'iw_collapse',
        'publicFile' => 'iw_publicFile',
        'help' => 'iw_help',
        'gid' => 'iw_gid',
        'searchable' => 'iw_searchable',
        'extensions' => 'iw_extensions',
        'imgWidth' => 'iw_imgWidth',
        'imgHeight' => 'iw_imgHeight');

    $tables['IWforms_note_definition_column_def'] = array('fndid' => "I NOTNULL AUTO PRIMARY",
        'fid' => "I NOTNULL DEFAULT '0'",
        'fieldType' => "I(1) NOTNULL DEFAULT '0'",
        'required' => "I(1) NOTNULL DEFAULT '0'",
        'description' => "C(255) NOTNULL DEFAULT ''",
        'fieldName' => "X NOTNULL",
        'feedback' => "I(1) NOTNULL DEFAULT '0'",
        'order' => "I NOTNULL DEFAULT '1000'",
        'active' => "I(1) NOTNULL DEFAULT '0'",
        'dependance' => "C(50) NOTNULL DEFAULT '$'",
        'rfid' => "C(50) NOTNULL DEFAULT '$'",
        'validationNeeded' => "I(1) NOTNULL DEFAULT '0'",
        'notify' => "I(1) NOTNULL DEFAULT '0'",
        'size' => "C(3) NOTNULL DEFAULT '25'",
        'cols' => "C(3) NOTNULL DEFAULT '30'",
        'rows' => "C(3) NOTNULL DEFAULT '5'",
        'editor' => "I(1) NOTNULL DEFAULT '0'",
        'checked' => "I(1) NOTNULL DEFAULT '0'",
        'options' => "X NOTNULL",
        'calendar' => "I(1) NOTNULL DEFAULT '0'",
        'height' => "C(2) NOTNULL DEFAULT '1'",
        'color' => "C(7) NOTNULL DEFAULT '#DDDDDD'",
        'colorf' => "C(7) NOTNULL DEFAULT '#FFFFFF'",
        'accessType' => "I(1) NOTNULL DEFAULT '0'",
        'editable' => "I(1) NOTNULL DEFAULT '0'",
        'collapse' => "I(1) NOTNULL DEFAULT '0'",
        'publicFile' => "I(1) NOTNULL DEFAULT '0'",
        'help' => "X NOTNULL",
        'gid' => "I NOTNULL DEFAULT '0'",
        'searchable' => "I(1) NOTNULL DEFAULT '0'",
        'extensions' => "C(30) NOTNULL DEFAULT ''",
        'imgWidth' => "I(4) NOTNULL DEFAULT '0'",
        'imgHeight' => "I(4) NOTNULL DEFAULT '0'");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWforms_note_definition_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWforms_note_definition_column_def'], 'iw_');

    // IWforms_resp table definition
    $tables['IWforms_validator'] = DBUtil::getLimitedTablename('IWforms_validator');
    $tables['IWforms_validator_column'] = array('rfid' => 'iw_rfid',
        'fid' => 'iw_fid',
        'validator' => 'iw_validator',
        'validatorType' => 'iw_validatorType'); //0 global - 1 note only

    $tables['IWforms_validator_column_def'] = array('rfid' => "I NOTNULL AUTO PRIMARY",
        'fid' => "I NOTNULL DEFAULT '0'",
        'validator' => "I NOTNULL DEFAULT '0'",
        'validatorType' => "I(1) NOTNULL DEFAULT '0'");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWforms_resp_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWforms_resp_column_def'], 'iw_');

    // IWforms_resp table definition
    $tables['IWforms_group'] = DBUtil::getLimitedTablename('IWforms_group');
    $tables['IWforms_group_column'] = array('gfid' => 'iw_gfid',
        'fid' => 'iw_fid',
        'group' => 'iw_group',
        'accessType' => 'iw_accessType',
        'validationNeeded' => 'iw_validationNeeded');

    $tables['IWforms_group_column_def'] = array('gfid' => "I NOTNULL AUTO PRIMARY",
        'fid' => "I NOTNULL DEFAULT '0'",
        'group' => "I NOTNULL DEFAULT '0'",
        'accessType' => "I(1) NOTNULL DEFAULT '0'",
        'validationNeeded' => "I(1) NOTNULL DEFAULT '0'");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWforms_group_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWforms_group_column_def'], 'iw_');

    //Returns tables information
    return $tables;
}
예제 #21
0
 /**
  * Selector for a module's tables.
  *
  * @param string  $modname           Module name.
  * @param string  $tablename         Table name.
  * @param string  $name              Select field name.
  * @param string  $selectedValue     Selected value.
  * @param string  $defaultValue      Value for "default" option.
  * @param string  $defaultText       Text for "default" option.
  * @param boolean $submit            Submit on choose.
  * @param boolean $showSystemColumns Whether or not to show the system columns.
  * @param boolean $disabled          Add Disabled attribute to select.
  * @param integer $multipleSize      Size for multiple selects.
  *
  * @return string The rendered output.
  */
 public static function getSelector_TableFields($modname, $tablename, $name, $selectedValue = '', $defaultValue = 0, $defaultText = '', $submit = false, $showSystemColumns = false, $disabled = false, $multipleSize = 1)
 {
     if (!$modname) {
         return z_exit(__f('Invalid %1$s passed to %2$s.', array('modname', 'HtmlUtil::getSelector_TableFields')));
     }
     if (!$tablename) {
         return z_exit(__f('Invalid %1$s passed to %2$s.', array('tablename', 'HtmlUtil::getSelector_TableFields')));
     }
     if (!$name) {
         return z_exit(__f('Invalid %1$s passed to %2$s.', array('name', 'HtmlUtil::getSelector_TableFields')));
     }
     $tables = ModUtil::dbInfoLoad($modname, '', true);
     $colkey = $tablename . '_column';
     $cols = $tables[$colkey];
     if (!$cols) {
         return z_exit(__f('Invalid %1$s [%2$s] in %3$s.', array('column key', $colkey, 'HtmlUtil::getSelector_TableFields')));
     }
     if (!$showSystemColumns) {
         $filtercols = array();
         ObjectUtil::addStandardFieldsToTableDefinition($filtercols, '');
     }
     $data = array();
     foreach ($cols as $k => $v) {
         if ($showSystemColumns) {
             $data[$v] = $k;
         } else {
             if (!$filtercols[$k]) {
                 $data[$v] = $k;
             }
         }
     }
     return self::getSelector_Generic($name, $data, $selectedValue, $defaultValue, $defaultText, $allValue, $allText, $submit, $disabled, $multipleSize);
 }
예제 #22
0
/**
 * Define module tables
 * @author Albert Pï¿œrez Monfort (aperezm@xtec.cat)
 * @return module tables information
 */
function IWnoteboard_tables() {
    // Initialise table array
    $table = array();

    // IWnoteboard table definition
    $table['IWnoteboard'] = DBUtil::getLimitedTablename('IWnoteboard');
    $table['IWnoteboard_column'] = array('nid' => 'iw_nid',
        'data' => 'iw_data',
        'informa' => 'iw_informa',
        'noticia' => 'iw_noticia',
        'destinataris' => 'iw_destinataris',
        'mes_info' => 'iw_mes_info',
        'text' => 'iw_text',
        'caduca' => 'iw_caduca',
        'no_mostrar' => 'iw_no_mostrar',
        'titular' => 'iw_titular',
        'titulin' => 'iw_titulin',
        'titulout' => 'iw_titulout',
        'fitxer' => 'iw_fitxer',
        'textfitxer' => 'iw_textfitxer',
        'verifica' => 'iw_verifica',
        'admet_comentaris' => 'iw_admet_comentaris',
        'ncid' => 'iw_ncid',
        'tid' => 'iw_tid',
        'marca' => 'iw_marca',
        'edited' => 'iw_edited',
        'edited_by' => 'iw_edited_by',
        'lang' => 'iw_lang',
        'literalGroups' => 'iw_literalGroups',
);
    $table['IWnoteboard_column_def'] = array('nid' => "I NOTNULL AUTO PRIMARY",
        'data' => "C(15) NOTNULL DEFAULT ''",
        'informa' => "I NOTNULL DEFAULT '0'",
        'noticia' => "X NOTNULL",
        'destinataris' => "C(255) NOTNULL DEFAULT ''",
        'mes_info' => "C(255) NOTNULL DEFAULT ''",
        'text' => "C(255) NOTNULL DEFAULT ''",
        'caduca' => "C(15) NOTNULL DEFAULT ''",
        'no_mostrar' => "X NOTNULL",
        'titular' => "C(255) NOTNULL DEFAULT ''",
        'titulin' => "C(15) NOTNULL DEFAULT ''",
        'titulout' => "C(15) NOTNULL DEFAULT ''",
        'fitxer' => "C(255) NOTNULL DEFAULT ''",
        'textfitxer' => "C(255) NOTNULL DEFAULT ''",
        'verifica' => "I(1) NOTNULL DEFAULT '0'",
        'admet_comentaris' => "I(1) NOTNULL DEFAULT '0'",
        'ncid' => "I NOTNULL DEFAULT '0'",
        'tid' => "I NOTNULL DEFAULT '0'",
        'marca' => "X NOTNULL",
        'edited' => "C(15) NOTNULL DEFAULT ''",
        'edited_by' => "I NOTNULL DEFAULT '0'",
        'lang' => "C(3) NOTNULL DEFAULT ''",
        'literalGroups' => "C(255) NOTNULL DEFAULT ''",
);

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWnoteboard_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWnoteboard_column_def'], 'iw_');

    // IWnoteboard_themes table definition
    $table['IWnoteboard_themes'] = DBUtil::getLimitedTablename('IWnoteboard_themes');
    $table['IWnoteboard_topics'] = DBUtil::getLimitedTablename('IWnoteboard_topics');
    $table['IWnoteboard_topics_column'] = array('tid' => 'iw_tid',
        'nomtema' => 'iw_nomtema',
        'descriu' => 'iw_descriu',
        'grup' => 'iw_grup');

    $table['IWnoteboard_topics_column_def'] = array('tid' => "I NOTNULL AUTO PRIMARY",
        'nomtema' => "C(100) NOTNULL DEFAULT ''",
        'descriu' => "C(255) NOTNULL DEFAULT ''",
        'grup' => "I NOTNULL DEFAULT '0'");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWnoteboard_topics_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWnoteboard_topics_column_def'], 'iw_');

    // Return the table information
    return $table;
}
예제 #23
0
/**
 * Content
 *
 * @copyright (C) 2007-2010, Content Development Team
 * @link http://github.com/zikula-modules/Content
 * @license See license.txt
 */


function content_tables()
{
    $tables = array();

    // Page setup (pages can be nested beneath each other)
    $tables['content_page'] = 'content_page';
    $tables['content_page_column'] = array(
        'id'                => 'page_id',               // Page ID
        'parentPageId'      => 'page_ppid',             // Parent (containing) page ID
        'title'             => 'page_title',            // Title for this page
        'showTitle'         => 'page_showtitle',        // Display title on the page
        'urlname'           => 'page_urlname',          // URL name for this page
        'metadescription'   => 'page_metadescription',  // Meta description
        'metakeywords'      => 'page_metakeywords',     // Meta keywords
        'nohooks'           => 'page_nohooks',          // Page w/o hooks
        'layout'            => 'page_layout',           // Name of page layout
        'categoryId'        => 'page_categoryid',       // Primary category ID
        'views'             => 'page_views',            // # views of page
        'active'            => 'page_active',           // Bool flag: active or not?
        'activeFrom'        => 'page_activefrom',       // Date - publish start
        'activeTo'          => 'page_activeto',         // Date - publish end
        'inMenu'            => 'page_inmenu',           // Bool flag: include in menu?
        'position'          => 'page_pos',              // Position inside current level of pages (sorting order)
        'level'             => 'page_level',            // Nested set level
        'setLeft'           => 'page_setleft',          // Nested set left
        'setRight'          => 'page_setright',         // Nested set right
        'language'          => 'page_language',         // Language of initial version
        'optionalString1'   => 'page_optString1',       // Optional Information
        'optionalString2'   => 'page_optString2',       // Optional Information
        'optionalText'      => 'page_optText'           // Optional Information
    );
    $tables['content_page_column_def'] = array(
        'id'                => "I NOTNULL AUTO PRIMARY",
        'parentPageId'      => "I NOTNULL DEFAULT 0",
        'title'             => "C(255) NOTNULL DEFAULT ''",
        'showTitle'         => "I1 NOTNULL DEFAULT 1",
        'urlname'           => "C(255) NOTNULL DEFAULT ''",
        'metadescription'   => "X NOTNULL DEFAULT ''",
        'metakeywords'      => "X NOTNULL DEFAULT ''",
        'nohooks'           => "I1 NOTNULL DEFAULT 0",
        'layout'            => "C(100) NOTNULL",
        'categoryId'        => "I NOT NULL DEFAULT 0",
        'views'             => "I NOT NULL DEFAULT 0",
        'active'            => "I1 NOTNULL DEFAULT 1",
        'activeFrom'        => "T",
        'activeTo'          => "T",
        'inMenu'            => "I1 NOTNULL DEFAULT 1",
        'position'          => 'I NOTNULL DEFAULT 0',
        'level'             => 'I NOTNULL DEFAULT 0',
        'setLeft'           => 'I NOTNULL DEFAULT 0',
        'setRight'          => 'I NOTNULL DEFAULT 0',
        'language'          => 'C(10)',
        'optionalString1'   => "C(255) NOTNULL DEFAULT ''",
        'optionalString2'   => "C(255) NOTNULL DEFAULT ''",
        'optionalText'      => "X NOTNULL DEFAULT ''"
    );
    $tables['content_page_primary_key_column'] = 'id';
    // add standard data fields
    ObjectUtil::addStandardFieldsToTableDefinition ($tables['content_page_column'], 'page_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['content_page_column_def']);
    // additional indexes
    $tables['content_page_column_idx'] = array('parentPageId' => array('parentPageId', 'position'), 
                                               'leftright' => array('setLeft','setRight'), 
                                               'categoryId' => 'categoryId', 
                                               'urlname' => array('urlname', 'parentPageId'));

    // Content setup (multiple content items on each page)
    $tables['content_content'] = 'content_content';
    $tables['content_content_column'] = array(
        'id'              => 'con_id',          // Content item ID
        'pageId'          => 'con_pageid',      // Reference to owner page ID
        'areaIndex'       => 'con_areaindex',   // Content area index
        'position'        => 'con_position',    // Position inside content area
        'module'          => 'con_module',      // Content module
        'type'            => 'con_type',        // Content type (depending on module)
        'data'            => 'con_data',        // Data from the content providing module
        'active'          => 'con_active',      // Bool flag: active or not?
        'visiblefor'      => 'con_visiblefor',  // content only visible for members (0)/non members(2)/both (1)
        'stylePosition'   => 'con_stylepos',    // Styled floating position
        'styleWidth'      => 'con_stylewidth',  // Styled width
        'styleClass'      => 'con_styleclass'   // Styled CSS class
    );
    $tables['content_content_column_def'] = array(
        'id'              => "I NOTNULL AUTO PRIMARY",
        'pageId'          => "I NOTNULL DEFAULT 0",
        'areaIndex'       => "I NOTNULL DEFAULT 0",
        'position'        => "I NOTNULL DEFAULT 0",
        'module'          => "C(100) NOTNULL DEFAULT ''",
        'type'            => "C(100) NOTNULL DEFAULT ''",
        'data'            => "XL",
        'active'          => "I1 NOTNULL DEFAULT 1",
        'visiblefor'      => "I1 NOTNULL DEFAULT 1",
        'stylePosition'   => "C(20) NOTNULL DEFAULT 'none'",
        'styleWidth'      => "C(20) NOTNULL DEFAULT 'wauto'",
        'styleClass'      => "C(100) NOTNULL DEFAULT ''"
    );
    $tables['content_content_primary_key_column'] = 'id';
    // add standard data fields
    ObjectUtil::addStandardFieldsToTableDefinition ($tables['content_content_column'], 'con_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['content_content_column_def']);
    // additional indexes
    $tables['content_content_column_idx'] = array('pageActive' => array('pageId', 'active'), 
                                                  'pagePosition' => array('pageId', 'areaIndex', 'position'));

    // Multiple category relation
    $tables['content_pagecategory'] = 'content_pagecategory';
    $tables['content_pagecategory_column'] = array(
        'pageId'     => 'con_pageid',       // Related page ID
        'categoryId' => 'con_categoryid'    // Related category ID
    );
    $tables['content_pagecategory_column_def'] = array(
        'pageId'     => 'I NOTNULL DEFAULT 0',
        'categoryId' => 'I NOTNULL DEFAULT 0'
    );
    // additional indexes
    $tables['content_pagecategory_column_idx'] = array('pageId' => 'pageId');


    // Searchable text from content plugins
    $tables['content_searchable'] = 'content_searchable';
    $tables['content_searchable_column'] = array(
        'contentId' => 'search_cid',    // Content ID
        'text'      => 'search_text'    // Content searchable text
    );
    $tables['content_searchable_column_def'] = array(
        'contentId' => 'I NOTNULL AUTO PRIMARY',
        'text'      => 'X'
    );
    $tables['content_searchable_primary_key_column'] = 'contentId';

  
    // Translated pages
    $tables['content_translatedpage'] = 'content_translatedpage';
    $tables['content_translatedpage_column'] = array(
        'pageId'            => 'transp_pid',                // Page ID
        'language'          => 'transp_lang',               // Translated to language
        'title'             => 'transp_title',              // Translated title
        'metadescription'   => 'transp_metadescription',    // Translated meta description
        'metakeywords'      => 'transp_metakeywords'        // Translated meta keywords
    );
    $tables['content_translatedpage_column_def'] = array(
        'pageId'            => 'I NOTNULL DEFAULT 0',
        'language'          => 'C(10) NOTNULL',
        'title'             => 'C(255) NOTNULL',
        'metadescription'   => "X NOTNULL DEFAULT ''",
        'metakeywords'      => "X NOTNULL DEFAULT ''"
    );
    ObjectUtil::addStandardFieldsToTableDefinition ($tables['content_translatedpage_column'], 'transp_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['content_translatedpage_column_def']);
    // additional indexes
    $tables['content_translatedpage_column_idx'] = array('entry' => array('pageId', 'language'));


    // Translated content plugins
    $tables['content_translatedcontent'] = 'content_translatedcontent';
    $tables['content_translatedcontent_column'] = array(
        'contentId' => 'transc_cid',     // Content ID
        'language'  => 'transc_lang',    // Translated to language
        'data'      => 'transc_data'    // Translated content
    );
    $tables['content_translatedcontent_column_def'] = array(
        'contentId' => 'I NOTNULL DEFAULT 0',
        'language'  => 'C(10) NOTNULL',
        'data'      => 'XL'
    );
    ObjectUtil::addStandardFieldsToTableDefinition ($tables['content_translatedcontent_column'], 'transc_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['content_translatedcontent_column_def']);
    // additional indexes
    $tables['content_translatedcontent_column_idx'] = array('entry' => array('contentId', 'language'));


    // History
    $tables['content_history'] = 'content_history';
    $tables['content_history_column'] = array(
        'id'            => 'ch_id',
        'pageId'        => 'ch_pageid',
        'data'          => 'ch_data',
        'revisionNo'    => 'ch_revisionno',
        'action'        => 'ch_action',
        'date'          => 'ch_date',
        'ipno'          => 'ch_ipno',
        'userId'        => 'ch_userid'
    );
    $tables['content_history_column_def'] = array(
        'id'           => "I NOTNULL AUTO PRIMARY",
        'pageId'       => "I NOTNULL DEFAULT 0",
        'data'         => "XL NOTNULL DEFAULT ''",
        'revisionNo'   => "I NOTNULL DEFAULT 0",
        'action'       => "C(255) NOTNULL DEFAULT ''",
        'date'         => "T NOTNULL DEFAULT ''",
        'ipno'         => "C(30) NOTNULL DEFAULT ''",
        'userId'       => "I NOTNULL DEFAULT 0"
    );
    // additional indexes
    $tables['content_history_column_idx'] = array('entry' => array('pageId', 'revisionNo'), 
                                                  'action' => 'action');

    return $tables;
}
예제 #24
0
/**
 * Define module tables
 * @author Sara Arjona Téllez (sarjona@xtec.cat)
 * @return module tables information
 */
function IWqv_tables() {
    // Initialise table array
    $tables = array();

    // IWqv table definition
    $tables['IWqv'] = DBUtil::getLimitedTablename('IWqv');
    $tables['IWqv_column'] = array('qvid' => 'iw_qvid',
        'teacher' => 'iw_teacher',
        'groups' => 'iw_groups',
        'title' => 'iw_title',
        'description' => 'iw_description',
        'url' => 'iw_url',
        'skin' => 'iw_skin',
        'lang' => 'iw_lang',
        'maxdeliver' => 'iw_maxdeliver',
        'showcorrection' => 'iw_showcorrection',
        'showinteraction' => 'iw_showinteraction',
        'ordersections' => 'iw_ordersections',
        'orderitems' => 'iw_orderitems',
        'target' => 'iw_target',
        'width' => 'iw_width',
        'height' => 'iw_height',
        'active' => 'iw_active',
        'observations' => 'iw_observations');
    $tables['IWqv_column_def'] = array('qvid' => "I NOTNULL AUTO PRIMARY",
        'teacher' => "INT(11) NOTNULL",
        'groups' => "C(255) NOTNULL",
        'title' => "C(255) NOTNULL DEFAULT ''",
        'description' => "X NOTNULL DEFAULT ''",
        'url' => "C(255) NOTNULL DEFAULT ''",
        'skin' => "C(20) NOTNULL DEFAULT ''",
        'lang' => "C(10) NOTNULL DEFAULT ''",
        'maxdeliver' => "INT(3) NOTNULL DEFAULT '-1'",
        'showcorrection' => "INT(1) NOTNULL DEFAULT '1'",
        'showinteraction' => "INT(1) NOTNULL DEFAULT '1'",
        'ordersections' => "INT(1) NOTNULL DEFAULT '0'",
        'orderitems' => "INT(1) NOTNULL DEFAULT '0'",
        'target' => "C(10) NOTNULL DEFAULT 'blank'",
        'width' => "C(10) NULL",
        'height' => "C(10) NULL",
        'active' => "INT(1) NOTNULL DEFAULT '1'",
        'observations' => "X NOTNULL");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWqv_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWqv_column_def'], 'iw_');

    // IWqv_assignments table definition
    $tables['IWqv_assignments'] = DBUtil::getLimitedTablename('IWqv_assignments');
    $tables['IWqv_assignments_column'] = array('qvaid' => 'iw_qvaid',
        'qvid' => 'iw_qvid',
        'userid' => 'iw_userid',
        'sectionorder' => 'iw_sectionorder',
        'itemorder' => 'iw_itemorder',
        'teachercomments' => 'iw_teachercomments',
        'teacherobservations' => 'iw_teacherobservations');

    $tables['IWqv_assignments_column_def'] = array('qvaid' => "I NOTNULL AUTO PRIMARY",
        'qvid' => "INT(11) NOTNULL",
        'userid' => "INT(11) NOTNULL",
        'sectionorder' => "INT(10) NOTNULL DEFAULT '0'",
        'itemorder' => "INT(10) NOTNULL DEFAULT '0'",
        'teachercomments' => "X NULL",
        'teacherobservations' => "X NULL");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWqv_assignments_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWqv_assignments_column_def'], 'iw_');

    // IWqv_sections table definition
    $tables['IWqv_sections'] = DBUtil::getLimitedTablename('IWqv_sections');
    $tables['IWqv_sections_column'] = array('qvsid' => 'iw_qvsid',
        'qvaid' => 'iw_qvaid',
        'sectionid' => 'iw_sectionid',
        'responses' => 'iw_responses',
        'scores' => 'iw_scores',
        'pendingscores' => 'iw_pendingscores',
        'attempts' => 'iw_attempts',
        'state' => 'iw_state',
        'time' => 'iw_time');

    $tables['IWqv_sections_column_def'] = array('qvsid' => "I NOTNULL AUTO PRIMARY",
        'qvaid' => "INT(11) NOTNULL",
        'sectionid' => "C(255) NOTNULL",
        'responses' => "X NULL",
        'scores' => "X NULL",
        'pendingscores' => "X NULL",
        'attempts' => "INT(60) NULL DEFAULT '0'",
        'state' => "INT(1) NULL DEFAULT '0'",
        'time' => "C(8) NULL DEFAULT '00:00:00'");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWqv_sections_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWqv_sections_column_def'], 'iw_');

    // IWqv_messages table definition
    $tables['IWqv_messages'] = DBUtil::getLimitedTablename('IWqv_messages');
    $tables['IWqv_messages_column'] = array('qvmid' => 'iw_qvmid',
        'qvsid' => 'iw_qvsid',
        'itemid' => 'iw_itemid',
        'userid' => 'iw_userid',
        'message' => 'iw_message');

    $tables['IWqv_messages_column_def'] = array('qvmid' => "I NOTNULL AUTO PRIMARY",
        'qvsid' => "INT(11) NOTNULL",
        'itemid' => "C(255) NOTNULL",
        'userid' => "INT(11) NOTNULL",
        'message' => "X NOTNULL DEFAULT ''");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWqv_messages_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWqv_messages_column_def'], 'iw_');

    // IWqv_messages table definition
    $tables['IWqv_messages_read'] = DBUtil::getLimitedTablename('IWqv_messages_read');
    $tables['IWqv_messages_read_column'] = array('qvmrid' => 'iw_qvmrid',
        'qvmid' => 'iw_qvmid',
        'userid' => 'iw_userid');

    $tables['IWqv_messages_read_column_def'] = array('qvmrid' => "I NOTNULL AUTO PRIMARY",
        'qvmid' => "INT(11) NOTNULL",
        'userid' => "INT(11) NOTNULL");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWqv_messages_read_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWqv_messages_read_column_def'], 'iw_');



    // IWmain table definition needed in this module
    $tables['IWmain'] = DBUtil::getLimitedTablename('IWmain');
    $tables['IWmain_column'] = array('id' => 'iw_id',
        'uid' => 'iw_uid',
        'module' => 'iw_module',
        'name' => 'iw_name',
        'value' => 'iw_value',
        'lifetime' => 'iw_lifetime');

    // Return the table information
    return $tables;
}
예제 #25
0
/**
 * Define module tables
 * @author Albert P�rez Monfort (aperezm@xtec.cat)
 * @return module tables information
 */
function IWmain_tables() {
    // Initialise table array
    $table = array();

    // IWmain table definition
    $table['IWmain'] = DBUtil::getLimitedTablename('IWmain');
    $table['IWmain_column'] = array('id' => 'iw_id',
        'module' => 'iw_module',
        'name' => 'iw_name',
        'value' => 'iw_value',
        'uid' => 'iw_uid',
        'lifetime' => 'iw_lifetime',
        'nult' => 'iw_nult');

    $table['IWmain_column_def'] = array('id' => "I NOTNULL AUTO PRIMARY",
        'module' => "C(50) NOTNULL DEFAULT ''",
        'name' => "C(50) NOTNULL DEFAULT ''",
        'value' => "X NOTNULL",
        'uid' => "I NOTNULL DEFAULT '0'",
        'lifetime' => "C(20) NOTNULL DEFAULT '0'",
        'nult' => "I(1) NOTNULL DEFAULT '0'");

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWmain_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWmain_column_def'], 'iw_');

    // logs table definition
    $table['IWmain_logs'] = DBUtil::getLimitedTablename('IWmain_logs');
    $table['IWmain_logs_column'] = array('logId' => 'iw_logId',
        'moduleName' => 'iw_moduleName',
        'actionType' => 'iw_actionType', // 1 - add / 2 - Edit / 3 - Delete
        'visible' => 'iw_visible', // 1 - all users / 0 - only administrators
        'actionText' => 'iw_actionText',
        'logIp' => 'iw_logIp',
        'indexName' => 'iw_indexName',
        'indexValue' => 'iw_indexValue',
        'indexName1' => 'iw_indexName1',
        'indexValue1' => 'iw_indexValue1',
        'error' => 'iw_error',
    );

    $table['IWmain_logs_column_def'] = array('logId' => "I NOTNULL AUTO PRIMARY",
        'moduleName' => "C(25) NOTNULL DEFAULT ''",
        'actionType' => "I(1) NOTNULL DEFAULT '0'",
        'visible' => "I(1) NOTNULL DEFAULT '0'",
        'actionText' => "C(255) NOTNULL DEFAULT ''",
        'logIp' => "C(15) NOTNULL DEFAULT ''",
        'indexName' => "C(15) NOTNULL DEFAULT ''",
        'indexValue' => "I NOTNULL DEFAULT '0'",
        'indexName1' => "C(15) NOTNULL DEFAULT ''",
        'indexValue1' => "I NOTNULL DEFAULT '0'",
        'error' => "I(1) NOTNULL DEFAULT '0'",
    );

    ObjectUtil::addStandardFieldsToTableDefinition($table['IWmain_logs_column'], '');
    ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWmain_logs_column_def']);

    // IWusers table definition
    $table['IWusers'] = DBUtil::getLimitedTablename('IWusers');
    $table['IWusers_column'] = array('suid' => 'iw_suid',
        'uid' => 'iw_uid',
        'id' => 'iw_id',
        'nom' => 'iw_nom',
        'cognom1' => 'iw_cognom1',
        'cognom2' => 'iw_cognom2',
        'naixement' => 'iw_naixement',
	'code' => 'iw_code',
        'accio' => 'iw_accio',
        'sex' => 'iw_sex',
        'description' => 'iw_description',
        'avatar' => 'iw_avatar',
        'newavatar' => 'iw_newavatar',
    );
    // Return the table information
    return $table;
}
예제 #26
0
/**
 * Define module tables
 * @author Albert Pérez Monfort (aperezm@xtec.cat)
 * @return module tables information
 */
function IWforums_tables() {
    // Initialise table array
    $tables = array();

    // IWforums_definition table definition
    $tables['IWforums_definition'] = DBUtil::getLimitedTablename('IWforums_definition');

    //fields
    $tables['IWforums_definition_column'] = array('fid' => 'iw_fid',
        'nom_forum' => 'iw_nom_forum',
        'descriu' => 'iw_descriu',
        'longDescriu' => "longDescriu",
        'actiu' => 'iw_actiu',
        'adjunts' => 'iw_adjunts',
        'grup' => 'iw_grup',
        'mod' => 'iw_mod',
        'observacions' => 'iw_observacions',
        'subscriptionMode' => 'subscriptionMode',
        'subscribers' => 'subscribers',
        'noSubscribers' => 'noSubscribers',
        'msgDelTime' => 'iw_msgDelTime',
        'msgEditTime' => 'iw_msgEditTime');

    $tables['IWforums_definition_column_def'] = array('fid' => "I NOTNULL AUTO PRIMARY",
        'nom_forum' => "C(50) NOTNULL DEFAULT ''",
        'descriu' => "C(255) NOTNULL DEFAULT ''",
        'longDescriu' => "X NOTNULL",
        'actiu' => "I(1) NOTNULL DEFAULT '0'",
        'adjunts' => "I(1) NOTNULL DEFAULT '0'",
        'grup' => "C(255) NOTNULL DEFAULT ''",
        'mod' => "C(255) NOTNULL DEFAULT ''",
        'observacions' => "C(255) NOTNULL DEFAULT ''",
        'subscriptionMode' => "'I(1) NOTNULL DEFAULT '1'", // 0: no subscription; 1:optional. Users must subscribe/unsubscribe; 2:subscription is default, allow unsubscriptions; 3:compulsory
        'subscribers' => "X",
        'noSubscribers' => "X",
        'msgDelTime' => "C(3) NOTNULL DEFAULT '0'",
        'msgEditTime' => "C(3) NOTNULL DEFAULT '0'");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWforums_definition_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWforums_definition_column_def'], 'iw_');


    // IWforums_temes table definition
    $tables['IWforums_temes'] = DBUtil::getLimitedTablename('IWforums_temes');

    //fields
    $tables['IWforums_temes_column'] = array('ftid' => 'iw_ftid',
        'fid' => 'iw_fid',
        'titol' => 'iw_titol',
        'descriu' => 'iw_descriu',
        'usuari' => 'iw_usuari',
        'data' => 'iw_data',
        'order' => 'iw_order',
        'last_user' => 'iw_last_user',
        'last_time' => 'iw_last_time');

    $tables['IWforums_temes_column_def'] = array('ftid' => "I NOTNULL AUTO PRIMARY",
        'fid' => "I NOTNULL DEFAULT '0'",
        'titol' => "C(100) NOTNULL DEFAULT ''",
        'descriu' => "X NOTNULL",
        'usuari' => "I NOTNULL DEFAULT '0'",
        'data' => "C(20) NOTNULL DEFAULT ''",
        'order' => "I NOTNULL DEFAULT '0'",
        'last_user' => "I NOTNULL DEFAULT '0'",
        'last_time' => "C(20) NOTNULL DEFAULT ''");

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWforums_temes_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWforums_temes_column_def'], 'iw_');

    // IWforums_msg table definition
    $tables['IWforums_msg'] = DBUtil::getLimitedTablename('IWforums_msg');

    //fields
    $tables['IWforums_msg_column'] = array('fmid' => 'iw_fmid',
        'fid' => 'iw_fid',
        'ftid' => 'iw_ftid',
        'titol' => 'iw_titol',
        'usuari' => 'iw_usuari',
        'data' => 'iw_data',
        'missatge' => 'iw_missatge',
        'adjunt' => 'iw_adjunt',
        'icon' => 'iw_icon',
        'llegit' => 'iw_llegit',
        'marcat' => 'iw_marcat',
        'idparent' => 'iw_idparent',
        'lastdate' => 'iw_lastdate',
        'onTop' => 'iw_onTop',
        );

    $tables['IWforums_msg_column_def'] = array('fmid' => "I NOTNULL AUTO PRIMARY",
        'fid' => "I NOTNULL DEFAULT '0'",
        'ftid' => "I NOTNULL DEFAULT '0'",
        'titol' => "C(100) NOTNULL DEFAULT ''",
        'usuari' => "I NOTNULL DEFAULT '0'",
        'data' => "C(20) NOTNULL DEFAULT ''",
        'missatge' => "X NOTNULL",
        'adjunt' => "C(255) NOTNULL DEFAULT ''",
        'icon' => "C(100) NOTNULL DEFAULT ''",
        'llegit' => "X NOTNULL",
        'marcat' => "X NOTNULL",
        'idparent' => "I NOTNULL DEFAULT '0'",
        'lastdate' => "C(20) NOTNULL DEFAULT ''",
        'onTop' => "I(1) NOTNULL DEFAULT '0'",
        );

    ObjectUtil::addStandardFieldsToTableDefinition($tables['IWforums_msg_column'], 'pn_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($tables['IWforums_msg_column_def'], 'iw_');

    //Retorna la informaciᅵ de la taula
    return $tables;
}