Ignore:
Timestamp:
2007/06/14 22:01:13 (17 years ago)
Author:
adati
Message:

1.4.0a-betaのマージ

Location:
branches/beta/data/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/beta/data/lib/glib.php

    r241 r14676  
    8686 * [Ãí¼á] - 
    8787 *----------------------------------------------------------------------*/ 
    88 function gfDebugLog($obj){ 
     88function gfDebugLog($obj, $path = DEBUG_LOG_PATH){ 
    8989        gfPrintLog("*** start Debug ***"); 
    9090        ob_start(); 
     
    9292        $buffer = ob_get_contents(); 
    9393        ob_end_clean(); 
    94         $fp = fopen(LOG_PATH, "a+"); 
     94        $fp = fopen($path, "a+"); 
    9595        fwrite( $fp, $buffer."\n" ); 
    9696        fclose( $fp ); 
     
    9898 
    9999        // ¥í¥°¥Æ¡¼¥·¥ç¥ó 
    100         gfLogRotation(MAX_LOG_QUANTITY, MAX_LOG_SIZE, LOG_PATH); 
     100        gfLogRotation(MAX_LOG_QUANTITY, MAX_LOG_SIZE, $path); 
    101101} 
    102102 
  • branches/beta/data/lib/slib.php

    r13286 r14676  
    16591659} 
    16601660 
    1661 /* ¼õÃí´°Î»¥á¡¼¥ëÁ÷¿® */ 
    1662 function sfSendOrderMail($order_id, $template_id, $subject = "", $header = "", $footer = "", $send = true) { 
     1661/** ¼õÃí´°Î»¥á¡¼¥ëÁ÷¿® 
     1662 *  $template_id ¤¬ 1¡§·ÈÂÓÍѥƥó¥×¥ì¡¼¥È¡¢0¡§PCÍѥƥó¥×¥ì¡¼¥È 
     1663 */ 
     1664function sfSendOrderMail($order_id, $template_id, $subject = "", $body, $send = true) { 
    16631665    global $arrMAILTPLPATH; 
    16641666     
     
    16701672    $objQuery = new SC_Query(); 
    16711673         
    1672     if($subject == "" && $header == "" && $footer == "") { 
     1674    if($subject == "" && $body == "" ) { 
    16731675        // ¥á¡¼¥ë¥Æ¥ó¥×¥ì¡¼¥È¾ðÊó¤Î¼èÆÀ 
    16741676        $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']; 
    16781679        $tmp_subject = $arrRet[0]['subject']; 
    16791680    } else { 
    1680         $objPage->tpl_header = $header; 
    1681         $objPage->tpl_footer = $footer; 
     1681        $objPage->tpl_body = $body; 
    16821682        $tmp_subject = $subject; 
    16831683    } 
     
    16931693    // ¸ÜµÒ¾ðÊó¤Î¼èÆÀ 
    16941694    $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)); 
    16961696    $arrCustomer = $arrRet[0]; 
    16971697 
     
    17241724    // ¥á¡¼¥ëËÜʸ¤Î¼èÆÀ 
    17251725    $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     
    17281739    // ¥á¡¼¥ëÁ÷¿®½èÍý 
    17291740    $objSendMail = new GC_SendMail(); 
     
    17441755        } 
    17451756    } 
    1746  
    17471757    return $objSendMail; 
    17481758} 
     
    29232933} 
    29242934 
    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 */ 
     2945function 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"); 
    29332968} 
    29342969 
Note: See TracChangeset for help on using the changeset viewer.