Example #1
0
    $objMsgM = new Keke_witkey_msg_class();
    if (strtoupper(CHARSET) == 'GBK') {
        $to_username = kekezu::utftogbk($to_username);
    }
    $arrSpaceInfo = kekezu::get_user_info($to_username, 1);
    if (!$arrSpaceInfo) {
        $tips['errors']['to_username'] = '******';
        kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
    }
    if ($arrSpaceInfo['uid'] == $gUid) {
        $tips['errors']['to_username'] = '******';
        kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
    }
    if (strtoupper(CHARSET) == 'GBK') {
        $title = kekezu::utftogbk($title);
        $content = kekezu::utftogbk($content);
    }
    $objMsgM->setUid($gUid);
    $objMsgM->setUsername($username);
    $objMsgM->setTo_uid($arrSpaceInfo['uid']);
    $objMsgM->setTo_username($arrSpaceInfo['username']);
    $objMsgM->setTitle(kekezu::str_filter(kekezu::escape($title)));
    $objMsgM->setContent(kekezu::str_filter(kekezu::escape($content)));
    $objMsgM->setOn_time(time());
    $objMsgM->setType(3);
    $objMsgM->create_keke_witkey_msg();
    unset($objMsgM);
    kekezu::show_msg('已发送', NULL, NULL, NULL, 'ok');
} else {
    $userArrData = keke_user_class::get_user_info($id);
}
 public function public_pubtask()
 {
     $this->submit_check();
     $std_obj = $this->_std_obj;
     $release_info = $std_obj->_release_info;
     $task_obj = $this->_task_obj;
     $user_info = $this->_user_info;
     $task_obj->setModel_id($this->_model_id);
     $task_obj->setIndus_id($release_info['indus_id']);
     $task_obj->setIndus_pid($release_info['indus_pid']);
     $task_obj->setProvince($release_info['province']);
     $task_obj->setCity($release_info['city']);
     $task_obj->setArea($release_info['area']);
     $task_obj->setTask_title(kekezu::str_filter(kekezu::escape($release_info['txt_title'])));
     $task_obj->setTask_desc(kekezu::str_filter(kekezu::escape($release_info['tar_content'])));
     $strFileIds = implode(',', array_filter(explode('|', $release_info['file_ids'])));
     $task_obj->setTask_file($strFileIds);
     $task_obj->setTask_pic($this->filerPic($strFileIds));
     $task_obj->setContact($release_info['txt_mobile']);
     $task_obj->setProfit_rate($this->_task_config['task_rate']);
     $task_obj->setTask_fail_rate($this->_task_config['task_fail_rate']);
     $task_obj->setTask_cash($release_info['txt_task_cash']);
     $task_obj->setReal_cash($release_info['txt_task_cash'] * (100 - $this->_task_config['task_rate']) / 100);
     $task_obj->setStart_time(time());
     $time_arr = getdate();
     $rel_time = $time_arr['hours'] * 3600 + $time_arr['minutes'] * 60 + $time_arr['seconds'];
     if ($this->_model_id == 15) {
         $objRelease = sreward_release_class::get_instance($this->_model_id, $pub_mode);
         $arrConfig = $objRelease->_task_config;
         $end_times = time() + $arrConfig['max_time'] * 24 * 60 * 60;
         $task_obj->setSub_time($end_times);
         $task_obj->setEnd_time($end_times);
     } else {
         $task_obj->setSub_time(strtotime($release_info['txt_task_day']) + $rel_time);
         $task_obj->setEnd_time(strtotime($release_info['txt_task_day']) + $this->_task_config['choose_time'] * 24 * 3600 + $rel_time);
     }
     $task_obj->setUid($this->_uid);
     $task_obj->setUsername($this->_username);
     $task_obj->setTeamwork($release_info['txt_teamwork']);
     $selfIp = keke_base_class::get_ip();
     $ipinfo = json_decode(file_get_contents("http://ip.taobao.com/service/getIpInfo.php?ip=" . $selfIp), true);
     $ipinfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_district where name='" . $ipinfo['data']['region'] . "'");
     $task_obj->setTask_status(0);
     $task_obj->setCash_cost($release_info['txt_task_cash']);
     $task_obj->setKf_uid($this->_kf_uid);
 }
 public function public_pubservice()
 {
     $std_obj = $this->_std_obj;
     $release_info = $std_obj->_release_info;
     $service_obj = $this->_service_obj;
     $txt_service_title = kekezu::str_filter($release_info['txt_title']);
     $service_obj->setTitle($txt_service_title);
     $service_obj->setModel_id($this->_model_id);
     if ($release_info[submit_method] == 'inside') {
         $service_obj->setFile_path($release_info[file_path_2]);
     }
     $tar_content = kekezu::str_filter($release_info['tar_content']);
     $service_obj->setContent(kekezu::escape($tar_content));
     $service_obj->setIndus_id($release_info[indus_id]);
     $service_obj->setIndus_pid($release_info['indus_pid']);
     $service_obj->setCity($release_info['city']);
     $service_obj->setProvince($release_info['province']);
     $service_obj->setArea($release_info['area']);
     $shop_id = db_factory::get_count(sprintf(" select shop_id from %switkey_shop where uid ='%d'", TABLEPRE, $this->_uid));
     $service_obj->setShop_id($shop_id);
     $service_obj->setUid($this->_uid);
     $service_obj->setUsername($this->_username);
     $service_obj->setPrice($release_info['txt_price']);
     $service_obj->setUnite_price($release_info['unite_price']);
     $service_obj->setService_time($release_info['service_time']);
     $service_obj->setUnit_time($release_info['unit_time']);
     $service_obj->setProfit_rate($this->_service_config['service_profit']);
     $service_obj->setConfirm_max($this->_service_config['confirm_max_day']);
     $release_info['pic_patch'] and $service_obj->setPic($release_info['pic_patch']);
     $service_obj->setOn_time(time());
 }
