gusucode.com > weenCompany闻名企业网站系统 4.0.0 繁体中英文 UTF8源码程序 > modules/m6_contactform/install.php

    <?php
// +---------------------------------------------+
// |     Copyright ?2003 ?2005 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       = 6;
$modulename     = '聯繫框';
$version        = '2.0';
$modulepath     = 'm6_contactform/contactform.php';
$settingspath   = 'm6_contactform/m6_settings.php';
$authorname     = 'weencompany';
$authorlink     = 1;
$modulesettings = '19';


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

if($installtype == 'install')
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid,  '模塊設置',          '收件箱',                                	'用戶提交的聯絡信息以郵件的方式發送至:<br />\r\n多個郵箱地址可用英文逗號隔開.', 'text', '$email', 1) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid,  '模塊設置',          '允許附件',                    	'是否允許用戶提交聯繫信息時發送附件?', 'yesno', '0', '2') ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid,  '模塊設置', 		   '驗證碼', 						'用戶提交聯繫信息時是否需要填寫驗證碼?', 'yesno', '0', 3) ");

if($_SESSION['lang'] == 'en') //Insert English phrase.
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'full_name',                'Full Name:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'your_email',               'Your Email:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'subject',                  'Subject:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'message',                  'Message:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'send_message',             'Send Message', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'reset',                    'Reset', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'invalid_email',            'Invalid Email entered!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'no_post_access',           'Sorry, your account does not have access to submit contact information!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_sent',               'Thanks! Your email has been sent!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_not_sent',           'A system error occured. Your message was not sent!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'attachment',               'Attachment:', '', '', '', '', '1', '0', '0') ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'empty_fields',             'Error: One of the required field(s) is empty!', '', '', '', '', '1', '0', '0') ");

}
else  //Insert Chinese phrase.
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'full_name',                '您的姓名:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'your_email',               'Email地址:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'subject',                  '您的問題:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'message',                  '詳細內容:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'send_message',             '提交發送', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'reset',                    '重置', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'invalid_email',            'Email地址無效!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'no_post_access',           '對不起, 您所在的用戶組無權提交聯繫信息!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_sent',               '謝謝! 您的問題已發送郵件給管理員.', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_not_sent',           '系統錯誤! 郵件發送未完成.', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'attachment',               '附件:', '', '', '', '', '1', '0', '0') ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'empty_fields',             '錯誤: 聯繫內容不完整!', '', '', '', '', '1', '0', '0') ");

}

}


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

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


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

if($installtype == 'uninstall')
{
  // no tables to uninstall
}

?>