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

    <?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       = 12;
$modulename     = '用戶註冊';
$version        = '2.0';
$modulepath     = 'm12_registration/register.php';
$settingspath   = 'm12_registration/m12_settings.php';
$authorname     = 'weencompany';
$authorlink     = 1;
$modulesettings = '17';


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

if($installtype == 'install')
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '模塊設置', '校驗方式',           '提交註冊信息時, 是否彈出小窗口顯示錯誤信息?<br/>注: 選擇\'否\'則以網頁方式顯示錯誤信息.', 'yesno', '1', 1) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '模塊設置', '用戶名長度',              '可輸入用戶名的最大長度:', 'text', '12', 2) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '模塊設置', '密碼長度',              '可輸入密碼的最大長度:', 'text', '15', 3) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '模塊設置', '禁止Email地址',               '禁止註冊的Email地址(以空格分開):<br />注: 禁止特定Email地址如: info@weentech.com; 禁止全部地址如: @weentech.com.', 'textarea', '', 4) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '模塊設置', '禁止IP地址',                  '被禁止註冊和訪問的IP地址(以空格分開):<br/>注: 可禁止特定的IP地址, 或使用通配符禁止子網絡IP地址如: 192.168.*.*', 'textarea', '', 5) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '模塊設置', '郵件驗證',             '是否發送一封驗證郵件到用戶註冊的信箱, 並在用戶驗證後完成註冊?', 'yesno', '0', 6) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '模塊設置', '驗證碼',                                           '註冊時是否輸入驗證碼?', 'yesno', '0', 7) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '模塊設置', '關閉註冊',      '是否關閉新用戶註冊, 關閉後已註冊用戶仍可正常登錄?', 'yesno', '0', 8) ");

  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'user_name',               '用戶名:', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'password',                '密碼:', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'password_again',          '確認密碼:', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email',                   'Email地址:', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_again',             '確認Email地址:', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'register',                '註冊', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'reset_form',              '重置', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'enter_alnum_username',    '用戶名僅能用字母或數字組成!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'enter_alnum_password',    '密碼僅能用字母或數字組成!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'password_unmatched',      '您輸入的密碼與確認密碼不匹配!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'unvalid_email',           'Email地址無效!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_unmatched',         '您輸入的Email地址與確認Email地址不匹配!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'username_exists',         '用戶名已被註冊, 請重新輸入!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_exists',            'Email地址已被註冊, 請重新輸入!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'register_success',        '感謝您的註冊!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'already_logged_in',       '您已經註冊, 並登陸為:', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'logout',                  '如果您希望退出, 請點擊這裏.', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'register_now',            '點擊這裏註冊!', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_banned',            '您輸入的Email地址禁止註冊!', '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'pwd_reset',               '取回密碼',                         '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_not_found',         '您輸入的Email地址不正確:',                         '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_subject',                          '您的新密碼',                         '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_message',                          '您的新密碼是: ',                         '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'password_reset_success',  '系統已為您生成了一個新密碼, 並發送到您的郵箱中, 請查收.',                         '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'activation_required',                  '感謝您的註冊! 一封確認郵件已發送到您的信箱, 請按郵件中的提示信息激活您的帳號.',                         '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_subject_activation', '感謝您的註冊!',                         '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'email_message_activation', '感謝您的註冊! 請點擊以下鏈接激活您的帳號:',                         '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'validation_key_not_found', '您的帳號未註冊! 請正確地拷貝鏈接.',                         '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'already_validated',                 '您的帳號已激活, 可以使用用戶名和密碼登陸網站了.',                         '', '', '', '', 1, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'validation_success',                 '您的帳號已激活, 可以使用用戶名和密碼登陸網站了.',                         '', '', '', '', 1, 0, 0)");
}


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

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


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

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

?>