更新最新的权限控制及邮箱群发功能至测服

第一步:更新代码至版本号:180;

第二步:修改.htaccess文件,增加test的属履带代码如下

RewriteCond $1 !^(index\.php|css|flash|images|img|includes|js|language|ckeditor|ckfinder|qr|font|upload|pchart|datepicker|bbs|test|ecshop|robots\.txt)

第三步:新建全站配置表inapp_config,MYSQL创建代码如下:

CREATE TABLE `inapp_config` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `mailHost` varchar(100) NOT NULL,
  `mailFrom` varchar(100) DEFAULT NULL,
  `mailUsername` varchar(150) DEFAULT NULL,
  `mailPassword` varchar(100) DEFAULT NULL,
  `mailSendNum` int(11) DEFAULT NULL,
  `mailSendTime` int(11) DEFAULT NULL,
  `mailPort` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

第四步,导入全站配置基本信息,MYSQL代码如下:

INSERT INTO `inapp_config` VALUES ('1', 'smtp.qq.com;', '119658306@qq.com', '119658306', '123', '5', '50', '25');

第五步,修改存储结构函数,相关代码如下:

CREATE DEFINER=`sam`@`220.132.121.207` PROCEDURE `Admin_SP_EditAdminAccount`(IN `_aid` INTEGER
  , IN `_account` VARCHAR(100)
 , IN `_pwd` VARCHAR(32)
 , IN `_description` VARCHAR(100) , IN `_adminPriv` VARCHAR(300)
  , IN `_yingyundataPriv` VARCHAR(300) , IN `_gamedataPriv` VARCHAR(300) , OUT `_RTN` INTEGER)
    SQL SECURITY INVOKER
SP:BEGIN
  IF NOT EXISTS (SELECT aid FROM inapp_adminmember WHERE account = _account)
  THEN
    SET _RTN = 1300;
    LEAVE SP;
  END IF;

  UPDATE inapp_adminmember SET pwd = _pwd, description = _description, adminPriv = _adminPriv, yingyundataPriv = _yingyundataPriv, gamedataPriv = _gamedataPriv
  WHERE aid = _aid;
  IF ROW_COUNT() <> 1
  THEN
    SET _RTN = 1301;
    LEAVE SP;
  END IF;

  SET _RTN = 1;
END

第六步,清空表inapp_websort,替换新的内容,具体代码如下:

 1 truncate table `inapp_websort`;
 2 
 3 
 4 INSERT INTO `inapp_websort` VALUES ('7', 'game', '0', '1', null, 'admin/game', '', '0', '游戏管理', 'GAME', '1', '2');
 5 INSERT INTO `inapp_websort` VALUES ('1', 'ad', '0', '1', null, 'admin/ad', '', '0', '广宣管理', 'AD ', '1', '5');
 6 INSERT INTO `inapp_websort` VALUES ('3', 'member', '0', '1', null, 'admin/member', '', '0', '会员', 'MEMBER', '1', '4');
 7 INSERT INTO `inapp_websort` VALUES ('4', 'news', '0', '1', null, 'admin/news', '', '0', '公告管理', 'NEWS', '1', '4');
 8 INSERT INTO `inapp_websort` VALUES ('5', 'account', '0', '1', null, 'admin/account', '', '0', '账号', 'ACCOUNT', '1', '4');
 9 INSERT INTO `inapp_websort` VALUES ('6', 'statistics', '0', '1', null, 'admin/statistics/index', '', '0', '营运报表', 'STATISTICS', '1', '2');
