processor.php
1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* 万能小店
*
* @author WeEngine Team & ewei
* @url
*/
defined('IN_IA') or exit('Access Denied');
class Ewei_hotelModuleProcessor extends WeModuleProcessor {
public function respond() {
global $_W;
$rid = $this->rule;
if ($rid) {
$reply = pdo_fetch("SELECT * FROM " . tablename('hotel2_reply') . " WHERE rid = :rid", array(':rid' => $rid));
if ($reply) {
$sql = 'SELECT id,title,description,thumb FROM ' . tablename('hotel2') . ' WHERE `weid`=:weid AND `id`=:hotelid';
$hotel = pdo_fetch($sql, array(':weid' => $_W['uniacid'], ':hotelid' => $reply['hotelid']));
$news = array();
$news[] = array(
'title' => $hotel['title'],
'description' => strip_tags($hotel['description']),
'picurl' => $_W['attachurl'] . $hotel['thumb'],
//'url' => create_url('mobile/module/hotel2', array('name' => 'hotel2', 'op'=>'detail', 'id' => $hotel['id'], 'weid' => $_W['uniacid']))
'url'=>$this->createMobileUrl('detail', array('hid' => $hotel['id']))
);
return $this->respNews($news);
}
}
$this->module['config']['picurl'] = $_W['attachurl'] . $this->module['config']['picurl'];
return $this->respNews($this->module['config']);
}
}