コード例 #1
0
ファイル: keke_backup_class.php プロジェクト: pengfeiaaa/web
 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;
 }
コード例 #2
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(73);
$msg_obj = new Keke_witkey_msg_tpl_class();
$config_msg_arr = $kekezu->get_table_data("*", "witkey_msg_config", " 1 = 1 ", "config_id desc ", '', '', 'config_id');
$now_msg_arr = db_factory::get_one(" select * from " . TABLEPRE . "witkey_msg_config where k='{$slt_tpl_code}'");
$now_v = unserialize($now_msg_arr['v']);
if (isset($tpl_code)) {
    $msg_tpl = db_factory::query(" select * from " . TABLEPRE . "witkey_msg_tpl where tpl_code='{$tpl_code}'");
    if ($msg_tpl) {
        kekezu::echojson('', 1, $msg_tpl);
    } else {
        echo json_encode(array("status" => 0));
    }
}
$objMsgC = new Keke_witkey_msg_config_class();
if (isset($sbt_edit)) {
    if ($slt_tpl_code) {
        $objMsgC->setWhere("k='{$slt_tpl_code}'");
        $objMsgC->setContent($tar_msg_temp_content);
        $res = $objMsgC->edit_keke_witkey_msg_config();
    }
    if ($res) {
        kekezu::admin_system_log($_lang['edit_sms_tpl']);
        kekezu::admin_show_msg($_lang['edit_sms_tpl_success'], 'index.php?do=msg&view=intertpl&slt_tpl_code=' . $slt_tpl_code, 3, '', 'success');
    }
}
$msg_tpl = db_factory::get_one("select content from " . TABLEPRE . "witkey_msg_config where k='{$slt_tpl_code}'");
$msg_tpl = $msg_tpl['content'];
require $kekezu->_tpl_obj->template(ADMIN_DIRECTORY . '/tpl/admin_msg_' . $view);
コード例 #3
0
defined('IN_KEKE') or exit('Access Denied');
$strUrl = 'index.php?do=user&view=account&op=password';
if (isset($formhash) && kekezu::submitcheck($formhash)) {
    $old_pass = kekezu::escape(trim($old_password));
    $new_pass = kekezu::escape(trim($new_password));
    $confirm_pass = kekezu::escape(trim($confirm_password));
    if (md5($old_pass) != $gUserInfo['password']) {
        $title['errors']['old_password'] = '******';
        kekezu::show_msg($title, NULL, NULL, NULL, 'error');
    }
    if ($old_pass === $new_pass) {
        $title['errors']['new_password'] = '******';
        kekezu::show_msg($title, NULL, NULL, NULL, 'error');
    }
    if ($new_pass != $confirm_pass) {
        $title['errors']['confirm_password'] = '******';
        kekezu::show_msg($title, NULL, NULL, NULL, 'error');
    }
    $intRes1 = db_factory::updatetable(TABLEPRE . 'witkey_space', array('password' => md5($new_pass)), array('uid' => $gUid));
    $intRes2 = db_factory::updatetable(TABLEPRE . 'witkey_member', array('password' => md5($new_pass)), array('uid' => $gUid));
    $flag = keke_user_class::user_edit($gUserInfo['username'], $old_pass, $new_pass, '', 0) > 0 ? 1 : 0;
    if ($flag && $intRes1 === 1 && $intRes2 === 1) {
        kekezu::admin_system_log($_SESSION['username'] . '于' . date("Y-m-d H:i:s") . '修改了密码');
        keke_msg_class::notify_user($gUserInfo['uid'], $gUserInfo['username'], 'update_password', '修改密码', array('新密码' => $new_pass, '网站名称' => $kekezu->_sys_config['website_name'], '用户名' => $gUserInfo['username']), 2);
        setcookie('rememberme', '');
        unset($_SESSION, $_SESSION['uid'], $_SESSION['username']);
        unset($_COOKIE['rememberme']);
        session_destroy();
        kekezu::show_msg('新密码已生效', 'index.php?do=login', NULL, NULL, 'ok');
    }
}
コード例 #4
0
$indus_table_obj = new Keke_witkey_industry_class();
$indus_obj = keke_table_class::get_instance("witkey_industry");
$file_obj = new keke_file_class();
$indus_arr = kekezu::get_industry(0);
isset($indus_id) and intval($indus_id) > 0 and $indus_info = $indus_obj->get_table_info('indus_id', $indus_id);
empty($art_info) or extract($art_info);
if (isset($indus_id) && intval($indus_id) > o) {
    $indus_info = $indus_obj->get_table_info('indus_id', $indus_id);
    $indus_pid = $indus_info['indus_pid'];
}
if ($sbt_edit) {
    $indus_table_obj->setWhere("indus_name = '" . $fs['indus_name'] . "'");
    $res = $indus_table_obj->count_keke_witkey_industry();
    !$pk && $res and kekezu::admin_show_msg($_lang['operate_fail'], $url, 3, $_lang['indus_has']);
    $fs['on_time'] = time();
    isset($fs['is_recommend']) or $fs['is_recommend'] = 0;
    isset($fs['totask']) or $fs['totask'] = 0;
    isset($fs['togoods']) or $fs['togoods'] = 0;
    $fs = kekezu::escape($fs);
    $res = $indus_obj->save($fs, $pk);
    $indus_info = $indus_obj->get_table_info('indus_id', $pk['indus_id']);
    $url = "index.php?do=task&view=industry";
    !$pk and kekezu::admin_system_log($_lang['add_industry']) or kekezu::admin_system_log($_lang['edit_industry'] . ':' . $indus_info['indus_name']);
    $file_obj->delete_files(S_ROOT . "./data/data_cache/");
    $file_obj->delete_files(S_ROOT . './data/tpl_c/');
    $res and kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['operate_fail'], $url, 3, '', 'warning');
}
$temp_arr = array();
kekezu::get_tree($indus_arr, $temp_arr, 'option', $indus_pid, 'indus_id');
$indus_arr = $temp_arr;
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_task_' . $view);
コード例 #5
0
        kekezu::admin_system_log($_lang['delete_attachment'] . $file_id);
        $res and kekezu::admin_show_msg($_lang['atachment_delete_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['attchment_not_exist_delete_fail'], $url, 3, '', 'warning');
    }
} elseif (isset($sbt_action)) {
    is_array($ckb) and $ids = implode(',', array_filter($ckb));
    if (sizeof($ids)) {
        $where = "file_id in ({$ids})";
        $file_obj->setWhere($where);
        $file_info = $file_obj->query_keke_witkey_file();
        foreach ($file_info as $v) {
            @unlink($backup_patch . $v['save_name']);
        }
        $file_obj->setWhere($where);
        $res = $file_obj->del_keke_witkey_file();
        if ($res) {
            kekezu::admin_system_log($_lang['delete_attachment'] . "{$ids}");
            kekezu::admin_show_msg($_lang['mulit_operate_success'], $url, 3, '', 'success');
        }
    } else {
        kekezu::admin_show_msg($_lang['choose_operate_item'], $url, 3, '', 'warning');
    }
} else {
    $where = ' 1 = 1 ';
    intval($txt_file_id) and $where .= " and file_id = {$txt_file_id}";
    strval($txt_file_name) and $where .= " and file_name like '%{$txt_file_name}%' ";
    $ord['1'] and $where .= " order by {$ord['0']} {$ord['1']} " or $where .= " order by file_id desc";
    $table_obj = keke_table_class::get_instance("witkey_file");
    $d = $table_obj->get_grid($where, $url, $page, $wh['page_size'], null, 1, 'ajax_dom');
    $file_arr = $d['data'];
    $pages = $d['pages'];
}
コード例 #6
0
ファイル: admin_user_add.php プロジェクト: pengfeiaaa/web
        kekezu::admin_show_msg($_lang['operate_notice'], "index.php?do=user&view=add", 3, $_lang['user_creat_success'], 'success');
    } else {
        $uinfo = kekezu::get_user_info($edituid);
        if ($fds['password']) {
            $slt = db_factory::get_count(sprintf("select rand_code from %switkey_member where uid = '%d'", TABLEPRE, $edituid));
            $sec_code = keke_user_class::get_password($fds['password'], $slt);
            $fds['sec_code'] = $sec_code;
            $newpwd = $fds['password'];
            $pwd = md5($fds['password']);
            $fds[password] = $pwd;
            db_factory::execute(sprintf("update %switkey_member set password ='******' where uid=%d", TABLEPRE, $pwd, $edituid));
        } else {
            unset($fds['password']);
        }
        keke_user_class::user_edit($uinfo['username'], '', $newpwd, '', 1);
        $space_class->save($fds, array("uid" => "{$edituid}"));
        kekezu::admin_system_log($_lang['edit_member'] . $member_arr[username]);
        kekezu::admin_show_msg($_lang['edit_success'], "index.php?do=user&view=add&edituid=" . $edituid, 3, '', 'success');
    }
}
if ($check_email) {
    $regClass = new keke_register_class();
    $result = $regClass->check_email($check_email);
    if ($result !== true) {
        echo $result;
    } else {
        echo 1;
    }
    die;
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_add');
コード例 #7
0
<?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);
コード例 #8
0
ファイル: task_edit.php プロジェクト: huangbinzd/kppwGit
     $task_obj->setTask_cash($fields['task_cash']);
     $task_obj->setTask_desc($fields['task_desc']);
     $fields = kekezu::escape($fields);
     $task_obj->setSeo_title($fields['seo_title']);
     $task_obj->setSeo_keyword($fields['seo_keyword']);
     $task_obj->setSeo_desc($fields['seo_desc']);
     if ($_FILES['fle_task_pic']['name']) {
         $task_pic = keke_file_class::upload_file("fle_task_pic");
     } else {
         $task_pic = $task_pic_path;
     }
     $task_obj->setTask_pic($task_pic);
     $item_ids = array();
     $cash = $task_info['att_cash'] ? $task_info['att_cash'] : 0;
     $task_obj->setAtt_cash($cash);
     kekezu::admin_system_log($_lang['edit_task'] . ":{$fields['task_title']}");
     $res = $task_obj->edit_keke_witkey_task();
     $v_arr = array($_lang['admin_name'] => $myinfo_arr['username'], $_lang['time'] => date('Y-m-d H:i:s', time()), $_lang['model_name'] => $model_info['model_name'], $_lang['task_id'] => $task_info['task_id'], $_lang['task_title'] => $task_info['task_title']);
     keke_msg_class::notify_user($task_info['uid'], $task_info['username'], 'task_edit', $_lang['edit_task'], $v_arr, 1);
 } elseif ($sbt_act) {
     switch ($sbt_act) {
         case "freeze":
             $res = keke_task_config::task_freeze($task_id);
             break;
         case "unfreeze":
             $res = keke_task_config::task_unfreeze($task_id);
             break;
         case "pass":
             $res = keke_task_config::task_audit_pass(array($task_id));
             break;
         case "nopass":
コード例 #9
0
ファイル: admin_msg_map.php プロジェクト: huangbinzd/kppwGit
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(141);
if ($sbt_edit) {
    $api = array();
    foreach ($conf as $k => $v) {
        $res .= db_factory::execute(" update " . TABLEPRE . "witkey_basic_config set v='{$v}' where k='{$k}'");
        $open == $k and $api[$k] = 1 or $api[$k] = 0;
    }
    $api = serialize($api);
    db_factory::execute(sprintf("update %switkey_basic_config set v='%s' where k='map_api_open'", TABLEPRE, $api));
    kekezu::admin_system_log($_lang['edit_map_api']);
    if ($res) {
        kekezu::admin_show_msg($_lang['map_api_edit_success'], "index.php?do={$do}&view={$view}", 2, '', 'success');
    }
} else {
    $map_apis = kekezu::get_table_data("k,v,type,desc", "witkey_basic_config", "type='map'", "", "", "", "k");
    $api_open = db_factory::get_one("select v from " . TABLEPRE . "witkey_basic_config where k='map_api_open'");
    $api_open = unserialize($api_open['v']);
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
コード例 #10
0
ファイル: goods_config.php プロジェクト: huangbinzd/kppwGit
defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role('m612');
$goods_config = kekezu::get_task_config($model_id);
is_array($goods_config) and extract($goods_config) or $goods_config = array();
$model_obj = keke_table_class::get_instance('witkey_model');
$ops = array('config', 'control', 'rule');
in_array($op, $ops) or $op = 'config';
$url = "index.php?do=model&model_id={$model_id}&view=config&op={$op}";
kekezu::empty_cache();
$indus_arr = $kekezu->_indus_arr;
$indus_index = kekezu::get_indus_by_index();
if (isset($sbt_edit)) {
    $log_op_arr = array("config" => $_lang['goods_basic_config'], "control" => $_lang['goods_flow_config'], "rule" => $_lang['goods_permissions_config']);
    $log_msg = $_lang['has_update'] . $log_op_arr[$op];
    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;
コード例 #11
0
ファイル: keke_task_config.php プロジェクト: pengfeiaaa/web
 public static function del_sign_task($task_id, $model)
 {
     global $_lang;
     $taskInfo = db_factory::get_one(sprintf("select * from %switkey_task where task_id='%d' and task_status in(0,1,8,9,10)", TABLEPRE, $task_id));
     if ($taskInfo) {
         CustomClass::delExtDataByObjId($taskInfo['task_id'], $taskInfo['model_id']);
     }
     if ($model === 1) {
         $sql = sprintf("delete from %switkey_task_work where task_id='%d'", TABLEPRE, $task_id);
     } else {
         $sql = sprintf("delete from %switkey_task_bid where task_id ='%d'", TABLEPRE, $task_id);
     }
     db_factory::execute($sql);
     $file_sql = sprintf("select save_name from %switkey_file where task_id = '%d' ", TABLEPRE, $task_id);
     $files = db_factory::query($file_sql);
     foreach ($files as $v) {
         keke_file_class::del_file($v['save_name']);
     }
     db_factory::execute(sprintf("delete from %switkey_file where task_id ='%d' ", TABLEPRE, $task_id));
     $del_title = db_factory::get_count(sprintf("select task_title from %switkey_task where task_id='%d'", TABLEPRE, $task_id));
     kekezu::admin_system_log($_lang['delete_task'] . ":{$del_title}");
 }
コード例 #12
0
    $config_arr[$v['k']] = $v['v'];
}
$config_arr['account_pwd'] = base64_decode($config_arr['account_pwd']);
$url = 'index.php?do=config&view=mail';
if (isset($submit)) {
    foreach ($_POST as $k => $v) {
        $config_basic_obj->setWhere("k = '{$k}'");
        if ($k == 'account_pwd') {
            $config_basic_obj->setV(base64_encode($v));
        } else {
            $config_basic_obj->setV($v);
        }
        $res += $config_basic_obj->edit_keke_witkey_basic_config();
    }
    $kekezu->_cache_obj->gc();
    kekezu::admin_system_log($_lang['email_config_param']);
    $kekezu->_cache_obj->set("keke_witkey_basic_config", $config_basic_arr);
    kekezu::admin_show_msg($_lang['submit_success'], $url, 3, '', 'success');
}
if (isset($email)) {
    $mail = new Phpmailer_class();
    if ($config_arr['mail_server_cat'] == "smtp") {
        $mail->IsSMTP();
        $mail->SMTPAuth = true;
        $mail->CharSet = $_K['charset'];
        $mail->Host = $config_arr['smtp_url'];
        $mail->Port = $config_arr['mail_server_port'];
        $mail->Username = $config_arr['post_account'];
        $mail->Password = $config_arr['account_pwd'];
    } else {
        $mail->IsMail();
コード例 #13
0
ファイル: auth_list.php プロジェクト: pengfeiaaa/web
            $auth_obj->del_auth($record_id);
            break;
    }
} elseif (isset($sbt_action)) {
    $keyids = $ckb;
    switch ($sbt_action) {
        case $_lang['mulit_delete']:
            kekezu::admin_system_log($_lang['mulit_delete_mobile']);
            $auth_obj->del_auth($keyids);
            break;
        case $_lang['mulit_pass']:
            kekezu::admin_system_log($_lang['mulit_pass_mobile']);
            $auth_obj->review_auth($keyids, 'pass');
            break;
        case $_lang['mulit_nopass']:
            kekezu::admin_system_log($_lang['mulit_nopass_mobile']);
            $auth_obj->review_auth($keyids, 'not_pass');
            break;
    }
} else {
    $where = " 1 = 1 ";
    $w['auth_status'] === "0" and $where .= " and auth_status = 0 " or $w['auth_status'] and $where .= " and auth_status = '{$w['auth_status']}' ";
    intval($w['mobile_a_id']) and $where .= " and mobile_a_id = " . intval($w['mobile_a_id']) . "";
    $w['username'] and $where .= " and username like '%" . $w['username'] . "%' ";
    $where .= " order by mobile_a_id desc ";
    intval($w['page_size']) and $page_size = intval($w['page_size']) or $page_size = 10;
    $mobile_obj->setWhere($where);
    $count = $mobile_obj->count_keke_witkey_auth_mobile();
    abs(intval($page)) or $page = 1;
    $kekezu->_page_obj->setAjax(1);
    $kekezu->_page_obj->setAjaxDom("ajax_dom");
コード例 #14
0
        unset($_POST['mobile_username']);
        unset($_POST['mobile_password']);
    }
    foreach ($_POST as $k => $v) {
        $config_basic_obj->setWhere("k = '{$k}'");
        $config_basic_obj->setV(kekezu::k_input($v));
        $res += $config_basic_obj->edit_keke_witkey_basic_config();
    }
    if ($_POST['credit_is_allow'] == 2) {
        foreach ($model_list as $k => $v) {
            $config = unserialize($v['config']);
            $config['defeated'] = '1';
            keke_task_config::set_task_ext_config($v['model_id'], $config);
        }
    }
    kekezu::admin_system_log($_lang['update'] . $log_nav_arr[$op]);
    $kekezu->_cache_obj->set("keke_witkey_basic_config", $config_basic_arr);
    kekezu::admin_show_msg($_lang['submit_success'], $url, 3, '', 'success');
}
function get_url_rule()
{
    $service = array('apache', 'apache-hosts', 'iis6', 'iis7', 'nginx');
    $rule_arr = array();
    foreach ($service as $v) {
        switch ($v) {
            case 'apache-hosts':
                $r = '
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/index.html$ $1/index.php
RewriteRule ^(.*)/(\\w+).html$ $1/index.php?do=$2
コード例 #15
0
ファイル: admin_tpl_taglist.php プロジェクト: pengfeiaaa/web
if ($op == 'del') {
    $delid = $delid ? $delid : kekezu::admin_show_msg($_lang['wrong_parameters'], $url, 3, '', 'warning');
    $tag_obj->setWhere("tag_id='{$delid}'");
    $tag_obj->del_keke_witkey_tag();
    $kekezu->_cache_obj->del('tag_list_cache');
    kekezu::admin_system_log($_lang['delete_tag'] . "{$delid}");
    kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success');
} elseif (isset($sbt_action)) {
    if (is_array($ckb)) {
        $ids = implode(',', array_filter($ckb));
    }
    if (count($ids)) {
        $tag_obj->setWhere(' tag_id in (' . $ids . ') ');
        $tag_obj->del_keke_witkey_tag();
        $kekezu->_cache_obj->del('tag_list_cache');
        kekezu::admin_system_log($_lang['delete_tag'] . "{$ids}");
        kekezu::admin_show_msg($_lang['mulit_operate_success'], $url, 3, '', 'success');
    } else {
        kekezu::admin_show_msg($_lang['choose_operate_item'], $url, 3, '', 'warning');
    }
} else {
    $where = " tag_type=5  ";
    $type or $type = 2;
    if ($type == 1) {
        $where .= " and tagname like '%活动%' ";
    } elseif ($type == 2) {
        $where .= " and tagname like '%协议%' ";
    } else {
        $where .= " and tagname like '%任务%' ";
    }
    strval($txt_title) and $where .= " and tagname like '%{$txt_title}%' ";
コード例 #16
0
            $pay_config['safekey'] = $fds['safekey'];
            $pay_config['account_name'] = $fds['account_name'];
            break;
        case 'chinabank':
            $pay_config['seller_id'] = $fds['seller_id'];
            $pay_config['safekey'] = $fds['safekey'];
            break;
        case 'paypal':
            $pay_config['account'] = $fds['account'];
            break;
        case 'tenpay':
        case 'yeepay':
            $pay_config['seller_id'] = $fds['seller_id'];
            $pay_config['safekey'] = $fds['safekey'];
            break;
        case 'alipay_trust':
            $pay_config['account'] = $fds['account'];
            $pay_config['seller_id'] = $fds['seller_id'];
            $pay_config['safekey'] = $fds['safekey'];
            break;
    }
    $pay_config['descript'] = $fds['descript'];
    $pay['config'] = serialize($pay_config);
    $res = $pay_api_obj->save($pay, $pk);
    kekezu::admin_system_log($_lang['config'] . $payname);
    $file_obj = new keke_file_class();
    $file_obj->delete_files(S_ROOT . "./data/data_cache/");
    unset($items);
    kekezu::admin_show_msg($_lang['submit'], 'index.php?do=config&view=pay&op=' . $type, 3, '', 'success');
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view);
コード例 #17
0
ファイル: admin_config_mark.php プロジェクト: pengfeiaaa/web
            require ADMIN_ROOT . 'admin_config_' . $view . '_' . $op . '.php';
            break;
    }
} elseif ($is_submit == '1') {
    intval($hdn_mark_rule_id) and $mark_rule_obj->setWhere(" mark_rule_id = " . intval($hdn_mark_rule_id) . "");
    $mark_rule_obj->setM_value(intval($txt_m_value));
    $mark_rule_obj->setG_value(intval($txt_g_value));
    $mark_rule_obj->setG_title($txt_g_title);
    $mark_rule_obj->setM_title($txt_m_title);
    $mark_rule_obj->setG_ico($hdn_g_ico);
    $mark_rule_obj->setM_ico($hdn_m_ico);
    if (intval($hdn_mark_rule_id)) {
        kekezu::admin_system_log($_lang['edit_mark_rule']);
        $res = $mark_rule_obj->edit_keke_witkey_mark_rule();
    } else {
        kekezu::admin_system_log($_lang['create_mark_rule']);
        $res = $mark_rule_obj->create_keke_witkey_mark_rule();
    }
    if ($res) {
        $u_list = db_factory::query(sprintf(" select buyer_credit,seller_credit,uid from %switkey_space", TABLEPRE));
        if ($u_list) {
            $s = sizeof($u_list);
            for ($i = 0; $i < $s; $i++) {
                $b_level = keke_user_mark_class::get_mark_level($u_list[$i]['buyer_credit'], 2);
                $s_level = keke_user_mark_class::get_mark_level($u_list[$i]['seller_credit'], 1);
                $sql = " UPDATE " . TABLEPRE . "witkey_space set buyer_level='" . serialize($b_level) . "',seller_level='" . serialize($s_level) . "' where uid='{$u_list[$i]['uid']}'";
                $sql != '' && db_factory::execute($sql);
            }
        }
    }
    kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['submit_success'], 'success');
コード例 #18
0
ファイル: task_edit.php プロジェクト: huangbinzd/kppwGit
        }
        if ($_FILES['fle_task_pic']['name']) {
            $task_pic = keke_file_class::upload_file("fle_task_pic");
        } else {
            $task_pic = $task_pic_path;
        }
        $task_pic and $fds['task_pic'] = $task_pic;
        if ($txt_task_day) {
            $fds['sub_time'] = strtotime($txt_task_day);
        }
        $fds['seo_title'] = $fields['seo_title'];
        $fds['seo_keyword'] = $fields['seo_keyword'];
        $fds['seo_desc'] = $fields['seo_desc'];
        $fds = kekezu::escape($fds);
        $pk and $success = $task_obj->save($fds, $pk);
        kekezu::admin_system_log($_lang['edit_task'], '{$fds[task_title]}');
        $v_arr = array($_lang['admin_name'] => $myinfo_arr['username'], $_lang['time'] => date('Y-m-d H:i:s', time()), $_lang['model_name'] => $model_info['model_name'], $_lang['task_id'] => $task_info['task_id'], $_lang['task_title'] => $task_info['task_title']);
        keke_msg_class::notify_user($task_info['uid'], $task_info['username'], 'task_edit', $_lang['edit_task'], $v_arr, 1);
        kekezu::admin_show_msg($_lang['task_edit_success'], "index.php?do=model&model_id={$model_id}&view=list", 3, '', 'success');
    }
    $indus_arr = $kekezu->_indus_arr;
    $temp_arr = array();
    $indus_option_arr = $indus_arr;
    $indus_arr = kekezu::get_industry(1);
    $temp_arr = array();
    $status_arr = dtender_task_class::get_task_status();
    $payitem_list = keke_payitem_class::get_payitem_config('employer');
    kekezu::get_tree($indus_option_arr, $temp_arr, "option", $task_info['indus_id']);
    $indus_option_arr = $temp_arr;
} else {
    require S_ROOT . '/task/' . $model_info['model_dir'] . '/admin/task_misc.php';
コード例 #19
0
ファイル: admin_case_add.php プロジェクト: huangbinzd/kppwGit
    }
    $case_obj->setObj_type($case_type);
    $case_obj->setCase_auther($fds['case_auther']);
    $case_obj->setCase_price($fds['case_price']);
    $case_obj->setCase_desc(kekezu::escape($fds['case_desc']));
    $case_obj->setCase_title(kekezu::escape($fds['case_title']));
    $case_obj->setOn_time(time());
    $case_img = $hdn_case_img or $case_img = keke_file_class::upload_file("fle_case_img");
    $case_obj->setCase_img($case_img);
    if ($hdn_case_id) {
        $res = $case_obj->edit_keke_witkey_case();
        kekezu::admin_system_log($_lang['edit_case'] . ':' . $hdn_case_id);
        $res and kekezu::admin_show_msg($_lang['modify_case_success'], 'index.php?do=case&view=lise', 3, '', 'success') or kekezu::admin_show_msg($_lang['modify_case_fail'], 'index.php?do=case&view=lise', 3, '', 'warning');
    } else {
        $res = $case_obj->create_keke_witkey_case();
        kekezu::admin_system_log($_lang['add_case']);
        $res and kekezu::admin_show_msg($_lang['add_case_success'], 'index.php?do=case&view=lise', 3, '', 'success') or kekezu::admin_show_msg($_lang['add_case_fail'], 'index.php?do=case&view=add', 3, '', 'warning');
    }
}
function case_obj_exists($id, $obj = 'task')
{
    if ($obj == 'task') {
        $search_obj = db_factory::get_count(sprintf("select count(task_id) from %switkey_task where task_id='%d' ", TABLEPRE, $id));
    } elseif ($obj == 'service') {
        $search_obj = db_factory::get_count(sprintf("select count(service_id) from %switkey_service where service_id='%d' ", TABLEPRE, $id));
    }
    if ($search_obj) {
        return true;
    } else {
        return false;
    }
コード例 #20
0
$op and $op = $op or $op = 'config';
$url = "index.php?do={$do}&view={$view}&op={$op}";
switch ($op) {
    case "config":
        if (!isset($sbt_edit)) {
            $bind_info = check_bind('mobile_username');
        } else {
            foreach ($conf as $k => $v) {
                if (check_bind($k)) {
                    $res .= db_factory::execute(" update " . TABLEPRE . "witkey_basic_config set v='{$v}' where k='{$k}'");
                } else {
                    $res .= db_factory::execute(" insert into " . TABLEPRE . "witkey_basic_config values('','{$k}','{$v}','mobile','','')");
                }
            }
            $kekezu->_cache_obj->gc();
            kekezu::admin_system_log($_lang['edit_mobile_log']);
            kekezu::admin_show_msg($_lang['binding_cellphone_account_successfully'], "index.php?do={$do}&view={$view}&op=config", 3, '', 'success');
        }
        break;
    case "manage":
        if ($remain_fee) {
            if ($mobile_p && $mobile_u) {
                $msg = new sms_d9('', '');
                $m = $msg->get_userinfo();
                if (!$m) {
                    kekezu::echojson($_lang['get_user_info_fail'], "2");
                    die;
                } else {
                    kekezu::echojson($m, "1");
                    die;
                }
コード例 #21
0
ファイル: task_edit.php プロジェクト: huangbinzd/kppwGit
     $task_obj->setTask_cash($task_cash);
     $task_obj->setReal_cash($task_cash * (1 - $task_info['profit_rate'] / 100));
     $fds['task_cash_coverage'] and $task_obj->setTask_cash_coverage($fds['task_cash_coverage']);
     $fds['budget'] and $task_obj->setBudget($fds['budget']);
     $task_obj->setTask_desc($task_desc);
     $fields = kekezu::escape($fields);
     $task_obj->setSeo_title($fields['seo_title']);
     $task_obj->setSeo_keyword($fields['seo_keyword']);
     $task_obj->setSeo_desc($fields['seo_desc']);
     if ($_FILES['fle_task_pic']['name']) {
         $task_pic = keke_file_class::upload_file("fle_task_pic");
     } else {
         $task_pic = $task_pic_path;
     }
     $task_obj->setTask_pic($task_pic);
     kekezu::admin_system_log($_lang['edit_task'] . ":{$task_title}");
     $res = $task_obj->edit_keke_witkey_task();
     $v_arr = array($_lang['admin_name'] => $myinfo_arr['username'], $_lang['time'] => date('Y-m-d H:i:s', time()), $_lang['model_name'] => $model_info['model_name'], $_lang['task_id'] => $task_info['task_id'], $_lang['task_title'] => $task_info['task_title']);
     keke_msg_class::notify_user($task_info['uid'], $task_info['username'], 'task_edit', $_lang['edit_task'], $v_arr, 1);
 } elseif ($sbt_act) {
     switch ($sbt_act) {
         case "freeze":
             $res = keke_task_config::task_freeze($task_id);
             break;
         case "unfreeze":
             $res = keke_task_config::task_unfreeze($task_id);
             break;
         case "pass":
             $res = keke_task_config::task_audit_pass(array($task_id));
             break;
         case "nopass":
コード例 #22
0
 public static function edit_item($auth_code, $data, $pk = null, $big_ico_name = null, $small_ico_name = null, $small_n_ico_name = null, $conf = array())
 {
     global $kekezu;
     global $_lang;
     $auth_item = keke_auth_base_class::get_auth_item($auth_code);
     $auth_item or kekezu::admin_show_msg($_lang['auth_item_edit_fail_notice'], "index.php?do=auth&view=item_list", '3', '', 'error');
     $tab_obj = keke_table_class::get_instance("witkey_auth_item");
     $big_ico_name and $data['auth_big_ico'] = $big_ico_name == 'delete' ? '' : $big_ico_name;
     $small_ico_name and $data['auth_small_ico'] = $small_ico_name == 'delete' ? '' : $small_ico_name;
     $small_n_ico_name and $data['auth_small_n_ico'] = $small_n_ico_name == 'delete' ? '' : $small_n_ico_name;
     $data['update_time'] = time();
     $res = $tab_obj->save($data, $pk);
     if ($res) {
         $kekezu->_cache_obj->del('auth_item_cache_list');
         kekezu::admin_system_log($_lang['edit_auth_item'] . $auth_item['auth_title']);
         kekezu::admin_show_msg($_lang['auth_item_edit_success'], $_SERVER['HTTP_REFERER'], 3, '', 'success');
     } else {
         kekezu::admin_show_msg($_lang['auth_item_edit_fail'], $_SERVER['HTTP_REFERER'], 3, '', 'warning');
     }
 }
コード例 #23
0
ファイル: auth_list.php プロジェクト: huangbinzd/kppwGit
            $auth_obj->del_auth($realname_a_id);
            break;
    }
} elseif (isset($sbt_action)) {
    $keyids = $ckb;
    switch ($sbt_action) {
        case $_lang['mulit_delete']:
            kekezu::admin_system_log($_lang['mulit_delete_realname_auth']);
            $auth_obj->del_auth($keyids);
            break;
        case $_lang['mulit_pass']:
            kekezu::admin_system_log($_lang['mulit_pass_realname_auth']);
            $auth_obj->review_auth($keyids, 'pass');
            break;
        case $_lang['mulit_nopass']:
            kekezu::admin_system_log($_lang['mulit_nopass_realname']);
            $auth_obj->review_auth($keyids, 'not_pass');
            break;
    }
} else {
    $where = " 1 = 1 ";
    $w['auth_status'] === "0" and $where .= " and auth_status = 0 " or $w['auth_status'] and $where .= " and auth_status = '{$w['auth_status']}' ";
    intval($w['realname_a_id']) and $where .= " and realname_a_id = " . intval($w['realname_a_id']) . "";
    $w['username'] and $where .= " and username like '%" . $w['username'] . "%' ";
    $where .= " order by realname_a_id desc ";
    intval($w['page_size']) and $page_size = intval($w['page_size']) or $page_size = 10;
    $realname_obj->setWhere($where);
    $count = $realname_obj->count_keke_witkey_auth_realname();
    intval($page) or $page = 1 and $page = intval($page);
    $kekezu->_page_obj->setAjax(1);
    $kekezu->_page_obj->setAjaxDom("ajax_dom");
コード例 #24
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$tab_obj = keke_table_class::get_instance("witkey_prom_item");
$upload_obj = new keke_upload_class(UPLOAD_ROOT, array("gif", 'jpeg', 'jpg', 'png'), UPLOAD_MAXSIZE);
if ($sbt_edit) {
    $fds['prom_type'] == 'site' and $fds['item_type'] = 'img';
    $fds['on_time'] = time();
    $files = $upload_obj->run('item_pic', 1);
    $files != 'The uploaded file is Unallowable!' and $item_pic = $files['0']['saveName'];
    $item_pic and $fds['item_pic'] = $item_pic;
    if ($item_id) {
        $edit = $tab_obj->save($fds, $pk);
        kekezu::admin_system_log($_lang['edit_prom_material'] . $item_id);
        $edit && kekezu::admin_show_msg($_lang['prom_material_edit_success'], '', 3, '', 'success');
    }
    $add = $tab_obj->save($fds);
    kekezu::admin_system_log($_lang['add_prom_material']);
    $add && kekezu::admin_show_msg($_lang['prom_material_add_success'], '', 3, '', 'success');
} else {
    $item_id and $item_info = db_factory::get_one(" select * from " . TABLEPRE . "witkey_prom_item where item_id = '{$item_id}'");
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
コード例 #25
0
ファイル: service_edit.php プロジェクト: huangbinzd/kppwGit
if ($op == 'basic') {
    $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);
コード例 #26
0
        die;
        break;
    case "del":
        $del_info = kekezu::get_user_info($delid);
        $delid or kekezu::admin_show_msg($_lang['param_error'], $url, 3, '', 'warning');
        $res = db_factory::execute(sprintf("update %switkey_space set group_id = 0 where uid = '%d' ", TABLEPRE, $delid));
        kekezu::admin_system_log($_lang['delete_kf'] . $del_info[username]);
        $res and kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['delete_success'], 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['delete_fail'], 'warning');
        break;
}
if ($sbt_action) {
    $keyids = $ckb;
    if (is_array($keyids)) {
        $ids = implode(',', $keyids);
        $res = db_factory::execute(sprintf("update %switkey_space set group_id = 0 where uid in (%s) ", TABLEPRE, $ids));
        kekezu::admin_system_log($_lang['more_delete_kfs'] . $ids);
        $res and kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['mulit_operate_success']) or kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['mulit_operate_fail'], "error");
    }
}
$sql = " 1 = 1 and group_id != 0 ";
$w[page_size] and $p_size = intval($w[page_size]) or $p_size = 10;
$page = intval($page) ? intval($page) : 1;
$w[uid] and $sql .= " and uid='{$w['uid']}'";
$w[username] and $sql .= " and username like '%{$w['username']}%'";
$w[status] == 1 and $sql .= " and status = 1";
$w[status] == 2 and $sql .= " and status = 0";
$ord[uid] and $sql .= " order by uid " . $ord[uid] or $sql .= " order by uid desc ";
$space_obj->setWhere($sql);
$count = $space_obj->count_keke_witkey_space();
$limit = $p_size;
$kekezu->_page_obj->setAjax(1);
コード例 #27
0
 public function review_auth($auth_ids, $type = 'pass', $url = null)
 {
     global $_lang;
     global $kekezu;
     if ($url === null) {
         $url = $_SERVER['HTTP_REFERER'];
     }
     $prom_obj = keke_prom_class::get_instance();
     is_array($auth_ids) and $auth_ids = implode(",", $auth_ids);
     $auth_info = $this->get_auth_info($auth_ids);
     $size = sizeof($auth_info);
     $size > 0 && $type == 'pass' and $status = '1' or $status = '2';
     $size == 0 and kekezu::admin_show_msg($this->auth_lang() . $_lang['apply_not_exist_audit_fail'], $_SERVER['HTTP_REFERER']);
     if ($size == 1 && $auth_info[0]['auth_status'] != '1') {
         $this->set_auth_status($auth_info[0][$this->_primary_key], $status);
         $this->set_auth_record_status($auth_info[0]['uid'], $status);
         $this->_auth_code == 'realname' && $status == 1 and $this->extract_birth($auth_info[0]['uid'], $auth_info[0]['id_card']);
     } elseif ($size > 1) {
         foreach ($auth_info as $v) {
             if ($v['auth_status'] != '1') {
                 $this->set_auth_record_status($v['uid'], $status);
                 $this->set_auth_status($v[$this->_primary_key], $status);
                 $this->_auth_code == 'realname' && $status == 1 and $this->extract_birth($v['uid'], $v['id_card']);
             }
         }
     }
     switch ($type) {
         case "pass":
             kekezu::admin_system_log($this->auth_lang() . $_lang['apply_pass'] . "{$auth_ids}");
             foreach ($auth_info as $v) {
                 if ($this->_auth_code == 'enterprise') {
                     $this->set_user_role($auth_info[0][uid], $type);
                 } elseif ($this->_auth_code == 'realname') {
                     $this->set_user_role($auth_info[0][uid], $type);
                 }
                 $feed_arr = array("feed_username" => array("content" => $v[username], "url" => "index.php?do=seller&id={$v['uid']}"), "action" => array("content" => $_lang['has_pass'], "url" => ""), "event" => array("content" => $this->auth_lang(), "url" => ""));
                 kekezu::save_feed($feed_arr, $v['uid'], $v['username'], $this->_auth_name);
                 $prom_obj->dispose_prom_event('reg', $v['uid'], $v['uid']);
                 $auth_arr = keke_glob_class::get_finance_action();
                 $arr[$_lang['auth_code']] = $auth_arr[$this->_auth_name];
                 $arr[$_lang['auth_url']] = "index.php?do=user&view=payitem&op=auth&auth_code={$this->_auth_code}";
                 keke_msg_class::notify_user($v['uid'], $v['username'], 'auth_success', $auth_arr[$this->_auth_name] . $_lang['through'], $arr, 2);
             }
             $url = 'HTTP://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?do=auth&view=list&code={$this->_auth_code}";
             kekezu::admin_show_msg($this->auth_lang() . $_lang['apply_audit_success'], $url, 3, '', 'success');
             break;
         case "not_pass":
             kekezu::admin_system_log($this->auth_lang() . $_lang['apply_not_pass'] . "{$auth_ids}");
             kekezu::admin_show_msg($this->auth_lang() . $_lang['apply_audit_not_pass'], $url, 3, '', 'success');
             break;
     }
 }
コード例 #28
0
        $ad_result = $ad_obj->del_keke_witkey_ad();
        $tag_obj->setWhere('tag_id=' . $delid);
        $result = $tag_obj->del_keke_witkey_tag();
        kekezu::admin_system_log($_lang['delete_ads_tags_id'] . $delid . 'name:' . $ad_name . $_lang['corresponding_ads_data'] . $ad_result . $_lang['tiao']);
        kekezu::admin_show_msg($result ? $_lang['delete_ads_tags_success'] : $_lang['delete_fail'], $url, 3, '', $result ? 'success' : 'warning');
    } else {
        if (!empty($ckb)) {
            $ids = is_array($ckb) && count($ckb) > 0 ? implode(',', $ckb) : kekezu::admin_show_msg($_lang['delete_fail_select_operation'], $url, 3, '', 'warning');
            $tag_name_arr = db_factory::query(' select tagname from ' . TABLEPRE . "witkey_tag where tag_id in({$ids}) ");
            while (list($key, $value) = each($tag_name_arr)) {
                $ad_obj->setWhere('ad_name = "' . $value['tagname'] . '"');
                $ad_result .= $ad_obj->del_keke_witkey_ad();
            }
            $tag_obj->setWhere('tag_id in(' . $ids . ')');
            $result = $tag_obj->del_keke_witkey_tag();
            kekezu::admin_system_log($_lang['mulit_delete_ads_tags'] . $ids . $_lang['is_corresponding_ads_data'] . $ad_result . $_lang['tiao']);
            kekezu::admin_show_msg($result ? $_lang['mulit_delete_ads_tags_success'] : $_lang['delete_fail'], $url, 3, '', $res ? 'success' : 'warning');
        }
    }
}
$where = '1=1 and tag_type=9';
$w['tag_id'] && ($where .= ' and tag_id="' . $w['tag_id'] . '"');
$w['tagname'] && ($where .= " and INSTR(tagname,'{$w['tagname']}')>0 ");
is_array($w['ord']) && ($w['ord'] = $w['ord'][0] . ' ' . $w['ord'][1]);
$w['ord'] && ($where .= ' order by ' . $w['ord']) or $sql .= ' order by tag_id desc ';
$w['page_size'] and $page_size = intval($w['page_size']) or $page_size = 10;
$page and $page = intval($page) or $page = '1';
$tag_arr = $table_obj->get_grid($where, $url, $page, $page_size);
$pages = $tag_arr['pages'];
$tag_arr = $tag_arr['data'];
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
コード例 #29
0
ファイル: auth_list.php プロジェクト: huangbinzd/kppwGit
            $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;
        case $_lang['mulit_pass']:
            kekezu::admin_system_log($_lang['mulit_pass_enterprise_auth']);
            $auth_obj->review_auth($keyids, 'pass', $url);
            break;
        case $_lang['mulit_nopass']:
            kekezu::admin_system_log($_lang['mulit_nopass_enterprise_auth']);
            $auth_obj->review_auth($keyids, 'not_pass', $url);
            break;
    }
} else {
    $where = " 1 = 1 ";
    $w['auth_status'] === "0" and $where .= " and auth_status = 0 " or $w['auth_status'] and $where .= " and auth_status = '{$w['auth_status']}' ";
    intval($w['enterprise_auth_id']) and $where .= " and enterprise_auth_id = " . intval($w['enterprise_auth_id']) . "";
    $w['username'] and $where .= " and username like '%" . $w['username'] . "%' ";
    $where .= " order by enterprise_auth_id desc ";
    intval($w['page_size']) and $page_size = intval($w['page_size']) or $page_size = 10;
    $enterprise_obj->setWhere($where);
    $count = $enterprise_obj->count_keke_witkey_auth_enterprise();
    intval($page) or $page = 1 and $page = intval($page);
    $kekezu->_page_obj->setAjax(1);
    $kekezu->_page_obj->setAjaxDom("ajax_dom");
コード例 #30
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(82);
$suggest_obj = keke_table_class::get_instance("witkey_proposal");
$page and $page = intval($page) or $page = 1;
$slt_page_size and $slt_page_size = intval($slt_page_size) or $slt_page_size = 10;
$url = "index.php?do={$do}&view={$view}&page={$page}&slt_page_size={$slt_page_size}&txt_p_id={$txt_p_id}&txt_pro_title={$txt_pro_title}&ord[]={$ord['0']}&ord[]={$ord['1']}";
$suggest_type_arr = array('1' => '我的建议', '2' => '我的问题');
$suggest_status_arr = array('1' => '待回复', '2' => '已回复');
if ($ac == 'del') {
    if ($p_id) {
        $res = $suggest_obj->del("p_id", $p_id, $url);
        kekezu::admin_system_log('删除建议' . $p_id);
        kekezu::admin_show_msg($_lang['delete_success'], $url, 3, '', 'success');
    } else {
        kekezu::admin_show_msg($_lang['delete_fail'], $url, 3, '', 'warning');
    }
} else {
    $where = ' 1 = 1  ';
    $txt_p_id and $where .= "  and p_id = " . intval($txt_p_id);
    $txt_pro_title and $where .= " and pro_title like '%" . $txt_pro_title . "%'";
    $slt_static and $where .= " and pro_status = " . intval($slt_static);
    if ($ord[1]) {
        $where .= " order by {$ord['0']} {$ord['1']} ";
    } else {
        $where .= " order by p_id desc";
    }
    $d = $suggest_obj->get_grid($where, $url, $page, $slt_page_size, null, 1, 'ajax_dom');
    $suggestlist_arr = $d[data];
    $pages = $d[pages];