コード例 #1
0
ファイル: site.php プロジェクト: alextiannus/wormwood_wechat
 private function calcUserMark($userChoices)
 {
     $usermark = 0;
     if (count($userChoices) <= 0) {
         return $usermark;
     }
     $choice_ids = array_keys($userChoices);
     $ref = pdo_fetchAll("SELECT * FROM " . tablename('quickexam2_choice') . " WHERE choice_id in (" . join(',', $choice_ids) . ")", array(), 'choice_id');
     foreach ($userChoices as $choice_id => $choice_arr) {
         if (count(array_diff(explode(',', $ref[$choice_id]['answer']), $choice_arr)) > 0) {
             // different answer set, wrong!
         } else {
             $usermark += $ref[$choice_id]['mark'];
         }
     }
     return $usermark;
 }
コード例 #2
0
ファイル: repair.inc.php プロジェクト: guohuadeng/wuyeWq
电话:' . $member['mobile'] . '
时间:' . $createtime . '
', 'deviceNo' => $this->module['config']['deviceNo'], 'msgNo' => $msgNo);
                echo $this->sendFreeMessage($freeMessage);
            }
        }
        pdo_insert("xcommunity_report", $data);
        $id = pdo_insertid();
        //短信提醒
        $content = $_GPC['content'];
        $mobile = $member['mobile'];
        if ($this->module['config']['report_type']) {
            $result = $this->Resms($content, $mobile);
        }
        //微信提醒
        $notice = pdo_fetchAll("SELECT * FROM" . tablename('xcommunity_wechat_notice') . "WHERE regionid='{$member['regionid']}'");
        foreach ($notice as $key => $value) {
            if ($value['repair_status'] == 2) {
                $openid = $value['fansopenid'];
                $url = $this->createMobileUrl('repair', array('op' => 'display'));
                $template_id = $this->module['config']['repair_tplid'];
                $createtime = date('Y-m-d H:i:s', $_W['timestamp']);
                $content = array('first' => array('value' => '新报修通知'), 'keyword1' => array('value' => $member['realname']), 'keyword2' => array('value' => $member['mobile']), 'keyword3' => array('value' => $member['address']), 'keyword4' => array('value' => $_GPC['content']), 'keyword5' => array('value' => $createtime), 'remark' => array('value' => '请尽快联系客户。'));
                $this->sendtpl($openid, $url, $template_id, $content);
            }
        }
        message('报修申请提交成功,请查看"我的报修"等待工作人员联系。', $this->createMobileUrl('repair', array('op' => 'display')), 'success');
    }
} elseif ($op == 'display' || $op == 'more') {
    $pindex = max(1, intval($_GPC['page']));
    $psize = 10;
コード例 #3
0
ファイル: car.inc.php プロジェクト: keycoolkui/weixinfenxiao
    if ($_W['ispost']) {
        if (empty($_GPC['id'])) {
            pdo_insert('xcommunity_carpool', $data);
        } else {
            pdo_update('xcommunity_carpool', $data, array('id' => $_GPC['id']));
        }
        message('发布成功', $this->createMobileUrl('car', array('op' => 'display')), 'success');
    }
    include $this->template('caradd');
} elseif ($op == 'detail') {
    $id = $_GPC['id'];
    if ($id) {
        $item = pdo_fetch("SELECT * FROM" . tablename('xcommunity_carpool') . "WHERE id=:id", array(':id' => $id));
    }
    include $this->template('cardetail');
} elseif ($op == 'my') {
    $pindex = max(1, intval($_GPC['page']));
    $psize = 10;
    $condition = '';
    $keyword = $_GPC['keyword'];
    if ($keyword) {
        $keyword = "%{$_GPC['keyword']}%";
        $condition = " AND start_position LIKE '{$keyword}' OR end_position LIKE '{$keyword}'";
    }
    $list = pdo_fetchAll("SELECT * FROM" . tablename('xcommunity_carpool') . "WHERE weid='{$_W['weid']}' AND status = 0 AND regionid='{$member['regionid']}' {$condition} LIMIT " . ($pindex - 1) * $psize . ',' . $psize);
    if ($op == 'more') {
        include $this->template('carindex_more');
    }
    include $this->template('car_index');
    exit;
}
コード例 #4
0
ファイル: site.php プロジェクト: eduNeusoft/weixin
 public function doMobileWorng()
 {
     global $_GPC, $_W;
     $id = intval($_GPC['id']);
     $flight_setting = pdo_fetch("SELECT * FROM " . tablename('fighting_setting') . " WHERE rid = '{$id}' LIMIT 1");
     if (empty($flight_setting)) {
         message('非法访问,请重新发送消息进入一战到底页面!');
     }
     $fromuser = $_W['fans']['from_user'];
     $member = fans_search($fromuser);
     if (empty($member)) {
         $followurl = $flight_setting['followurl'];
         //分享URL
         header("location:{$followurl}");
     }
     $sql = "SELECT  * FROM " . tablename('fighting_question_worng') . " AS a LEFT JOIN " . tablename('fighting') . " AS b ON b.id = a.fightingid ";
     $list = pdo_fetchAll($sql);
     include $this->template('worng');
     exit;
 }
コード例 #5
0
ファイル: export.php プロジェクト: keycoolkui/weixinfenxiao
<?php

header("Content-type:text/csv;");
header("Content-Disposition:attachment;filename=weicard.csv");
header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
header('Expires:0');
header('Pragma:public');
$weid = $_W['uniacid'];
$result = pdo_fetchAll("SELECT * FROM " . tablename('amouse_weicard_member') . " WHERE  weid=" . $weid . " ORDER BY id DESC ");
$title = "名字" . "," . "公司" . "," . "职务" . "," . "部门" . "," . "电话" . "," . "时间" . "\n";
if (isWin()) {
    echo iconv('utf-8', 'gb2312', $title);
    foreach ($result as $key => $value) {
        $temp = $value['realname'] . "," . $value['company'] . "," . $value['job'] . "," . $value['department'] . "," . $value['mobile'] . "," . date("Y-m-d G:i", $value['createtime']) . "\n";
        echo iconv('utf-8', 'gb2312', $temp);
    }
} else {
    echo $title;
    foreach ($result as $key => $value) {
        echo $value['realname'] . ",";
        echo $value['company'] . ",";
        echo $value['job'] . ",";
        echo $value['department'] . ",";
        echo $value['mobile'] . ",";
        echo date("Y-m-d G:i", $value['createtime']) . "\n";
    }
}
function isWin()
{
    global $_SERVER;
    $agent = $_SERVER['HTTP_USER_AGENT'];
コード例 #6
0
ファイル: site.php プロジェクト: 6662680/qday_wx
 public function doWebPackedit()
 {
     global $_GPC, $_W;
     $sql = 'SELECT * FROM ' . tablename('fb_item');
     $list = pdo_fetchAll($sql);
     $op = $_GPC['op'];
     if ($op == 'add') {
         $url = $this->createWebUrl('packedit', array('op' => 'add'));
         if (checksubmit('submit')) {
             if (empty($_GPC['name'])) {
                 message('请输入套餐名称');
             }
             $data = array('p_name' => $_GPC['name'], 'thumb' => $_GPC['thumb'], 'price' => $_GPC['price'], 'm_price' => $_GPC['mprice'], 's_item' => serialize($_GPC['item']), 'detail' => $_GPC['detail'], 'is_show' => $_GPC['is_show'], 'is_recommend' => $_GPC['is_recommend']);
             $result = pdo_insert('fb_package', $data);
             if ($result) {
                 message('添加成功', $this->createWebUrl('package'), 'success');
             }
         }
     } elseif ($op == 'edit') {
         $id = $_GPC['id'];
         $url = $this->createWebUrl('packedit', array('op' => 'edit', 'id' => $id));
         if (checksubmit('submit')) {
             $data = array('p_name' => $_GPC['name'], 'thumb' => $_GPC['thumb'], 'price' => $_GPC['price'], 'm_price' => $_GPC['mprice'], 's_item' => serialize($_GPC['item']), 'detail' => $_GPC['detail'], 'is_show' => $_GPC['is_show'], 'is_recommend' => $_GPC['is_recommend']);
             //pdo_update('account', array('uniacid' => '100'), array('acid' => '10'));
             $result = pdo_update('fb_package', $data, array('id' => $id));
             if ($result) {
                 message('更新成功', $this->createWebUrl('package'), 'success');
             }
         }
         $sql = 'SELECT * FROM ' . tablename('fb_package') . 'where id=:id';
         $param = array(':id' => $id);
         $item = pdo_fetch($sql, $param);
         $arr = unserialize($item['s_item']);
         $item['s_item'] = $arr;
     } elseif ($op == 'delete') {
         $id = $_GPC['id'];
         $result = pdo_delete('fb_package', array('id' => $id));
         if ($result) {
             message('删除成功', $this->createWebUrl('package'), 'success');
         }
     }
     include $this->template('pack_edit');
 }
コード例 #7
0
ファイル: search.inc.php プロジェクト: guohuadeng/wuyeWq
global $_W, $_GPC;
$op = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
if ($op == 'post') {
    if ($_GPC['id']) {
        $item = pdo_fetch("SELECT * FROM" . tablename('xcommunity_search') . "WHERE id=:id", array(':id' => $_GPC['id']));
    }
    $data = array('weid' => $_W['weid'], 'sname' => $_GPC['sname'], 'surl' => $_GPC['surl'], 'icon' => $_GPC['icon'], 'status' => $_GPC['status']);
    if ($_W['ispost']) {
        if (empty($_GPC['id'])) {
            pdo_insert("xcommunity_search", $data);
        } else {
            pdo_update("xcommunity_search", $data, array('id' => $_GPC['id']));
        }
        message('更新成功', referer(), 'success');
    }
} elseif ($op == 'display') {
    $list = pdo_fetchAll('SELECT * FROM' . tablename('xcommunity_search') . "WHERE weid='{$_W['weid']}'");
    if ($_GPC['id']) {
        if (empty($_GPC['status'])) {
            pdo_query("UPDATE " . tablename('xcommunity_search') . " SET status=0 WHERE id=:id", array(':id' => $_GPC['id']));
            message('成功关闭', referer(), 'success');
        } else {
            pdo_query("UPDATE " . tablename('xcommunity_search') . " SET status=1 WHERE id=:id", array(':id' => $_GPC['id']));
            message('成功开启', referer(), 'success');
        }
    }
} elseif ($op == 'delete') {
    pdo_delete("xcommunity_search", array('id' => $_GPC['id']));
    message('删除成功', referer(), 'success');
}
include $this->template('search');
コード例 #8
0
ファイル: black.inc.php プロジェクト: guohuadeng/wuyeWq
 *
 * [晓锋] Copyright (c) 2013 qfinfo.cn
 */
/**
 * 后台黑名单管理
 */
defined('IN_IA') or exit('Access Denied');
global $_W, $_GPC;
$type = !empty($_GPC['type']) ? $_GPC['type'] : 2;
if ($type == 2) {
    $table = 'xcommunity_fled';
} else {
    $table = 'xcommunity_carpool';
}
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$list = pdo_fetchAll("SELECT * FROM" . tablename($table) . "WHERE weid='{$_W['weid']}' AND status = 1 LIMIT " . ($pindex - 1) * $psize . ',' . $psize);
$total = pdo_fetchcolumn("SELECT COUNT(*) FROM" . tablename($table) . "WHERE weid='{$_W['weid']}' AND status = 1");
$pager = pagination($total, $pindex, $psize);
if ($_GPC['op'] == 'delete') {
    if ($_GPC['id']) {
        pdo_delete($table, array('id' => $_GPC['id']));
        echo json_encode(array('state' => 1));
    }
} elseif ($_GPC['op'] == 'toblack') {
    if ($_GPC['id']) {
        pdo_query("UPDATE " . tablename($table) . "SET status =0 WHERE id=:id", array(':id' => $_GPC['id']));
        echo json_encode(array('state' => 1));
    }
}
include $this->template('black');
コード例 #9
0
<?php

/**
 * 微小区模块
 *
 * [晓锋] Copyright (c) 2013 qfinfo.cn
 */
/**
 * 微信端 物业费查询
 */
defined('IN_IA') or exit('Access Denied');
global $_W, $_GPC;
$title = '物业费查询';
$op = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
$member = $this->changemember();
$region = pdo_fetch("SELECT * FROM" . tablename('xcommunity_region') . "WHERE id='{$member['regionid']}'");
if ($op == 'display') {
    //查当前公众号下面的费用时间
    $list = pdo_fetchAll("SELECT * FROM" . tablename('xcommunity_protime') . "WHERE weid='{$_W['weid']}'");
    include $this->template('propertyfree');
}
if ($_GPC['op'] == 'ajax') {
    $protime = $_GPC['ym'];
    $pro = pdo_fetch("SELECT * FROM" . tablename('xcommunity_protime') . "WHERE protime=:protime AND weid='{$_W['weid']}'", array(':protime' => $protime));
    $profrees = pdo_fetchAll("SELECT * FROM" . tablename('xcommunity_propertyfree') . "WHERE protimeid='{$pro['id']}' AND mobile='{$member['mobile']}'");
    $result = array('data' => $profrees, 'info' => "成功", 'status' => 1);
    print_r(json_encode($result));
}
コード例 #10
0
ファイル: activity.inc.php プロジェクト: guohuadeng/wuyeWq
        $condition .= " AND title LIKE '%{$_GPC['keyword']}%'";
    }
    $list = pdo_fetchAll("SELECT * FROM" . tablename('xcommunity_activity') . "WHERE weid='{$_W['weid']}' {$condition} LIMIT " . ($pindex - 1) * $psize . ',' . $psize);
    $total = pdo_fetchcolumn("SELECT COUNT(*) FROM" . tablename('xcommunity_activity') . "WHERE weid='{$_W['weid']}'");
    $pager = pagination($total, $pindex, $psize);
} elseif ($op == 'delete') {
    pdo_delete('xcommunity_activity', array('id' => $id));
    message('删除成功', referer(), 'success');
} elseif ($op == 'res') {
    $pindex = max(1, intval($_GPC['page']));
    $psize = 20;
    $condition = '';
    $params = array();
    if (!empty($_GPC['keyword'])) {
        $condition .= " AND title LIKE :keyword";
        $params[':keyword'] = "%{$_GPC['keyword']}%";
    }
    $list = pdo_fetchAll("SELECT * FROM" . tablename('xcommunity_res') . " WHERE weid='{$_W['weid']}' {$condition} LIMIT " . ($pindex - 1) * $psize . ',' . $psize);
    $total = pdo_fetchcolumn("SELECT COUNT(*) FROM" . tablename('xcommunity_res') . "WHERE weid='{$_W['weid']}'");
    $pager = pagination($total, $pindex, $psize);
    $row = array();
    foreach ($list as $key => $value) {
        $rows = pdo_fetch("SELECT * FROM" . tablename('xcommunity_activity') . "WHERE id=:id", array(':id' => $value['id']));
        $row[] = array('truename' => $value['truename'], 'mobile' => $value['mobile'], 'num' => $value['num'], 'sex' => $value['sex'], 'createtime' => $value['createtime'], 'title' => $rows['title'], 'id' => $value['id']);
    }
    if (checksubmit('delete')) {
        pdo_delete('xcommunity_res', " id  IN  ('" . implode("','", $_GPC['select']) . "')");
        message('删除成功!', referer(), 'success');
    }
}
include $this->template('activity');
コード例 #11
0
ファイル: site.php プロジェクト: alextiannus/wormwood_wechat
 public function doMobileHouseAdd()
 {
     global $_GPC, $_W;
     $id = intval($_GPC['id']);
     $region = pdo_fetchAll("SELECT * FROM" . tablename('hewer_gulluk') . "WHERE weid='{$_W['weid']}'");
     if ($_W['ispost']) {
         $data = array('weid' => $_W['weid'], 'cate_id' => $_GPC['cate_id'], 'title' => $_GPC['title'], 'gid' => $_GPC['gid'], 'housenow' => $_GPC['housenow'], 'houseall' => $_GPC['houseall'], 'yil' => $_GPC['yil'], 'hrs_lan' => $_GPC['hrs_lan'], 'mianji' => $_GPC['mianji'], 'jiage' => $_GPC['jiage'], 'direction' => $_GPC['direction'], 'house_zx' => $_GPC['house_zx'], 'picstyle' => $_GPC['picstyle'], 'content' => $_GPC['content'], 'linkman' => $_GPC['linkman'], 'jinsi' => $_GPC['jinsi'], 'tel' => $_GPC['tel'], 'wupin' => implode(',', $_GPC['wupin']), 'openid' => $_W['fans']['from_user']);
         if (!empty($_FILES['thumb']['tmp_name'])) {
             file_delete($_GPC['thumb-old']);
             $upload = file_upload($_FILES['thumb']);
             if (is_error($upload)) {
                 message($upload['message'], '', 'error');
             }
             $data['thumb'] = $upload['path'];
         }
         if (empty($id)) {
             pdo_insert('hewer_house', $data);
             message('发布成功', $this->createMobileUrl('house'), 'success');
         } else {
             pdo_update('hewer_house', $data, array('id' => $id));
             message('更新成功', $this->createMobileUrl('house'), 'success');
         }
     }
     include $this->template('addhouse');
 }