10 INSERT INTO `inapp_websort` VALUES ('9', 'add', '7', '1', null, 'admin/game/add', '', '0', '新增應用', 'ADD GAME', '2', '0');
11 INSERT INTO `inapp_websort` VALUES ('10', 'index', '7', '1', null, 'admin/game/index', '', '0', '應用列表', 'GAME LIST', '2', '1');
12 INSERT INTO `inapp_websort` VALUES ('11', 'index', '1', '1', null, 'admin/ad/indList', '', '0', '首頁大看版廣告', 'HOME BIG AD', '2', '2');
13 INSERT INTO `inapp_websort` VALUES ('12', 'menuList', '1', '1', null, 'admin/ad/menuList', '', '0', '左側列表廣告', 'LEFT LIST AD', '2', '2');
14 INSERT INTO `inapp_websort` VALUES ('13', 'appTopList', '1', '1', null, 'admin/ad/appTopList', '', '0', 'Top icon', 'TOP ICON', '2', '1');
15 INSERT INTO `inapp_websort` VALUES ('14', 'appHotAppleList', '1', '1', null, 'admin/ad/appHotAppleList', '', '0', '熱門蘋果', 'HOT APPLE', '2', '1');
16 INSERT INTO `inapp_websort` VALUES ('15', 'appHotAndroidList', '1', '1', null, 'admin/ad/appHotAndroidList', '', '0', '熱門安卓', 'HOT ANDROID', '2', '1');
17 INSERT INTO `inapp_websort` VALUES ('16', 'index', '3', '1', null, 'admin/member', '', '0', '會員搜尋', 'MEMBER SEARCH', '2', '0');
18 INSERT INTO `inapp_websort` VALUES ('17', 'forbidden', '3', '1', null, 'admin/member/forbidden', '', '0', '會員禁權名單', 'FORBIDDEN', '2', '1');
19 INSERT INTO `inapp_websort` VALUES ('18', 'goldscreening', '3', '1', null, 'admin/member/goldscreening', '', '0', '會員金幣篩選名單', 'GOLD SCREEN', '2', '0');
20 INSERT INTO `inapp_websort` VALUES ('19', 'mail', '3', '1', null, 'admin/member/mail', '', '0', '群發郵件', 'MAIL', '2', '0');
21 INSERT INTO `inapp_websort` VALUES ('20', 'index', '4', '1', null, 'admin/news', '', '0', '公告列表', 'NEWS LIST', '2', '2');
22 INSERT INTO `inapp_websort` VALUES ('21', 'add', '4', '1', null, 'admin/news/add', '', '0', ' 新增公告', 'ADD NEWS', '2', '0');
23 INSERT INTO `inapp_websort` VALUES ('22', 'edit', '4', '0', null, 'admin/news/edit', '', '0', '編輯公告', '', '2', '0');
24 INSERT INTO `inapp_websort` VALUES ('23', 'del', '4', '0', null, null, '', '0', '刪除公告', '', '2', '0');
25 INSERT INTO `inapp_websort` VALUES ('24', 'index', '5', '1', null, 'admin/account', '', '0', '賬號列表', 'ACCOUNT LIST', '2', '1');
26 INSERT INTO `inapp_websort` VALUES ('25', 'add', '5', '1', null, 'admin/account/add', '', '0', '新增賬號', 'ADD ACCOUNT', '2', '0');
27 INSERT INTO `inapp_websort` VALUES ('26', 'del', '24', '1', null, null, '', '0', '刪除賬號', '', '3', '0');
28 INSERT INTO `inapp_websort` VALUES ('27', 'edit', '5', '0', null, null, '', '0', '編輯賬號碼', '', '2', '0');
29 INSERT INTO `inapp_websort` VALUES ('28', 'platform', '6', '1', null, 'admin/statistics/platform', '', '0', '平臺數據', 'PLATFORM', '2', '1');
30 INSERT INTO `inapp_websort` VALUES ('29', 'index', '6', '1', null, 'admin/statistics/index', '', '0', ' 應用數據', 'STATISTICS LIST', '2', '1');
31 INSERT INTO `inapp_websort` VALUES ('30', 'edit', '10', '1', null, null, '', '0', '编辑应用', 'EDIT APP', '3', '0');
32 INSERT INTO `inapp_websort` VALUES ('32', 'add', '12', '1', null, null, '', '0', '左侧列表广告新增', 'ADD', '3', '0');
33 INSERT INTO `inapp_websort` VALUES ('33', 'send', '13', '1', null, null, '', '0', 'TOP ICON送出', 'SEND', '3', '0');
34 INSERT INTO `inapp_websort` VALUES ('34', 'send', '14', '1', null, null, '', '0', '热门苹果送出', 'SEND', '3', '0');
35 INSERT INTO `inapp_websort` VALUES ('35', 'send', '15', '1', null, null, '', '0', '热门安卓送出', 'SEND', '3', '0');
36 INSERT INTO `inapp_websort` VALUES ('36', 'edit', '11', '1', null, null, '', '0', '首頁大看版廣告编辑', 'EDIT', '3', '0');
37 INSERT INTO `inapp_websort` VALUES ('37', 'edit', '12', '1', null, null, '', '0', '左側列表廣告编辑', 'EDIT', '3', '0');
38 INSERT INTO `inapp_websort` VALUES ('38', 'edit', '20', '1', null, null, '', '0', '公告列表编辑', 'EDIT', '3', '0');
39 INSERT INTO `inapp_websort` VALUES ('39', 'edit', '24', '1', null, null, '', '0', '賬號列表编辑', 'EDIT', '3', '0');
40 INSERT INTO `inapp_websort` VALUES ('40', 'import', '28', '1', null, null, '', '0', ' 导出平台储值量', 'IMPORT DATA', '3', '0');
41 INSERT INTO `inapp_websort` VALUES ('41', 'add', '11', '1', null, null, '', '0', '首頁大看版廣告新增', 'ADD', '3', '0');
42 INSERT INTO `inapp_websort` VALUES ('44', 'jinqian', '17', '1', null, null, '', '0', '会员禁權', 'JINQIAN', '3', '0');
43 INSERT INTO `inapp_websort` VALUES ('45', 'del', '20', '1', null, null, '', '0', '删除公告权限 ', 'DEL', '3', '0');
44 INSERT INTO `inapp_websort` VALUES ('46', 'huichu', '29', '1', null, null, '', '0', '应用数据汇出权限', 'HUICHU', '3', '0');
45 INSERT INTO `inapp_websort` VALUES ('47', 'data', '0', '1', null, 'admin/data/platform', '', '0', '数据分析', 'DATA', '1', '5');
46 INSERT INTO `inapp_websort` VALUES ('48', 'index', '47', '1', null, 'admin/data/index', '', '0', '游戏数据分析', 'GAME DATA', '2', '0');
47 INSERT INTO `inapp_websort` VALUES ('49', 'addata', '47', '1', null, 'admin/data/addata', '', '0', '广告数据分析', 'AD DATA', '2', '0');
48 INSERT INTO `inapp_websort` VALUES ('50', 'payActive', '47', '1', null, 'admin/data/payActive', '', '0', '付费率数据分析', 'PAY DATA', '2', '0');
49 INSERT INTO `inapp_websort` VALUES ('51', 'undercarriage', '11', '1', null, null, '', '0', '下架', 'undercarriage', '3', '0');
50 INSERT INTO `inapp_websort` VALUES ('52', 'undercarriage', '12', '1', null, null, '', '0', '下架', 'undercarriage', '3', '0');
51 INSERT INTO `inapp_websort` VALUES ('53', 'sortup', '11', '1', null, null, '', '0', '往上排序', 'sortup', '3', '0');
52 INSERT INTO `inapp_websort` VALUES ('54', 'sortup', '12', '1', null, null, '', '0', '往上排序', 'sortup', '3', '0');
53 INSERT INTO `inapp_websort` VALUES ('55', 'sortdown', '12', '1', null, null, '', '0', '往下排序', 'sortdown', '3', '0');
54 INSERT INTO `inapp_websort` VALUES ('56', 'sortdown', '11', '1', null, null, '', '0', '往下排序', 'sortdown', '3', '0');
55 INSERT INTO `inapp_websort` VALUES ('57', 'del', '11', '1', null, null, '', '0', '删除', 'del', '3', '0');
56 INSERT INTO `inapp_websort` VALUES ('58', 'del', '12', '1', null, null, '', '0', '删除', 'del', '3', '0');
57 INSERT INTO `inapp_websort` VALUES ('59', 'grounding', '11', '1', null, null, '', '0', '上架', 'grounding', '3', '0');
58 INSERT INTO `inapp_websort` VALUES ('60', 'grounding', '12', '1', null, null, '', '0', '上架', 'grounding', '3', '0');
59 INSERT INTO `inapp_websort` VALUES ('61', 'cnzz', '0', '1', null, 'http://new.cnzz.com/v1/login.php?siteid=5242691', '', '0', '站长统计[密码:inapp123456]', 'cnzz', '1', '0');
60 INSERT INTO `inapp_websort` VALUES ('62', 'platform', '47', '1', null, 'admin/data/platform', '', '0', '平台数据分析', 'platform', '2', '1');
61 INSERT INTO `inapp_websort` VALUES ('63', 'yingyun', '28', '1', null, null, '', '0', '营运报表 游戏的控制', 'yingyun', '3', '0');
62 INSERT INTO `inapp_websort` VALUES ('64', 'gamedata', '62', '1', null, null, '', '0', '数据分析 游戏的控制\r\n\r\n', 'gamedata', '3', '0');
63 INSERT INTO `inapp_websort` VALUES ('65', 'Config', '0', '1', null, 'admin/Config/index', '', '0', '网站配置', 'index', '1', '1');
64 INSERT INTO `inapp_websort` VALUES ('66', 'index', '65', '1', null, 'admin/Config/index', '', '0', '邮箱配置', 'config', '2', '0');

