Changeset 14676 for branches/beta/data/lib
- Timestamp:
- 2007/06/14 22:01:13 (17 years ago)
- Location:
- branches/beta/data/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/beta/data/lib/glib.php
r241 r14676 86 86 * [Ãí¼á] - 87 87 *----------------------------------------------------------------------*/ 88 function gfDebugLog($obj ){88 function gfDebugLog($obj, $path = DEBUG_LOG_PATH){ 89 89 gfPrintLog("*** start Debug ***"); 90 90 ob_start(); … … 92 92 $buffer = ob_get_contents(); 93 93 ob_end_clean(); 94 $fp = fopen( LOG_PATH, "a+");94 $fp = fopen($path, "a+"); 95 95 fwrite( $fp, $buffer."\n" ); 96 96 fclose( $fp ); … … 98 98 99 99 // ¥í¥°¥Æ¡¼¥·¥ç¥ó 100 gfLogRotation(MAX_LOG_QUANTITY, MAX_LOG_SIZE, LOG_PATH);100 gfLogRotation(MAX_LOG_QUANTITY, MAX_LOG_SIZE, $path); 101 101 } 102 102 -
branches/beta/data/lib/slib.php
r13286 r14676 1659 1659 } 1660 1660 1661 /* ¼õÃí´°Î»¥á¡¼¥ëÁ÷¿® */ 1662 function sfSendOrderMail($order_id, $template_id, $subject = "", $header = "", $footer = "", $send = true) { 1661 /** ¼õÃí´°Î»¥á¡¼¥ëÁ÷¿® 1662 * $template_id ¤¬ 1¡§·ÈÂÓÍѥƥó¥×¥ì¡¼¥È¡¢0¡§PCÍѥƥó¥×¥ì¡¼¥È 1663 */ 1664 function sfSendOrderMail($order_id, $template_id, $subject = "", $body, $send = true) { 1663 1665 global $arrMAILTPLPATH; 1664 1666 … … 1670 1672 $objQuery = new SC_Query(); 1671 1673 1672 if($subject == "" && $ header == "" && $footer == "") {1674 if($subject == "" && $body == "" ) { 1673 1675 // ¥á¡¼¥ë¥Æ¥ó¥×¥ì¡¼¥È¾ðÊó¤Î¼èÆÀ 1674 1676 $where = "template_id = ?"; 1675 $arrRet = $objQuery->select("subject, header, footer", "dtb_mailtemplate", $where, array('1')); 1676 $objPage->tpl_header = $arrRet[0]['header']; 1677 $objPage->tpl_footer = $arrRet[0]['footer']; 1677 $arrRet = $objQuery->select("subject, body", "dtb_mailtemplate", $where, array($template_id)); 1678 $objPage->tpl_body = $arrRet[0]['body']; 1678 1679 $tmp_subject = $arrRet[0]['subject']; 1679 1680 } else { 1680 $objPage->tpl_header = $header; 1681 $objPage->tpl_footer = $footer; 1681 $objPage->tpl_body = $body; 1682 1682 $tmp_subject = $subject; 1683 1683 } … … 1693 1693 // ¸ÜµÒ¾ðÊó¤Î¼èÆÀ 1694 1694 $customer_id = $arrOrder['customer_id']; 1695 $arrRet = $objQuery->select("point ", "dtb_customer", "customer_id = ?", array($customer_id));1695 $arrRet = $objQuery->select("point,name01,name02", "dtb_customer", "customer_id = ?", array($customer_id)); 1696 1696 $arrCustomer = $arrRet[0]; 1697 1697 … … 1724 1724 // ¥á¡¼¥ëËÜʸ¤Î¼èÆÀ 1725 1725 $objMailView->assignobj($objPage); 1726 $body = $objMailView->fetch($arrMAILTPLPATH[$template_id]); 1727 1726 $name = $objPage->arrCustomer['name01']." ".$objPage->arrCustomer['name02']; 1727 $objPage->tpl_body = ereg_replace( "(\{name\})", $name , $objPage->tpl_body ); 1728 $tmp_subject = ereg_replace( "(\{name\})", $name , $tmp_subject ); 1729 1730 // $template_id==1¤Ï·ÈÂÓÍÑ 1731 if($template_id == '1'){ 1732 $body = $objMailView->fetch($arrMAILTPLPATH[1]); 1733 $body = ereg_replace( "(\{order\})", $body , $objPage->tpl_body ); 1734 }else{ 1735 $body = $objMailView->fetch($arrMAILTPLPATH[0]); 1736 $body = ereg_replace( "(\{order\})", $body , $objPage->tpl_body ); 1737 } 1738 1728 1739 // ¥á¡¼¥ëÁ÷¿®½èÍý 1729 1740 $objSendMail = new GC_SendMail(); … … 1744 1755 } 1745 1756 } 1746 1747 1757 return $objSendMail; 1748 1758 } … … 2923 2933 } 2924 2934 2925 /* ¥Ç¥Ð¥Ã¥°ÍÑ ------------------------------------------------------------------------------------------------*/ 2926 function sfPrintR($obj) { 2927 print("<div style='font-size: 12px;color: #00FF00;'>\n"); 2928 print("<strong>**¥Ç¥Ð¥Ã¥°Ãæ**</strong><br />\n"); 2929 print("<pre>\n"); 2930 print_r($obj); 2931 print("</pre>\n"); 2932 print("<strong>**¥Ç¥Ð¥Ã¥°Ãæ**</strong></div>\n"); 2935 /** ¥Ç¥Ð¥Ã¥°ÍÑ´Ø¿ô **/ 2936 2937 /** 2938 * ÅϤµ¤ì¤¿ÊÑ¿ô¤òDump¤¹¤ë 2939 * 2940 * @param mixed $obj Dump¤·¤¿¤¤ÊÑ¿ô 2941 * @param string $color ½ÐÎϤ¹¤ë¿§ 2942 * 2943 * @return void ¤Ê¤· 2944 */ 2945 function sfPrintR($obj, $color='green') { 2946 if ( DEBUG_MODE === false ) { 2947 return; 2948 } 2949 2950 $arrColor = array( 2951 'green' => '#00FF00', 2952 'red' => '#FF0000', 2953 'blue' => '#0000FF' 2954 ); 2955 2956 if ( empty($arrColor[$color]) ) { 2957 $color = $arrColor['green']; 2958 } else { 2959 $color = $arrColor[$color]; 2960 } 2961 2962 print("<div style='font-size: 12px;color: $color;'>\n"); 2963 print("<strong>**¥Ç¥Ð¥Ã¥°Ãæ**</strong><br />\n"); 2964 print("<pre>\n"); 2965 print_r($obj); 2966 print("</pre>\n"); 2967 print("<strong>**¥Ç¥Ð¥Ã¥°Ãæ**</strong></div>\n"); 2933 2968 } 2934 2969
Note: See TracChangeset
for help on using the changeset viewer.