<?php
// +---------------------------------------------+
// |     Copyright 2006-2008 weenCompany         |
// |     http://www.weentech.com                 |
// |     This file may not be redistributed.     |
// +---------------------------------------------+

if(!defined('TABLE_PREFIX'))
  define('TABLE_PREFIX', '');

if(!defined('IN_WEENCOMPANY'))
  die('File not found!');


// ############################### MODULE DETAILS ##############################

$uniqueid       = 17;
$modulename     = '产品模块';
$version        = '2.0';
$modulepath     = 'm17_products/imagegallery.php';
$settingspath   = 'm17_products/m17_settings.php';
$authorname     = 'weencompany';
$authorlink     = 1;
$modulesettings = '27';


// ############################### INSTALL MODULE ##############################

if($installtype == 'install')
{
  $DB->query("CREATE TABLE " . TABLE_PREFIX . "m17_products (
  imageid       INT(10)      UNSIGNED NOT NULL              AUTO_INCREMENT,
  sectionid     INT(10)      UNSIGNED NOT NULL DEFAULT 0,
  activated     TINYINT(1)            NOT NULL DEFAULT 0,
  ordernum    INT(10)       UNSIGNED NOT NULL DEFAULT 0,
  filename      VARCHAR(32)           NOT NULL DEFAULT '',
  thumbname     VARCHAR(32)           NOT NULL DEFAULT '',
  isautothumb   TINYINT(1)            NOT NULL DEFAULT 1,
  allowsmilies  TINYINT(1)            NOT NULL DEFAULT 0,
  allowcomments TINYINT(1)            NOT NULL DEFAULT 0,
  showauthor    TINYINT(1)            NOT NULL DEFAULT 0,
  author        VARCHAR(64)           NOT NULL DEFAULT '',
  title         VARCHAR(128)          NOT NULL DEFAULT '',
  description   TEXT,
  specification   TEXT,
  priceship   TEXT,
  viewcount     INT(10)      UNSIGNED NOT NULL DEFAULT 0,
  datecreated   INT(10)      UNSIGNED NOT NULL DEFAULT 0,
  moduleid      INT(10)       UNSIGNED NOT NULL DEFAULT " . $uniqueid .",
  aorp          TINYINT(1)    NOT NULL DEFAULT 1,
  KEY imageid (imageid)
  ) TYPE=MyISAM;" );


  $DB->query("CREATE TABLE " . TABLE_PREFIX . "m17_sections (
  sectionid     INT(10)      UNSIGNED NOT NULL              AUTO_INCREMENT,
  parentid      INT(10)      UNSIGNED NOT NULL DEFAULT 0,
  activated     TINYINT(1)            NOT NULL DEFAULT 0,
  ordernum    INT(10)       UNSIGNED NOT NULL DEFAULT 0,
  name          VARCHAR(128)          NOT NULL DEFAULT '',
  description   TEXT                  NOT NULL,
  sorting       VARCHAR(32)           NOT NULL DEFAULT '',
  imageid       INT(10)      UNSIGNED NULL,
  datecreated   INT(10)      UNSIGNED NOT NULL DEFAULT 0,
  KEY sectionid (sectionid)
  ) TYPE=MyISAM;" );

if($sitedefaultlang == 'en') //Insert English section.
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "m" . $uniqueid . "_sections VALUES (NULL, 0, 1, 1, 'Products', '', '时间(降序)', NULL, " . time() . ")");

}
else  //Insert Chinese section.
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "m" . $uniqueid . "_sections VALUES (NULL, 0, 1, 1, '产品', '', '时间(降序)', NULL, " . time() . ")");

}

  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置',              '弹出方式',                         '是否点击产品缩图, 直接弹出窗口显示大图片和产品信息:', 'yesno', '0', 1) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置',              '每行产品数',             '每行显示的产品数量:', 'text', '4', 2) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置',              '每页产品数',                      '每页显示的产品数量:', 'text', '12', 3) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置',              '邮件通知',                   '会员提交产品图片及说明后, 按此邮箱地址通知管理员:<br />\r\n多个信箱可用英文逗号隔开, 不希望收到通知, 请留空.', 'text', '', 4) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置',              '自动发布',                  '是否允许会员提交产品图片后不经审核自动发布?', 'yesno', '0', 5) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置',              '显示点击率',                     '是否显示产品的点击次数?', 'yesno', '1', 6) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置',              '显示评论数',                  '是否显示产品的评论条数?', 'yesno', '1', 7) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置',              '显示跳转',                    '是否显示产品类别下拉跳转栏?', 'yesno', '1', 8) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置',              '显示导航',                    '是否显示产品类别水平导航栏?', 'yesno', '1', 9) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置',              '类别排序',                   '产品分类目录的排序方式:',                      '<select name=\\\\\"settings[\$setting[settingid]]\\\\\">\r\n
  <option value=\\\\\"0\\\\\" \".iif(\$setting[value]==\"0\", \"selected\", \"\").\">时间(降序)</option>\r\n
  <option value=\\\\\"1\\\\\" \".iif(\$setting[value]==\"1\", \"selected\", \"\").\">时间(升序)</option>\r\n
  <option value=\\\\\"2\\\\\" \".iif(\$setting[value]==\"2\", \"selected\", \"\").\">编号(降序)</option>\r\n
  <option value=\\\\\"3\\\\\" \".iif(\$setting[value]==\"3\", \"selected\", \"\").\">编号(升序)</option>\r\n
  </select>', '2', 10) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置', '居中显示', '窗口中是否居中显示产品图片?', 'yesno', '1', 11) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置', 'TinyMCE编辑器', '后台管理中编辑产品描述时是否启用TinyMCE中文编辑器?<br />注: 此项设置仅当系统基本设置中启用了TinyMCE编辑器时才有效.', 'yesno', '1', 12) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '基本设置', '验证码', '会员提交产品时, 是否需要填写验证码?', 'yesno', '1', 13) ");

  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '缩图设置',    '自动缩图',                       '是否在上传产品大图时自动生成缩图?<br />注: 自动生成缩图仅当产品图片为jpg或png图片时有效. 选择\"否\", 则需上传大图时同时上传缩图.', 'yesno', '1', 1)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '缩图设置',    '缩图最大宽度',                  '自动生成缩图的最大宽度(像素):', 'text', '100', 2) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '缩图设置',    '缩图最大高度',                 '自动生成缩图的最大高度(像素):', 'text', '100', 3) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '缩图设置',    '方形缩图',                '是否拉伸大图自动生成方形缩图?', 'yesno', '0', 4) ");

  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '中图设置',      '自动中图',                '是否在上传产品大图时自动生成中图?<br />注: 自动生成中图仅当产品图片为jpg或png类型时有效, 选择\"否\", 将无法创建中图(系统不提供上传中图功能).', 'yesno', '1', 1) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '中图设置',      '大图保持原始',                 '上传的产品大图是否保持原始尺寸?<br />如果此项设置为\"否\", 且\"自动中图\"设置为\"是\", 则仅显示产品中图, 且删除原上传图片.', 'yesno', '1', 2) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '中图设置',      '中图最大宽度',                    '自动生成中图的最大宽度(像素):', 'text', '400', 3) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '中图设置',      '中图最大高度',                   '自动生成中图的最大高度(像素):', 'text', '400', 4) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '中图设置',      '方型中图',                   '是否拉伸大图自动生成方形中图?', 'yesno', '0', 5) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '缩图设置', '缩图边框', '是否显示缩图边框?', 'yesno', '1', 5) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '中图设置', '中图边框', '是否显示中图边框?', 'yesno', '1', 6) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '类别设置', '分类统计', '是否显示类别的产品数量统计? <br />如果网站访问速度太慢或有大量产品, 建议选\"否\".', 'yesno', '1', 1) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '类别设置', '显示方式', '是否以图片方式显类别? <br />选择\"否\", 则仅显示类别名称.', 'yesno', '1', 2) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '类别设置', '每行类别数', '每行显示的产品类别数, 设置为\"1\"表示纵向排列:', 'text', '5', 3) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '类别设置', '图片边框', '当类别以图片方式显示时, 是否显示图片边框?', 'yesno', '1', 4) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '类别设置', '显示类别', '是否显示产品类别的下属分类别?', 'yesno', '1', 5) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '类别设置', '根类别显示所有产品', '是否在产品模块的根类别下显示所有产品? 此时进入产品页面将显示所有产品; 选择否, 仅显示根类别下的产品.', 'yesno', '0', 6) ");
  
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '边框设置', '边框颜色', '图片边框的颜色:<br />默认颜色: #606E9B', 'text', '#606E9B', 1) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '边框设置', '边框间隙', '图片与边框之间的间隙(像素):<br />默认间隙: 3', 'text', '3', 2) ");