Example #4
0
$objTask->process_can();
$arrProcess_can = $objTask->process_can();
$arrConfig = $objTask->_task_config;
$arrWorkFlag = array(4 => array('id' => 4, 'style' => 'fa-check-circle', 'name' => '中标'), 5 => array('id' => 2, 'style' => 'fa-dot-circle-o', 'name' => '入围'), 6 => array('id' => 3, 'style' => 'fa-check-circle', 'name' => '合格'), 7 => array('id' => 0, 'style' => 'fa-times-circle', 'name' => '淘汰'));
$strExtTypes = kekezu::get_ext_type();
switch ($op) {
    case "taskRecommend":
        $resInt = keke_task_config::task_recommend($taskId);
        if ($resInt) {
            kekezu::show_msg('推荐操作成功', 'index.php?do=task&id=' . $taskId, NULL, NULL, 'ok');
        }
        kekezu::show_msg('推荐操作失败,请勿重复操作', NULL, NULL, NULL, 'fail');
        break;
    case "workComment":
        if ($strTarComment) {
            $strTarComment = kekezu::str_filter(kekezu::escape($strTarComment));
            if (strtoupper(CHARSET) == 'GBK') {
                $strTarComment = kekezu::utftogbk($strTarComment);
            }
            if ($kekezu->_sys_config['ban_content'] && kekezu::k_match(array($kekezu->_sys_config['ban_content']), $strTarComment)) {
                $tips['errors']['strTarComment'] = $_lang['sensitive_word'];
                kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
            }
            $strContent = $arrTaskInfo['username'] . '点评了您在<a href=index.php?do=task&id=' . $taskId . '>' . $arrTaskInfo[task_title] . '</a>中投递的报价,<a href=index.php?do=task&id=' . $taskId . '>快去看看吧</a>';
            MsgClass::SendFeedMsg($wkuid, "您有新的报价点评", $strContent);
            if ($objTask->set_work_comment('work', $intWorkId, $strTarComment)) {
                $date = date('Y-m-d', time());
                $time = date('H:i:s', time());
                kekezu::show_msg(array('d' => $date, 't' => $time), NULL, NULL, NULL, 'ok');
            }
            kekezu::show_msg('提交失败', NULL, NULL, NULL, 'fail');
Example #5
0
                $arrOldImageLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['old_pic']);
                $arrImageLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['pic']);
                $arrOldFileLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['old_file_path']);
                $arrFileLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['file_path']);
                require keke_tpl_class::template('shop/goods/admin/tpl/goods_updateinfo');
                die;
            }
            break;
        case 'off_shelf':
            if ($is_submit == "1") {
                $serviceInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_service where service_id=" . intval($service_id));
                $objMsgM = new Keke_witkey_msg_class();
                $objMsgM->setTo_uid($serviceInfo['uid']);
                $objMsgM->setTo_username($serviceInfo['username']);
                $objMsgM->setTitle("商品下架");
                $objMsgM->setContent(kekezu::str_filter(kekezu::escape("您的商品 " . $serviceInfo[title] . " 被管理员下架,下架原因:{$reason}")));
                $objMsgM->setOn_time(time());
                $objMsgM->setType(2);
                $objMsgM->create_keke_witkey_msg();
                goods_shop_class::set_service_status($service_id, 3);
                kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, '商品下架成功', 'success');
            } else {
                require keke_tpl_class::template('shop/' . $model_info['model_dir'] . '/admin/tpl/goods_reason');
                die;
            }
            break;
    }
}
if (isset($sbt_action)) {
    $key_ids = $ckb;
    if (is_array($key_ids)) {
Example #6
0
     $model_info = db_factory::get_one("select * from " . TABLEPRE . "witkey_model where model_id=4");
     $config = unserialize($model_info[config]);
     $task_info = get_task_info($task_id);
     $work_info = db_factory::get_one("select * from  " . TABLEPRE . "witkey_task_bid  where task_id='" . intval($task_id) . "' and bid_status=4");
     if ($work_info) {
         $objMsgM = new Keke_witkey_msg_class();
         $objMsgM->setTo_uid($work_info['uid']);
         $objMsgM->setTo_username($work_info['username']);
         $objMsgM->setTitle(kekezu::str_filter(kekezu::escape("任务结束")));
         $objMsgM->setContent(kekezu::str_filter(kekezu::escape($content)));
         $objMsgM->setOn_time(time());
         $objMsgM->create_keke_witkey_msg();
         db_factory::execute("update " . TABLEPRE . "witkey_task_bid set bid_status=0 where task_id='" . intval($task_id) . "' and bid_status=4");
     }
     db_factory::execute("update " . TABLEPRE . "witkey_task set task_status=9 where task_id=" . intval($task_id));
     $v_arr = array("模型名称" => $model_info['model_name'], "任务标题" => '<a href="' . $kekezu->_sys_config['website_url'] . '/index.php?do=task&id=' . $task_audit_arr['task_id'] . '">' . $task_audit_arr['task_title'] . '</a>', "理由" => kekezu::str_filter(kekezu::escape($content)));
     keke_msg_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_end_manually', '任务结束通知', $v_arr);
     kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['operate_success'], 'success');
     break;
 case "pass":
     $res = keke_task_config::task_audit_pass($task_id);
     $v_arr = array($_lang['username'] => "{$task_audit_arr['username']}", $_lang['task_link'] => $url, $_lang['start_time'] => $start_time, $_lang['end_time'] => $end_time, $_lang['task_id'] => "#" . $task_id);
     keke_shop_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_auth_success', $_lang['task_auth_success'], $v_arr);
     kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['audit_success'], 'success');
     break;
 case "nopass":
     if ($is_submit == "1") {
         $res = keke_task_config::task_audit_nopass($task_id);
         $v_arr = array($_lang['username'] => "{$task_audit_arr['username']}", $_lang['task_title'] => $url, $_lang['web_name'] => "{$kekezu->_sys_config}['website_name']", "审核原因" => $reason);
         keke_shop_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_auth_fail', $_lang['task_auth_fail'], $v_arr);
         kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['operate_success'], 'success');
