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 | |
---|
7 | class pc_do_c_review_add extends OpenPNE_Action |
---|
8 | { |
---|
9 | function execute($requests) |
---|
10 | { |
---|
11 | $u = $GLOBALS['AUTH']->uid(); |
---|
12 | |
---|
13 | // --- リクエスト変数 |
---|
14 | $category_id = $requests['category_id']; |
---|
15 | $asin = $requests['asin']; |
---|
16 | $body = $requests['body']; |
---|
17 | $satisfaction_level = $requests['satisfaction_level']; |
---|
18 | // ---------- |
---|
19 | |
---|
20 | $product = p_h_review_write_product4asin($asin); |
---|
21 | |
---|
22 | //c_reviewへ登録 |
---|
23 | $c_review_id = do_c_review_add_insert_c_review($product, $category_id); |
---|
24 | |
---|
25 | //c_review_commentへ登録 |
---|
26 | if ($c_review_id) { |
---|
27 | do_c_review_add_insert_c_review_comment($c_review_id, $u, $body, $satisfaction_level); |
---|
28 | } |
---|
29 | |
---|
30 | $p = array('c_review_id' => $c_review_id); |
---|
31 | openpne_redirect('pc', 'page_h_review_list_product', $p); |
---|
32 | } |
---|
33 | } |
---|
34 | |
---|
35 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.