static function show_msg($title = "", $url = "", $time = 3, $content = "", $type = 'info')
 {
     global $_K, $basic_config, $username, $uid, $nav_list, $_lang, $strWebLogo, $task_open, $shop_open, $indus_arr, $arrTopIndus, $indus_goods_arr, $indus_task_arr;
     $type == 'ok' and $type = 'success';
     if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
         !in_array($type, array('success', 'error', 'fail')) and $type = 'error';
         $json = array('status' => $type, 'data' => $title, 'url' => $url);
         strtoupper(CHARSET) == 'GBK' and $json = kekezu::gbktoutf($json);
         echo json_encode($json);
     } else {
         !in_array($type, array('success', 'warning', 'danger', 'info')) and $type = 'info';
         intval($time) or $time = 3;
         $url or $url = 'index.php';
         $strPageTitle = '页面跳转提示';
         require keke_tpl_class::template('msg');
     }
     unset($json, $_K, $basic_config, $username, $uid, $nav_list, $_lang, $strWebLogo, $task_open, $shop_open, $indus_arr, $arrTopIndus, $indus_goods_arr, $indus_task_arr);
     die;
 }
Exemple #2
0
 static function run_backup()
 {
     global $_lang;
     set_time_limit(0);
     ini_set('memory_limit', '1024M');
     $output = array();
     $db_factory = new db_factory();
     $tables = $db_factory->query(" show table status from `" . DBNAME . "`");
     $temp_arr = array();
     foreach ($tables as $v) {
         if (substr($v[Name], 0, strlen(TABLEPRE)) == TABLEPRE) {
             $temp_arr[] = $v;
         }
     }
     $tables = $temp_arr;
     $sqlmsg = '';
     foreach ($tables as $tablesarr) {
         $table_name = $tablesarr['Name'];
         $table_type = $tablesarr['Type'];
         $result = $db_factory->query("show fields from " . $table_name);
         $sqlmsg .= "#" . $_lang['table_name'] . ":<" . $table_name . ">\n";
         $sqlmsg .= "DROP TABLE IF EXISTS `" . $table_name . "`;\n";
         $createtable = $db_factory->query("SHOW CREATE TABLE " . $table_name);
         $sqlmsg .= $createtable[0]['Create Table'] . " ;\n";
         $result = $db_factory->query("show fields from " . $table_name);
         foreach ($result as $fileds) {
             $fields[] = "`" . $fileds['Field'] . "`";
         }
         $field = join(",", $fields);
         $sql_insert = self::querySelect($table_name, $field, $result);
         if ($sql_insert !== false) {
             $sqlmsg .= $sql_insert;
         }
         unset($fields);
         $output[] = str_replace(TABLEPRE . 'witkey_', '**********************', $table_name);
     }
     $sqlmsg .= "\n";
     $path = S_ROOT . './data/backup/backup_' . time() . '_' . DBNAME . ".sql";
     keke_tpl_class::swritefile($path, $sqlmsg);
     kekezu::admin_system_log($_lang['backup_database'] . '' . "backup_" . time() . '_' . DBNAME . ".sql");
     file_exists($path) and kekezu::echojson('', 1, $output) or kekezu::echojson('', 0, $output);
     die;
 }
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(51);
$filename = S_ROOT . './tpl/' . $tplname . '/' . $tname;
$code_content = htmlspecialchars(keke_tpl_class::sreadfile($filename));
if ($sbt_edit) {
    $filename = S_ROOT . $tname;
    if (!is_writable($filename)) {
        kekezu::admin_show_msg($_lang['file'] . $filename . $_lang['can_not_write_please_check'], "index.php?do=tpl&view=tpllist&tplname={$tplname}", 3, '', 'warning');
    }
    keke_tpl_class::swritefile($filename, htmlspecialchars_decode(kekezu::k_stripslashes($txt_code_content)));
    kekezu::admin_system_log($_lang['edit_template'] . $tplname . '/' . $tname);
    kekezu::admin_show_msg($_lang['tpl_edit_success'], "index.php?do=tpl&view=tpllist&tplname={$tplname}", 3, '', 'success');
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_tpl_' . $view);
 static function get_adgroup_by_target($target_id, $target_name, $ad_list_num)
 {
     global $kekezu, $_K;
     $arrTag = db_factory::get_one(sprintf('select * from %s where target_id = %d', TABLEPRE . 'witkey_ad_target', intval($target_id)));
     $datalist = kekezu::get_table_data('*', 'witkey_ad', '1=1 and is_allow=1 and target_id = ' . intval($target_id), 'listorder', '', $ad_list_num, '', 3600);
     require keke_tpl_class::parse_code(htmlspecialchars_decode($arrTag['content']), $arrTag['target_id']);
 }
Exemple #5
0
    $service_obj = new service_shop_class();
    $service_info = db_factory::get_one(sprintf("select * from %switkey_service where service_id='%d'", TABLEPRE, $service_id));
    if ($service_info['pic']) {
        $servicePics = explode(',', $service_info['pic']);
    }
    if ($service_info['file_path']) {
        $serviceFiles = explode(',', $service_info['file_path']);
    }
    $ac_url = "index.php?do=model&model_id=7&view=edit&service_id=" . $service_id;
    $status_arr = $service_obj->get_service_status();
    unset($status_arr[1]);
    $service_info['ext_fields'] = CustomClass::getExtDataList($service_info['service_id'], $service_info['model_id']);
    if ($sbt_edit) {
        if ($ext_fds) {
            CustomClass::editExtData($service_id, $model_id, $ext_fds);
        }
        kekezu::admin_system_log($_lang['to_witkey_service_name_is'] . $service_info[title] . $_lang['in_edit_operate']);
        service_shop_class::set_on_sale_num($pk['service_id'], $fds['service_status']);
        $service_obj = keke_table_class::get_instance('witkey_service');
        $c = $service['content'];
        $fds = kekezu::escape($service);
        $service['content'] = $c;
        isset($service['is_top']) or $service['is_top'] = 0;
        $service_obj->save($service, array("service_id" => $service_id));
        kekezu::admin_show_msg($_lang['service_edit_success'], 'index.php?do=model&model_id=7&view=list', 2, $_lang['service_edit_success'], 'success');
    }
} else {
    require S_ROOT . '/shop/' . $model_info['model_dir'] . '/admin/shop_misc.php';
}
require keke_tpl_class::template('shop/' . $model_info['model_dir'] . '/admin/tpl/service_edit_' . $op);
Exemple #6
0
            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);
            }
        }
        break;
    case 'step4':
        $taskId = intval($taskId);
        if (0 === $taskId) {
            kekezu::show_msg('无权访问', $strUrl, 3, NULL, 'warning');
        }
        $arrTaskInfo = $objRelease->check_access($step, $id, $arrPubInfo, $taskId);
        $arrPayInfo = $objRelease->checkWhetherToPay($taskId);
        $boolValue = $arrPayInfo['balance_pay'];
        $floatPayCash = $arrPayInfo['total_cash'];
        break;
}
require keke_tpl_class::template('pubtask');
die;
Exemple #7
0
 }
 if (mysql_errno()) {
     $error_arr['dbname'] = 'database_errno_1044' . mysql_error();
     include INSTALL_ROOT . 'tpl' . DIRECTORY_SEPARATOR . 'sql.tpl.php';
     break;
 }
 mysql_close($link);
 $db = new db_tool();
 $db->connect($dbhost, $dbuser, $dbpw, $dbname, DBCHARSET);
 $temp_arr = array("dbhost" => $dbhost, "dbname" => $dbname, "dbuser" => $dbuser, "dbpass" => $dbpw, "tablepre" => $tablepre, 'cookie_path' => $c_path);
 $config_content = keke_tpl_class::sreadfile($config_path);
 foreach ($temp_arr as $key => $value) {
     $key = strtoupper($key);
     $config_content = preg_replace("/define\\s?+\\(\\s?+'({$key})'\\s?+,\\s?+.*'\\s?+\\);/i", "define ( '{$key}', '{$value}');", $config_content);
 }
 keke_tpl_class::swritefile($config_path, $config_content);
 // 写配置文件
 if ($data_type == 'b') {
     // 带演示版本
     $sqlfile = $sqldemofile;
 }
 $sql = file_get_contents($sqlfile);
 $sql = str_replace("\r\n", "\n", $sql);
 include INSTALL_ROOT . 'tpl' . DIRECTORY_SEPARATOR . $step . '.tpl.php';
 runquery($sql, $tablepre, $db);
 // ob
 for ($i = 1; $i <= 3; $i++) {
     $sql_district = file_get_contents(INSTALL_ROOT . 'data/keke_witkey_district_' . $i . '.sql');
     $sql_district = str_replace("\r\n", "\n", $sql_district);
     runquery($sql_district, $tablepre, $db);
     // ob
Exemple #8
0
<?php

defined('IN_KEKE') or exit('Access Denied');
require keke_tpl_class::template('close');
die;
Exemple #9
0
            $satus_arr = tender_task_class::get_work_status();
        }
        break;
    case 'comm':
        if ($ac && $comm_id) {
            $id = intval($comm_id);
            switch ($ac) {
                case 'del':
                    $sql = ' delete from %switkey_comment where comment_id=%d';
                    $type == 1 and $sql .= ' or p_id=%d';
                    $res = db_factory::execute(sprintf($sql, TABLEPRE, $id, $id));
                    $res and kekezu::echojson('', 1) or kekezu::echojson('', 0);
                    die;
                    break;
                case 'load':
                    $list = db_factory::query(sprintf(' select * from %switkey_comment where p_id=%d', TABLEPRE, $id));
                    require keke_tpl_class::template('task/' . $model_info['model_dir'] . '/admin/tpl/task_edit_ext');
                    die;
                    break;
            }
        } else {
            $o = keke_table_class::get_instance('witkey_comment');
            $tmp = $o->get_grid('obj_id=' . $task_id . ' and p_id=0', $url, $page, $limit, ' order by on_time desc ', 1, 'ajax_dom');
            $list = $tmp['data'];
            $pages = $tmp['pages'];
        }
        break;
    case 'mark':
        $list = db_factory::query(sprintf(" select * from %switkey_mark where origin_id=%d and `mark_status`!=0 and model_code='%s'", TABLEPRE, $task_id, $model_info['model_code']));
        break;
}
defined('ADMIN_KEKE') or exit('Access Denied');
$intTaskId = intval($task_id);
$intModelId = intval($model_id);
$arrTaskInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_task where task_id=" . $intTaskId);
$arrWorkInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_task_work where task_id=" . $intTaskId . " and work_status=4");
if ($arrTaskInfo['task_status'] != 13) {
    kekezu::admin_show_msg($_lang['param_error'], 'index.php?do=model&model_id=' . $intModelId . '&view=list', 3, '', 'warning');
}
$floatCash = $arrTaskInfo['task_cash'] * (1 - $arrTaskInfo['task_fail_rate'] / 100);
$arrGinfo = keke_user_class::get_user_info($arrTaskInfo['uid']);
$arrWinfo = keke_user_class::get_user_info($arrWorkInfo['uid']);
if ($intSbtEdit == 1) {
    $floaTotalCash = floatval($floatCash);
    $floatGzGet = floatval(keke_curren_class::convert($op_result['gz_get'], 0, true));
    $floatWkGet = floatval(keke_curren_class::convert($op_result['wk_get'], 0, true));
    if ($floaTotalCash != $floatGzGet + $floatWkGet) {
        kekezu::admin_show_msg($_lang['wain_you_give_cash_error_notice'], "index.php?do=model&model_id={$model_id}&view=list", "3", "", "warning");
    } else {
        $res = keke_finance_class::cash_in($arrGinfo['uid'], $floatGzGet, 'task_fail');
        $res .= keke_finance_class::cash_in($arrWinfo['uid'], $floatWkGet, 'task_fail');
        if ($res) {
            db_factory::execute("update " . TABLEPRE . "witkey_task set task_status=9 where task_id=" . $intTaskId);
            kekezu::admin_show_msg('处理成功', "index.php?do=model&model_id={$model_id}&view=list", "3", "", "success");
        } else {
            kekezu::admin_show_msg('处理失败', "index.php?do=model&model_id={$model_id}&view=list", "3", "", "warning");
        }
    }
}
require keke_tpl_class::template('task/' . $model_info['model_dir'] . '/admin/tpl/task_' . $view);
Exemple #11
0
     }
     break;
 case 'comm':
     if ($ac && $comm_id) {
         $id = intval($comm_id);
         switch ($ac) {
             case 'del':
                 $sql = ' delete from %switkey_comment where comment_id=%d';
                 $type == 1 and $sql .= ' or p_id=%d';
                 $res = db_factory::execute(sprintf($sql, TABLEPRE, $id, $id));
                 $res and kekezu::echojson('', 1) or kekezu::echojson('', 0);
                 die;
                 break;
             case 'load':
                 $list = db_factory::query(sprintf(' select * from %switkey_comment where p_id=%d', TABLEPRE, $id));
                 require keke_tpl_class::template('shop/' . $model_info['model_dir'] . '/admin/tpl/goods_edit_ext');
                 die;
                 break;
         }
     } else {
         $o = keke_table_class::get_instance('witkey_comment');
         $tmp = $o->get_grid('obj_id=' . $service_id . ' and p_id=0', $url, $page, $limit, ' order by on_time desc ', 1, 'ajax_dom');
         $list = $tmp['data'];
         $pages = $tmp['pages'];
     }
     break;
 case 'mark':
     $o = keke_table_class::get_instance('witkey_mark');
     $tmp = $o->get_grid("origin_id={$service_id} and `mark_status`!=0 and model_code='{$model_info['model_code']}'", $url, $page, $limit, ' order by mark_time desc ', 1, 'ajax_dom');
     $list = $tmp['data'];
     $pages = $tmp['pages'];