Example #7
0
 public static function set_task_comment($comment_arr, $is_reply = false)
 {
     strtolower(CHARSET) == 'gbk' and $comment_arr['content'] = kekezu::utftogbk($comment_arr['content']);
     $comment_arr['content'] = kekezu::escape(kekezu::str_filter($comment_arr['content']));
     $lid = db_factory::inserttable(TABLEPRE . "witkey_comment", $comment_arr, 1);
     $is_reply or db_factory::execute(sprintf("update %switkey_task set leave_num = leave_num+1 where task_id = '%d'", TABLEPRE, $comment_arr['obj_id']));
     return $lid;
 }
Example #8
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$strUrl = 'index.php?do=user&view=message&op=send';
if (isset($formhash) && kekezu::submitcheck($formhash)) {
    $title = kekezu::str_filter(kekezu::escape(strip_tags(htmlspecialchars_decode($title))));
    $content = kekezu::str_filter(kekezu::escape(strip_tags(htmlspecialchars_decode($content))));
    $objMsgM = new Keke_witkey_msg_class();
    if (strtoupper(CHARSET) == 'GBK') {
        $to_username = kekezu::utftogbk($to_username);
    }
    $arrSpaceInfo = kekezu::get_user_info($to_username, 1);
    if (!$arrSpaceInfo) {
        $tips['errors']['to_username'] = '******';
        kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
    }
    if ($arrSpaceInfo['uid'] == $gUid) {
        $tips['errors']['to_username'] = '******';
        kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
    }
    if (strtoupper(CHARSET) == 'GBK') {
        $title = kekezu::utftogbk($title);
        $content = kekezu::utftogbk($content);
    }
    $objMsgM->setUid($gUid);
    $objMsgM->setUsername($username);
    $objMsgM->setTo_uid($arrSpaceInfo['uid']);
    $objMsgM->setTo_username($arrSpaceInfo['username']);
    $objMsgM->setTitle($title);
    $objMsgM->setContent($content);
    $objMsgM->setOn_time(time());