Changeset 16602
- Timestamp:
- 2007/10/29 21:45:42 (16 years ago)
- Location:
- branches/feature-module-combz
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-combz/data/downloads/module/mdl_combz/mdl_combz.inc
r16564 r16602 9 9 require_once(DATA_PATH . "lib/slib.php"); 10 10 11 define('COMBZ_ENCODE', 'Shift-JIS'); 12 11 13 /************************************************************************************************************** 12 14 * ´Ø¿ô̾ ¡§sfCombzReserve … … 17 19 * Ìá¤êÃÍ ¡§¼èÆÀ·ë²Ì 18 20 **************************************************************************************************************/ 19 function sfCombzReserve() { 20 $arrPost = array( 21 'mode' => 'reserve', 21 function sfCombzReserve($where, $arrval) { 22 ini_set("mbstring.http_input", COMBZ_ENCODE); 23 ini_set("mbstring.http_output", COMBZ_ENCODE); 24 ini_set("default_charset", COMBZ_ENCODE); 25 ini_set("mbstring.internal_encoding", COMBZ_ENCODE); 26 27 $arrForm = array( 22 28 'pubid' => 'u7gu', 23 29 'pw' => 'iejkngt67', 24 30 'magid' => 'j7zb', 25 'subject' => 'lockon test subject',26 'body' => 'this is body',27 31 ); 28 32 29 $req = new HTTP_Request('http://menu2.combzmail.jp/ex_eccube.cgi'); 30 $req->setMethod(HTTP_REQUEST_METHOD_POST); 31 $req->addPostDataArray($arrPost); 32 $ret = $req->sendRequest(); 33 34 if (!PEAR::isError($ret)) { 35 $response = $req->getResponseBody(); 36 $response = mb_convert_encoding($response, "EUC-JP", "Shift-JIS"); 37 print($response); 38 } else { 39 print($ret->getMessage()); 33 //¥Ú¡¼¥¸´ÉÍý¥¯¥é¥¹ 34 class LC_ReservePage { 35 //¥³¥ó¥¹¥È¥é¥¯¥¿ 36 function LC_ReservePage() { 37 //¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È¤Î»ØÄê 38 $this->tpl_mainpage = MODULE_PATH . 'mdl_combz/combz_reserve.tpl'; 39 } 40 40 } 41 $req->clearPostData(); 41 42 $objPage = new LC_ReservePage(); 43 $objView = new SC_AdminView(); 44 $objQuery = new SC_Query(); 45 46 $objPage->arrForm = $arrForm; 47 $objView->assignobj($objPage); //ÊÑ¿ô¤ò¥Æ¥ó¥×¥ì¡¼¥È¤Ë¥¢¥µ¥¤¥ó¤¹¤ë 48 $fetch = $objView->fetch($objPage->tpl_mainpage); //¥Æ¥ó¥×¥ì¡¼¥È¤Î½ÐÎÏ 49 $fetch = mb_convert_encoding($fetch, COMBZ_ENCODE); 50 print($fetch); 42 51 } 43 52 … … 50 59 * Ìá¤êÃÍ ¡§¼èÆÀ·ë²Ì 51 60 **************************************************************************************************************/ 52 function sfCombzRegist() { 53 $arrPost = array( 54 'mode' => 'add_form', 61 function sfCombzRegist($where, $arrval) { 62 ini_set("mbstring.http_input", COMBZ_ENCODE); 63 ini_set("mbstring.http_output", COMBZ_ENCODE); 64 ini_set("default_charset", COMBZ_ENCODE); 65 ini_set("mbstring.internal_encoding", COMBZ_ENCODE); 66 67 $arrForm = array( 55 68 'pubid' => 'u7gu', 56 69 'pw' => 'iejkngt67', 57 70 'magid' => 'j7zb', 58 'set_data' => 'test03@lockon.co.jp',59 'set_data' => 'test04@lockon.co.jp',60 71 ); 61 72 62 $req = new HTTP_Request('http://menu2.combzmail.jp/ex_eccube.cgi'); 63 $req->setMethod(HTTP_REQUEST_METHOD_POST); 64 $req->addPostDataArray($arrPost); 65 $ret = $req->sendRequest(); 73 //¥Ú¡¼¥¸´ÉÍý¥¯¥é¥¹ 74 class LC_ReservePage { 75 //¥³¥ó¥¹¥È¥é¥¯¥¿ 76 function LC_ReservePage() { 77 //¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È¤Î»ØÄê 78 $this->tpl_mainpage = MODULE_PATH . 'mdl_combz/combz_regist.tpl'; 79 } 80 } 81 82 $objPage = new LC_ReservePage(); 83 $objView = new SC_AdminView(); 84 85 $objQuery = new SC_Query(); 86 $arrRet = $objQuery->select("email, email_mobile", "dtb_customer", $where, $arrval); 87 88 for($i = 0; $i < count($arrRet); $i++) { 89 if($arrRet[$i]['email'] != "") { 90 $arrForm['set_data'] = $arrRet[$i]['email'] . "\n"; 91 } 92 if($arrRet[$i]['email_mobile'] != "") { 93 $arrForm['set_data'] = $arrRet[$i]['email_mobile'] . "\n"; 94 } 95 } 66 96 67 if (!PEAR::isError($ret)) { 68 $response = $req->getResponseBody(); 69 //$response = mb_convert_encoding($response, "EUC-JP", "Shift-JIS"); 70 print($response); 71 } else { 72 print($ret->getMessage()); 73 } 74 $req->clearPostData(); 97 $objPage->arrForm = $arrForm; 98 $objView->assignobj($objPage); //ÊÑ¿ô¤ò¥Æ¥ó¥×¥ì¡¼¥È¤Ë¥¢¥µ¥¤¥ó¤¹¤ë 99 $fetch = $objView->fetch($objPage->tpl_mainpage); //¥Æ¥ó¥×¥ì¡¼¥È¤Î½ÐÎÏ 100 $fetch = mb_convert_encoding($fetch, COMBZ_ENCODE); 101 print($fetch); 102 75 103 } 76 104 … … 83 111 * Ìá¤êÃÍ ¡§¼èÆÀ·ë²Ì 84 112 **************************************************************************************************************/ 85 function sfCombzPost($combz_type ) {113 function sfCombzPost($combz_type, $where, $arrval) { 86 114 switch($combz_type) { 87 115 case 'reserve': 88 sfCombzReserve( );116 sfCombzReserve($where, $arrval); 89 117 break; 90 118 case 'regist': 91 sfCombzRegist( );119 sfCombzRegist($where, $arrval); 92 120 break; 93 121 default: -
branches/feature-module-combz/html/admin/mail/index.php
r16564 r16602 132 132 case 'search': 133 133 case 'back': 134 // ¥³¥ó¥Ó¡¼¥ºÏ¢·ÈÍÑ 135 case 'combz': 134 136 //-- ÆþÎÏÃÍ¥³¥ó¥Ð¡¼¥È 135 137 $objPage->list_data = lfConvertParam($_POST, $arrSearchColumn); … … 174 176 //¸½ºß»þ¹ï¤Î¼èÆÀ 175 177 $objPage->arrNowDate = lfGetNowDate(); 178 } 179 180 if($_POST['mode'] == 'combz' && function_exists('sfCombzPost')) { 181 $objPage->combz_return = sfCombzPost($_POST['combz_type'], $where, $arrval); 176 182 } 177 183 break; … … 280 286 } 281 287 } 282 break;283 // ¥³¥ó¥Ó¡¼¥ºÏ¢·ÈÍÑ284 case 'combz':285 $objPage->combz_return = sfCombzPost($_POST['combz_type']);286 288 break; 287 289 default:
Note: See TracChangeset
for help on using the changeset viewer.