当前位置: 首页>>代码示例>>PHP>>正文


PHP keke_table_class::get_instance方法代码示例

本文整理汇总了PHP中keke_table_class::get_instance方法的典型用法代码示例。如果您正苦于以下问题:PHP keke_table_class::get_instance方法的具体用法?PHP keke_table_class::get_instance怎么用?PHP keke_table_class::get_instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在keke_table_class的用法示例。


在下文中一共展示了keke_table_class::get_instance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($auth_code)
 {
     $this->_auth_code = $auth_code;
     $this->_auth_name = $auth_code . "_auth";
     $this->_auth_table_name = "witkey_auth_" . $auth_code;
     $this->_tab_obj = keke_table_class::get_instance($this->_auth_table_name);
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:7,代码来源:keke_auth_base_class.php

示例2: createExtData

 static function createExtData($objid, $model_id, $data)
 {
     if (!self::checkCustom($model_id)) {
         return false;
     }
     $extCode = CustomClass::getExtCodeByModelId($model_id);
     if ($data) {
         foreach ($data as $k => $v) {
             if (in_array($k, $extCode)) {
                 $fieldInfo = self::getFieldName($k);
                 $extData = array();
                 $extData[$k]['fieldname'] = $fieldInfo['f_name'];
                 $extData[$k]['content'] = kekezu::escape($v);
                 if ($extData) {
                     $jsondata = serialize($extData);
                     $tabObj = keke_table_class::get_instance("witkey_custom_fields_ext");
                     $fields = array();
                     $fields['c_id'] = $fieldInfo['id'];
                     $fields['model_id'] = $model_id;
                     $fields['extdata'] = $jsondata;
                     $fields['objid'] = $objid;
                     $tabObj->save($fields);
                 }
             }
         }
     }
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:27,代码来源:CustomClass.php

示例3: implode

    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}%' ";
    $ord['1'] and $where .= " order by" . $ord['0'] . $ord['1'];
    $t_obj = keke_table_class::get_instance("witkey_tag");
    $tag_type = 5;
    $d = $t_obj->get_grid($where, $url, $page, $slt_page_size);
    $tag_arr = $d['data'];
    $pages = $d['pages'];
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_tpl_' . $view);
开发者ID:pengfeiaaa,项目名称:web,代码行数:31,代码来源:admin_tpl_taglist.php

示例4: defined

<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$objTable = keke_table_class::get_instance("witkey_custom_fields");
intval($page) or $page = 1;
$url = "index.php?do=custom&view=fields&model_id={$model_id}&page={$page}";
$id = intval($id);
$model_id = intval($model_id);
if ($opajax == 'setorder') {
    db_factory::execute("UPDATE `" . TABLEPRE . "witkey_custom_fields` SET `listorder`='" . intval($ordernum) . "' WHERE (`id`='" . $id . "')");
    die;
}
if ($opajax == 'setopen') {
    db_factory::execute("UPDATE `" . TABLEPRE . "witkey_model` SET `open_custom`='" . intval($opennum) . "' WHERE (`model_id`='" . $model_id . "')");
    die;
}
if ($ac == 'del') {
    CustomClass::delExtData($id);
    $res = $objTable->del('id', $id);
    $res and kekezu::admin_show_msg($_lang['delete_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['delete_fail'], $url, 3, '', 'warning');
} else {
    $where = " 1 = 1 and model_id = " . $model_id;
    $where .= " order by listorder asc ";
    $d = $objTable->get_grid($where, $url, $page, 10, null, 1, 'ajax_dom');
    $dataList = $d['data'];
    $pages = $d['pages'];
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:28,代码来源:admin_custom_fields.php

示例5: defined

<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(213);
$objDistrict = keke_table_class::get_instance('witkey_district');
$url = 'index.php?do=config&view=dq';
if ($page) {
    $page = $_R['page'];
    $url .= '&page=' . $page;
} else {
    $page = 1;
}
$region_config = keke_glob_class::getRegionConfig();
$objDq = keke_table_class::get_instance('witkey_basic_config');
if ($_R['op'] == 'del') {
    $intResult = $objDistrict->del('id', $_R[id]);
    kekezu::admin_show_msg($_lang['operate_success'], "index.php?do=config&view=dq&page=" . $page, 3, '', 'success');
}
if ($_R['op'] == 'region_switch') {
    $result = keke_glob_class::updateRegionConfig('region_search_switch', $_R['val']);
    $result and kekezu::echojson('', $_R['val']) or kekezu::echojson('', $_R['val']);
}
if ($_R['op'] == 'region_checkbox') {
    if ($_R['dtype'] == 'shop') {
        keke_glob_class::updateRegionConfig('region_search_shop', $_R['val']);
    } else {
        keke_glob_class::updateRegionConfig('region_search_task', $_R['val']);
    }
    kekezu::echojson('', $_R['val']);
}
$one = $objDistrict->get_grid('upid=0', $url, $page, 10, ' order by id asc', '1', 'ajax_dom');
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:31,代码来源:admin_config_dq.php

示例6: __construct

 function __construct($comment_type)
 {
     global $kekezu;
     $this->_comment_obj = keke_table_class::get_instance("witkey_comment");
     $this->_comment_type = $comment_type;
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:6,代码来源:keke_comment_class.php

示例7: elseif

        $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'];
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:31,代码来源:admin_tool_file.php

示例8: get_table_obj

 public static function get_table_obj($table = 'witkey_payitem')
 {
     return keke_table_class::get_instance($table);
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:4,代码来源:keke_payitem_class.php

示例9: intval

<?php

$strUrl = 'index.php?do=user&view=gz&op=mark';
$page and $strUrl .= "&page={$page}";
$type and $strUrl .= "&type={$type}";
$obj and $strUrl .= "&obj={$obj}";
$page and $page = intval($page) or $page = 1;
$mark_obj = keke_table_class::get_instance('witkey_mark');
$arrObj = array('goods' => '商品', 'gy' => '雇佣', 'sreward' => '任务', 'mreward' => '任务', 'preward' => '任务', 'tender' => '任务', 'dtender' => '任务');
$arrMarkStatus = array('0' => '尚未评价', '1' => '好评', '2' => '中评', '3' => '差评');
$w1 = ' 1 = 1 ';
if ($type) {
    switch ($type) {
        case 1:
            $w1 .= " and a.mark_status='0' and ((a.by_uid='{$gUid}' and a.mark_type = '2' )) ";
            $w2 .= " and a.mark_status='0' and ((a.by_uid='{$gUid}' and a.mark_type = '2' )) ";
            break;
        case 2:
            $w1 .= " and a.by_uid='{$gUid}' and a.mark_type = '2' ";
            $w2 .= " and a.by_uid='{$gUid}' and a.mark_type = '2' ";
            break;
        case 3:
            $w1 .= " and a.uid = '{$gUid}' and a.mark_type = '1' ";
            $w2 .= " and a.uid='{$gUid}' and a.mark_type = '1' ";
            break;
    }
} else {
    $w1 .= " and ((a.uid = '{$gUid}' and a.mark_type = '1') or (a.by_uid='{$gUid}' and a.mark_type = '2' )) ";
    $w2 .= " and ((a.uid = '{$gUid}' and a.mark_type = '1') or (a.by_uid='{$gUid}' and a.mark_type = '2' )) ";
}
if ($obj) {
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:31,代码来源:gz_mark.php

示例10: defined

<?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);
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:23,代码来源:admin_prom_item_edit.php

示例11: __construct

 public function __construct($code = 'mobile')
 {
     parent::__construct($code);
     $this->_primary_key = 'mobile_a_id';
     $this->_tab_obj = keke_table_class::get_instance($this->_auth_table_name);
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:6,代码来源:keke_auth_mobile_class.php

示例12: defined

<?php

defined('ADMIN_KEKE') or exit('Access Denied');
intval($task_id) or kekezu::admin_show_msg($_lang['param_error'], 'index.php?do=model&model_id=' . $model_id . '&view=list', 3, '', 'warning');
$ops = array('basic', 'work', 'comm');
in_array($op, $ops) or $op = 'basic';
keke_lang_class::loadlang('task_edit', 'task');
if ($op == 'basic') {
    $model_list = $kekezu->_model_list;
    $task_status = dtender_task_class::get_task_status();
    $task_id = $task_id ? $task_id : kekezu::admin_show_msg($_lang['param_error'], "index.php?do=model&model_id={$model_id}&view=list", 3, '', 'warning');
    $task_obj = keke_table_class::get_instance("witkey_task");
    $task_info = db_factory::get_one(" select * from " . TABLEPRE . "witkey_task where task_id = '{$task_id}'");
    $task_sub_time = date('Y-m-d', $task_info['sub_time']);
    $task_start_time = date('Y-m-d', $task_info['start_time']);
    $task_config = unserialize($model_info['config']);
    $file_list = db_factory::query(sprintf(" select * from %switkey_file where task_id='%d' and obj_type='task' ", TABLEPRE, $task_id));
    $cash_rule_arr = kekezu::get_table_data("*", "witkey_task_cash_cove", "model_code='{$model_info['model_code']}'", "", '', '', "cash_rule_id");
    $operate = keke_task_config::can_operate($task_info['task_status'], $task_info['is_top']);
    $task_info['ext_fields'] = CustomClass::getExtDataList($task_id, $task_info['model_id']);
    if ($sbt_edit) {
        if ($ext_fds) {
            CustomClass::editExtData($task_id, $model_id, $ext_fds);
        }
        if (!$fds[indus_id]) {
            kekezu::admin_show_msg($_lang['must_select_a_industry'], $_SERVER['HTTP_REFERER'], 3, '', 'warning');
        }
        if ($_FILES['fle_task_pic']['name']) {
            $task_pic = keke_file_class::upload_file("fle_task_pic");
        } else {
            $task_pic = $task_pic_path;
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:31,代码来源:task_edit.php

示例13: edit_item

 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');
     }
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:20,代码来源:keke_auth_fac_class.php

示例14: defined

<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(2);
$pay_api_obj = keke_table_class::get_instance("witkey_pay_api");
$payment_config = kekezu::get_payment_config($payname, $type);
$pay_config = unserialize($payment_config['config']);
$payment_exist = db_factory::get_count(" select payment from " . TABLEPRE . "witkey_pay_api where payment='{$payname}' and type='{$type}'");
$payment_config or kekezu::admin_show_msg($_lang['wrong_model_directory'], "index.php?do=config&view=pay", 3, '', 'warning');
$temp = array();
foreach (explode(";", $payment_config['initparam']) as $item) {
    $it = explode(":", $item);
    $temp[] = array('k' => $it['0'], 'name' => $it['1'], 'v' => $payment_config[$it['0']]);
}
$items = $temp;
if (isset($sbt_edit)) {
    $pay_config = array();
    $pay_config['pay_status'] = $fds['pay_status'];
    switch ($payname) {
        case 'alipayjs':
            $pay_config['account'] = $fds['account'];
            $pay_config['seller_id'] = $fds['seller_id'];
            $pay_config['safekey'] = $fds['safekey'];
            $pay_config['account_name'] = $fds['account_name'];
            break;
        case 'alipaydual':
            $pay_config['account'] = $fds['account'];
            $pay_config['seller_id'] = $fds['seller_id'];
            $pay_config['safekey'] = $fds['safekey'];
            $pay_config['account_name'] = $fds['account_name'];
            break;
开发者ID:pengfeiaaa,项目名称:web,代码行数:31,代码来源:admin_config_editpay.php

示例15: defined

<?php

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');
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:31,代码来源:goods_config.php


注:本文中的keke_table_class::get_instance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。