Craigweb Webmail-开源

  • D3_151283
    了解作者
  • 19.7KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-08 02:46
    上传日期
Craigweb Webmail是一个小型,高效的POP3 Webmail程序。 它是用PHP编写的。 它非常容易安装(只需要更改一行)。 该脚本的最初标题为Nameko,Craigweb进行了修改,并重做了该脚本的某些部分。
mail.zip
  • mail
  • tmp_webmail
  • .DS_Store
    6KB
  • line.gif
    106B
  • logout.gif
    740B
  • print.gif
    932B
  • forward.gif
    874B
  • delete.gif
    947B
  • back.gif
    775B
  • check.gif
    1KB
  • index.php
    36.2KB
  • write.gif
    941B
  • reply.gif
    916B
内容介绍
<? /* Copyright (C) 2004 Marco Avidano * * This program has been modified by Craigweb, All modifications Copyright (C) Craigweb 2004-2005 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * See http://www.gnu.org/licenses/gpl.html for the complete text of the license. */ header("Pragma: no-cache"); header("Cache-Control: no-cache, must-revalidate"); @set_time_limit(0); @error_reporting (E_ALL ^ E_NOTICE); session_start(); //***************************************// //*** CONFIGURE Craigweb WebMail HERE *** START ***// $EMAILDOMAIN="craigweb.net"; //Set the domain all e-mails are to say they were sent from. $DEFAULT_COLORSET="Craigweb"; //Set the Default Color here. GREY,VIOLET,GREEN,BLUE,BROWN,Craigweb $DEFAULT_FONTSIZE=10; //Set the Default font size. Any integer from 7 to 16 $DEFAULT_MAIL_PER_PAGE=50; //Set the Default amount of mail to be displayed per page $SERVERS=array( "localhost"=>"127.0.0.1" ); //*** CONFIGURE Craigweb WebMail HERE *** STOP ***// //**************************************// $VER=array( "NAME"=>"Craigweb WebMail", //If you change a significant protion of the code you are required to add the word "modifided" to the name "WEB"=>"Craigweb", "URL"=>"http://craigweb.net/", "MAJOR"=>"1", "MINOR"=>"01", "BUILD"=>"104" ); $_SESSION[email]="$_SESSION[username]@$EMAILDOMAIN"; $SECTION_RIGHT=" $SECTION_RIGHT"; $SECTION_LEFT=array( "0"=>"Login", "1"=>"Check Login", "2"=>"Inbox - ".count($_SESSION[MESSAGES][CONTENT])." message".((count($_SESSION[MESSAGES][CONTENT])>1)?"s":"")." - ".sprintf("%.2f",$_SESSION[MESSAGES][SIZE]/1024)." KB", "3"=>"Read message", "4"=>"Compose new mail", "5"=>"Delete messages", "6"=>"Send message", "999"=>"Credits" ); // Define the colors below $COLORSET=array( "GREY"=>array("GROUND"=>"#999999","DARK"=>"#DFDFDF","MEDIUM"=>"#E8E8E8","LIGHT"=>"#F7F7F7","LINE"=>"#7F7F7F","LINKS"=>"#000000"), "Craigweb"=>array("GROUND"=>"#6699CC","DARK"=>"#C7DDF8","MEDIUM"=>"white","LIGHT"=>"#F7F7F7","LINE"=>"#CCCCCC","LINKS"=>"#000000"), "VIOLET"=>array("GROUND"=>"#CA6597","DARK"=>"#F6C5DB","MEDIUM"=>"#F3DAE8","LIGHT"=>"#FDEEF6","LINE"=>"#FE00BF","LINKS"=>"#FE4100"), "GREEN"=>array("GROUND"=>"#64C969","DARK"=>"#C4F5C9","MEDIUM"=>"#D9F2D9","LIGHT"=>"#EDFCED","LINE"=>"#2FFE00","LINKS"=>"#F21DAB"), "BLUE"=>array("GROUND"=>"#6699CC","DARK"=>"#C7DDF8","MEDIUM"=>"#DBEAF5","LIGHT"=>"#F0F8FF","LINE"=>"#00BFFF","LINKS"=>"#3E00FE"), "BROWN"=>array("GROUND"=>"#C98A64","DARK"=>"#F5D9C4","MEDIUM"=>"#F2E1D9","LIGHT"=>"#FCF2ED","LINE"=>"#FE2300","LINKS"=>"#2727F9") ); if(!$_SESSION[COLORS]) $_SESSION[COLORS]=$DEFAULT_COLORSET; if(!$_SESSION[FONTSIZE]) $_SESSION[FONTSIZE]=$DEFAULT_FONTSIZE; if($_GET[colorset]) $_SESSION[COLORS]=$_GET[colorset]; $COLORS=$_SESSION[COLORS]; if($_GET[fontsize]) $_SESSION[FONTSIZE]=$_GET[fontsize]; $cwm=$_SERVER[SCRIPT_NAME]; if((!$_SESSION[AUTH] && $_REQUEST[op]>1 && $_REQUEST[op]<100) || !$_REQUEST[op]) $_REQUEST[op]=0; if(!$_SESSION[MPP]) $_SESSION[MPP]=$DEFAULT_MAIL_PER_PAGE; $BOUNDARY="----------CraigwebWebmailBoundary"; $LEGAL_CHARS="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._@-"; $SOCK=""; ?> <html> <head> <title><?="$VER[NAME] $VER[MAJOR].$VER[MINOR]"?></title> <style type="text/css"><!-- BODY,TABLE,TR,TD,INPUT,TEXTAREA,OPTION,SELECT { font-family:tahoma,sans-serif;font-size:<?=$_SESSION[FONTSIZE]?>pt;color:#333333;text-decoration:none; } A:LINK,A:VISITED,.title { font-family:tahoma,sans-serif;font-size:<?=$_SESSION[FONTSIZE]?>pt;color:<?=$COLORSET[$COLORS][LINKS]?>;text-decoration:none; } A:HOVER { text-decoration:underline; } --></style> </head> <body bgcolor="<?=$COLORSET[$COLORS][GROUND]?>"> <table cellspacing="0" cellpadding="0" width="100%" height="90%" border="0" bgcolor="<?=$COLORSET[$COLORS][MEDIUM]?>"> <tr valign="middle" height="25"> <td width="75%">&nbsp; <span style="font-size:<?=($_SESSION[FONTSIZE]+4)?>pt;"><b><?="$VER[NAME] $VER[MAJOR].$VER[MINOR]"?></b></span></td> <td width="25%" align="right">Welcome <u><?="$_SESSION[username]"?></u>&nbsp;&nbsp;</td> </tr> <tr valign="top" height="100%"> <td colspan="2" style="padding:10pt;border-top:2pt solid #111111"> <table cellspacing="0" cellpadding="0" width="100%" border="0" bgcolor="<?=$COLORSET[$COLORS][LIGHT]?>"> <tr valign="middle"><td style="border-bottom:1pt solid <?=$COLORSET[$COLORS][LINE]?>"><table cellspacing="0" cellpadding="0" width="100%" border="0"><tr valign="middle"> <td width="35%" style="font-size:<?=($_SESSION[FONTSIZE]+2)?>pt;"><b>&nbsp; <?=$SECTION_LEFT[$_REQUEST[op]]?> </b></td> <td width="65%" align="right"><b><?=$SECTION_RIGHT?></b> &nbsp;</td> </tr></table></td></tr> <tr> <? switch($_REQUEST[op]) { //1:CHECK LOGIN case "1": $_SESSION[MESSAGES]=$_SESSION[LIMIT]=""; $auth_fields=array("username","password","server","auth_type"); foreach($auth_fields as $af) { if($_POST[$af]) $_SESSION[$af]=$_POST[$af]; if(!$_SESSION[$af]) $fields_not_filled=1; } echo("<td valign='top'><p>&nbsp;</p><p>&nbsp;</p>"); if($fields_not_filled) { ShowMessage("ERROR!","<p>You must fill all the fields of the login form!</p>\n<p><a href='$cwm' rel='nofollow' onclick='return false;'><b>Try again</b></a></p>"); } else { switch(POP3OpenConnectionAndLogin()) { case "1": //BAD CONNECTION ShowMessage("ERROR!","<p>Connect to address ".$_SESSION[server].":<br>connection refused</p>\n<p><a href='$cwm' rel='nofollow' onclick='return false;'><b>Try again</b></a></p>"); break; case "2": //LOGIN FAILED ShowMessage("ERROR!","<p>Authentication failed (bad password?)<br>Connection closed by foreign host.</p>\n<p><a href='$cwm' rel='nofollow' onclick='return false;'><b>Try again</b></a></p>"); break; case "3": //LOGIN OK, RETRIEVE MESSAGES $retr_code=POP3RetrieveHeaders(); switch($retr_code) { case "31": $_SESSION[AUTH]=1; ShowMessage("OK!","<p>Messages fully retrieved!</p>\n<p>If you are not automatically redirected to the next page in 5 seconds,<br>please <a href='$cwm?op=2' rel='nofollow' onclick='return false;'><b>click here</b></a>!</p>\n<script language='JavaScript'>window.location='$cwm?op=2'</script>"); break; default: //UNKNOWN ANSWER ShowMessage("ERROR!","<p>Retrieving messages from server ".$_SESSION[server].":<br>unknown answer from the server ($retr_code)</p>\n<p><a href='$cwm' rel='nofollow' onclick='return false;'><b>Try again</b></a></p>"); break; } break; default: //UNKNOWN ANSWER ShowMessage("ERROR!","<p>Connect to address ".$_SESSION[server].":<br>unknown answer from the server</p>\n<p><a href='$cwm' rel='nofollow' onclick='return false;'><b>Try again</b></a></p>"); break; } if($SOCK) POP3CloseConnection(); } echo("</td>"); break; //2:SHOW MESSAGE LIST case "2": $msgnum=count($_SESSION[MESSAGES][CONTENT])+1; if($_GET[toggle_delete]) $_SESSION[MESSAGES][CONTENT][$_GET[toggle_delete]][DELETE]*=(-1); if($_GET[change_limit]) $_SESSION[LIMIT]=$_GET[change_limit]; if($_GET[change_mpp]) { $_SESSION[MPP]=$_GET[change_mpp]; $_SESSION[LIMIT]=1; } if($_POST[auto_mark_deletion]) { for($i=1;$i<$msgnum;$i++) { $header=MessageParseHeader(split("\r\n",$_SESSION[MESSAGES][CONTENT][$i][HEADER])); if(strstr($header[subject],$_POST[auto_mark_deletion]) || strstr($header[from],$_POST[auto_mark_deletion])) $_SESSION[MESSAGES][CONTENT][$i][DELETE]=$message[DELETE]=1; } } if($_GET[mark_all_messages]) { for($i=$msgnum;$i>0;$i--) $_SESSION[MESSAGES][CONTENT][$i][DELETE]=$_GET[mark_all_messages]; } $marked_messages_num=0; fo
评论
    相关推荐
    • 易语言调用php
      .版本 2 php_执行php文件 (取运行目录 () + “\1.php”) php_执行php函数 (“e_to_php”, “易语言传来的参数”) php_执行php代码 (“echo '直接在易语言中执行的php代码';”, “1.php”)
    • php cookie
      php php php php.。。。。。。。。。。
    • php
      PHP基本映像 支持的标签和相应的Dockerfile链接 使用PHP 您可以直接使用图像,例如 docker run --rm -it chinayin/php:7.2-fpm docker run --rm -it chinayin/php:7.2-cli 这些映像是每天生成的,并已启用安全发布...
    • PHP教程
      PHP学习,做动态网站很爽的一种语言,虽然我只学习了ASP,但是觉得这种语言还是瞒实用的.........
    • PHP 手册
      PHP 最初是在西元 1994 年 Rasmus Lerdorf 开始计画发展。在 1995 年以 Personal Home Page Tools (PHP Tools) 开始对外发表第一个版本。在这早期的版本中,提供了访客留言本、访客计数器等简单的功能。随后在新的...
    • php10
      php10 十天学会php练习代码
    • PHP 课件
      PHP 课件 PHP是什么? PHP能做什么? 基本功能 简要历史 PHP标记风格 PHP的词法结构
    • PHP
      PHP lang-php具有php的js函数,例如getElementById()或alert();。 导入文件,将其下载或复制代码,然后使用php中的include函数获取文件,如下所示: include 'js-php.php'; 那么您可以在php中使用js函数:...
    • php脚本集合
      1.zipfile.php与unzipfile.php是一组能够将网站文件打包成zip或者将zip文件包解压缩的PHP脚本,将其上传到网站空间后即可访问使用; 2.phpzip是一款将文件打包为其特有格式,通过本地软件phpzip.exe进行压缩解压的...
    • php调用图片
      php程序 后台输入文字或者编号调用图片php程序 后台输入文字或者编号调用图片php程序 后台输入文字或者编号调用图片php程序 后台输入文字或者编号调用图片php程序 后台输入文字或者编号调用图片php程序 后台输入文字...