载转老外编写的一个maillist源代码_PHP
admin.php3 $program_name Version: $ver $admin_name:
INCLUDE("layout.inc.php3");
INCLUDE("config.inc.php3");
INCLUDE("./lang/$language.inc.php3");
print_header("$admin_name");
print_navbar();
$string=implode($argv," ");
$string2=explode("&",$string);
if($string==’’)
{
echo"
Administration:
.php3?admin">
$admin_username:
$admin_password:
$send">
";
}
else if($string==’admin’)
{
if($adminuser1==$adminuser)
{
if($adminpass1==$adminpass)
{
echo"
admin.php3?send&$adminuser1&$adminpass1">$send_mail
admin.php3?users&$adminuser1&$adminpass1">$show_users
admin.php3?delall&$adminuser1&$adminpass1">$del_table
tablecreator.php3">$create_table
";
}
else { echo"$noaccess"; }
}
else { echo"$noaccess"; }
}
else if($string2[0]==’delall’)
{
if($string2[1]==$adminuser)
{
if($string2[2]==$adminpass)
{
$query="DROP TABLE $maillist_table";
mysql_db_query($database_name,$query,$conn) or die("$cant_del_table");
echo"$table_deleted";
}
else { echo"$noaccess"; }
}
else { echo"$noaccess"; }
}
else if($string2[0]==’users’)
{
if($string2[1]==$adminuser)
{
if($string2[2]==$adminpass)
{
echo"
$headline_users
";
}
else { echo"$noaccess"; }
}
else { echo"$noaccess"; }
}
else if($string2[0]==’deluser’)
{
if($string2[1]==$adminuser)
{
if($string2[2]==$adminpass)
{
$query="DELETE FROM $maillist_table WHERE email=’$string2[3]’";
mysql_db_query($database_name,$query,$conn) or die("$string2[3] $could_not_be_deleted");
echo"$string2[3] has_been_deleted";
}
else { echo"$noaccess"; }
}
else { echo"$noaccess"; }
}
else if($string2[0]==’send’)
{
if($string2[1]==$adminuser)
{
if($string2[2]==$adminpass)
{
echo"
$send_mail:
?>
english.inc.php3
$mailadd_text="If you are in our Newsletter, you get an E-Mail with Informations
about our Homepage every month. Just fill in the following Form.
to unsubscribe click";
$remember_pass="Please remember your Password, otherwise, you can’t delete your mailadress from
the list";
$wrong_mail="You’ve entered a bad E-Mail adress";
$admin_name="Newsletter Administration";
$program_name="Newsletter-Manager";
$admin_username="Admin-Username";
$admin_password="Admin-Password";
$send="submit";
$reset="reset";
$noaccess="access denied";
$send_mail="Send a Mail to the list";
$show_users="Show/delete members";
$del_table="Delete Table $maillist_table";
$create_table="Create Table $maillist_table";
$cant_del_table="Can’t delete Table $maillist_table";
$table_deleted="Table $maillist_table has been deleted";
$headline_users="Every user on one place:";
$prename="Prename";
$database_error="Error on Database: $database_name";
$delete="delete";
$could_not_be_deleted="could not be deleted";
$has_been_deleted="has been deleted";
$topic="Topic";
$message="Message";
$send_error="send error";
$xxx_has_been_sent="The following has been sent";
$already_there="You are already in the list!!!";
$xxx_has_been_entered="The following has been entered";
$password="Password";
$cant_find_entry="Can’t find entry!";
$isnt_in_db="$email is not entered in the Database";
$error_del="Error while trying to delete";
$entry_del="Entry has been deleted";
$here="HERE";
$click="";
$all_fields_must_be_edited="ERROR! All Fields have to be filled in completely!";
?>
tablecreator.php3
INCLUDE"layout.inc.php3";
INCLUDE"config.inc.php3";
print_header("Create table $maillist_table");
print_navbar();
$query="CREATE TABLE $maillist_table
(name CHAR (50) not null , vorname CHAR (50) not null ,
email CHAR (255) not null , pass CHAR (10) not null ,
PRIMARY KEY (email), INDEX (email), UNIQUE (email))";
mysql_db_query($database_name,$query,$conn) or die("Could not create table");
echo"Table "$maillist_table" has been created";
print_back();
print_footer();
?>
index.php3
/******************************************************************************/
/* */
/* Mailinglisten-Manager */
/* */
/* by: Marcel Beerta */
/* http://www.supertown.de/computer/mazen/ */
/* marcel.beerta@gmx.net */
/* */
/******************************************************************************/
INCLUDE "config.inc.php3";
INCLUDE "./lang/$language.inc.php3";
INCLUDE "layout.inc.php3";
print_header("$program_name");
print_navbar();
$string=implode($argv," ");
if ($string==’add’)
{
if($name&&$prename&&$email&&$pw)
{
$query="INSERT INTO $maillist_table(name,vorname,email,pass)
VALUES(’$name’,’$vorname’,’$email’,’$pw’)";
mysql_db_query($database_name,$query,$conn) or die("$already_there");
echo"
$xxx_has_been_entered
Name: $name
$prename: $vorname
E-Mail: $email
$password: $pw
$remember_pass
";
}
else
{
echo"$all_fields_must_be_edited";
}
}
else if($string==’delete’)
{
echo"
.php3?delme">
E-Mail:
$password:
$send">
";
}
else if($string==’delme’)
{
$query1="SELECT * FROM $maillist_table WHERE $maillist_table.email LIKE ’$email’";
$result=mysql_db_query($database_name,$query1,$conn) or die("$cant_find_entry");
$data=mysql_fetch_row($result) or die("$isnt_in_db
");
if($data[3]==$pw)
{
$query="DELETE FROM $maillist_table WHERE email=’$email’";
mysql_db_query($database_name,$query,$conn) or die("$error_del");
echo"$entry_del";
}
else
{
echo"$noaccess";
}
}
else
{
echo"$mailadd_text
index.php3?delete">$here $click ...
";
}
print_back();
print_footer();
?>
layout.inc.php3
/******************************************************************************/
/* */
/* Layout Datei ... */
/* */
/* Einfach auf eigene Layout-Wuensche anpassen ... */
/* */
/* by Marcel Beerta */
/* http://www.supertown.de/computer/mazen/ */
/* */
/******************************************************************************/
function print_header ($title)
{
echo"
Content-Type" content="text/html; charset=ISO-8859-1">
description"
content="">
keywords"
content="">
distribution" content="global">
robots" content="index">
robots" content="follow">
revisit-after" CONTENT="1 days">
language" content="">
author" content="">
copyright" content="">
programmer" content="Marcel Beerta (www.game-center.de)">
0" leftmargin="0" bgColor=#040732 link=#ffc600 text=#ffffff vLink=#ffc600
style="font-family: Verdana; color: #FFFFFF">";
}
function print_navbar ( )
{
echo"
";
}
function print_footer ( )
{
echo"
";
}
function print_back ( )
{
echo"
";
}
?>
config.inc.php3
/*****************************************************************************/
/* */
/* Datenbank-Connector */
/* Marcel Beerta */
/* http://www.supertown.de/mazen/maillist */
/*****************************************************************************/
/**************************************/
/* Just edit the following few lines: */
/**************************************/
//Admin-username:
$adminuser=’szw’;
//Admin-password:
$adminpass=’szw’;
//language
$language=’english’; //other Languages: ’german’,’english’
//The Hostname of the MySQL-Server
$hostname = ’localhost’;
//MySQL-Server username
$user = ’root’;
//MySQL-Server password
$pass = ’’;
//Database-Name
$database_name = ’maillist’;
//Maillinglist-Table
$maillist_table=’marcel_maillist’;
//From-E-Mail
$from=’sszw@163.net’;
//Reply-To-E-Mail
$reply=’sszw@163.net’;
//X-Mailer
$mailer=’PHP-Maillist by Mazen’;
/************************************************/
/* Don’t edit this, if you don’t know, what you */
/* do... */
/************************************************/
$conn=mysql_pconnect ($hostname,$user,$pass);
$ver="1.0.0";
?&g

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











In C language, if statement is usually used to execute a specific block of code based on a single condition. However, multiple conditions can be combined to make a determination using logical operators such as &&, ||, and !. Including using logical AND (&&) to judge multiple conditions, using logical OR (||) to judge at least one condition, using logical NOT (!) to judge the negation of a single condition, as well as nesting if statements and using parentheses to clarify priority.

To update the curl version under Linux, you can follow the steps below: Check the current curl version: First, you need to determine the curl version installed in the current system. Open a terminal and execute the following command: curl --version This command will display the current curl version information. Confirm available curl version: Before updating curl, you need to confirm the latest version available. You can visit curl's official website (curl.haxx.se) or related software sources to find the latest version of curl. Download the curl source code: Using curl or a browser, download the source code file for the curl version of your choice (usually .tar.gz or .tar.bz2

How to use C# to write a Bloom filter algorithm. The Bloom Filter (BloomFilter) is a very space-efficient data structure that can be used to determine whether an element belongs to a set. Its basic idea is to map elements into a bit array through multiple independent hash functions and mark the bits of the corresponding bit array as 1. When judging whether an element belongs to the set, you only need to judge whether the bits of the corresponding bit array are all 1. If any bit is 0, it can be judged that the element is not in the set. Bloom filters feature fast queries and

How to write exponentiation function in C language Exponentiation (exponentiation) is a commonly used operation in mathematics, which means multiplying a number by itself several times. In C language, we can implement this function by writing a power function. The following will introduce in detail how to write a power function in C language and give specific code examples. Determine the input and output of the function The input of the power function usually contains two parameters: base and exponent, and the output is the calculated result. therefore, we

The hotel reservation system is an important information management system that can help hotels achieve more efficient management and better services. If you want to learn how to use C++ to write a simple hotel reservation system, then this article will provide you with a basic framework and detailed implementation steps. Functional Requirements of a Hotel Reservation System Before developing a hotel reservation system, we need to determine the functional requirements for its implementation. A basic hotel reservation system needs to implement at least the following functions: (1) Room information management: including room type, room number, room

How to write a simple minesweeper game in C++? Minesweeper is a classic puzzle game that requires players to reveal all the blocks according to the known layout of the minefield without stepping on the mines. In this article, we will introduce how to write a simple minesweeper game using C++. First, we need to define a two-dimensional array to represent the map of the Minesweeper game. Each element in the array can be a structure used to store the status of the block, such as whether it is revealed, whether there are mines, etc. In addition, we also need to define

How to use C++ to write a simple student course selection system? With the continuous development of technology, computer programming has become an essential skill. In the process of learning programming, a simple student course selection system can help us better understand and apply programming languages. In this article, we will introduce how to use C++ to write a simple student course selection system. First, we need to clarify the functions and requirements of this course selection system. A basic student course selection system usually includes the following parts: student information management, course information management, selection

How to use C# to write dynamic programming algorithm Summary: Dynamic programming is a common algorithm for solving optimization problems and is suitable for a variety of scenarios. This article will introduce how to use C# to write dynamic programming algorithms and provide specific code examples. 1. What is a dynamic programming algorithm? Dynamic Programming (DP) is an algorithmic idea used to solve problems with overlapping subproblems and optimal substructure properties. Dynamic programming decomposes the problem into several sub-problems to solve, and records the solution to each sub-problem.
