当前位置: 首页>>代码示例>>PHP>>正文


PHP Fox::getTableName方法代码示例

本文整理汇总了PHP中Fox::getTableName方法的典型用法代码示例。如果您正苦于以下问题:PHP Fox::getTableName方法的具体用法?PHP Fox::getTableName怎么用?PHP Fox::getTableName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Fox的用法示例。


在下文中一共展示了Fox::getTableName方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initSession

 /**
  * Bootstraps session
  *
  * @param Uni_Application_Bootstrap $bootS
  * @return void
  */
 public static function initSession($bootS)
 {
     if (Fox::getMode() != Uni_Controller_Action::MODE_INSTALL) {
         session_set_cookie_params(0);
         if (!Fox::isDatabaseSession()) {
             Zend_Session::start(array('save_path' => APPLICATION_PATH . '/../var/sessions'));
         } else {
             $config = array('name' => Fox::getTableName('core_session'), 'primary' => 'id', 'modifiedColumn' => 'modified', 'dataColumn' => 'data', 'lifetimeColumn' => 'lifetime');
             Zend_Session::setSaveHandler(new Zend_Session_SaveHandler_DbTable($config));
             Zend_Session::start();
         }
     }
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:19,代码来源:Fox.php

示例2: getMenuItemsByGroup

 /**
  * Get menu items in the menu group
  * 
  * @param string $key
  * @return array 
  */
 public function getMenuItemsByGroup($key)
 {
     $select = $this->getAdapter()->select()->from(array('mi' => $this->_name), '*')->where('mi.status=' . self::STATUS_ENABLED)->join(array('mg' => Fox::getTableName($this->_menuGroup)), 'mg.key = "' . addslashes($key) . '" AND find_in_set(mg.id, mi.menu_group)', 'mg.id')->order('mi.sort_order ASC');
     return $this->getAdapter()->fetchAll($select);
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:11,代码来源:Menu.php

示例3: getAttributeSetByEntity

 /**
  * Get attribute set for entity
  * 
  * @param string $entityTypeCode
  * @return array 
  */
 public function getAttributeSetByEntity($entityTypeCode)
 {
     $select = $this->getAdapter()->select()->from(array('a' => $this->_name))->join(array('e' => Fox::getTableName($this->_entityType)), 'a.entity_type_id=e.id', FALSE)->where('e.entity_type_code=?', $entityTypeCode);
     return $this->getAdapter()->fetchRow($select);
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:11,代码来源:Set.php

示例4: int

 *
 * Class Fox_Member_Setup_Sql
 * 
 * @uses Uni_Core_Setup_Abstract
 * @category    Fox
 * @package     Fox_Member
 * @author      Zendfox Team of Unicode Systems <zendfox@unicodesystems.in>
 * @copyright   Copyright (c) 2011 Unicode Systems. (http://www.unicodesystems.in)
 * @license     http://www.gnu.org/licenses/  GNU General Public License
 */
$installer = $this;
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('member_entity') . " (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `attribute_set_id` tinyint(4) unsigned NOT NULL,\n  `first_name` varchar(255) NOT NULL,\n  `last_name` varchar(255) NOT NULL,\n  `email_id` varchar(255) NOT NULL,\n  `join_date` datetime NOT NULL,\n  `password` varchar(255) NOT NULL,\n  `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0=>Blocked 1=>Active 2=>not confirm',\n  `member_image` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `attribute_set_id` (`attribute_set_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n\nALTER TABLE " . Fox::getTableName('member_entity') . "\n  ADD CONSTRAINT `member_entity_ibfk_1` FOREIGN KEY (`attribute_set_id`) REFERENCES " . Fox::getTableName('eav_attribute_set') . " (`id`);\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('member_entity_date') . " (\n  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n  `attribute_id` int(10) unsigned NOT NULL,\n  `entity_id` int(10) unsigned NOT NULL,\n  `value` date DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `attribute_id_2` (`attribute_id`,`entity_id`),\n  KEY `attribute_id` (`attribute_id`),\n  KEY `entity_id` (`entity_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n\nALTER TABLE " . Fox::getTableName('member_entity_date') . "\n  ADD CONSTRAINT `member_entity_datetime_ibfk_1` FOREIGN KEY (`attribute_id`) REFERENCES " . Fox::getTableName('eav_attribute') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n  ADD CONSTRAINT `member_entity_datetime_ibfk_2` FOREIGN KEY (`entity_id`) REFERENCES " . Fox::getTableName('member_entity') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('member_entity_decimal') . " (\n  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n  `attribute_id` int(10) unsigned NOT NULL,\n  `entity_id` int(10) unsigned NOT NULL,\n  `value` decimal(12,2) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `attribute_id_2` (`attribute_id`,`entity_id`),\n  KEY `attribute_id` (`attribute_id`),\n  KEY `entity_id` (`entity_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n\nALTER TABLE " . Fox::getTableName('member_entity_decimal') . "\n  ADD CONSTRAINT `member_entity_decimal_ibfk_1` FOREIGN KEY (`attribute_id`) REFERENCES " . Fox::getTableName('eav_attribute') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n  ADD CONSTRAINT `member_entity_decimal_ibfk_2` FOREIGN KEY (`entity_id`) REFERENCES " . Fox::getTableName('member_entity') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('member_entity_int') . " (\n  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n  `attribute_id` int(10) unsigned NOT NULL,\n  `entity_id` int(10) unsigned NOT NULL,\n  `value` int(11) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `attribute_id_2` (`attribute_id`,`entity_id`),\n  KEY `attribute_id` (`attribute_id`),\n  KEY `entity_id` (`entity_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n\nALTER TABLE " . Fox::getTableName('member_entity_int') . "\n  ADD CONSTRAINT `member_entity_int_ibfk_1` FOREIGN KEY (`attribute_id`) REFERENCES " . Fox::getTableName('eav_attribute') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n  ADD CONSTRAINT `member_entity_int_ibfk_2` FOREIGN KEY (`entity_id`) REFERENCES " . Fox::getTableName('member_entity') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('member_entity_text') . " (\n  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n  `attribute_id` int(10) unsigned NOT NULL,\n  `entity_id` int(10) unsigned NOT NULL,\n  `value` text,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `attribute_id_2` (`attribute_id`,`entity_id`),\n  KEY `attribute_id` (`attribute_id`),\n  KEY `entity_id` (`entity_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n\nALTER TABLE " . Fox::getTableName('member_entity_text') . "\n  ADD CONSTRAINT `member_entity_text_ibfk_1` FOREIGN KEY (`attribute_id`) REFERENCES " . Fox::getTableName('eav_attribute') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n  ADD CONSTRAINT `member_entity_text_ibfk_2` FOREIGN KEY (`entity_id`) REFERENCES " . Fox::getTableName('member_entity') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('member_entity_varchar') . " (\n  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n  `attribute_id` int(10) unsigned NOT NULL,\n  `entity_id` int(10) unsigned NOT NULL,\n  `value` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `attribute_id_2` (`attribute_id`,`entity_id`),\n  KEY `attribute_id` (`attribute_id`),\n  KEY `entity_id` (`entity_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n\nALTER TABLE " . Fox::getTableName('member_entity_varchar') . "\n  ADD CONSTRAINT `member_entity_varchar_ibfk_1` FOREIGN KEY (`attribute_id`) REFERENCES " . Fox::getTableName('eav_attribute') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n  ADD CONSTRAINT `member_entity_varchar_ibfk_2` FOREIGN KEY (`entity_id`) REFERENCES " . Fox::getTableName('member_entity') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('member_forget_password_entity') . " (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `mem_id` varchar(255) NOT NULL,\n  `code` varchar(255) NOT NULL,\n  `created_on` datetime NOT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `code` (`code`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\nALTER TABLE " . Fox::getTableName('member_forget_password_entity') . "  ADD CONSTRAINT `member_forget_password_entity_ibfk_1` FOREIGN KEY (`mem_id`) REFERENCES " . Fox::getTableName('member_entity') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('member_verification_entity') . " (\n  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n  `mem_id` int(11) unsigned NOT NULL,\n  `verification_code` varchar(255) NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `mem_id` (`mem_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\nALTER TABLE " . Fox::getTableName('member_verification_entity') . "\n  ADD CONSTRAINT `member_forget_password_entity_ibfk_1` FOREIGN KEY (`mem_id`) REFERENCES " . Fox::getTableName('member_entity') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n");
$installer->insertRecord(Fox::getTableName('eav_entity_type'), array('id' => '1', 'entity_type_code' => 'member'));
$installer->insertRecord(Fox::getTableName('eav_attribute_set'), array('id' => '1', 'entity_type_id' => '1', 'attribute_set_name' => 'Member'));
$installer->insertRecord(Fox::getTableName('eav_entity_metadata_group'), array('id' => '1', 'entity_type_id' => '1', 'group_name' => 'Personal Details', 'sort_order' => '0'));
$installer->insertRecord(Fox::getTableName('eav_attribute_group'), array('id' => '1', 'attribute_set_id' => '1', 'attribute_group_name' => 'Personal Details', 'sort_order' => '0'));
$installer->insertRecord(Fox::getTableName('eav_entity_metadata_attribute'), array('id' => '1', 'entity_type_id' => '1', 'group_id' => '1', 'attribute_code' => 'first_name', 'data_type' => 'varchar', 'input_type' => 'text', 'frontend_label' => 'First Name', 'validation' => '', 'is_required' => '1', 'is_editable' => '1', 'is_backend_editable' => '1', 'is_visible_on_frontend' => '1', 'default_value' => '', 'position' => '0', 'source_model' => ''));
$installer->insertRecord(Fox::getTableName('eav_entity_metadata_attribute'), array('id' => '2', 'entity_type_id' => '1', 'group_id' => '1', 'attribute_code' => 'last_name', 'data_type' => 'varchar', 'input_type' => 'text', 'frontend_label' => 'Last Name', 'validation' => '', 'is_required' => '1', 'is_editable' => '1', 'is_backend_editable' => '1', 'is_visible_on_frontend' => '1', 'default_value' => '', 'position' => '0', 'source_model' => ''));
$installer->insertRecord(Fox::getTableName('eav_entity_metadata_attribute'), array('id' => '3', 'entity_type_id' => '1', 'group_id' => '1', 'attribute_code' => 'email_id', 'data_type' => 'varchar', 'input_type' => 'text', 'frontend_label' => 'Email ID', 'validation' => 'email', 'is_required' => '1', 'is_editable' => '0', 'is_backend_editable' => '0', 'is_visible_on_frontend' => '1', 'default_value' => '', 'position' => '0', 'source_model' => ''));
$installer->insertRecord(Fox::getTableName('eav_entity_metadata_attribute'), array('id' => '4', 'entity_type_id' => '1', 'group_id' => '1', 'attribute_code' => 'password', 'data_type' => 'varchar', 'input_type' => 'password', 'frontend_label' => 'Password', 'validation' => '', 'is_required' => '1', 'is_editable' => '0', 'is_backend_editable' => '0', 'is_visible_on_frontend' => '1', 'default_value' => '', 'position' => '0', 'source_model' => ''));
$installer->insertRecord(Fox::getTableName('eav_entity_metadata_attribute'), array('id' => '5', 'entity_type_id' => '1', 'group_id' => '1', 'attribute_code' => 'confirm_password', 'data_type' => 'varchar', 'input_type' => 'password', 'frontend_label' => 'Confirm Password', 'validation' => '', 'is_required' => '1', 'is_editable' => '0', 'is_backend_editable' => '0', 'is_visible_on_frontend' => '1', 'default_value' => '', 'position' => '0', 'source_model' => ''));
$installer->insertRecord(Fox::getTableName('eav_entity_metadata_attribute'), array('id' => '6', 'entity_type_id' => '1', 'group_id' => '1', 'attribute_code' => 'member_image', 'data_type' => 'varchar', 'input_type' => 'file', 'frontend_label' => 'Upload Image', 'validation' => 'image', 'is_required' => '0', 'is_editable' => '0', 'is_backend_editable' => '0', 'is_visible_on_frontend' => '0', 'default_value' => '', 'position' => '0', 'source_model' => ''));
$installer->insertRecord(Fox::getTableName('eav_entity_metadata_attribute'), array('id' => '7', 'entity_type_id' => '1', 'group_id' => '1', 'attribute_code' => 'id', 'data_type' => 'int', 'input_type' => 'hidden', 'frontend_label' => '', 'validation' => '', 'is_required' => '0', 'is_editable' => '0', 'is_backend_editable' => '1', 'is_visible_on_frontend' => '1', 'default_value' => '', 'position' => '0', 'source_model' => ''));
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:30,代码来源:sql_setup-1.0.0.0.php

示例5: int

 * Zendfox Framework
 *
 * LICENSE
 *
 * This file is part of Zendfox.
 *
 * Zendfox is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Zendfox is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Zendfox in the file LICENSE.txt.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Class Fox_Cms_Setup_Sql
 * 
 * @uses Uni_Core_Setup_Abstract
 * @category    Fox
 * @package     Fox_Cms
 * @author      Zendfox Team of Unicode Systems <zendfox@unicodesystems.in>
 * @copyright   Copyright (c) 2011 Unicode Systems. (http://www.unicodesystems.in)
 * @license     http://www.gnu.org/licenses/  GNU General Public License
 */
$installer = $this;
$installer->runSetup("\n    CREATE TABLE IF NOT EXISTS " . Fox::getTableName('contact_request') . " (\n`id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(100) NOT NULL,\n  `email` varchar(100) NOT NULL,\n  `subject` varchar(255) NOT NULL,\n  `message` text NOT NULL,\n  `status` tinyint(4) NOT NULL COMMENT '0=>unread,1=>read,2=>replied',\n  `contact_date` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n");
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:30,代码来源:sql_setup-1.0.0.0.php

示例6: int

 * This file is part of Zendfox.
 *
 * Zendfox is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Zendfox is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Zendfox in the file LICENSE.txt.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Class Fox_Admin_Setup_Sql
 * 
 * @uses Uni_Core_Setup_Abstract
 * @category    Fox
 * @package     Fox_Admin
 * @author      Zendfox Team of Unicode Systems <zendfox@unicodesystems.in>
 * @copyright   Copyright (c) 2011 Unicode Systems. (http://www.unicodesystems.in)
 * @license     http://www.gnu.org/licenses/  GNU General Public License
 */
$installer = $this;
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('admin_analytics') . " (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `date_value` date NOT NULL,\n  `total_results` int(11) NOT NULL,\n  `page_views` int(11) NOT NULL,\n  `total_visits` int(11) NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('admin_role') . " (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(60) NOT NULL,\n  `resource_ids` text NOT NULL COMMENT 'Comma Seperated Resource Ids',\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n");
$installer->insertRecord(Fox::getTableName('admin_role'), array('id' => '1', 'name' => 'Administrator', 'resource_ids' => '-1'));
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('admin_user') . " (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `firstname` varchar(100) NOT NULL,\n  `lastname` varchar(100) NOT NULL,\n  `email` varchar(255) NOT NULL,\n  `contact` varchar(15) DEFAULT NULL,\n  `username` varchar(50) NOT NULL,\n  `password` varchar(255) NOT NULL,\n  `role_id` int(10) unsigned NOT NULL,\n  `status` tinyint(4) NOT NULL COMMENT '0=>Blocked 1=>Active',\n  PRIMARY KEY (`id`),\n  KEY `role_id` (`role_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n                \nALTER TABLE " . Fox::getTableName('admin_user') . "\n  ADD CONSTRAINT `admin_user_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES " . Fox::getTableName('admin_role') . " (`id`);\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('admin_forget_password_entity') . " (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `user_id` int(10) unsigned NOT NULL,\n  `code` varchar(255) NOT NULL,\n  `created_on` datetime NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `user_id` (`user_id`),\n  KEY `code` (`code`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\nALTER TABLE " . Fox::getTableName('`admin_forget_password_entity`') . "\n  ADD CONSTRAINT `admin_forget_password_entity_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES " . Fox::getTableName('admin_user') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n");
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:30,代码来源:sql_setup-1.0.0.0.php

示例7: load

 /**
  * Loads record and sets data in the model for passed criteria
  *
  * @param string $value
  * @param string $field
  * @return object|NULL 
  */
 public function load($value, $field = NULL)
 {
     $condition = '';
     if (is_array($value)) {
         foreach ($value as $key => $val) {
             $condition .= $condition != '' ? " AND {$key}='{$val}'" : "{$key}='{$val}'";
         }
     } else {
         $condition = ($field ? $field : $this->primary) . '=' . "'{$value}'";
     }
     $record = $this->fetchRow($condition);
     if ($record) {
         $mainData = $record->toArray();
         $metaData = array();
         $attrSetId = $mainData[$this->_eav_field];
         $eav_entity_prefix = $this->getEavEntityPrefix();
         $aidRows = $this->getAdapter()->fetchAll("SELECT at.attribute_code AS attribute_code, at.id AS attribute_id, at.data_type as data_type FROM " . Fox::getTableName('eav_attribute') . " at JOIN " . Fox::getTableName('eav_entity_attribute') . " ea ON (ea.attribute_id=at.id) WHERE ea.attribute_set_id='{$attrSetId}'");
         foreach ($aidRows as $aidRow) {
             $attrAlias = 'eav_' . $aidRow['data_type'];
             $metaData['select'][] = '(SELECT `value` FROM ' . $eav_entity_prefix . '_' . $aidRow['data_type'] . '  WHERE ' . $eav_entity_prefix . '_' . $aidRow['data_type'] . ".entity_id=main.id AND " . $eav_entity_prefix . '_' . $aidRow['data_type'] . '.attribute_id=\'' . $aidRow['attribute_id'] . '\') AS ' . $aidRow['attribute_code'];
         }
         if (!empty($metaData)) {
             $select = $this->select()->from(array('main' => $this->_name), $metaData['select'])->where($this->primary . '=?', $mainData[$this->primary]);
             $eavData = $this->fetchRow($select);
             if ($eavData) {
                 $mainData = array_merge($mainData, $eavData->toArray());
             }
         }
         return $this->setData($mainData);
     }
     return NULL;
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:39,代码来源:Abstract.php

示例8: int

 * Zendfox Framework
 *
 * LICENSE
 *
 * This file is part of Zendfox.
 *
 * Zendfox is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Zendfox is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Zendfox in the file LICENSE.txt.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Class Fox_Cms_Setup_Sql
 * 
 * @uses Uni_Core_Setup_Abstract
 * @category    Fox
 * @package     Fox_Cms
 * @author      Zendfox Team of Unicode Systems <zendfox@unicodesystems.in>
 * @copyright   Copyright (c) 2011 Unicode Systems. (http://www.unicodesystems.in)
 * @license     http://www.gnu.org/licenses/  GNU General Public License
 */
$installer = $this;
$installer->runSetup("\n    CREATE TABLE IF NOT EXISTS " . Fox::getTableName('backup_report') . " (\n   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n  `file_name` varchar(100) NOT NULL,\n  `file_size` int(11) NOT NULL,\n  `backup_date` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n");
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:30,代码来源:sql_setup-1.0.0.0.php

示例9: int

 *
 * This file is part of Zendfox.
 *
 * Zendfox is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Zendfox is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Zendfox in the file LICENSE.txt.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Class Fox_News_Setup_Sql
 * 
 * @uses Uni_Core_Setup_Abstract
 * @category    Fox
 * @package     Fox_News
 * @author      Zendfox Team of Unicode Systems <zendfox@unicodesystems.in>
 * @copyright   Copyright (c) 2011 Unicode Systems. (http://www.unicodesystems.in)
 * @license     http://www.gnu.org/licenses/  GNU General Public License
 */
$installer = $this;
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('news_entity') . " (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `title` varchar(255) NOT NULL,\n  `content` text NOT NULL,\n  `date_from` datetime DEFAULT NULL,\n  `date_to` datetime DEFAULT NULL,\n  `sort_order` int(10) unsigned NOT NULL,\n  `status` tinyint(4) NOT NULL COMMENT '0=>Disabled 1=>Enabled',\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n");
$installer->insertRecord(Fox::getTableName('news_entity'), array('id' => '1', 'title' => 'News Title 1', 'content' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta.', 'sort_order' => '1', 'status' => '1'));
$installer->insertRecord(Fox::getTableName('news_entity'), array('id' => '2', 'title' => 'News Title 2', 'content' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta.', 'sort_order' => '1', 'status' => '1'));
$installer->insertRecord(Fox::getTableName('news_entity'), array('id' => '3', 'title' => 'News Title 3', 'content' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta.', 'sort_order' => '1', 'status' => '1'));
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:30,代码来源:sql_setup-1.0.0.0.php

示例10: mediumint

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Zendfox in the file LICENSE.txt.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Class Fox_Cms_Setup_Sql
 * 
 * @uses Uni_Core_Setup_Abstract
 * @category    Fox
 * @package     Fox_Cms
 * @author      Zendfox Team of Unicode Systems <zendfox@unicodesystems.in>
 * @copyright   Copyright (c) 2011 Unicode Systems. (http://www.unicodesystems.in)
 * @license     http://www.gnu.org/licenses/  GNU General Public License
 */
$installer = $this;
$installer->runSetup("\n    CREATE TABLE IF NOT EXISTS " . Fox::getTableName('cms_block') . " (\n  `id` mediumint(9) NOT NULL AUTO_INCREMENT,\n  `title` varchar(255) NOT NULL,\n  `identifier_key` varchar(150) NOT NULL,\n  `content` text NOT NULL,\n  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0=>Disabled 1=>Enabled',\n  `created_on` datetime NOT NULL,\n  `modified_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `identifier_key` (`identifier_key`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;\n");
$installer->insertRecord(Fox::getTableName('cms_block'), array('id' => '1', 'title' => 'Footer Content', 'identifier_key' => 'footer-content', 'content' => 'Powered By: Zendfox (WAF)', 'status' => '1', 'created_on' => date('Y-m-d H:i:s'), 'modified_on' => date('Y-m-d H:i:s')));
$installer->insertRecord(Fox::getTableName('cms_block'), array('id' => '2', 'title' => 'Footer Links', 'identifier_key' => 'footer-links', 'content' => '<p><a class="noneBack" href="{{getUrl(\'\')}}">Home</a> <a href="{{getUrl(\'about\')}}">About Us</a><a href="{{getUrl(\'need-help\')}}">Need Help? </a> <a href="{{getUrl(\'contact\')}}">Contact Us</a><a href="{{getUrl(\'privacy-policy\')}}">Privacy Policy</a><a class="last" href="{{getUrl(\'terms\')}}">Terms of Service</a></p>', 'status' => '1', 'created_on' => date('Y-m-d H:i:s'), 'modified_on' => date('Y-m-d H:i:s')));
$installer->insertRecord(Fox::getTableName('cms_block'), array('id' => '3', 'title' => 'Left Template', 'identifier_key' => 'template-block', 'content' => '<div class="left_cont top1 gradient"><div class="zend-template-content"><ul><li class="template-image">&nbsp;</li><li class="get-text">Get Zendfox<br /> Customizable Templates</li><li class="click-button"><a href="#">Click Here</a></li></ul></div></div>', 'status' => '1', 'created_on' => date('Y-m-d H:i:s'), 'modified_on' => date('Y-m-d H:i:s')));
$installer->insertRecord(Fox::getTableName('cms_block'), array('id' => '4', 'title' => 'Left Menu', 'identifier_key' => 'left-menu-block', 'content' => '<div class="left_cont top2 gradient">    <h2 class="sub-heading">Left Menu Title</h2>    <div class="left-list">        <ul>            <li><a href="#">Demo Menu 1</a></li>            <li><a href="#">Demo Menu 2</a></li>            <li><a href="#">Demo Menu 3</a></li>            <li><a href="#">Demo Menu 4</a></li>            <li><a href="#">Demo Menu 5</a></li>            <li><a href="#">Demo Menu 6</a></li>            <li><a href="#">Demo Menu 7</a></li>            <li><a href="#">Demo Menu 8</a></li>            <li><a href="#">Demo Menu 9</a></li>            <li><a href="#">Demo Menu 10</a></li>            <li><a href="#">Demo Menu 11</a></li>                    </ul>    </div></div>', 'status' => '1', 'created_on' => date('Y-m-d H:i:s'), 'modified_on' => date('Y-m-d H:i:s')));
$installer->insertRecord(Fox::getTableName('cms_block'), array('id' => '5', 'title' => 'Right Menu', 'identifier_key' => 'right-menu-block', 'content' => '<div class="left_cont top2 gradient">    <h2 class="sub-heading">Right Menu Title</h2>    <div class="left-list">        <ul>            <li><a href="#">Demo Menu 1</a></li>            <li><a href="#">Demo Menu 2</a></li>            <li><a href="#">Demo Menu 3</a></li>            <li><a href="#">Demo Menu 4</a></li>            <li><a href="#">Demo Menu 5</a></li>            <li><a href="#">Demo Menu 6</a></li>            <li><a href="#">Demo Menu 7</a></li>            <li><a href="#">Demo Menu 8</a></li>            <li><a href="#">Demo Menu 9</a></li>            <li><a href="#">Demo Menu 10</a></li>            <li><a href="#">Demo Menu 11</a></li>                    </ul>    </div></div>', 'status' => '1', 'created_on' => date('Y-m-d H:i:s'), 'modified_on' => date('Y-m-d H:i:s')));
$installer->runSetup("\n    CREATE TABLE IF NOT EXISTS " . Fox::getTableName('cms_page') . " (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `title` tinytext NOT NULL,\n  `url_key` varchar(255) NOT NULL,\n  `content` text NOT NULL,\n  `layout` varchar(100) NOT NULL,\n  `layout_update` text NULL,\n  `meta_keywords` tinytext NULL,\n  `meta_description` tinytext NULL,\n  `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0=>Inactive,1=>Active,100=>Deleted',\n  `created` datetime NOT NULL COMMENT 'Creation Date and time',\n  `modified_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `url_key` (`url_key`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;\n");
$installer->insertRecord(Fox::getTableName('cms_page'), array('id' => '1', 'title' => '404 Not Found!', 'url_key' => 'no-page-404', 'content' => '<div class="oops"><h1>Oooops!! <span class="go-back"><a onclick="history.go(-1);" href="#">Go back</a>&nbsp; to the previous page</span></h1><div class="not-found"><div class="logo-img"><img src="{{themeUrl(\'images/fox-logo.png\')}}" alt="Zendfox Logo" /></div><h2>404-Page Not Found!</h2><h3>Sorry, <span class="page-request">The page you requested was not found on server.</span></h3><h4>Suggestions:</h4><ul><li>Please make sure the spelling is correct.</li></ul></div></div>', 'layout' => 'one-column', 'layout_update' => '', 'meta_keywords' => '', 'meta_description' => '', 'status' => '1', 'created' => date('Y-m-d H:i:s'), 'modified_on' => date('Y-m-d H:i:s')));
$installer->insertRecord(Fox::getTableName('cms_page'), array('id' => '2', 'title' => 'Home', 'url_key' => 'home', 'content' => '<div class="banner_wrap">{{view key="home-banner" class="core/template" tpl="fox/html/banner"}}</div><div class="msgbox">{{view key="messages" class="core/template" tpl="fox/html/messages"}}</div><div class="title_bar"><h2>Home <span>Page</span></h2></div><div class="home_content_wrap"><div class="home_content_left"><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta.</p><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta.</p></div></div>', 'layout' => 'three-columns', 'layout_update' => '', 'meta_keywords' => '', 'meta_description' => '', 'status' => '1', 'created' => date('Y-m-d H:i:s'), 'modified_on' => date('Y-m-d H:i:s')));
$installer->insertRecord(Fox::getTableName('cms_page'), array('id' => '3', 'title' => 'About Us', 'url_key' => 'about', 'content' => '<div class="title_bar"><h2>About <span>Us</span></h2></div><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta.</p>', 'layout' => 'three-columns', 'layout_update' => '', 'meta_keywords' => '', 'meta_description' => '', 'status' => '1', 'created' => date('Y-m-d H:i:s'), 'modified_on' => date('Y-m-d H:i:s')));
$installer->insertRecord(Fox::getTableName('cms_page'), array('id' => '4', 'title' => 'Privacy Policy', 'url_key' => 'privacy-policy', 'content' => '<div class="title_bar"><h2>Privacy <span>Policy</span></h2></div><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta.</p>', 'layout' => 'three-columns', 'layout_update' => '', 'meta_keywords' => '', 'meta_description' => '', 'status' => '1', 'created' => date('Y-m-d H:i:s'), 'modified_on' => date('Y-m-d H:i:s')));
$installer->insertRecord(Fox::getTableName('cms_page'), array('id' => '5', 'title' => 'Terms of Service', 'url_key' => 'terms', 'content' => '<div class="title_bar"><h2>Terms of <span>Service</span></h2></div><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta.</p>', 'layout' => 'three-columns', 'layout_update' => '', 'meta_keywords' => '', 'meta_description' => '', 'status' => '1', 'created' => date('Y-m-d H:i:s'), 'modified_on' => date('Y-m-d H:i:s')));
$installer->insertRecord(Fox::getTableName('cms_page'), array('id' => '6', 'title' => 'Need Help?', 'url_key' => 'need-help', 'content' => '<div class="title_bar"><h2>Need <span>Help?</span></h2></div><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta.</p>', 'layout' => 'three-columns', 'layout_update' => '', 'meta_keywords' => '', 'meta_description' => '', 'status' => '1', 'created' => date('Y-m-d H:i:s'), 'modified_on' => date('Y-m-d H:i:s')));
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:30,代码来源:sql_setup-1.0.0.0.php

示例11: int

 *
 * LICENSE
 *
 * This file is part of Zendfox.
 *
 * Zendfox is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Zendfox is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Zendfox in the file LICENSE.txt.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Class Fox_Newsletter_Setup_Sql
 * 
 * @uses Uni_Core_Setup_Abstract
 * @category    Fox
 * @package     Fox_Newsletter
 * @author      Zendfox Team of Unicode Systems <zendfox@unicodesystems.in>
 * @copyright   Copyright (c) 2011 Unicode Systems. (http://www.unicodesystems.in)
 * @license     http://www.gnu.org/licenses/  GNU General Public License
 */
$installer = $this;
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('newsletter_subscriber') . " (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(255) DEFAULT NULL,\n  `email` varchar(255) NOT NULL,\n  `status` tinyint(4) NOT NULL COMMENT '0->unsusbcribe,1->confirm,2->subscribe',\n  `code` varchar(50) NOT NULL,\n   PRIMARY KEY (`id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('newsletter_template') . " (\n  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(255) NOT NULL,\n  `subject` varchar(255) NOT NULL,\n  `sender_name` varchar(255) NOT NULL,\n  `sender_email` varchar(255) NOT NULL,\n  `content` text NOT NULL,\n  `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  `update_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',\n  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=>Not Sent 1=>Sent',\n  `last_sent` datetime DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n");
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:30,代码来源:sql_setup-1.0.0.0.php

示例12: tinyint

 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Zendfox is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Zendfox in the file LICENSE.txt.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Class Fox_Eav_Setup_Sql
 * 
 * @uses Uni_Core_Setup_Abstract
 * @category    Fox
 * @package     Fox_Eav
 * @author      Zendfox Team of Unicode Systems <zendfox@unicodesystems.in>
 * @copyright   Copyright (c) 2011 Unicode Systems. (http://www.unicodesystems.in)
 * @license     http://www.gnu.org/licenses/  GNU General Public License
 */
$installer = $this;
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('eav_entity_type') . " (\n  `id` tinyint(4) unsigned NOT NULL AUTO_INCREMENT,\n  `entity_type_code` varchar(100) NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('eav_attribute_set') . " (\n  `id` tinyint(4) unsigned NOT NULL AUTO_INCREMENT,\n  `entity_type_id` tinyint(4) unsigned NOT NULL,\n  `attribute_set_name` varchar(100) NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `entity_type_id` (`entity_type_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n\nALTER TABLE " . Fox::getTableName('eav_attribute_set') . "\n  ADD CONSTRAINT `eav_attribute_set_ibfk_1` FOREIGN KEY (`entity_type_id`) REFERENCES " . Fox::getTableName('eav_entity_type') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('eav_attribute') . " (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `entity_type_id` tinyint(4) unsigned NOT NULL,\n  `attribute_code` varchar(150) NOT NULL,\n  `data_type` varchar(30) NOT NULL,\n  `input_type` varchar(30) NOT NULL,\n  `frontend_label` varchar(150) NOT NULL,\n  `validation` varchar(100) DEFAULT NULL,\n  `is_editable` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=>No 1=>Yes',\n  `is_backend_editable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0=>No, 1=>Yes',\n  `is_visible_on_frontend` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=>No 1=>Yes',\n  `is_required` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=>No 1=>Yes',\n  `is_user_defined` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=>System 1=>User',\n  `default_value` text,\n  `is_unique` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=>No 1=>Yes',\n  `position` int(11) NOT NULL DEFAULT '0',\n  `source_model` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `attribute_code` (`attribute_code`),\n  KEY `entity_type_id` (`entity_type_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n\nALTER TABLE " . Fox::getTableName('eav_attribute') . "\n  ADD CONSTRAINT `eav_attribute_ibfk_1` FOREIGN KEY (`entity_type_id`) REFERENCES " . Fox::getTableName('eav_entity_type') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('eav_attribute_group') . " (\n  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,\n  `attribute_set_id` tinyint(4) unsigned NOT NULL,\n  `attribute_group_name` varchar(100) NOT NULL,\n  `sort_order` int(11) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`id`),\n  KEY `attribute_set_id` (`attribute_set_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n\nALTER TABLE " . Fox::getTableName('eav_attribute_group') . "\n  ADD CONSTRAINT `eav_attribute_group_ibfk_1` FOREIGN KEY (`attribute_set_id`) REFERENCES " . Fox::getTableName('eav_attribute_set') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('eav_attribute_option') . " (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `attribute_id` int(10) unsigned NOT NULL,\n  `sort_order` int(11) NOT NULL DEFAULT '0',\n  `label` varchar(255) DEFAULT NULL,\n  `value` varchar(255) DEFAULT NULL,\n  `is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=>No 1=>Yes',\n  PRIMARY KEY (`id`),\n  KEY `attribute_id` (`attribute_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n\nALTER TABLE " . Fox::getTableName('eav_attribute_option') . "\n  ADD CONSTRAINT `eav_attribute_option_ibfk_1` FOREIGN KEY (`attribute_id`) REFERENCES " . Fox::getTableName('eav_attribute') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('eav_entity_metadata_group') . " (\n  `id` tinyint(4) unsigned NOT NULL AUTO_INCREMENT,\n  `entity_type_id` tinyint(4) unsigned NOT NULL,\n  `group_name` varchar(255) NOT NULL,\n  `sort_order` int(11) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`id`),\n  KEY `entity_type_id` (`entity_type_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;\n\nALTER TABLE " . Fox::getTableName('eav_entity_metadata_group') . "\n  ADD CONSTRAINT `eav_entity_metadata_group_ibfk_1` FOREIGN KEY (`entity_type_id`) REFERENCES " . Fox::getTableName('eav_entity_type') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('eav_entity_metadata_attribute') . " (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `entity_type_id` tinyint(4) unsigned NOT NULL,\n  `group_id` tinyint(4) unsigned NOT NULL,\n  `attribute_code` varchar(150) NOT NULL,\n  `data_type` varchar(30) NOT NULL,\n  `input_type` varchar(30) NOT NULL,\n  `frontend_label` varchar(150) NOT NULL,\n  `validation` varchar(100) DEFAULT NULL,\n  `is_required` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=>No 1=>Yes',\n  `is_editable` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=>No 1=>Yes',\n  `is_backend_editable` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=>No, 1=>Yes',\n  `is_visible_on_frontend` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=>No 1=>Yes',\n  `default_value` text,\n  `position` int(11) NOT NULL DEFAULT '0',\n  `source_model` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `group_id` (`group_id`),\n  KEY `entity_type_id` (`entity_type_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n\nALTER TABLE " . Fox::getTableName('eav_entity_metadata_attribute') . "\n  ADD CONSTRAINT `eav_entity_metadata_attribute_ibfk_1` FOREIGN KEY (`entity_type_id`) REFERENCES " . Fox::getTableName('eav_entity_type') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n  ADD CONSTRAINT `eav_entity_metadata_attribute_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES " . Fox::getTableName('eav_entity_metadata_group') . " (`id`);\n");
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('eav_entity_attribute') . " (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `attribute_set_id` tinyint(4) unsigned NOT NULL,\n  `attribute_group_id` smallint(5) unsigned NOT NULL,\n  `attribute_id` int(10) unsigned NOT NULL,\n  `sort_order` int(11) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`id`),\n  KEY `attribute_set_id` (`attribute_set_id`),\n  KEY `attribute_id` (`attribute_id`),\n  KEY `attribute_group_id` (`attribute_group_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;\n\nALTER TABLE " . Fox::getTableName('eav_entity_attribute') . "\n  ADD CONSTRAINT `eav_entity_attribute_ibfk_1` FOREIGN KEY (`attribute_id`) REFERENCES " . Fox::getTableName('eav_attribute') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n  ADD CONSTRAINT `eav_entity_attribute_ibfk_2` FOREIGN KEY (`attribute_set_id`) REFERENCES " . Fox::getTableName('eav_attribute_set') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n  ADD CONSTRAINT `eav_entity_attribute_ibfk_3` FOREIGN KEY (`attribute_group_id`) REFERENCES " . Fox::getTableName('eav_attribute_group') . " (`id`) ON DELETE CASCADE ON UPDATE CASCADE;\n");
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:30,代码来源:sql_setup-1.0.0.0.php

示例13: smallint

 *
 * Zendfox is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Zendfox in the file LICENSE.txt.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Class Fox_Navigation_Setup_Sql
 * 
 * @uses Uni_Core_Setup_Abstract
 * @category    Fox
 * @package     Fox_Navigation
 * @author      Zendfox Team of Unicode Systems <zendfox@unicodesystems.in>
 * @copyright   Copyright (c) 2011 Unicode Systems. (http://www.unicodesystems.in)
 * @license     http://www.gnu.org/licenses/  GNU General Public License
 */
$installer = $this;
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('navigation_menu_group') . " (\n  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(100) NOT NULL,\n  `sort_order` int(11) NOT NULL,\n  `key` varchar(100) NOT NULL,\n  `description` varchar(255) DEFAULT NULL,\n  `status` tinyint(1) NOT NULL COMMENT '0=>Disable 1=>Enable',\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n");
$installer->insertRecord(Fox::getTableName('navigation_menu_group'), array('id' => '1', 'name' => 'Header Menu', 'sort_order' => '0', 'key' => 'HEADER', 'description' => 'Header Menu', 'status' => '1'));
$installer->insertRecord(Fox::getTableName('navigation_menu_group'), array('id' => '2', 'name' => 'Left Menu', 'sort_order' => '1', 'key' => 'LEFT', 'description' => 'Member Menus', 'status' => '1'));
$installer->runSetup("\nCREATE TABLE IF NOT EXISTS " . Fox::getTableName('navigation_menu_item') . " (\n `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,\n  `title` varchar(100) NOT NULL,\n  `link` varchar(255) NOT NULL,\n  `open_window` varchar(20) NOT NULL,\n  `sort_order` int(11) NOT NULL,\n  `status` tinyint(1) NOT NULL COMMENT '0=>Disabled 1=>Enabled',\n  `menu_group` varchar(255) NOT NULL,\n  `style_class` varchar(100) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n");
$installer->insertRecord(Fox::getTableName('navigation_menu_item'), array('id' => '1', 'title' => 'Home', 'link' => '', 'open_window' => '_self', 'sort_order' => '1', 'status' => '1', 'menu_group' => '1', 'style_class' => 'home'));
$installer->insertRecord(Fox::getTableName('navigation_menu_item'), array('id' => '2', 'title' => 'About Us', 'link' => 'about', 'open_window' => '_self', 'sort_order' => '2', 'status' => '1', 'menu_group' => '1', 'style_class' => ''));
$installer->insertRecord(Fox::getTableName('navigation_menu_item'), array('id' => '3', 'title' => 'Contact Us', 'link' => 'contact', 'open_window' => '_self', 'sort_order' => '3', 'status' => '1', 'menu_group' => '1', 'style_class' => ''));
$installer->insertRecord(Fox::getTableName('navigation_menu_item'), array('id' => '4', 'title' => 'View Profile', 'link' => 'member/account/profile', 'open_window' => '_self', 'sort_order' => '1', 'status' => '1', 'menu_group' => '2', 'style_class' => ''));
$installer->insertRecord(Fox::getTableName('navigation_menu_item'), array('id' => '5', 'title' => 'Edit Profile', 'link' => 'member/account/edit-profile', 'open_window' => '_self', 'sort_order' => '2', 'status' => '1', 'menu_group' => '2', 'style_class' => ''));
$installer->insertRecord(Fox::getTableName('navigation_menu_item'), array('id' => '6', 'title' => 'Change Password', 'link' => 'member/account/change-password', 'open_window' => '_self', 'sort_order' => '3', 'status' => '1', 'menu_group' => '2', 'style_class' => ''));
$installer->insertRecord(Fox::getTableName('navigation_menu_item'), array('id' => '7', 'title' => 'News', 'link' => 'news', 'open_window' => '_self', 'sort_order' => '4', 'status' => '1', 'menu_group' => '1', 'style_class' => ''));
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:30,代码来源:sql_setup-1.0.0.0.php

示例14: getUnassignedAttributes

 /**
  * Get unused attributes
  * 
  * @param int $attributeSetId
  * @param int $entityTypeId
  * @return Uni_Core_Model_Collection 
  */
 public function getUnassignedAttributes($attributeSetId, $entityTypeId)
 {
     return $this->getCollection('entity_type_id=' . $entityTypeId . ' AND id NOT IN(SELECT e.attribute_id FROM ' . Fox::getTableName($this->entityAttribute) . ' e WHERE e.attribute_set_id=' . $attributeSetId . ')');
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:11,代码来源:Attribute.php


注:本文中的Fox::getTableName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。