Exemple #12
0
                $tar_content = kekezu::utftogbk($tar_content);
            }
            $tar_content = strip_tags(htmlspecialchars_decode($tar_content));
            if ($kekezu->_sys_config['ban_content'] && kekezu::k_match(array($kekezu->_sys_config['ban_content']), $tar_content)) {
                $tips['errors']['tar_content'] = $_lang['sensitive_word'];
                kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
            }
            $resText = $objTask->set_task_reqedit(kekezu::escape($tar_content));
            if ($resText === true) {
                kekezu::show_msg('操作成功', 'index.php?do=task&id=' . $taskId, 3, NULL, 'ok');
            } else {
                kekezu::show_msg($resText, 'index.php?do=task&id=' . $taskId, 3, NULL, 'fail');
            }
        } else {
            $strExtDesc = $arrTaskInfo['ext_desc'];
            require keke_tpl_class::template('task/reqedit');
            die;
        }
        die;
        break;
    case 'mark':
        $strModelCode = $objTask->_model_code;
        $strJumpUrl = 'index.php?do=task&id=' . $taskId;
        require S_ROOT . 'control/mark.php';
        die;
        break;
    default:
        jumpUrl($taskId);
        break;
}
function jumpUrl($taskId = 0)
Exemple #13
0
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');
            }
        }
    }
}
require keke_tpl_class::template("tpl/default/ajax/payitem");
die;
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$report_info = keke_report_class::get_report_info($report_id);
$report_info or kekezu::admin_show_msg($_lang['parameters_error_not_exist'] . $action_arr[$type][1] . $_lang['record'], "index.php?do=trans&view={$type}", 3, '', 'warning');
$user_info = kekezu::get_user_info($report_info['uid']);
$to_userinfo = kekezu::get_user_info($report_info['to_uid']);
$obj_info = keke_report_class::obj_info_init($report_info, $user_info);
$ac == 'download' and keke_file_class::file_down($filename, $filepath);
$url = "index.php?do={$do}&view={$type}";
if ($type == 'complaint') {
    if ($sbt_op) {
        $op_result[action] == 'pass' and $report_status = 4 or $report_status = 3;
        $url .= "&report_status={$report_status}";
        $res = keke_report_class::sub_process_ts($report_info, $user_info, $to_userinfo, $op_result);
        $res and kekezu::admin_show_msg($_lang['operate_notice'], $url, "2", $_lang['process_success'], 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, "2", $_lang['operate_over'], 'warning');
    } else {
        $report_info = keke_report_class::get_report_info($report_id);
    }
    require keke_tpl_class::template(ADMIN_DIRECTORY . '/tpl/admin_trans_process');
} else {
    if (empty($obj_info) || empty($obj_info['model_id'])) {
        kekezu::admin_show_msg($_lang['friendly_notice'], $url, 3, $_lang['deal_object_del'], 'warning');
    }
    $report_info = keke_report_class::get_report_info($report_id);
    $model_info = $kekezu->_model_list[$obj_info['model_id']];
    $path = S_ROOT . $model_info['model_type'] . "/" . $model_info['model_dir'] . "/admin/admin_route.php";
    require $path;
}
Exemple #15
0
            $objType = 'work';
        } else {
            $objType = 'task';
        }
        $report_reason = keke_report_class::getRightsType($objType);
    } else {
        $report_reason = keke_report_class::getReportType($objType);
    }
    if (isset($formhash) && kekezu::submitcheck($formhash)) {
        $resText = keke_order_class::set_report($objId, $toUid, $type, $filepath, $tarContent, $sltReason);
        if ($resText === true) {
            kekezu::show_msg('感谢您的' . $transname . ',管理员会尽快受理,请耐心等待处理结果。', $strUrl . "&orderId=" . $orderId, 3, NULL, 'ok');
        } else {
            kekezu::show_msg($resText, null, null, NULL, 'fail');
        }
    } else {
        $strUrl = $reportUrl;
        require keke_tpl_class::template("tpl/default/ajax/report");
    }
    exit(0);
}
if ($action === 'showKf') {
    $kf_info = kekezu::get_rand_kf();
    require keke_tpl_class::template('shop/goods/tpl/default/order/kf_info');
    die;
    exit(0);
}
require S_ROOT . "/shop/" . $arrModelInfo['model_dir'] . "/control/" . $reqPage . "_order.php";
require keke_tpl_class::template("shop/" . $arrModelInfo['model_code'] . "/tpl/" . $_K['template'] . "/order/" . $reqPage . "_index");
die;
die;
Exemple #16
0
 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');
     } else {
         $strUsername = sreward_task_class::getUsername($_GET['uid']);
         $strTittle = sreward_task_class::getTitle($task_id);
         require keke_tpl_class::template('task/sreward/admin/tpl/admin_user_check');
         die;
     }
     break;
 case "freeze":
     $res = keke_task_config::task_freeze($task_id);
     kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['freeze_task_success'], 'success');
     break;
 case "unfreeze":
     $res = keke_task_config::task_unfreeze($task_id);
     kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['unfreeze_task_success'], 'success');
     break;
 case "recommend":
     $res = keke_task_config::task_recommend($task_id);
     kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['task_recommend_success'], 'success');
     break;