第七步,新增存储函数Config_SP_editInfo,代码如下:

CREATE DEFINER=`root`@`%` PROCEDURE `Config_SP_editInfo`(IN `_id` INTEGER ,IN `_mailHost` VARCHAR(100),IN `_mailFrom` VARCHAR(100), IN `_mailUsername` VARCHAR(100), IN `_mailPassword` VARCHAR(100),IN `_mailSendTime` VARCHAR(100),  IN `_mailSendNum` VARCHAR(100), IN `_mailPort` INTEGER, OUT `_RTN` INTEGER)
    SQL SECURITY INVOKER
SP:BEGIN
  UPDATE inapp_config  SET mailHost = _mailHost,mailFrom = _mailFrom, mailUsername= _mailUsername, mailPassword = _mailPassword, mailSendNum = _mailSendNum, mailSendTime = _mailSendTime, mailPort = _mailPort
  WHERE id = _id;

  IF ROW_COUNT() <> 1
  THEN
    SET _RTN = 1300;
    LEAVE SP;
  END IF;

  SET _RTN = 1;
END

第八步,新增存储函数Config_SP_GetInfo,代码如下:

CREATE DEFINER=`root`@`%` PROCEDURE `Config_SP_GetInfo`(IN `_id` INTEGER
                                           ,OUT `_RTN` INTEGER)
    SQL SECURITY INVOKER
SP:BEGIN
  SELECT * FROM inapp_config WHERE id = _id;

  IF FOUND_ROWS() <> 1
  THEN
    SET _RTN = 1300;
    LEAVE SP;
  END IF;

  SET _RTN = 1;
END

 

至此,更新完成!

posted @ 2013-05-07 13:55  jshaibozhong  阅读(333)  评论(0编辑  收藏  举报