Changeset 14676 for branches/beta/html/admin/order/mail.php
- Timestamp:
- 2007/06/14 22:01:13 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/beta/html/admin/order/mail.php
r339 r14676 8 8 9 9 class LC_Page { 10 11 var $mailTemp; 12 var $arrMAILTEMPLATE; 10 13 function LC_Page() { 11 14 $this->tpl_mainpage = 'order/mail.tpl'; … … 14 17 $this->tpl_subno = 'index'; 15 18 $this->tpl_subtitle = '¼õÃí´ÉÍý'; 16 global $arrMAILTEMPLATE;17 $this->arrMAILTEMPLATE = $arrMAILTEMPLATE;19 20 18 21 } 19 22 } … … 22 25 $objView = new SC_AdminView(); 23 26 $objSess = new SC_Session(); 27 28 // ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹ 29 $objFormParam = new SC_FormParam(); 30 // ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ 31 lfInitParam(); 32 33 // ǧ¾Ú²ÄÈݤÎȽÄê 24 34 sfIsSuccess($objSess); 25 35 … … 32 42 33 43 $objPage->tpl_order_id = $_POST['order_id']; 44 // DB¤«¤é¼õÃí¾ðÊó¤òÆɤ߹þ¤à 45 lfGetOrderData($_POST['order_id']); 34 46 35 // ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹ 36 $objFormParam = new SC_FormParam(); 37 // ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ 38 lfInitParam(); 47 // --¥Æ¥ó¥×¥ì¡¼¥È¡¿¥×¥ë¥À¥¦¥ó¥á¥Ë¥å¡¼¤ÎºîÀ® 48 $conn = new SC_DbConn(); 49 $sql = "SELECT * FROM dtb_mailtemplate WHERE del_flg=0 ORDER BY template_id ASC"; 50 51 $Temp = $conn->getAll($sql);//$Temp¤Ë¼èÆÀ¤·¤¿¥Ç¡¼¥¿¤ò°ì»þŪ¤Ë³ÊǼ 52 //¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤Ë½ÐÎϤ¹¤ë¤¿¤á¤ËÆ󼡸µÇÛÎó¤ËÂåÆþ¤¹¤ë 53 for($i = 0;$i < count($Temp);$i++){ 54 $arrTemplate[0][$i] = $Temp[$i]['template_id']; 55 $arrTemplate[1][$i] = $Temp[$i]['template_name']; 56 } 57 58 //¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤Ø¥Ç¡¼¥¿¤òÂåÆþ 59 $objPage->mailTemp = $arrTemplate; 60 $objPage->arrMAILTEMPLATE = $arrTemplate[1]; 39 61 40 62 switch($_POST['mode']) { … … 54 76 if (count($objPage->arrErr) == 0) { 55 77 // Ãíʸ¼õÉե᡼¥ë 56 sfSendOrderMail($_POST['order_id'], $_POST['template_id'], $_POST['subject'], $_POST[' header'], $_POST['footer']);78 sfSendOrderMail($_POST['order_id'], $_POST['template_id'], $_POST['subject'], $_POST['body']); 57 79 } 58 80 header("Location: " . URL_SEARCH_ORDER); … … 70 92 if (count($objPage->arrErr) == 0) { 71 93 // Ãíʸ¼õÉե᡼¥ë(Á÷¿®¤Ê¤·) 72 $objSendMail = sfSendOrderMail($_POST['order_id'], $_POST['template_id'], $_POST['subject'], $_POST[' header'], $_POST['footer'], false);94 $objSendMail = sfSendOrderMail($_POST['order_id'], $_POST['template_id'], $_POST['subject'], $_POST['body'], false); 73 95 // ³Îǧ¥Ú¡¼¥¸¤Îɽ¼¨ 74 96 $objPage->tpl_subject = $objSendMail->subject; … … 85 107 case 'change': 86 108 // POSTÃͤμèÆÀ 109 87 110 $objFormParam->setValue('template_id', $_POST['template_id']); 88 if(sfIsInt($_POST['template_id'])) { 89 $objQuery = new SC_Query(); 111 112 //¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤ÇÁªÂò¤µ¤ì¤¿¥Æ¥ó¥×¥ì¡¼¥È̾¤ò¥Æ¥ó¥×¥ì¡¼¥ÈID¤È´ØÏ¢ÉÕ¤±¤ë 113 $_POST['template_id'] = $arrTemplate[0][$_POST['template_id']]; 114 if(sfIsInt($_POST['template_id'])) { 115 $objQuery = new SC_Query(); 90 116 $where = "template_id = ?"; 91 $arrRet = $objQuery->select("subject, header, footer", "dtb_mailtemplate", $where, array($_POST['template_id']));92 117 $arrRet = $objQuery->select("subject, body", "dtb_mailtemplate", $where, array($_POST['template_id'])); 118 $objFormParam->setParam($arrRet[0]); 93 119 } 94 120 break; … … 113 139 $objFormParam->addParam("¥Æ¥ó¥×¥ì¡¼¥È", "template_id", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK")); 114 140 $objFormParam->addParam("¥á¡¼¥ë¥¿¥¤¥È¥ë", "subject", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "SPTAB_CHECK")); 115 $objFormParam->addParam("¥Ø¥Ã¥À¡¼", " header", LTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "SPTAB_CHECK"));116 $objFormParam->addParam("¥Õ¥Ã¥¿¡¼", "footer", LTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "SPTAB_CHECK"));141 $objFormParam->addParam("¥Ø¥Ã¥À¡¼", "body", LTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "SPTAB_CHECK")); 142 //$objFormParam->addParam("¥Õ¥Ã¥¿¡¼", "footer", LTEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "SPTAB_CHECK")); 117 143 } 144 145 function lfGetOrderData($order_id) { 146 global $objFormParam; 147 global $objPage; 148 if(sfIsInt($order_id)) { 149 // DB¤«¤é¼õÃí¾ðÊó¤òÆɤ߹þ¤à 150 $objQuery = new SC_Query(); 151 $where = "order_id = ?"; 152 $arrRet = $objQuery->select("*", "dtb_order", $where, array($order_id)); 153 $objFormParam->setParam($arrRet[0]); 154 list($point, $total_point) = sfGetCustomerPoint($order_id, $arrRet[0]['use_point'], $arrRet[0]['add_point']); 155 $objFormParam->setValue('total_point', $total_point); 156 $objFormParam->setValue('point', $point); 157 $objPage->arrDisp = $arrRet[0]; 158 } 159 }
Note: See TracChangeset
for help on using the changeset viewer.