Exemple #17
0
        } else {
            $objType = 'task';
        }
        $report_reason = keke_report_class::getRightsType($objType);
    } else {
        $report_reason = keke_report_class::getReportType($objType);
    }
    if (isset($formhash) && kekezu::submitcheck($formhash)) {
        $resText = keke_order_class::set_report($objId, $toUid, $type, $filepath, $tarContent, $sltReason);
        if ($resText === true) {
            kekezu::show_msg('感谢您的' . $transname . ',管理员会尽快受理,请耐心等待处理结果。', $strUrl . "&orderId=" . $orderId, 3, NULL, 'ok');
        } else {
            kekezu::show_msg($resText, null, null, NULL, 'fail');
        }
    } else {
        $strUrl = $reportUrl;
        require keke_tpl_class::template("tpl/default/ajax/report");
    }
    exit(0);
}
if ($action === 'showKf') {
    $kf_info = kekezu::get_rand_kf();
    require keke_tpl_class::template('shop/goods/tpl/default/order/kf_info');
    die;
    exit(0);
}
$serviceSql = 'select service_id,model_id,title,price from ' . TABLEPRE . 'witkey_service where uid = ' . $id . ' and service_status = 2 and model_id = 7 order by service_id desc limit 0,5';
$arrServiceLists = db_factory::query($serviceSql);
require $do . "/" . $reqPage . "_order.php";
require $kekezu->_tpl_obj->template($do . '/' . $reqPage . "_index");
die;
Exemple #18
0
            case "accept":
                $resText = $objAgreement->accept_confirm($strUrl);
                if (true === $resText) {
                    kekezu::show_msg('源文件确认完成,任务交付成功', $strUrl, 3, NULL, 'ok');
                } else {
                    kekezu::show_msg($resText, null, 3, NULL, 'fail');
                }
                break;
        }
        break;
    case "step4":
        $modelCode = $objAgreement->_model_code;
        $objId = $arrAgreeInfo['work_id'];
        if ($arrAgreeInfo['seller_uid'] == $gUid) {
            $toUid = $arrAgreeInfo['buyer_uid'];
        } else {
            $toUid = $arrAgreeInfo['seller_uid'];
        }
        $arrMark = keke_user_mark_class::get_mark_info(array('model_code' => $modelCode, 'obj_id' => $objId, 'by_uid' => $gUid, 'uid' => $toUid));
        $markInfo = $arrMark['mark_info']['0'];
        $markInfo or kekezu::show_msg('操作提示', $strUrl, "3", '互评系统繁忙,请稍后再试', "error");
        $aidList = keke_user_mark_class::get_mark_aid($intUserType);
        $aidInfo = keke_user_mark_class::get_user_aid($markInfo['by_uid'], $markInfo['mark_type'], $markInfo['mark_status'], 2, $markInfo['model_code'], $objId);
        $strJumpUrl = "index.php?do=task&id=" . $arrAgreeInfo['task_id'] . "&view=mark#detail";
        if ($markInfo['mark_status'] == '1') {
            kekezu::show_msg('操作提示', $strJumpUrl, 3, '评价完成,任务已结束', 'success');
        }
        break;
}
require keke_tpl_class::template("task/" . $arrModelInfo['model_dir'] . "/tpl/" . $_K['template'] . "/agreement/index");
die;
Exemple #19
0
            kekezu::show_msg($tips, $strUrl . '&step=step3&serviceId=' . $intSid, NULL, NULL, 'ok');
        } else {
            !$_SESSION[$stdCacheName] and kekezu::show_msg($_lang['friendly_notice'], "index.php?do=pubgoods&id={$id}", 2, "该商品已提交,不可再返回修改!", "warning");
            $objRelease->check_access($step, $id, $arrPubInfo);
            $strTarComment = kekezu::cutstr(htmlspecialchars_decode($arrPubInfo['tar_content']), 1000);
            $strCommentLen = strlen($strTarComment);
            if ($strCommentLen > 500) {
                $strPartComment = kekezu::cutstr($strTarComment, 500);
            }
        }
        break;
    case 'step3':
        $serviceId = intval($serviceId);
        if (0 === $serviceId) {
            kekezu::show_msg('无权访问', $strUrl, 3, NULL, 'warning');
        }
        $objRelease->del_service_obj($stdCacheName);
        $objRelease->check_access($step, $id, $arrPubInfo, $serviceId);
        break;
    case 'step4':
        $serviceId = intval($serviceId);
        if (0 === $serviceId) {
            kekezu::show_msg('无权访问', $strUrl, 3, NULL, 'warning');
        }
        $arrPayInfo = $objRelease->checkWhetherToPay($serviceId, 'goods');
        $boolValue = $arrPayInfo['balance_pay'];
        $floatPayCash = $arrPayInfo['total_cash'];
        break;
}
require keke_tpl_class::template('pubgoods');
die;
Exemple #20
0
    kekezu::admin_system_log($log_msg);
    switch ($op) {
        case 'config':
            !empty($fds['indus_bid']) and $fds['indus_bid'] = implode(",", $fds['indus_bid']) or $fds['indus_bid'] = '';
            $fds['on_time'] = time();
            $fds = kekezu::escape($fds);
            $res = $model_obj->save($fds, $pk);
            kekezu::admin_show_msg($_lang['goods_basic_config_update_success'], $url, 3, '', 'success');
            break;
        case 'control':
            if ($filepath) {
                copy("../" . $filepath, "../tpl/default/img/shop/shop_default_big.png");
            }
            is_array($cont) and $res = keke_task_config::set_task_ext_config($model_id, $cont);
            kekezu::admin_show_msg($_lang['goods_flow_config_update_success'], $url, 3, '', 'success');
            break;
        case 'rule':
            if ($fds['allow_times']) {
                $perm_item_obj = new Keke_witkey_priv_item_class();
                foreach ($fds['allow_times'] as $k => $v) {
                    $perm_item_obj->setWhere(" op_id = '{$k}'");
                    $perm_item_obj->setAllow_times(intval($v));
                    $perm_item_obj->edit_keke_witkey_priv_item();
                }
                kekezu::admin_show_msg($_lang['goods_permissions_config_update_success'], "index.php?do=model&model_id={$model_id}&view=config&op=rule", 3, '', 'success');
            }
            break;
    }
}
require keke_tpl_class::template('shop/' . $model_info['model_dir'] . '/admin/tpl/goods_' . $view);
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(140);
if (isset($submit)) {
    $basic_obj = new Keke_witkey_basic_config_class();
    foreach ($conf as $k => $v) {
        $basic_obj->setWhere("k = '{$k}'");
        $basic_obj->setV($v);
        $res .= $basic_obj->edit_keke_witkey_basic_config();
    }
    !empty($api) and $attent_api = $api or $attent_api = array();
    $basic_obj->setWhere("k = 'attent_api_open'");
    $basic_obj->setV(serialize($attent_api));
    $basic_obj->edit_keke_witkey_basic_config();
    kekezu::admin_system_log($_lang['weibo_config_view']);
    kekezu::admin_show_msg($_lang['weibo_view_config_success'], "index.php?do=msg&view=attention", 3, '', 'success');
} else {
    $attent_api = db_factory::get_count(sprintf(" select v from %switkey_basic_config where type='attent_api'", TABLEPRE));
    $attent_api = unserialize($attent_api);
    $attent_list = kekezu::get_table_data("k,v,desc", "witkey_basic_config", "type='attention'", 'listorder asc ', "", "", "k");
}
require keke_tpl_class::template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
        $payitem = db_factory::get_one($sql . sprintf(' from %switkey_finance where fina_type="out"
						 and fina_action="payitem" ', TABLEPRE) . $f_sql, 1, 3600);
        break;
    case 'profit':
        $sql = sprintf(' select sum(site_profit) c from %switkey_finance where site_profit>0 ', TABLEPRE);
        $task = db_factory::get_count($sql . ' and obj_type="task" ' . $f_sql, 0, 'c', 3600);
        $service = db_factory::get_count($sql . ' and obj_type="service" ' . $f_sql, 0, 'c', 3600);
        $payitem = db_factory::get_count($sql . ' and obj_type="payitem" ' . $f_sql, 0, 'c', 3600);
        $auth = db_factory::get_count($sql . ' and INSTR(obj_type,"_auth")>0 ' . $f_sql, 0, 'c', 3600);
        $withdraw = db_factory::get_count(sprintf(' select sum(fee) c from %switkey_withdraw
					where withdraw_status=2 ', TABLEPRE) . $w_sql, 0, 'c', 3600);
        $p_all = floatval($task + $service + $payitem + $auth + $withdraw);
        break;
    case 'withdraw':
        $list = db_factory::query(sprintf(' select sum(withdraw_cash) cash,sum(fee) fee,
					count(withdraw_id) count,pay_type from %switkey_withdraw where 1 = 1 ', TABLEPRE) . $w_sql . ' group by pay_type', 1, 3600);
        $list && ($list = kekezu::get_arr_by_key($list, 'pay_type'));
        $bank_arr = keke_glob_class::get_bank();
        $pay_online = kekezu::get_payment_config('', 'online');
        break;
    case 'charge':
        $sql = ' select sum(fina_cash) cash,sum(fina_credit) credit,count(fina_id) count ';
        $r_sql = sprintf(' ,obj_type from %switkey_finance
						 where INSTR(obj_type,"_charge")>0  and fina_type = "in"', TABLEPRE);
        $charge = db_factory::query($sql . $r_sql . $f_sql . ' group by obj_type ', 1, 3600);
        $charge = kekezu::get_arr_by_key($charge, 'obj_type');
        $fina_type = keke_glob_class::get_fina_charge_type();
        break;
}
require keke_tpl_class::template(ADMIN_DIRECTORY . '/tpl/admin_finance_revenue');
Exemple #23
0
    $intAuthStatus = keke_auth_fac_class::auth_check('enterprise', $gUid);
    if ($intUserRole && !$intAuthStatus) {
        $intAuthStatus = 1;
    }
} else {
    $strCodeWh = " auth_code!='enterprise' ";
    $intAuthStatus = keke_auth_fac_class::auth_check('realname', $gUid);
    if ($intUserRole && !$intAuthStatus) {
        $intAuthStatus = 1;
    }
}
$arrAuthItems = keke_auth_base_class::get_auth_item(null, null, 1, $strCodeWh);
$arrAllAuthItems = keke_auth_base_class::get_auth_item(null, null, 1, null);
$keys = array_keys($arrAuthItems);
$arrAllowAuth = array('realname', 'enterprise', 'bank', 'mobile', 'email', 'alipayjs');
if ($code && in_array($code, $arrAllowAuth)) {
    $code or $code = $keys['0'];
    $code or kekezu::show_msg($_lang['param_error'], "index.php?do=auth", 3, '', 'warning');
    $auth_class = "keke_auth_" . $code . "_class";
    $objAuth = new $auth_class($code);
    $auth_item = $arrAllAuthItems[$code];
    $auth_dir = $auth_item['auth_dir'];
    $arrAuthInfo = $objAuth->get_user_auth_info($gUid, 0, $intBankAid);
    require S_ROOT . "/auth/{$code}/control/index.php";
    require keke_tpl_class::template('auth/' . $code . '/tpl/' . $_K['template'] . '/' . $step);
    die;
} else {
    $real_pass = keke_auth_fac_class::auth_check('enterprise', $gUid) or $real_pass = keke_auth_fac_class::auth_check("realname", $gUid);
    $arrHasAuthItem = keke_auth_fac_class::get_auth($gUserInfo);
    $arrUserAuthInfo = $arrHasAuthItem['info'];
}
Exemple #24
0
    if ($arrOrderInfo['order_status'] == 'ok') {
        $boolIsHosting = true;
    } else {
        $boolIsHosting = false;
    }
    $arrSimpleTasks = db_factory::query("select * from " . TABLEPRE . "witkey_task where indus_pid=" . $arrTaskInfo['indus_pid'] . " and task_id!=" . $arrTaskInfo['task_id'] . " and task_status not in(0,1,10) order by start_time desc limit 10");
    $arrRecommShops = db_factory::query(sprintf("select a.username,a.uid,b.indus_id,b.indus_pid,a.shop_name,if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) as good_rate from %switkey_shop a " . " left join %switkey_space b on a.uid=b.uid  where b.recommend=1 and b.status=1 and IFNULL(a.is_close,0)=0 and shop_status=1 order by if(b.indus_pid=%d ,1,0) desc, good_rate desc limit 0,5", TABLEPRE, TABLEPRE, $arrTaskInfo['indus_pid']), 1, $intIndexCacheTime);
    if ($view == 'mark') {
        $s === null and $s = 100 or $s = intval($s);
        $arrSearchStatus = array();
        $arrSearchStatus['100'] = '所有的';
        $arrSearchStatus['1'] = '好评';
        $arrSearchStatus['2'] = '中评';
        $arrSearchStatus['3'] = '差评';
        $arrSearchStatus['101'] = '来自雇主';
        $arrSearchStatus['102'] = '来自威客';
    }
    if ($arrModelInfo['open_custom'] == '1') {
        $c_open = 1;
        $arrShowCustoms = CustomClass::getExtData($arrTaskInfo['task_id'], $arrModelInfo['model_id']);
        foreach ($arrShowCustoms as $k => $v) {
            if ($v['extdata']) {
                $arrShowCustoms[$k]['data'] = unserialize($v['extdata']);
            }
        }
    }
    require S_ROOT . "/task/" . $arrModelInfo['model_dir'] . "/control/index.php";
    $_SESSION['spread'] = 'index.php?do=task&id=' . intval($id);
    require keke_tpl_class::template("task/" . $arrModelInfo['model_code'] . "/tpl/" . $_K['template'] . "/index");
    die;
}
Exemple #25
0
<?php

if (isset($formhash) && kekezu::submitcheck($formhash)) {
    if (strtoupper(CHARSET) == 'GBK') {
        $tar_content = kekezu::utftogbk($tar_content);
    }
    $tar_content = kekezu::escape($tar_content);
    $aid = implode(",", array_keys($star));
    $aid_star = implode(",", array_values($star));
    $res = keke_user_mark_class::exec_mark($markId, $tar_content, $mark_status, $aid, $aid_star);
    if ($markType == 'gz') {
        $strJumpUrl = 'index.php?do=user&view=gz&op=mark';
    } elseif ($markType == 'wk') {
        $strJumpUrl = 'index.php?do=user&view=wk&op=mark';
    }
    if ($res === true) {
        kekezu::show_msg('操作成功', $strJumpUrl, 3, NULL, 'ok');
    } else {
        kekezu::show_msg($res, $strJumpUrl, 3, NULL, 'fail');
    }
} else {
    $arrMark = keke_user_mark_class::get_mark_info(array('model_code' => $code, 'obj_id' => $objId, 'by_uid' => $uid, 'uid' => $to_uid));
    $markInfo = $arrMark['mark_info']['0'];
    $markInfo or kekezu::show_msg($_lang['operate_notice'], "", "", $_lang['mark_sya_busy_try_later'], "error");
    $aidList = keke_user_mark_class::get_mark_aid($roleType);
    $aidInfo = keke_user_mark_class::get_user_aid($markInfo['by_uid'], $markInfo['mark_type'], $markInfo['mark_status'], 2, $markInfo['model_code'], $objId);
}
require keke_tpl_class::template("tpl/default/ajax/mark");
die;
Exemple #26
0
     $arrMarkInfo = $arrMark['mark_info'];
     require keke_tpl_class::template('task/' . $arrModelInfo['model_code'] . '/tpl/default/gz_step6');
     die;
     break;
 case "wk":
     //$arrBidInfo = $objTask->get_task_info ();
     $arrMarkCount = keke_shop_class::get_mark_count($model_code, $sid);
     $p['url'] = $strUrl . "&view=mark&intPagesize=" . $p['page_size'] . "&intPage=" . $p['page'];
     $p['anchor'] = '#pageT';
     $w['model_code'] = $arrModelInfo['model_code'];
     $w['origin_id'] = $intId;
     $w['mark_status'] = $st;
     $w['mark_type'] = $ut;
     $arrMark = keke_user_mark_class::get_mark_info($w, $p, ' mark_id desc ', 'mark_status>0');
     $arrMarkInfo = $arrMark['mark_info'];
     require keke_tpl_class::template('task/' . $arrModelInfo['model_code'] . '/tpl/default/wk_step6');
     die;
     break;
     //2015-08-02   添加
 //2015-08-02   添加
 case 'gz_step6':
     $objId = $taskId;
     $toUid = $taskId;
     $arrMark = keke_user_mark_class::get_mark_info(array('model_code' => 'service', 'obj_id' => $objId, 'by_uid' => $gUid, 'uid' => $toUid));
     $markInfo = $arrMark['mark_info']['0'];
     $aidList = keke_user_mark_class::get_mark_aid(2);
     $aidInfo = keke_user_mark_class::get_user_aid($markInfo['by_uid'], $markInfo['mark_type'], $markInfo['mark_status'], 2, $markInfo['model_code'], $objId);
     $strJumpUrl = "index.php?do=task&id={$taskId}";
     if ($markInfo['mark_status'] == '1') {
         header('location:' . $strJumpUrl);
     }
$("#" + frm).submit();
});
} else {
d.alert("<?php 
echo $_lang['has_none_being_choose'];
?>
");
}
return false;
}
</script>
<!-- <?php 
if (KEKE_DEBUG) {
    ?>
<div
style="background-color: red; color: #fff; width: 400px; text-align: center;">
querys:
{eval echo db_factory::create()->get_query_num()}
&nbsp; times:
{eval echo kekezu::execute_time()}
</div>

<?php 
}
?>
 -->
</body>
</html>
<?php 
keke_tpl_class::ob_out();
Exemple #28
0
    $charge_reason = kekezu::filter_input($charge_reason);
    $sql2 = "update " . TABLEPRE . "witkey_finance set  fina_mem='{$charge_reason}' where fina_id = last_insert_id()";
    db_factory::execute($sql2);
    if ($res) {
        if ($cash_type == 1) {
            $v_arr = array('用户名' => $info[username], '金额动作' => '充值', '金额' => $cash);
            keke_shop_class::notify_user($info[uid], $info[username], "admin_charge", '后台手动充值通知', $v_arr, 2);
            kekezu::admin_show_msg('手动充值现金成功', $url, 3, '', 'success');
        } else {
            $v_arr = array('用户名' => $info[username], '金额动作' => '扣除', '金额' => $cash);
            keke_shop_class::notify_user($info[uid], $info[username], "admin_charge", '后台手动充值通知', $v_arr, 2);
            kekezu::admin_show_msg('手动扣除现金成功', $url, 3, '', 'success');
        }
    } else {
        kekezu::admin_show_msg('手动充值或扣除失败', "index.php?do={$do}&view={$view}", 3, '', 'warning');
    }
}
function get_info($uid, $t)
{
    $sql = " select balance,credit,uid,username from %switkey_space where ";
    if ($t == '1') {
        $sql1 = sprintf($sql . " uid=%d ", TABLEPRE, $uid, $uid);
        $info = db_factory::get_one($sql1);
    } else {
        $sql = sprintf($sql . " username='******'", TABLEPRE, $uid);
        $info = db_factory::get_one($sql);
    }
    return $info;
}
require keke_tpl_class::template(ADMIN_DIRECTORY . '/tpl/admin_user_charge');
Exemple #29
0
    switch ($ac) {
        case "pass":
            kekezu::admin_system_log($obj . $_lang['enterprise_auth_pass']);
            $auth_obj->review_auth($enterprise_auth_id, 'pass', $url);
            break;
        case "not_pass":
            if ($is_submit == "1") {
                $v_arr = array($_lang['username'] => $name, '网站名称' => $kekezu->_sys_config['website_name'], "审核原因" => $reason);
                keke_shop_class::notify_user($_GET['uid'], $name, 'auth_auth_fail', "企业认证失败", $v_arr, 2);
                kekezu::admin_system_log($obj . $_lang['enterprise_auth_nopass']);
                $auth_obj->review_auth($enterprise_auth_id, 'not_pass', $url);
            } else {
                $uid = $_GET['uid'];
                $strSql = "select * from " . TABLEPRE . "witkey_space where uid=" . $uid;
                $arrResult = db_factory::get_one($strSql);
                require keke_tpl_class::template('auth/enterprise/admin/tpl/auth_tp');
                die;
            }
            break;
        case 'del':
            kekezu::admin_system_log($obj . $_lang['enterprise_auth_delete']);
            $auth_obj->del_auth($enterprise_auth_id, $url);
            break;
    }
} elseif (isset($sbt_action)) {
    $keyids = $ckb;
    switch ($sbt_action) {
        case $_lang['mulit_delete']:
            kekezu::admin_system_log($_lang['mulit_delete_enterprise_auth']);
            $auth_obj->del_auth($keyids, $url);
            break;
Exemple #30
0
 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['examine_successfully'], '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');
     } else {
         $strUsername = sreward_task_class::getUsername($_GET['uid']);
         $strTittle = sreward_task_class::getTitle($task_id);
         require keke_tpl_class::template('task/' . $model_info['model_dir'] . '/admin/tpl/admin_user_check');
         die;
     }
     break;
 case "freeze":
     $res = keke_task_config::task_freeze($task_id);
     kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['task_frooze_successfully'], 'success');
     break;
 case "unfreeze":
     $res = keke_task_config::task_unfreeze($task_id);
     kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['task_unfrooze_successfully'], 'success');
     break;
 case "recommend":
     $res = keke_task_config::task_recommend($task_id);
     kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['task_recommend_successfully'], 'success');
     break;