if($sitedefaultlang == 'en') //Insert English phrase.
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'sections',                'Sections:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'no_gif_support',          'Images with the .gif extension are not supported.', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'previous_images',         '&laquo; Previous Page', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'more_images',             'Next Page &raquo;', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'submitted_by',            'Submitted by:', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'submit_an_image',         'Submit a product to this section.', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'submitting_image',        'Submitting Product', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'your_name',               'Your Name:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'description',             'Description:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'thumbnail',               'Thumbnail:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'image',                   'Image:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'submit_image',            'Submit Product', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'image_title',             'Title:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'enter_title',             'Please enter a title!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'enter_author',            'Please enter the author\'s name!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'select_image',            'Please select an image!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'select_thumbnail',        'Please select a thumbnail!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'enter_description',       'Please enter a description!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'image_submitted',         'Thanks! Your product has been submitted. ', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'previous_image',          '&laquo; Previous Product', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'next_image',              'Next Product &raquo;',     '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'invalid_image_type',      'Invalid image type!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'views',                   'Views', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'jump_to',                 'Jump To...', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'comments',                'Comments', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'comment',                'Comment', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'image2',                'Product', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'images',                'Products', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'images2',                'Products List:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'specification',               'Specification:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'priceship',               'Price & Shipment:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'descriptiontitle',               'Basic Info.', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'specificationtitle',               'Data Sheet', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'priceshiptitle',               'Price & Shipment', '', '', '', '', 0, 0, 0)");

}
else  //Insert Chinese phrase.
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'sections',                '分类:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'no_gif_support',          '网站已开启自动缩图功能, 仅支持jpg和png图片格式!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'previous_images',         '&laquo; 上一页', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'more_images',             '下一页 &raquo;', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'submitted_by',            '来自:', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'submit_an_image',         '提交产品到此类别.', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'submitting_image',        '提交产品', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'your_name',               '您的姓名:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'description',             '产品描述:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'thumbnail',               '产品缩图:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'image',                   '产品图片:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'submit_image',            '提交产品', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'image_title',             '产品名称:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'enter_title',             '请输入产品名称!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'enter_author',            '请输入您的姓名!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'select_image',            '请选择产品图片!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'select_thumbnail',        '请选择产品缩图', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'enter_description',       '请输入产品描述!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'image_submitted',         '谢谢! 产品提交成功.', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'previous_image',          '&laquo; 上一个', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'next_image',              '下一个 &raquo;',     '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'invalid_image_type',      '无效的图片类型!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'views',                   '查看次数:', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'jump_to',                 '跳转到...', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'comments',                '个评论', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'comment',                '评论', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'image2',                '个产品', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'images',                '个产品', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'images2',                '产品列表:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'specification',               '技术规格:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'priceship',               '价格及运输:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'descriptiontitle',               '基本信息', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'specificationtitle',               '技术规格', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'priceshiptitle',               '价格及运输', '', '', '', '', 0, 0, 0)");

}

}


// ############################### UPGRADE MODULE ##############################

if($installtype == 'upgrade')
{
  if($currentversion == '2.0')
  {
    // example:
    // UpdateModuleVersion(17, 2.1);
    // $currentversion = 2.1;
  }
}


// ############################## UNINSTALL MODULE #############################

if($installtype == 'uninstall')
{
  $DB->query("DROP TABLE IF EXISTS " . TABLE_PREFIX . "m17_products");
  $DB->query("DROP TABLE IF EXISTS " . TABLE_PREFIX . "m17_sections");
}

?>