ここの情報は古いです。ご理解頂いた上でお取り扱いください。

source: OpenPNE/branches/kijiji/2_4/webapp/modules/pc/do/dmd_event_kijiji.php @ 643

Last change on this file since 643 was 643, checked in by kanbe, 16 years ago

remove read diary code

File size: 2.9 KB
Line 
1<?php
2/**
3 * @copyright 2005-2006 OpenPNE Project
4 * @license   http://www.php.net/license/3_01.txt PHP License 3.01
5 */
6
7require_once 'HTTP/Request.php';
8
9class pc_do_dmd_event_kijiji extends OpenPNE_Action
10{
11    function execute($requests)
12    {
13        $u = $GLOBALS['AUTH']->uid();
14
15                /*
16        $c_member = db_common_c_member4c_member_id($u, true);
17        $c_diary = db_diary_get_c_diary4id($requests['target_c_diary_id']);
18
19        if ($c_diary['c_member_id'] != $u) {
20            handle_kengen_error();
21        }
22
23        $num_img = intval($requests['image']);
24        $image_url = '';
25        if ($num_img >= 1 && $num_img <= 3) {
26            $p = array('filename' => $c_diary['image_filename_' . $num_img]);
27            $image_url = openpne_gen_img_url($p);
28        }
29        */
30               
31                //var_dump($requests);
32
33        $post_url = 'http://ad.kijiji.co.jp/pnegate/getpostdata.php';
34        $req =& new HTTP_Request($post_url);
35        $req->setMethod(HTTP_REQUEST_METHOD_POST);
36        $req->addHeader('Content-Type', 'multipart/form-data');
37        $req->addPostData("email", $c_member['secure']['pc_address']);
38        $req->addPostData("area_id", $requests['area_id']);
39        $req->addPostData("cat_id", $requests['cat_id']);
40        $req->addPostData("format", $requests['format']);
41        $req->addPostData("ask_price", $requests['ask_price']);
42        $req->addPostData("price_type", $requests['price_type']);
43        $req->addPostData("address", $requests['address']);
44        $req->addPostData("title", $requests['title']);
45        $req->addPostData("desc", $requests['desc']);
46        $req->addPostData("event_start_year", $requests['event_start_year']);
47        $req->addPostData("event_start_month", $requests['event_start_month']);
48        $req->addPostData("event_start_date", $requests['event_start_date']);
49        $req->addPostData("event_end_year", $requests['event_end_year']);
50        $req->addPostData("event_end_month", $requests['event_end_month']);
51        $req->addPostData("event_end_date", $requests['event_end_date']);
52        $req->addPostData("event_start_hour", $requests['event_start_hour']);
53        $req->addPostData("event_start_minute", $requests['event_start_minute']);
54        $req->addPostData("event_end_hour", $requests['event_end_hour']);
55        $req->addPostData("event_end_minute", $requests['event_end_minute']);
56        $req->addPostData("image1", $image_url);
57        $req->addPostData("image2", $image_url);
58        $req->addPostData("image3", $image_url);
59        $req->addPostData("image4", $image_url);
60        $req->addPostData('from', OPENPNE_URL);
61       
62        //var_dump($req);
63
64        if (!PEAR::isError($req->sendRequest())) {
65            $res = $req->getResponseBody();
66            //echo $res;
67        } else {
68            $res = -1;
69        }
70       
71        //echo "<p>echo output example\n</p>";
72
73        openpne_redirect('pc', 'page_dmd_event_kijiji_end', array('result' => $res));
74    }
75}
76
77?>
Note: See TracBrowser for help on using the repository browser.