www.gusucode.com > weenCompany闻名企业网站系统 4.0.0 繁体中英文 UTF8源码程序 > modules/m8_latestposts/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 = 8; $modulename = '最新話題'; $version = '2.0'; $modulepath = 'm8_latestposts/latestposts.php'; $settingspath = 'm8_latestposts/m8_settings.php'; $authorname = 'weencompany'; $authorlink = 1; $modulesettings = '17'; // ############################### INSTALL MODULE ############################## if($installtype == 'install') { $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '模塊設置', '最新話題條目數', '最新話題模塊中顯示的論壇最新主題條目數:', 'text', '5', 1) "); $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '模塊設置', '換行字符數', '設定標題換行的字符數量:', 'text', '30', 2) "); $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid, '模塊設置', '排除論壇', '最新話題模塊不從被排除的論壇中選擇話題, 比如私密論壇:<br/>注: 需輸入論壇ID號, 多個排除論壇ID需用英文逗號隔開.', 'text', '', '3') "); if($_SESSION['lang'] == 'en') //Insert English phrase. { $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'posted_by', 'Posted by', '', '', '', '', 0, 0, 0)"); } else //Insert Chinese phrase. { $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'posted_by', '作者', '', '', '', '', 0, 0, 0)"); } } // ############################### UPGRADE MODULE ############################## if($installtype == 'upgrade') { if($currentversion == '2.0') { // example: // UpdateModuleVersion(8, 2.1); // $currentversion = 2.1; } } // ############################## UNINSTALL MODULE ############################# if($installtype == 'uninstall') { // no tables to uninstall } ?>