搜索
首页php教程php手册老外编写的一个maillist源代码

源代码

admin.php3


    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"
     

$program_name Version: $ver

Administration:


     

     
     
     
     
     
$admin_username:
$admin_password:

     

    ";
}

    else if($string==@#admin@#)
{
if($adminuser1==$adminuser)
    {
    if($adminpass1==$adminpass)
{
echo"
     

$admin_name:


     $send_mail


     $show_users


     $del_table


     $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


      
      ";
      $query="SELECT * from $maillist_table";
      $result=mysql_db_query($database_name,$query,$conn) or die("$database_error");
      while($data=mysql_fetch_row($result))
          {
  echo"";
  }
echo"
     
Name: $prename: E-Mail  
$data[0] $data[1] $data[2] $delete

    ";       
      
     
}
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:


              

              $topic:


              $message:


      
     ";
}
else { echo"$noaccess"; }
    }
    else { echo"$noaccess"; }
        }

else if($string2[0]==@#sendmail@#)
{
if($string2[1]==$adminuser)
    {
    if($string2[2]==$adminpass)
{
                $query="SELECT * FROM $maillist_table";
                $result=mysql_db_query($database_name,$query,$conn) or die("$database_error");
                while($data=mysql_fetch_row($result))
                        {
                        mail("$data[2]","$subject","$text","From: $from\nX-Mailer: $mailer\nReply-To: $reply\n") or die("$send_error");
}
                        echo"
                     $xxx_has_been_sent:


                     $topic:

                             $subject

                             $message:

                             $text

                    ";
}
else { echo"$noaccess"; }
    }
    else { echo"$noaccess"; }
        }
    
    print_back();
    print_footer();
?>



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"





E-Mail:
$password:









";

    }
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
$here $click ...

  







Name:
$prename:
E-Mail:
$password:
















";
    }
    
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=\"\">
content=\"\">









$title

";
}

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";



声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

安全考试浏览器

安全考试浏览器

Safe Exam Browser是一个安全的浏览器环境,用于安全地进行在线考试。该软件将任何计算机变成一个安全的工作站。它控制对任何实用工具的访问,并防止学生使用未经授权的资源。

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

功能强大的PHP集成开发环境

禅工作室 13.0.1

禅工作室 13.0.1

功能强大的PHP集成开发环境

SublimeText3汉化版

SublimeText3汉化版

中文版,非常好用

DVWA

DVWA

Damn Vulnerable Web App (DVWA) 是一个PHP/MySQL的Web应用程序,非常容易受到攻击。它的主要目标是成为安全专业人员在合法环境中测试自己的技能和工具的辅助工具,帮助Web开发人员更好地理解保护Web应用程序的过程,并帮助教师/学生在课堂环境中教授/学习Web应用程序安全。DVWA的目标是通过简单直接的界面练习一些最常见的Web漏洞,难度各不相同。请注意,该软件中