Example #1
0
     } else {
         !$_SESSION[$stdCacheName] and kekezu::show_msg($_lang['friendly_notice'], "index.php?do=pubtask&id={$id}", 2, "任务已提交,不可再返回修改!", "warning");
         $objRelease->check_access($step, $id, $arrPubInfo);
         $strExtTypes = kekezu::get_ext_type();
     }
     $arrFileLists = CommonClass::getFileArray('|', $arrPubInfo['file_ids']);
     break;
 case 'step3':
     $intFileCount = 0;
     if ($arrPubInfo['file_ids']) {
         $intFileCount = count(explode('|', $arrPubInfo['file_ids']));
     }
     if (isset($formhash) && kekezu::submitcheck($formhash)) {
         $arrPayitems = array('urgent' => intval($txt_urgent), 'tasktop' => intval($txt_tasktop) && intval($text_tasktop) ? intval($text_tasktop) : 0, 'workhide' => intval($txt_workhide), 'seohide' => intval($txt_seohide));
         $arrPayitems = array_filter($arrPayitems);
         PayitemClass::validPayitemCount($arrPayitems, $arrPubInfo['txt_task_day']);
         $_POST['payitem'] = $arrPayitems;
         $arrPubInfo and $_POST = array_merge($arrPubInfo, $_POST);
         $objRelease->save_task_obj($_POST, $stdCacheName);
         $intTaskId = $objRelease->pub_task();
         $objRelease->save_task_match($intTaskId);
         $objRelease->update_task_info($intTaskId, $stdCacheName);
         kekezu::show_msg($tips, $strUrl . '&step=step4&taskId=' . $intTaskId, NULL, NULL, 'ok');
     } else {
         !$_SESSION[$stdCacheName] and kekezu::show_msg($_lang['friendly_notice'], "index.php?do=pubtask&id={$id}", 2, "任务已提交,不可再返回修改!", "warning");
         $objRelease->check_access($step, $id, $arrPubInfo);
         $strTarComment = htmlspecialchars_decode($arrPubInfo['tar_content']);
         $strCommentLen = strlen($strTarComment);
         if ($strCommentLen > 1000) {
             $strPartComment = kekezu::cutstr($strTarComment, 1000);
         }
Example #2
0
    unset($arrPayitemLists['workhide']);
}
if (isset($formhash) && kekezu::submitcheck($formhash)) {
    $sec_code = kekezu::escape(trim($zfpwd));
    $strMd5Pwd = keke_user_class::get_password($sec_code, $gUserInfo['rand_code']);
    $arrUserInfo = db_factory::get_one(sprintf("select * from %switkey_space where uid=%d and sec_code='%s'", TABLEPRE, intval($gUid), $strMd5Pwd));
    if (!$arrUserInfo) {
        $tip['errors']['zfpwd'] = '密码不正确!';
        kekezu::show_msg($tip, NULL, NULL, NULL, 'error');
    }
    $arrPayitems = array('urgent' => intval($txt_urgent), 'tasktop' => intval($txt_tasktop) && intval($text_tasktop) ? intval($text_tasktop) : 0, 'workhide' => intval($txt_workhide), 'seohide' => intval($txt_seohide));
    if ($arrPayitems['tasktop']) {
        $arrTaskInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_task where task_id=" . intval($objId));
        $task_day = date('Y-m-d', $arrTaskInfo['sub_time']);
        $intTopInfo = PayitemClass::getPayitemRecord($type, $objId, 'tasktop');
        PayitemClass::validPayitemCount($arrPayitems, $task_day, $intTopInfo['end_time']);
    }
    $arrPayitems['goodstop'] = intval($text_goodstop);
    $arrPayitemBuy = array_filter($arrPayitems);
    if (is_array($arrPayitemBuy)) {
        $intOrderId = PayitemClass::creatPayitemOrder($arrPayitemBuy, $type, $objId);
        if ($intOrderId) {
            $res = PayitemClass::payPayitemOrder($intOrderId);
            if ($res === true) {
                kekezu::show_msg('购买成功', 'index.php?do=' . $type . '&id=' . intval($objId), NULL, NULL, 'ok');
            } else {
                kekezu::show_msg($res, 'index.php?do=pay&type=payitem&id=' . $intOrderId, NULL, NULL, 'fail');
            }
        }
    }
}