选择显示字体大小

老外编写的一个maillist源代码


admin.php3

<?
include(&quot;layout.inc.php3&quot;);
include(&quot;config.inc.php3&quot;);
include(&quot;./lang/&#36;language.inc.php3&quot;);
print_header(&quot;&#36;admin_name&quot;);
print_navbar();
&#36;string=implode(&#36;argv,&quot; &quot;);
&#36;string2=explode(&quot;&&quot;,&#36;string);
if(&#36;string=='')
{
echo&quot;
 <p align=center>&#36;program_name version: &#36;ver<br><br>administration:</p>
 <form method=post action=\&quot;admin.php3?admin\&quot;>
 <table border=0 width=50%>
 <tr><td>&#36;admin_username:</td><td><input type=text name=adminuser1></td></tr>
 <tr><td>&#36;admin_password:</td><td><input type=password name=adminpass1></td></tr>
 <tr><td></td><td><input type=submit value=\&quot;&#36;send\&quot;><input type=reset value=&#36;reset></td></tr>
 </table>
 </form>
&quot;;
}

else if(&#36;string=='admin')
{
if(&#36;adminuser1==&#36;adminuser)
{
if(&#36;adminpass1==&#36;adminpass)
{
echo&quot;
 <p align=center>&#36;admin_name:</p>
 <a href=\&quot;admin.php3?send&&#36;adminuser1&&#36;adminpass1\&quot;>&#36;send_mail</a><br><br>
 <a href=\&quot;admin.php3?users&&#36;adminuser1&&#36;adminpass1\&quot;>&#36;show_users</a><br><br>
 <a href=\&quot;admin.php3?delall&&#36;adminuser1&&#36;adminpass1\&quot;>&#36;del_table</a><br><br>
 <a href=\&quot;tablecreator.php3\&quot;>&#36;create_table</a>
&quot;;
}
else { echo&quot;&#36;noaccess&quot;; }
}
else { echo&quot;&#36;noaccess&quot;; }
}

else if(&#36;string2[0]=='delall')
{
if(&#36;string2[1]==&#36;adminuser)
{
if(&#36;string2[2]==&#36;adminpass)
{
&#36;query=&quot;drop table &#36;maillist_table&quot;;
mysql_db_query(&#36;database_name,&#36;query,&#36;conn) or die(&quot;&#36;cant_del_table&quot;);
echo&quot;&#36;table_deleted&quot;;
}
else { echo&quot;&#36;noaccess&quot;; }
}
else { echo&quot;&#36;noaccess&quot;; }
}

else if(&#36;string2[0]=='users')
{
if(&#36;string2[1]==&#36;adminuser)
{
if(&#36;string2[2]==&#36;adminpass)
{
echo&quot;
&#36;headline_users<br><br>
<table border=0 width=100% cellspacing=1><tr bgcolor=\&quot;#000084\&quot;><td width=25%>name:</td><td width=25%>&#36;prename:</td><td width=25%>e-mail</td><td width=25%> </td></tr>
&quot;;
&#36;query=&quot;select * from &#36;maillist_table&quot;;
&#36;result=mysql_db_query(&#36;database_name,&#36;query,&#36;conn) or die(&quot;&#36;database_error&quot;);
while(&#36;data=mysql_fetch_row(&#36;result))
{
echo&quot;<tr bgcolor=\&quot;#0000a0\&quot;><td>&#36;data[0]</td><td>&#36;data[1]</td><td>&#36;data[2]</td><td><a href=\&quot;admin.php3?deluser&&#36;string2[1]&&#36;string2[2]&&#36;data[2]\&quot;>&#36;delete</td></tr>&quot;;
}
echo&quot;
 </table>
&quot;;  

 
}
else { echo&quot;&#36;noaccess&quot;; }
}
else { echo&quot;&#36;noaccess&quot;; }
}

else if(&#36;string2[0]=='deluser')
{
if(&#36;string2[1]==&#36;adminuser)
{
if(&#36;string2[2]==&#36;adminpass)
{
&#36;query=&quot;delete from &#36;maillist_table where email='&#36;string2[3]'&quot;;
mysql_db_query(&#36;database_name,&#36;query,&#36;conn) or die(&quot;&#36;string2[3] &#36;could_not_be_deleted&quot;);
echo&quot;&#36;string2[3] has_been_deleted&quot;;
}
else { echo&quot;&#36;noaccess&quot;; }
}
else { echo&quot;&#36;noaccess&quot;; }
}


else if(&#36;string2[0]=='send')
{
if(&#36;string2[1]==&#36;adminuser)
{
if(&#36;string2[2]==&#36;adminpass)
{
 echo&quot;
&#36;send_mail:<br><br>
<form method=post action=admin.php3?sendmail&&#36;string2[1]&&#36;string2[2]>
&#36;topic:<br><input type=text name=subject><br>
&#36;message:<br><textarea rows=20 cols=50 name=text wrap=physical></textarea><br>
<input type=submit value=\&quot;&#36;send\&quot;><input type=reset value=\&quot;&#36;reset\&quot;>
 &quot;;
}
else { echo&quot;&#36;noaccess&quot;; }
}
else { echo&quot;&#36;noaccess&quot;; }
}

else if(&#36;string2[0]=='sendmail')
{
if(&#36;string2[1]==&#36;adminuser)
{
if(&#36;string2[2]==&#36;adminpass)
{
&#36;query=&quot;select * from &#36;maillist_table&quot;;
&#36;result=mysql_db_query(&#36;database_name,&#36;query,&#36;conn) or die(&quot;&#36;database_error&quot;);
while(&#36;data=mysql_fetch_row(&#36;result))
{
mail(&quot;&#36;data[2]&quot;,&quot;&#36;subject&quot;,&quot;&#36;text&quot;,&quot;from: &#36;from\nx-mailer: &#36;mailer\nreply-to: &#36;reply\n&quot;) or die(&quot;&#36;send_error&quot;);
}
echo&quot;
 &#36;xxx_has_been_sent:<br><br>
 &#36;topic:<br>
 &#36;subject<br>
 &#36;message:<br>
 &#36;text<br>
&quot;;
}
else { echo&quot;&#36;noaccess&quot;; }
}
else { echo&quot;&#36;noaccess&quot;; }
}

print_back();
print_footer();
?>



english.inc.php3
<?
&#36;mailadd_text=&quot;if you are in our newsletter, you get an e-mail with informations
 about our homepage every month. just fill in the following form.<br>to unsubscribe click&quot;;

&#36;remember_pass=&quot;please remember your password, otherwise, you can't delete your mailadress from the list&quot;;
&#36;wrong_mail=&quot;you've entered a bad e-mail adress&quot;;
&#36;admin_name=&quot;newsletter administration&quot;;
&#36;program_name=&quot;newsletter-manager&quot;;
&#36;admin_username=&quot;admin-username&quot;;
&#36;admin_password=&quot;admin-password&quot;;
&#36;send=&quot;submit&quot;;
&#36;reset=&quot;reset&quot;;
&#36;noaccess=&quot;access denied&quot;;
&#36;send_mail=&quot;send a mail to the list&quot;;
&#36;show_users=&quot;show/delete members&quot;;
&#36;del_table=&quot;delete table &#36;maillist_table&quot;;
&#36;create_table=&quot;create table &#36;maillist_table&quot;;
&#36;cant_del_table=&quot;can't delete table &#36;maillist_table&quot;;
&#36;table_deleted=&quot;table &#36;maillist_table has been deleted&quot;;
&#36;headline_users=&quot;every user on one place:&quot;;
&#36;prename=&quot;prename&quot;;
&#36;database_error=&quot;error on database: &#36;database_name&quot;;
&#36;delete=&quot;delete&quot;;
&#36;could_not_be_deleted=&quot;could not be deleted&quot;;
&#36;has_been_deleted=&quot;has been deleted&quot;;
&#36;topic=&quot;topic&quot;;
&#36;message=&quot;message&quot;;
&#36;send_error=&quot;send error&quot;;
&#36;xxx_has_been_sent=&quot;the following has been sent&quot;;
&#36;already_there=&quot;you are already in the list!!!&quot;;
&#36;xxx_has_been_entered=&quot;the following has been entered&quot;;
&#36;password=&quot;password&quot;;
&#36;cant_find_entry=&quot;can't find entry!&quot;;
&#36;isnt_in_db=&quot;&#36;email is not entered in the database&quot;;
&#36;error_del=&quot;error while trying to delete&quot;;
&#36;entry_del=&quot;entry has been deleted&quot;;
&#36;here=&quot;here&quot;;
&#36;click=&quot;&quot;;
&#36;all_fields_must_be_edited=&quot;error! all fields have to be filled in completely!&quot;;
?>


tablecreator.php3
<?

include&quot;layout.inc.php3&quot;;
include&quot;config.inc.php3&quot;;
print_header(&quot;create table &#36;maillist_table&quot;);
print_navbar();
&#36;query=&quot;create table &#36;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))&quot;;

mysql_db_query(&#36;database_name,&#36;query,&#36;conn) or die(&quot;could not create table&quot;);
echo&quot;table \&quot;&#36;maillist_table\&quot; has been created&quot;;
print_back();
print_footer();
?>

index.php3
<?

/******************************************************************************/
/*  */
/* mailinglisten-manager  */
/* */
/* by: marcel beerta  */
/* http://www.supertown.de/computer/mazen/  */
/* marcel.beerta@gmx.net  */
/*  */
/******************************************************************************/

include &quot;config.inc.php3&quot;;
include &quot;./lang/&#36;language.inc.php3&quot;;
include &quot;layout.inc.php3&quot;;

print_header(&quot;&#36;program_name&quot;);
print_navbar();
&#36;string=implode(&#36;argv,&quot; &quot;);

if (&#36;string=='add')
{
 if(&#36;name&&&#36;prename&&&#36;email&&&#36;pw)
 {
&#36;query=&quot;insert into &#36;maillist_table(name,vorname,email,pass) values('&#36;name','&#36;vorname','&#36;email','&#36;pw')&quot;;
mysql_db_query(&#36;database_name,&#36;query,&#36;conn) or die(&quot;&#36;already_there&quot;);

echo&quot;
&#36;xxx_has_been_entered<br><br>
 name: &#36;name<br>
 &#36;prename: &#36;vorname<br>
 e-mail: &#36;email<br>
 &#36;password: &#36;pw<br><br>
&#36;remember_pass<br>
&quot;;
}
else
{
echo&quot;&#36;all_fields_must_be_edited&quot;;
}

}


else if(&#36;string=='delete')
{
echo&quot;
<form method=post action=\&quot;index.php3?delme\&quot;>
<table border=0 align=left cellspacing=0 width=50%>
<tr><td>e-mail:</td><td><input type=text name=email></td></tr>
<tr><td>&#36;password:</td><td><input type=text name=pw></td></tr>
<tr><td><input type=submit value=\&quot;&#36;send\&quot;></td><td></td></tr>
</table>
</form><br><br><br><br><br><br><br>
&quot;;

}
else if(&#36;string=='delme')
{
&#36;query1=&quot;select * from &#36;maillist_table where &#36;maillist_table.email like '&#36;email'&quot;;
&#36;result=mysql_db_query(&#36;database_name,&#36;query1,&#36;conn) or die(&quot;&#36;cant_find_entry&quot;);
&#36;data=mysql_fetch_row(&#36;result) or die(&quot;&#36;isnt_in_db<br><br>&quot;);
if(&#36;data[3]==&#36;pw)
{
&#36;query=&quot;delete from &#36;maillist_table where email='&#36;email'&quot;;
mysql_db_query(&#36;database_name,&#36;query,&#36;conn) or die(&quot;&#36;error_del&quot;);
echo&quot;&#36;entry_del&quot;;
}
else
{
echo&quot;&#36;noaccess&quot;;
}
}
else
{
echo&quot;&#36;mailadd_text
<a href=\&quot;index.php3?delete\&quot;>&#36;here</a> &#36;click ...<br><br>
<form method=post action=index.php3?add>
<table border=0 align=left cellspacing=0 width=50%>
<tr><td>name:</td><td><input type=text name=name></td></tr>
<tr><td>&#36;prename:</td><td> <input type=text name=vorname></td></tr>
<tr><td>e-mail:</td><td> <input type=text name=email></td></tr>
<tr><td>&#36;password:</td><td> <input type=text name=pw></td></tr>
<tr><td><input type=submit value=\&quot;&#36;send\&quot;></td></tr>
</table>
</form><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
&quot;;
}

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 (&#36;title)
{
echo&quot;<html><head>
<meta http-equiv=\&quot;content-type\&quot; content=\&quot;text/html; charset=iso-8859-1\&quot;>
<meta name=\&quot;description\&quot;
content=\&quot;\&quot;>
<meta name=\&quot;keywords\&quot;
content=\&quot;\&quot;>
<meta name=\&quot;distribution\&quot; content=\&quot;global\&quot;>
<meta name=\&quot;robots\&quot; content=\&quot;index\&quot;>
<meta name=\&quot;robots\&quot; content=\&quot;follow\&quot;>
<meta name=\&quot;revisit-after\&quot; content=\&quot;1 days\&quot;>
<meta name=\&quot;language\&quot; content=\&quot;\&quot;>
<meta name=\&quot;author\&quot; content=\&quot;\&quot;>
<meta name=\&quot;copyright\&quot; content=\&quot;\&quot;>
<meta name=\&quot;programmer\&quot; content=\&quot;marcel beerta (www.game-center.de)\&quot;>

<title>&#36;title</title>
</head>
<body topmargin=\&quot;0\&quot; leftmargin=\&quot;0\&quot; bgcolor=#040732 link=#ffc600 text=#ffffff vlink=#ffc600 style=\&quot;font-family: verdana; color: #ffffff\&quot;>&quot;;
}

function print_navbar ( )
{
echo&quot;
<br>
&quot;;


}


function print_footer ( )
{
echo&quot;
<p align=center>

</p>
</body></html>
&quot;;
}


function print_back ( )
{
echo&quot;<br><br><a href=\&quot;javascript:history.go(-1)\&quot;><strong><< back </strong></a><br><br>&quot;;
}

?>


config.inc.php3
/*****************************************************************************/
/*  */
/*  datenbank-connector  */
/*  marcel beerta */
/*  http://www.supertown.de/mazen/maillist */
/*****************************************************************************/

/**************************************/
/* just edit the following few lines: */
/**************************************/
//admin-username:
&#36;adminuser='szw';
//admin-password:
&#36;adminpass='szw';
//language
&#36;language='english'; //other languages: 'german','english'
//the hostname of the mysql-server
&#36;hostname = 'localhost';
//mysql-server username
&#36;user = 'root';
//mysql-server password
&#36;pass = '';
//database-name
&#36;database_name = 'maillist';
//maillinglist-table
&#36;maillist_table='marcel_maillist';
//from-e-mail
&#36;from='sszw@163.net';
//reply-to-e-mail
&#36;reply='sszw@163.net';
//x-mailer
&#36;mailer='php-maillist by mazen';
/************************************************/
/* don't edit this, if you don't know, what you */
/* do...  */
/************************************************/
&#36;conn=mysql_pconnect (&#36;hostname,&#36;user,&#36;pass);
&#36;ver=&quot;1.0.0&quot;;
?>

  


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons