Exemplo n.º 1
0
<?php

include_once "../../includes/config.inc.php";
$configModel = new Model_CustomerConfig();
$userModel = new Model_Subtable('sub_user');
//微信通道
if (method_is('post')) {
    $content = "亲~,你已成功注册云客驿站平台,但个人资料至今还未完善哦,请尽快完善。为了能及时参加兼职工作,请至“个人中心”-“我的金库”绑定中国银行卡,(除本地中国银行卡外,其他银行会产生2.5元手续费;异地银行卡产生5.5元手续费哦),如有疑问,请在左下方客服窗口咨询云姐哦~";
    $configModel->sendCustomerMsg($content, $_POST['fromuser']);
} else {
    $listArr = $userModel->field('fromuser')->where("is_see=0 and fromuser!='' group by fromuser")->dataArr();
    $smarty->assign('list', $listArr);
    $smarty->assign('listcount', count($listArr));
    $smarty->setTpl('msg/templates/send_wanshan.html')->display();
    die;
}
Exemplo n.º 2
0
    $configModel = new Model_CustomerConfig();
    $configModel->sendCustomerMsg($cname . '发布了一个新职位:' . $taskRow['title'] . ",<a href='http://www.yunfanke.com/mobile/index.php?m=task&a=detail&id=" . $tid . "'>点击查看</a>", $_GET['fromuser']);
    die;
}
if ($_REQUEST['a'] == 'send_msg_confirm') {
    set_time_limit(0);
    $configModel = new Model_CustomerConfig();
    $tid = $_GET['tid'];
    //职位信息
    $taskModel = D('sub_task');
    $taskRow = $taskModel->find($tid);
    //确认过的报名人员
    $listArr = D('sub_sign')->where("tid='{$tid}' and is_valid=1")->dataArr();
    if ($listArr) {
        foreach ($listArr as $key => $value) {
            $uRow = $userModel->field('id,nickname,fromuser')->where("id='{$value['uid']}'")->dataRow();
            if ($uRow['fromuser']) {
                //$post_data="您好".$uRow['nickname'].",您已成功报名".$taskRow['title'].",请于".$taskRow['jihe_time']."到".$taskRow['jihe_address']."集合!";
                $post_data = "您好" . $uRow['nickname'] . ",您报名的" . $taskRow['title'] . ",因得到客户临时通知,此兼职取消!";
                //$post_data="您好".$uRow['nickname'].",您报名的".$taskRow['title'].",因得到客户通知,明天照常派单哦!";
                $configModel->sendCustomerMsg($post_data, $uRow['fromuser']);
                usleep(100000);
            }
        }
    }
    die;
}
if ($_REQUEST['a'] == 'send_msg_new') {
    set_time_limit(0);
    $configModel = new Model_CustomerConfig();
    $tid = $_POST['tid'];
Exemplo n.º 3
0
<?php

include_once "../../includes/config.inc.php";
$configModel = new Model_CustomerConfig();
$userModel = new Model_Subtable('sub_user');
//微信通道
if (method_is('post')) {
    $dailyModel = new Model_Subtable('sub_daily');
    $id = $_POST['content'];
    $row = $dailyModel->find($id);
    $content = $row['title'] . $row['content'] . "<a href='" . $row['a_link'] . "'>" . $row['a_title'] . "</a>";
    $configModel->sendCustomerMsg($content, $_POST['fromuser']);
} else {
    $dailyModel = new Model_Subtable('sub_daily');
    $id = $_GET['id'];
    $row = $dailyModel->find($id);
    $content = $row['title'] . $row['content'] . "<a href='" . $row['a_link'] . "'>" . $row['a_title'] . "</a>";
    $smarty->assign('content', $content);
    $smarty->assign('id', $id);
    $listArr = $userModel->field('fromuser')->where("`type`!=2 and fromuser!='' group by fromuser")->dataArr();
    $smarty->assign('list', $listArr);
    $smarty->assign('listcount', count($listArr));
    $smarty->setTpl('msg/templates/daily.html')->display();
    die;
}
Exemplo n.º 4
0
    $dmodel = new Model_Subtable('s_district');
    $darr = $dmodel->where("CityID=" . $_GET['cid'])->order('DistrictId asc')->dataArr();
    echo json_encode($darr);
    die;
}
//触发删除前天之前message表中数据
$rand_num = rand(1, 6);
if ($rand_num == 3) {
    $model->query("delete from message where create_date < '" . date('Y-m-d H:i:s', time() - 3600 * 24 * 2) . "'");
}
//数据列表
$signModel = new Model_Subtable('sub_sign');
$condition = array();
if ($_GET['keywords']) {
    $condition[] = " title like '%" . common_pg('keywords') . "%' ";
}
if ($condition) {
    $filter['where'] = implode('and', $condition);
}
$filter['order'] = " id desc ";
$data = $model->paginate($filter, '*', common_pg('p'), 10);
$listArr = $data['data'];
foreach ($listArr as $key => $value) {
    $listArr[$key]['title'] = cut_str(deletehtml($value['title']), 10);
    //总数
    $countRow = $signModel->field('count(id) as c')->where(" tid='{$value['id']}'")->dataRow();
    $listArr[$key]['countnum'] = $countRow['c'];
}
$smarty->assign('list', $listArr);
$smarty->assign('page', $model->pager($data['pager']));
$smarty->setTpl('task/templates/task_index.html')->display();
Exemplo n.º 5
0
        if ($result1) {
            die('chongfu');
        }
        $res = $signModel->add($data);
        $res ? die('suc') : die('err');
    }
}
//督导做结算管理
if ($_REQUEST['a'] == 'dudao_js') {
    $signModel = new Model_Subtable('sub_sign');
    $assignModel = D('sub_assign');
    $aid = (int) $_GET['aid'];
    $aRow = $assignModel->find($aid);
    $smarty->assign('aRow', $aRow);
    //我被指定的非追加的人数
    $zd_sign_row_my = $signModel->field("count(id) as count_num")->where("is_valid=1 and tid='" . $aRow['tid'] . "' and dudao_uid='" . $userRow['id'] . "' and is_zj=0")->dataRow();
    //echo $zd_sign_row_my['count_num'];
    //查询其他id较小的督导从即非指定也非追加的人员池里拿走了多少人数
    $assign_arr = $assignModel->where("tid='" . $aRow['tid'] . "'")->dataArr();
    $out_num = 0;
    foreach ($assign_arr as $k => $v) {
        if ($v['id'] < $aid) {
            //被指定的非追加的人员
            $zd_sign_row1 = $signModel->field("count(id) as count_num")->where("is_valid=1 and tid='" . $aRow['tid'] . "' and dudao_uid='" . $v['dudao_uid'] . "' and is_zj=0")->dataRow();
            //拿走人数
            $out_num += $v['num'] - $zd_sign_row1['count_num'];
        }
    }
    //非追加非指定的人员
    $limit_str = (int) $out_num . ',' . ($aRow['num'] - $zd_sign_row_my['count_num']);
    $listArr = $signModel->where("is_valid=1 and is_zj=0 and dudao_uid=0 and tid='" . $aRow['tid'] . "'")->order('id asc')->limit($limit_str)->dataArr();
Exemplo n.º 6
0
 //疫苗任务
 $yimiaoModel = D('sub_job_yimiao');
 $yimiaoRow = $yimiaoModel->dataRow();
 $yimiaoRow['content'] = cut_str(deletehtml(html_entity_decode($yimiaoRow['content'])), 25);
 $smarty->assign('yimiaoRow', $yimiaoRow);
 $jobsignModel = new Model_Subtable('sub_jobsign');
 $pageSize = 30;
 //页大小
 $p = (int) $_GET['p'] < 1 ? 1 : (int) $_GET['p'];
 //当前页数
 $limitStr = ($p - 1) * $pageSize . ',' . $pageSize;
 //条件
 $where = '';
 if ($_GET['user'] == 1) {
     //我的任务
     $signArr = $jobsignModel->field("id,jid")->where(" uid='" . $_SESSION['tyuser']['id'] . "' ")->order('id desc')->dataArr();
     if ($signArr) {
         $signRow = array();
         foreach ($signArr as $k => $v) {
             $signRow[] = $v['jid'];
         }
         $idStr = implode(',', $signRow);
         $where = " id in (" . $idStr . ") ";
     } else {
         $smarty->setLayout('')->setTpl('mobile/templates/no_data.html')->display();
         die;
     }
 }
 if ($where) {
     $listArr = $model->where($where)->order('ordernum desc,id desc')->limit($limitStr)->order('id desc')->dataArr();
 } else {
Exemplo n.º 7
0
$model = new Model_Subtable('sub_task');
//企业的历史发布
if ($_REQUEST['a'] == 'index') {
    $pageSize = 10;
    //页大小
    $p = (int) $_GET['p'] < 1 ? 1 : (int) $_GET['p'];
    //当前页数
    $limitStr = ($p - 1) * $pageSize . ',' . $pageSize;
    $listArr = $model->where("is_js=1 and uid=" . $userRow['id'])->order('id desc')->dataArr();
    //无分页数据
    if (!$listArr) {
        $smarty->setLayout('')->setTpl('mobile/templates/no_data.html')->display();
        die;
    }
    //已结算资讯条数
    $taskRow = $model->field("count(*) as countnum")->where("is_js=1 and uid=" . $userRow['id'])->dataRow();
    $smarty->assign('task_num', $taskRow['countnum']);
    $dmodel = new Model_Subtable('s_district');
    $signModel = new Model_Subtable('sub_sign');
    foreach ($listArr as $key => $value) {
        $listArr[$key]['title'] = cut_str(deletehtml($value['title']), 15);
        $drow = $dmodel->where("DistrictId='" . $value['did'] . "'")->dataRow();
        $listArr[$key]['addr'] = $drow['DistrictName'];
    }
    if ($_GET['p']) {
        if ($listArr) {
            echo json_encode($listArr);
            die;
        } else {
            echo json_encode('err');
            die;
Exemplo n.º 8
0
<?php

include_once "../includes/config.inc.php";
//if(!strpos($_SERVER['HTTP_USER_AGENT'],'MicroMessenger')) die("请在微信浏览器中打开");//判断是否微信打开
$model = new Model_Subtable('sub_user');
//登录
if ($_REQUEST['a'] == 'dologin') {
    $data = $_POST;
    $userRow = $model->field('id,username,pass,fromuser')->where("username='******'username'] . "'")->dataRow();
    if (!$userRow) {
        echo 'usernameerr';
        die;
    } else {
        if ($userRow['pass'] != md5($data['pass'])) {
            echo 'passerr';
            die;
        } else {
            //写cookie
            setCookie('tyuid', $userRow['id'], time() + 3600 * 24);
            //只写一天的cookie
            $_SESSION['tyuser'] = $userRow;
            echo 'success';
            die;
        }
    }
}
$smarty->setLayout('')->setTpl('mobile/templates/login.html')->display();
Exemplo n.º 9
0
            echo json_encode('err');
            die;
        }
    } else {
        $smarty->assign('list', $listArr);
        $smarty->setLayout('')->setTpl('mobile/templates/caiwu_task_index.html')->display();
        die;
    }
}
//结算页面
if ($_REQUEST['a'] == 'sign_js') {
    $signModel = new Model_Subtable('sub_sign');
    $logModel = new Model_Subtable('sub_money_log');
    if (method_is('post')) {
        $data = $_POST;
        $taskRow = $model->field('id,pay_type,is_js,work_time')->where("id=" . $data['tid'])->dataRow();
        //1现金日结,用户金额不增加
        if ($taskRow['pay_type'] == 1 && $taskRow['is_js'] == 0) {
            $listArr = $signModel->where("is_valid=1 and is_qd=1 and is_js=1 and tid=" . $data['tid'])->dataArr();
            foreach ($listArr as $k => $v) {
                //写金额日志
                $logData = array();
                $logData['info']['type'] = 7;
                //现金日结
                $logData['info']['uid'] = $v['uid'];
                $logData['info']['money'] = $v['fact_money'];
                $logData['info']['desc'] = $v['tid'];
                $logData['info']['work_date'] = substr($taskRow['work_time'], 0, 10);
                $logModel->add($logData);
            }
        }
Exemplo n.º 10
0
        $filter['where'] = implode('and', $condition);
    }
    $filter['order'] = " id desc ";
    $data = $submitModel->paginate($filter, '*', common_pg('p'), 10);
    $listArr = $data['data'];
    $userModel = new Model_Subtable('sub_user');
    foreach ($listArr as $key => $value) {
        $userRow = $userModel->find($value['uid']);
        $listArr[$key]['uname'] = $userRow['nickname'];
        $listArr[$key]['uphone'] = $userRow['username'];
        $userRow['sex'] == 1 ? $listArr[$key]['usex'] = '男' : ($listArr[$key]['usex'] = '女');
    }
    $smarty->assign('list', $listArr);
    $smarty->assign('page', $submitModel->pager($data['pager']));
    //人数统计
    $res1 = $submitModel->field('count(*) as countnum')->where("jid='{$id}'")->dataRow();
    $smarty->assign('countnum', $res1['countnum']);
    $smarty->setTpl('job/templates/submit.html')->display();
    die;
}
//向单个用户发消息
if ($_REQUEST['a'] == 'send_msg') {
    if (method_is('post')) {
        $id = $_POST['id'];
        $userModel = new Model_Subtable('sub_user');
        $userRow = $userModel->find($id);
        $configModel = new Model_CustomerConfig();
        $configModel->sendCustomerMsg('云姐对你说:' . $_POST['content'], $userRow['fromuser']);
    }
    die;
}
Exemplo n.º 11
0
        }
        $condition[] = " fromuser in ('" . implode("','", $fromuserArr) . "') ";
    } else {
        $condition[] = " fromuser='******' ";
    }
}
if ($_GET['is_see'] == '1') {
    $condition[] = " is_see=1 ";
} elseif ($_GET['is_see'] == '2') {
    $condition[] = " is_see=0 ";
}
if ($condition) {
    $filter['where'] = implode(' and ', $condition);
}
//人数统计
$res1 = $model->field('count(*) as countnum')->where($filter['where'])->dataRow();
$smarty->assign('countnum', $res1['countnum']);
$filter['order'] = " id desc ";
$data = $model->paginate($filter, '*', common_pg('p'), 10);
$listArr = $data['data'];
$memberModel = new Model_Member();
foreach ($listArr as $key => $value) {
    //微信头像
    $listArr[$key]['headPic'] = $memberModel->getPic($value['fromuser']);
    //所属区
    $drow = $dmodel->where("DistrictID='" . $value['did'] . "'")->dataRow();
    $listArr[$key]['district'] = $drow['DistrictName'];
}
$smarty->assign('list', $listArr);
$smarty->assign('page', $model->pager($data['pager']));
//苏州下的区
Exemplo n.º 12
0
        $info['info']['my_num'] = $my_num;
    }
    if ($data['type']) {
        $info['info']['type'] = $data['type'];
        $info['info']['nickname'] = $data['nickname'];
        $info['info']['contact_name'] = $data['contact_name'];
        $info['info']['contact_post'] = $data['contact_post'];
        $info['info']['bank_card'] = $data['bank_card'];
        $info['info']['pic'] = $data['pic'];
    }
    $res = $model->add($info);
    if ($res) {
        $_SESSION['mobile'] = '';
        $_SESSION['mobile_code'] = '';
        //写登录session
        $_SESSION['tyuser'] = $model->field('id,username,pass,fromuser')->where("id={$res}")->dataRow();
        //推荐人处理
        if ($tjr_uid) {
            $tj_data['info']['tjr_uid'] = $tjr_uid;
            $tj_data['info']['reg_uid'] = $res;
            $tj_data['info']['add_date'] = date('Y-m-d');
            D('sub_tjr')->add($tj_data);
        }
    }
    echo $res;
    die;
}
//微信用户标识
include_once "get_openid.php";
$smarty->assign('fromuser', $fromuser);
//防止恶意请求的随机码
Exemplo n.º 13
0
        $data['info'][type] = 2;
        $data['info'][pid] = $pid;
        $data['info'][fromuser] = $_SESSION['picuser']['fromuser'];
        $feModel->add($data);
        //鸡蛋数+1
        $model->query("update sub_pic set `enum`=`enum`+1 where id={$pid}");
        die('suc');
    }
}
if ($_REQUEST['a'] == 'index') {
    $list = $model->order('is_up desc,up_time desc,id desc')->limit('20')->dataArr();
    foreach ($list as $key => $value) {
        $list[$key]['introduce'] = cut_str(deletehtml($value['introduce']), 15);
        //评论数
        $replyModel = new Model_Subtable('sub_pic_reply');
        $replyRow = $replyModel->field("count(id) as countnum")->where("pid='{$value['id']}'")->dataRow();
        $list[$key]['countnum'] = $replyRow['countnum'];
    }
    $smarty->assign('list', $list);
    $smarty->setLayout('')->setTpl('mobile/templates/pic_index.html')->display();
    die;
}
if ($_REQUEST['a'] == 'index_ajax') {
    $pageSize = 8;
    $p = $_GET['p'];
    $limitStr = ($p - 1) * $pageSize . ',' . $pageSize;
    $listArr = $model->order('is_up desc,up_time desc,id desc')->limit($limitStr)->dataArr();
    if ($listArr) {
        foreach ($listArr as $key => $value) {
            $listArr[$key]['introduce'] = cut_str(deletehtml($value['introduce']), 15);
        }
Exemplo n.º 14
0
        echo $res;
        die;
    } else {
        //省
        $pmodel = new Model_Subtable('s_province');
        $smarty->assign('parr', $pmodel->dataArr());
        //苏州市下的区
        $dmodel = new Model_Subtable('s_district');
        $smarty->assign('darr', $dmodel->where("CityID=78")->order("DistrictId asc")->dataArr());
        //微信头像
        $memberModel = new Model_Member();
        $smarty->assign('headPic', $memberModel->getPic($userRow['fromuser']));
        //我的推荐人
        $tjrRow = D('sub_tjr')->where("reg_uid='" . $userRow['id'] . "'")->dataRow();
        if ($tjrRow) {
            $tjr_user_row = $model->field('id,nickname')->where("id='" . $tjrRow['tjr_uid'] . "'")->dataRow();
            $smarty->assign('tjr_user_row', $tjr_user_row);
        }
        $smarty->assign('vo', $model->find($userRow['id']));
        $smarty->setLayout('')->setTpl('mobile/templates/user_add_personal.html')->display();
        die;
    }
}
//企业信息完善
if ($_REQUEST['a'] == 'user_add_company') {
    if (method_is('post')) {
        $data = $_POST;
        $res = $model->add($data);
        $res ? die('suc') : die('err');
    } else {
        //苏州市下的区
Exemplo n.º 15
0
<?php

include_once "../../includes/config.inc.php";
$configModel = new Model_CustomerConfig();
$userModel = new Model_Subtable('sub_user');
//微信通道
if (method_is('post')) {
    $dailyModel = new Model_Subtable('sub_daily');
    $id = $_POST['content'];
    $row = $dailyModel->find($id);
    $content = $row['title'] . $row['content'] . "<a href='" . $row['a_link'] . "'>" . $row['a_title'] . "</a>";
    $configModel->sendCustomerMsg($content, $_POST['fromuser']);
} else {
    $dailyModel = new Model_Subtable('sub_daily');
    $id = $_GET['id'];
    $row = $dailyModel->find($id);
    $content = $row['title'] . $row['content'] . "<a href='" . $row['a_link'] . "'>" . $row['a_title'] . "</a>";
    $smarty->assign('content', $content);
    $smarty->assign('id', $id);
    $listArr = $userModel->field('fromuser')->where("username in ('15631183141','18013085978','13814812590','18351519983')")->dataArr();
    $smarty->assign('list', $listArr);
    $smarty->assign('listcount', count($listArr));
    $smarty->setTpl('msg/templates/send_kf.html')->display();
    die;
}
Exemplo n.º 16
0
    }
}
//申请职位
if ($_REQUEST['a'] == 'sign') {
    //是否禁报名
    $banModel = new Model_Ban('ban');
    $ban_res_say = $banModel->no_rights($userRow, 3);
    if ($ban_res_say) {
        die('err');
    }
    $signModel = new Model_Subtable('sub_sign');
    $data['num']['tid'] = $_GET['tid'];
    $data['num']['uid'] = $userRow['id'];
    $trow = $model->find($data['num']['tid']);
    //报名人数已满
    $manRow = $signModel->field('count(*) as countnum')->where("is_valid!=2 and tid='" . $data['num']['tid'] . "'")->dataRow();
    $manRow['countnum'] >= $trow['num'] ? $out_num = 1 : ($out_num = 0);
    //已报名
    $s = $signModel->where("tid=" . $data['num']['tid'] . " and uid=" . $data['num']['uid'])->dataRow();
    if ($out_num == 1) {
        die('rsym');
    } else {
        if ($s) {
            die('ybm');
        } else {
            $data['num']['fact_money'] = $trow['money'];
            //我的坐标
            $memLocModel = D('member_location');
            $memLocRow = $memLocModel->where("fromuser='******'fromuser'] . "'")->dataRow();
            //发布方若无经纬度,则默认为吴江市政府的坐标,我的坐标默认为0,0
            if (!$trow['latitude']) {
Exemplo n.º 17
0
        $smarty->assign('parr', $pmodel->dataArr());
        if ($_GET['id']) {
            $smarty->assign('vo', $model->find($_GET['id']));
        }
        $smarty->setLayout('')->setTpl('mobile/templates/task_add.html')->display();
        die;
    }
}
if ($_REQUEST['a'] == 'detail') {
    $vo = $model->find($_GET['id']);
    $smarty->assign('vo', $vo);
    //公司名称简介
    $smarty->assign('uRow', $userModel->field('nickname,introduce')->where("id=" . $vo['uid'])->dataRow());
    //已报名人数
    $signModel = new Model_Subtable('sub_sign');
    $signRow = $signModel->field('count(*) as countnum')->where("tid=" . $_GET['id'])->dataRow();
    $smarty->assign('signNum', $signRow['countnum']);
    //评论列表
    $replyModel = new Model_Subtable('sub_reply');
    $replyList = $replyModel->order('id desc')->limit('5')->dataArr();
    $smarty->assign('replyList', $replyList);
    $smarty->setLayout('')->setTpl('mobile/templates/task_detail.html')->display();
    die;
}
//申请职位
if ($_REQUEST['a'] == 'sign') {
    $signModel = new Model_Subtable('sub_sign');
    $data['num']['tid'] = $_GET['tid'];
    $data['num']['uid'] = $userRow['id'];
    $s = $signModel->where("tid=" . $data['num']['tid'] . " and uid=" . $data['num']['uid'])->dataRow();
    if ($s) {
Exemplo n.º 18
0
<?php

include_once "../../includes/config.inc.php";
$model = new Model_Subtable('sub_sign');
$userModel = new Model_Subtable('sub_user');
if ($_REQUEST['a'] == 'send') {
    $name = $_GET['name'];
    $phone = $_GET['phone'];
    $tid = $_GET['tid'];
    //职位信息
    $taskModel = D('sub_task');
    $taskRow = $taskModel->find($tid);
    $post_data = "你好" . $name . "(手机尾号为" . substr($phone, -4) . "),你已成功报名" . $taskRow['title'] . ",请于" . $taskRow['jihe_time'] . "到" . $taskRow['jihe_address'] . "集合!";
    send_phone_msg($phone, $post_data);
    die;
}
$listArr = $model->where("tid='{$_GET['tid']}' and is_valid=1")->dataArr();
foreach ($listArr as $key => $value) {
    $uRow = $userModel->field('id,username,nickname')->where("id='{$value['uid']}'")->dataRow();
    $listArr[$key] = $uRow;
    $listArr[$key]['xuhao'] = $key + 1;
}
$smarty->assign('list', $listArr);
$smarty->assign('tid', $_GET['tid']);
$smarty->setTpl('task/templates/send_phone_msg.html')->display();