当前位置:Gxlcms > PHP教程 > 转载老外编写的一个maillist源代码_PHP

转载老外编写的一个maillist源代码_PHP

时间:2021-07-01 10:21:17 帮助过:37人阅读

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:



";
}

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:










";

}
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 ...

















";
}

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"

<< back

";
}

?>


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

人气教程排行