コード例 #12
0
ファイル: nav.inc.php プロジェクト: guohuadeng/wuyeWq
<?php

/**
 * 微小区模块
 *
 * [晓锋] Copyright (c) 2013 qfinfo.cn
 */
/**
 * 后台菜单设置
 */
defined('IN_IA') or exit('Access Denied');
global $_W, $_GPC;
$op = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
$navs = pdo_fetchAll("SELECT * FROM" . tablename('xcommunity_nav') . "WHERE uniacid= '{$_W['uniacid']}'");
if (empty($navs)) {
    $data1 = array('displayorder' => 0, 'pcate' => 0, 'title' => '物业服务', 'url' => '', 'status' => 1, 'uniacid' => $_W['uniacid']);
    $data2 = array('displayorder' => 0, 'pcate' => 0, 'title' => '小区互动', 'url' => '', 'status' => 1, 'uniacid' => $_W['uniacid']);
    $data3 = array('displayorder' => 0, 'pcate' => 0, 'title' => '生活服务', 'url' => '', 'status' => 1, 'uniacid' => $_W['uniacid']);
    if ($data1) {
        pdo_insert('xcommunity_nav', $data1);
        $nid1 = pdo_insertid();
        $menu1 = array(array('displayorder' => 0, 'pcate' => $nid1, 'title' => '物业介绍', 'icon' => 'glyphicon glyphicon-user', 'bgcolor' => '#ffb81c', 'url' => $_W['siteroot'] . 'app/index.php?i=' . $_W['uniacid'] . '&c=entry&do=property&m=xfeng_community', 'status' => 1, 'uniacid' => $_W['uniacid']), array('displayorder' => 0, 'pcate' => $nid1, 'title' => '公告信息', 'icon' => 'glyphicon glyphicon-bullhorn', 'bgcolor' => '#95bd38', 'url' => $_W['siteroot'] . 'app/index.php?i=' . $_W['uniacid'] . '&c=entry&do=announcement&m=xfeng_community', 'status' => 1, 'uniacid' => $_W['uniacid']), array('displayorder' => 0, 'pcate' => $nid1, 'title' => '小区报修', 'icon' => 'glyphicon glyphicon-wrench', 'bgcolor' => '#3c87c8', 'url' => $_W['siteroot'] . 'app/index.php?i=' . $_W['uniacid'] . '&c=entry&do=repair&m=xfeng_community', 'status' => 1, 'uniacid' => $_W['uniacid']), array('displayorder' => 0, 'pcate' => $nid1, 'title' => '投诉建议', 'icon' => 'fa fa-legal', 'bgcolor' => '#dd4b2b', 'url' => $_W['siteroot'] . 'app/index.php?i=' . $_W['uniacid'] . '&c=entry&do=report&m=xfeng_community', 'status' => 1, 'uniacid' => $_W['uniacid']), array('displayorder' => 0, 'pcate' => $nid1, 'title' => '便民号码', 'icon' => 'glyphicon glyphicon-earphone', 'bgcolor' => '#ab5e90', 'url' => $_W['siteroot'] . 'app/index.php?i=' . $_W['uniacid'] . '&c=entry&do=phone&m=xfeng_community', 'status' => 1, 'uniacid' => $_W['uniacid']), array('displayorder' => 0, 'pcate' => $nid1, 'title' => '查物业费', 'icon' => 'fa fa-money', 'bgcolor' => '#660000', 'url' => $_W['siteroot'] . 'app/index.php?i=' . $_W['uniacid'] . '&c=entry&do=propertyfree&m=xfeng_community', 'status' => 1, 'uniacid' => $_W['uniacid']));
        foreach ($menu1 as $key => $value1) {
            pdo_insert('xcommunity_nav', $value1);
        }
    }
    if ($data2) {
        pdo_insert('xcommunity_nav', $data2);
        $nid2 = pdo_insertid();
        $menu2 = array(array('displayorder' => 0, 'pcate' => $nid2, 'title' => '小区活动', 'icon' => 'glyphicon glyphicon-tasks', 'bgcolor' => '#65944e', 'url' => $_W['siteroot'] . 'app/index.php?i=' . $_W['uniacid'] . '&c=entry&do=activity&m=xfeng_community', 'status' => 1, 'uniacid' => $_W['uniacid']), array('displayorder' => 0, 'pcate' => $nid2, 'title' => '家政服务', 'icon' => 'glyphicon glyphicon-leaf', 'bgcolor' => '#95bd38', 'url' => $_W['siteroot'] . 'app/index.php?i=' . $_W['uniacid'] . '&c=entry&do=homemaking&m=xfeng_community', 'status' => 1, 'uniacid' => $_W['uniacid']), array('displayorder' => 0, 'pcate' => $nid2, 'title' => '房屋租赁', 'icon' => 'fa fa-info', 'bgcolor' => '#38bfc8', 'url' => $_W['siteroot'] . 'app/index.php?i=' . $_W['uniacid'] . '&c=entry&do=houselease&m=xfeng_community', 'status' => 1, 'uniacid' => $_W['uniacid']), array('displayorder' => 0, 'pcate' => $nid2, 'title' => '常用查询', 'icon' => 'glyphicon glyphicon-search', 'bgcolor' => '#ec9510', 'url' => $_W['siteroot'] . 'app/index.php?i=' . $_W['uniacid'] . '&c=entry&do=search&m=xfeng_community', 'status' => 1, 'uniacid' => $_W['uniacid']), array('displayorder' => 0, 'pcate' => $nid2, 'title' => '二手市场', 'icon' => 'fa fa-exchange', 'bgcolor' => '#666699', 'url' => $_W['siteroot'] . 'app/index.php?i=' . $_W['uniacid'] . '&c=entry&do=fled&m=xfeng_community', 'status' => 1, 'uniacid' => $_W['uniacid']), array('displayorder' => 0, 'pcate' => $nid2, 'title' => '小区拼车', 'icon' => 'fa fa-truck', 'bgcolor' => '#7f6000', 'url' => $_W['siteroot'] . 'app/index.php?i=' . $_W['uniacid'] . '&c=entry&do=car&m=xfeng_community', 'status' => 1, 'uniacid' => $_W['uniacid']));
        foreach ($menu2 as $key => $value2) {
コード例 #13
0
ファイル: fled.inc.php プロジェクト: keycoolkui/weixinfenxiao
    include $this->template('fled_add');
} elseif ($op == 'detail') {
    $id = intval($_GPC['id']);
    if ($id) {
        $item = pdo_fetch("SELECT * FROM" . tablename('xcommunity_fled') . "WHERE id=:id", array(':id' => $id));
        if ($item['images']) {
            $images = unserialize($item['images']);
            if ($images) {
                $picid = implode(',', $images);
                $imgs = pdo_fetchall("SELECT * FROM" . tablename('xfcommunity_images') . "WHERE id in({$picid})");
            }
        }
    }
    include $this->template('fled_detail');
} elseif ($op == 'my') {
    $pindex = max(1, intval($_GPC['page']));
    $psize = 10;
    $condition = '';
    if (!empty($_GPC['keyword'])) {
        $keyword = "%{$_GPC['keyword']}%";
        $condition = " AND title LIKE '{$keyword}'";
    }
    $list = pdo_fetchAll('SELECT * FROM' . tablename('xcommunity_fled') . "WHERE weid='{$_W['weid']}' AND status = 0 AND regionid='{$member['regionid']}' AND openid='{$_W['fans']['from_user']}' LIMIT " . ($pindex - 1) * $psize . ',' . $psize);
    include $this->template('fledindex');
} elseif ($op == 'delete') {
    $id = $_GPC['id'];
    if (pdo_delete('xcommunity_fled', array('id' => $id))) {
        $result['state'] = 0;
        message($result, '', 'ajax');
    }
}
コード例 #14
0
ファイル: search.inc.php プロジェクト: guohuadeng/wuyeWq
<?php

/**
 * 微小区模块
 *
 * [晓锋] Copyright (c) 2013 qfinfo.cn
 */
/**
 * 微信端常用查询
 */
defined('IN_IA') or exit('Access Denied');
global $_W, $_GPC;
$title = '常用查询';
//判断是否注册
$this->changemember();
$list = pdo_fetchAll("SELECT * FROM" . tablename("xcommunity_search") . "WHERE status='1' AND weid='{$_W['weid']}'");
include $this->template('search');
コード例 #15
0
ファイル: activity.inc.php プロジェクト: guohuadeng/wuyeWq
 * [晓锋] Copyright (c) 2013 qfinfo.cn
 */
/**
 * 微信端小区活动
 */
defined('IN_IA') or exit('Access Denied');
global $_GPC, $_W;
$title = '小区活动';
$op = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
//判断是否注册,只有注册后,才能进入
$member = $this->changemember();
if ($op == 'display' || $op == 'more') {
    $pindex = max(1, intval($_GPC['page']));
    $psize = 10;
    $condition = '';
    $rows = pdo_fetchAll("SELECT * FROM" . tablename('xcommunity_activity') . "WHERE weid='{$_W['weid']}' order by status desc LIMIT " . ($pindex - 1) * $psize . ',' . $psize);
    $list = array();
    foreach ($rows as $key => $value) {
        $regions = unserialize($value['regionid']);
        if (@in_array($member['regionid'], $regions)) {
            $list[$key]['title'] = $value['title'];
            $list[$key]['starttime'] = $value['starttime'];
            $list[$key]['endtime'] = $value['endtime'];
            $list[$key]['resnumber'] = $value['resnumber'];
            $list[$key]['createtime'] = $value['createtime'];
            $list[$key]['id'] = $value['id'];
            $list[$key]['picurl'] = $value['picurl'];
        }
    }
    if ($op == 'more') {
        include $this->template('activity_index_more');
コード例 #16
0
ファイル: site.php プロジェクト: aspnmy/weizan
 public function doMobileMylist()
 {
     global $_GPC, $_W;
     $item = pdo_fetch("SELECT * FROM " . tablename('bmhospital_slide') . " WHERE weid = :weid", array(':weid' => $_W['weid']));
     $hslists = unserialize($item['hs_pic']);
     $rebs = pdo_fetchAll("SELECT * FROM" . tablename('bmhospital_reservation') . "WHERE openid='{$_W['fans']['from_user']}'");
     if ($_GPC['op'] == 'delete') {
         pdo_delete("bmhospital_reservation", array('id' => $_GPC['id']));
         message('删除成功', referer(), 'success');
     }
     $info_picurl = pdo_fetchcolumn("SELECT info_picurl FROM" . tablename('bmhospital_reply') . "WHERE weid='{$_W['weid']}'");
     include $this->template('mylist');
 }
コード例 #17
0
ファイル: export.php プロジェクト: keycoolkui/weixinfenxiao
<?php

header("Content-type:text/csv;");
header("Content-Disposition:attachment;filename=orders.csv");
header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
header('Expires:0');
header('Pragma:public');
$weid = $_W['uniacid'];
$result = pdo_fetchAll("SELECT * FROM " . tablename('heixiu_car_order') . " WHERE  weid=" . $weid . " ORDER BY id DESC ");
$meals = pdo_fetchall('SELECT * FROM ' . tablename('heixiu_car_meal') . "  ORDER BY id DESC");
$activitys = pdo_fetchAll("SELECT * FROM " . tablename('heixiu_car_activity') . " WHERE  weid=" . $weid . " ORDER BY id DESC ");
$title = "订单号" . "," . "姓名" . "," . "电话" . "," . "预约时间" . "," . "状态" . "," . "车牌号" . "," . "区域" . "," . "套餐" . "," . "价格" . "," . "技师名称" . "," . "时间" . "\n";
$mealArr = array();
foreach ($meals as $v) {
    $mealArr[$v['id']] = $v['title'];
}
if (isWin()) {
    echo iconv('utf-8', 'gb2312', $title);
    foreach ($result as $key => $value) {
        $txt = "";
        if ($value['status'] == 0) {
            $txt = '待确认 ';
        } elseif ($value['status'] == 1) {
            $txt = '已确认';
        } elseif ($value['status'] == -1) {
            $txt = '已关闭';
        }
        $temp = $value['ordersn'] . "," . $value['username'] . "," . $value['mobile'] . "," . $value['appointmenttime'] . $value['timezone'] . "," . $txt . "," . $value['carprefix'] . $value['carNo'] . "," . $value['address'] . "," . $mealArr[$value['mealid']] . "," . $value['price'] . "," . $value['jsname'] . "," . date("Y-m-d G:i", $value['createtime']) . "\n";
        echo iconv('utf-8', 'gb2312', $temp);
    }
} else {
コード例 #18
0
ファイル: notice.inc.php プロジェクト: guohuadeng/wuyeWq
<?php

/**
 * 微小区模块
 *
 * [晓锋] Copyright (c) 2013 qfinfo.cn
 */
/**
 * 后台小区通知设置
 */
defined('IN_IA') or exit('Access Denied');
global $_GPC, $_W;
$op = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
if ($op == 'display') {
    $list = pdo_fetchAll("SELECT * FROM" . tablename('xcommunity_wechat_notice') . "WHERE uniacid = '{$_W['uniacid']}' AND regionid='{$_GPC['regionid']}'");
} elseif ($op == 'post') {
    if ($_W['ispost']) {
        $data = array('uniacid' => $_W['uniacid'], 'regionid' => $_GPC['regionid'], 'fansopenid' => $_GPC['fansopenid'], 'repair_status' => $_GPC['repair_status'], 'report_status' => $_GPC['report_status']);
        if ($_GPC['id']) {
            if (pdo_update('xcommunity_wechat_notice', $data, array('id' => $_GPC['id']))) {
                message('提交成功', referer(), 'success');
            }
        } else {
            if (pdo_insert('xcommunity_wechat_notice', $data)) {
                message('提交成功', referer(), 'success');
            }
        }
    }
} elseif ($op == 'delete') {
    if (pdo_delete('xcommunity_wechat_notice', array('id' => $_GPC['id']))) {
        $result = array('status' => 1);
コード例 #19
0
ファイル: home.inc.php プロジェクト: keycoolkui/weixinfenxiao
<?php

/**
 * 微小区模块
 *
 * [晓锋] Copyright (c) 2013 qfinfo.cn
 */
/**
 * 微信端首页
 */
defined('IN_IA') or exit('Access Denied');
global $_GPC, $_W;
$title = $_W['account']['name'];
$member = $this->changemember();
$nav1 = pdo_fetchAll("SELECT * FROM" . tablename('xcommunity_navExtension') . "WHERE weid='{$_W['weid']}' AND cate=1");
$nav2 = pdo_fetchAll("SELECT * FROM" . tablename('xcommunity_navExtension') . "WHERE weid='{$_W['weid']}' AND cate=2");
$nav3 = pdo_fetchAll("SELECT * FROM" . tablename('xcommunity_navExtension') . "WHERE weid='{$_W['weid']}' AND cate=3");
include $this->template('home');