글
mail_lib.php
<? function GetTimeStamp($date) { /* 인자 형식 YYYY-MM-DD YYYY-MM-DD HH:mm:ss */ if (strlen($DATE) == 10) { $time = mktime(0,0,0,(int)substr($date,5,2),(int)substr($date,8,2),(int)substr($date,0,4)); } else { $time = mktime((int)substr($date,11,2),(int)substr($date,14,2),(int)substr($date,17,2), (int)substr($date,5,2),(int)substr($date,8,2),(int)substr($date,0,4)); } return $time; } function HtmlHeader($strTitle) { ?> <html> <head> <meta http-equiv=Content-Type content=text/html; charset=euc-kr> <title><?echo $strTitle;?></title> <link rel="stylesheet" href="web_mail.css" type="text/css"> </head> <? } function DisplayCopyRight() { global $C_TABLE_SIZE; ?> <table width="<?echo $C_TABLE_SIZE;?>" cellspacing=0 cellpadding=0 border=0> <tr> <td> <hr width=100% size=2 color=#007394> </td> </tr> <tr> <td align=center><b><font face=굴림 size=2 color=#003354> Copyright ⓒ 2000<img src="/img/ihelpers.gif" border=0 align=absmiddle> All rights reserved.</font></b></td> </tr> </table> <br> <? } function HtmlTail() { echo "</body></html>"; } function PrintMsg($strMessage) { ?> <script language="javascript"> <!-- alert("<?echo $strMessage;?>"); //--> </script> <? } function PrintMsgBack($strMessage) { ?> <script language="javascript"> <!-- alert("<?echo $strMessage;?>"); history.back(); //--> </script> <? exit; } function GoUrl($strUrl) { ?> <script language="javascript"> <!-- varUrl = '<?echo $strUrl;?>'; if (varUrl !="") { document.location.replace(varUrl); } //--> </script> <? } function RedirectTarget($url,$target) { ?> <html> <body onLoad="document.form1.submit()";> <form action="<?echo $url;? >" target="<?echo $target;?>" name=form1 method=post> <input type=hidden name=name value=""> </form> </body> </html> <? } function CheckBroswer($num, $num2) { global $HTTP_USER_AGENT; if (strpos($HTTP_USER_AGENT, "MSIE")) { return $num; } else { return $num2; } } function CompStr($buffer, $value) { if (strlen($buffer) <= strlen($value)) return false; if (substr($buffer, 0, strlen($value)) == $value) { return true; } else { return false; } } function Decode($val) { if(substr($val,0,2) == "=?") { //인코딩 여부 확인 $code = strpos($val, "?", 3); $code = strpos($val, "?", $code+1); $val = substr($val, $code+1, strlen($val) - $code -3); return imap_base64($val); } else { return $val; } } function printOutLook($val) { $line = split(" ", $val); $val = ""; $cnt = 0; for($i=0;$i<count($line);$i++) { if($line[$i]=="") $cnt++; if($cnt == 4) $val .= $line[$i] . " "; } echo imap_base64($val); } ?> |
'Programming' 카테고리의 다른 글
PHP 폼 자동 완성하기 (0) | 2006.05.25 |
---|---|
웹메일을 구현하자! - 메일 삭제 (0) | 2006.05.24 |
웹메일을 구현하자! - 메일 조회 #2 (0) | 2006.05.24 |
웹메일을 구현하자! - 메일 조회 #1 (0) | 2006.05.24 |
웹메일을 구현하자! - 메일확인 (0) | 2006.05.24 |
RECENT COMMENT