<?
/********************************************************************************/
/* 小林在贺卡 :	PHP+TXT							        */
/* ==============================						*/
/*  版本: v0.01 -- 2003.03.08					         	*/
/*										*/
/* ---------------------------------------------------				*/
/* - 程式版权 (c) 2003 小林所有	    -		                     		*/
/* - 小林在贺卡版权所有   http://www.xlzx.net.tf    -				*/
/* ---------------------------------------------------				*/
/*										*/
/*						                                */
/* 网站地址:  www.xlzx.net.tf - xlzx.24cc.com - OICQ:26565571		        */
/********************************************************************************/
/*简介：本软件无须数据库支持。                                                  */
/*                                                                              */
/*版权说明: 本软件为免费软件。你可以下载使用。但请保留此声明	                */
/*										*/
/* 本版为测试版。希望大家找出bug！大家多多提建议！	                        */ 
/* 	                                                                        */
/* 申明：由于使用本软件造成任何事故！本人概不负责！				*/
/*										*/
/*      作者：小林   E-mail:lilin525007@sina.com  网址：www.xlzx.net.tf         */
/********************************************************************************/
include("config.php");
$zxc="xlzx";
$message="<html>
           <head>
<meta http-equiv=Content-Type content=text/html; charset=gb2312>



           <style type=text/css>
             <!--
              A:link {text-decoration: none;color:#ff33cc }
               A:visited{text-decoration:none;color:#ff33cc}
            a:hover{color:red}
           -->
          </style>
          <title>点点心意 小林在线贺卡</title>
          </head>
          <body link=#800000 vlink=#800000 alink=#800000 text=#800000>
          <div align=center><center>
          <table border=0 width=60% cellspacing=0 cellpadding=0>
          <tr>
          <td align=center><table border=1 cellspacing=0 bgcolor=#FFD7D7 cellpadding=0 height=31 width=100%>
          <tr>
          <td width=100% height=29><table border=0 width=100%>
          <tr>
           <td valign=bottom><a href=http://card.silversand.net><img border=0 src=http://cards.silversand.net/mailimg0.gif width=99 height=32></a></td>
          <td align=right valign=bottom><a href=http://www.xlzx.net.tf><font size=2>点点心意 
           尽在小林在线</font></a></td>
          </tr>
         </table>
          </td>
          </tr>
         </table>
         </td>
         </tr>
         <tr>
         <td align=center><table border=1 width=100% bordercolorlight=#CF8B67
          cellspacing=1 height=286 bgcolor=#D69A7B bordercolordark=#D69A7B>
         <tr>
         <TD width=100% height=280 align=center><div align=center><center><table border=1 width=87% cellspacing=0 cellpadding=0 height=196 bgcolor=#FFEFDE
         bordercolordark=#FFD7AA bordercolorlight=#FFEFDE>
         <tr>
         <td width=100% height=194><table border=0 width=100% cellspacing=0
         cellpadding=0 height=166>
        <tr>
        <td width=50% height=9><img border=0 src=http://cards.silversand.net/mailimg2.gif width=16 height=16></td>
        <td width=50% height=9 align=right><img border=0 src=http://cards.silversand.net/mailimg2.gif width=16
        height=16></td>
        </tr>
       <tr>
        <td width=100% height=9 colspan=2><p align=center>　<img border=0
        src=http://cards.silversand.net/mailimg3.gif width=16 height=16></td>
        </tr>
        <tr>
        <td width=100% height=24 colspan=2><p>Dear:".$from_name."</td>
        </tr>
        <tr align=center>
        <td width=100% height=130 colspan=2><p align=center>这张贺卡是我的小小心意,<br>
        <br>
        愿您能收下!^0^</p>
        <div align=center><center><table border=1 width=21% bordercolorlight=#CF8B67
        cellspacing=1 cellpadding=0 bordercolordark=#FFFFFF height=12 bgcolor=#FFD7D7>
          <tr>
            <td width=100% align=center height=10>.<img border=0
            src=http://cards.silversand.net/mailimg1.gif width=11 height=10><font size=3><a href="."$self_url"."show.php?pd=".$randval."&id=".$ip." target='_blank'>开启</a></font><img
            border=0 src=http://cards.silversand.net/mailimg1.gif width=11 height=10>.</td>
          </tr>
        </table>
        </center></div></td>
        </tr>
        <tr>
        <td width=100% height=3 colspan=2><p align=right>你的朋友:".$to_name."</td>
        </tr>
        <tr>
        <td width=50% height=3><img border=0 src=http://cards.silversand.net/mailimg2.gif width=16
        height=16></td>
        <td width=50% height=3 align=right><img border=0 src=http://cards.silversand.net/mailimg2.gif width=16
        height=16></td>
        </tr>
        </table>
        </td>
       </tr>
      </table>
      </center></div></TD>
      </tr>
          <TR>
            <TD align=center><FONT color=#000000>收卡密码:</FONT><FONT color=#0000f>$randval$zxc$ip</FONT></TD>
          </TR>
        </table>
      </td>
      </tr>
      <tr>
      <td align=center width=70%><table border=1 width=100% bgcolor=#FFD7D7
      cellspacing=0 cellpadding=5 height=41>
       <tr>
      <td width=100% bordercolorlight=#FFD7AA height=39><p align=center><font size=2>*<a
           href=http://www.xlzx.net.tf>小林在线</a>制作*</font></td>
       </tr>
      </table>
      </td>
     </tr>
     <tr></TABLE></CENTER></DIV></BODY></HTML>";
$subject=$from_name."的心意!";






//定义自动分行函数

function fenhang(&$argstr) {
  $argstr=ereg_replace("\n", "", $argstr);
}

fenhang($message);

	$message.="<br>-------------------------    ---------------------------<br>\n";
	
	$message.=$signature;
        $style.=$message;
$body=$style;


$from="\"$from_name\" <$from_mail>";
$headers="Content-type: text/html; charset=gb2312\n";
$headers.="From: $from\nX-Mailer: System33r";
mail($to_mail,$subject,$body,$headers);

/*-------------------------------------write user's data----------------------------*/


$newtalk=ereg_replace("\n","~",$talk);

$book="data/user/data.php";

$ip_add=getenv('REMOTE_ADDR');
$garray = file($book);
$cog=count($garray);
$larray = explode("|",$garray[0]);
$id=$larray[0]+1;
$xinxi=array($id,$idd,$m,$from_name,$from_mail,$to_name,$to_mail,$backgd,$textcolor,$newtalk,$bgmid,$address,time(),$randval,$ip_add,"a");
$newguest = implode("|", $xinxi)."|\r\n";
$f = fopen($book,"r+");
$msg = fread($f,filesize($book));
fclose($f);
$fp=@fopen($book,"w+");
@fwrite($fp,$newguest.$msg);
@fclose($fp);
echo("<script language=javascript>
location=\"succeed.php\"
</script>");
exit;
?>
