Share PHP Mail Manager source code _php Tips

Source: Internet
Author: User
Tags php programming sha1 create database

This article for everyone to provide the PHP Mail Manager source code, I hope you like.
1. Demand Analysis
Administrators should be able to create and modify message content.
Administrators should be able to send text or HTML-formatted news messages to all subscribers in a list.
Users should be able to register to use a site and can access and modify their personal data.
Users should be able to subscribe to any one list of news messages on the site.
Users should be able to cancel a subscription to a mailing list.
Users should be able to store news letters in HTML or plain text format, depending on their personal preferences.
For security reasons, users should not be able to send messages to the list or see other users ' e-mail addresses.
Users and administrators should be able to view information about the mailing list.
Users and administrators should be able to view news messages that have been sent to a list (archived files) in the past.

2. Solution
2.1 User Rights map

2.2 List of files in the mailing list Manager

2.3 Possible actions in the mailing list Manager

3, the implementation of the database

CREATE DATABASE MLM; #创建mlm数据库 use MLM; #使用mlm数据库 CREATE TABLE lists #列表 (Listid INT auto_increment not NULL PRIMARY KEY, #列表ID listname chars not NUL 
 
L, #列表名 blurb VARCHAR (255) #列表主要内容); CREATE TABLE subscribers #订阅者 (email CHAR (MB) NOT null PRIMARY KEY, #邮箱 realname CHAR (m) not NULL, #真实姓名 mimety 
 
PE char (1) NOT NULL, #想要接收邮件类型 password char (n) not null, #密码 admin TINYINT not null #管理员标记); 
 
CREATE table sub_lists #订阅-List relational table (email CHAR (MB) not NULL, #邮件 Listid INT not null #列表ID); CREATE TABLE Mail #邮件表 (mailid INT auto_increment not null PRIMARY KEY, #邮件ID e-mail CHAR not NULL, #发送方 Subje CT CHAR NOT NULL, #主题 Listid INT is not null, #列表ID status CHAR (a) Not NULL, #邮件状态, is sent sent DATETIME, #发送时间 m 
 
Odified TIMESTAMP #最后一次修改时间戳); CREATE TABLE Images #图像表 (mailid INT not NULL, #邮件ID path char (m) not NULL, #路径 mimetype char (m) NOT null #图片类 
 
Type); GRANT select,insert,update,delete #创建mlm用户 on MLM. * To mlm@localhost identified by ' password '; 
 
#插入订阅者标记 INSERT into Subscribers VALUES (' Admin@localhost ', ' Administrative User ', ' H ', SHA1 (' admin '), 1); 
 INSERT into Subscribers VALUES (' Switch_1@switch.com ', ' Administrative User ', ' H ', SHA1 (' admin '), 1);

I hope this article will help you learn about PHP programming.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.