本文整理汇总了PHP中keke_table_class类的典型用法代码示例。如果您正苦于以下问题:PHP keke_table_class类的具体用法?PHP keke_table_class怎么用?PHP keke_table_class使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了keke_table_class类的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);
}
示例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);
}
}
}
}
}
示例3: get_table_obj
public static function get_table_obj($table = 'witkey_payitem')
{
return keke_table_class::get_instance($table);
}
示例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);
示例5: 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');
}
}
示例6: __construct
function __construct($comment_type)
{
global $kekezu;
$this->_comment_obj = keke_table_class::get_instance("witkey_comment");
$this->_comment_type = $comment_type;
}
示例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);
示例8: defined
<?php
defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(6);
$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');
}
示例9: intval
$ky and $strUrl .= "&ky=" . $ky;
$intPage and $strUrl .= "&intPage=" . $intPage;
$intPagesize and $strUrl .= "&intPagesize=" . intval($intPagesize);
$arrTaskTimeDesc = keke_glob_class::get_taskstatus_desc();
$arrPayitemConfig = PayitemClass::getPayitemConfig(null, null, null, 'item_id');
$pd and $arrIndusPInfo = kekezu::get_indus_info($pd);
$i and $arrIndusInfo = kekezu::get_indus_info($i);
$arrTaskNavs = TaskClass::getEnabledTaskModelList();
if ($m) {
$arrTaskStatus = call_user_func(array($arrTaskNavs[$m]['model_code'] . "_task_class", "get_task_status"));
}
$arrCashCoves = TaskClass::getTaskCashCove();
$arrModelLabel = array(0 => '未知', 1 => '单人', 2 => '多人', 3 => '计件', 4 => '招标', 5 => '订金', 6 => '文件', 7 => '服务');
$arrCityInfo = CommonClass::getDistrictById($p);
$arrDisplaypro = CommonClass::getDistrictByPid('0', 'id,upid,name');
$objTaskT = keke_table_class::get_instance('witkey_task');
$strWhere = " 1=1 ";
$intPage = intval($intPage) ? $intPage : 1;
$intPagesize = intval($intPagesize) ? $intPagesize : 20;
$arrTaskModelIds = array_keys($arrTaskNavs);
in_array($m, $arrTaskModelIds) and $strWhere .= " and a.model_id = " . $m or $strWhere .= " and a.model_id in(" . implode(',', $arrTaskModelIds) . ") ";
$i and $strWhere .= " and a.indus_id = " . $i;
$pd and $strWhere .= " and a.indus_pid = " . $pd;
switch ($r) {
case 1:
$strWhere .= " and a.model_id = 4 ";
break;
case 2:
$strWhere .= " and a.model_id != 4 ";
break;
}
示例10: defined
<?php
defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(32);
$tag_obj = new Keke_witkey_tag_class();
$ad_obj = new Keke_witkey_ad_class();
$table_obj = new keke_table_class('witkey_tag');
$url = "index.php?do={$do}&view={$view}&order_type={$order_type}&w[tpl_type]={$w['tpl_type']}&w[page_size]={$page_size}&w[ord]={$w['ord']}&page={$page}";
if ($sbt_action == $_lang['mulit_delete'] || $ac == 'del') {
if (!empty($delid)) {
$ad_name = db_factory::get_count("select tagname from " . TABLEPRE . "witkey_tag where tag_id = '{$delid}'");
$ad_obj->setWhere("ad_name='{$ad_name}'");
$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');
}
}
示例11: array
db_factory::updatetable(TABLEPRE . "witkey_basic_config", array('v' => $status), array('k' => 'hot_words_status'));
} elseif ($ac == 'handle') {
db_factory::updatetable(TABLEPRE . "witkey_basic_config", array('v' => $status), array('k' => 'update_status'));
} else {
$w = " 1 = 1 ";
$id and $w .= " and id = '{$id}'";
$title and $w .= " and words like '%{$title}%'";
if ($ord) {
switch ($ord) {
case 1:
$w .= " order by id asc";
break;
case 2:
$w .= " order by id desc";
break;
case 3:
$w .= " order by count asc";
break;
case 4:
$w .= " order by count desc";
break;
}
} else {
$w .= 'order by id desc';
}
$obj_Hw = keke_table_class::get_instance("witkey_hotwords");
$d = $obj_Hw->get_grid($w, $url, $page, $pageSize);
$arrHotWords = $d['data'];
$pages = $d['pages'];
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
示例12: array
<?php
$arrSidesPrimary = db_factory::get_table_data('*', 'witkey_article_category', 'cat_type = "help" and art_cat_pid = 100', 'listorder asc ', '', '', 'art_cat_id', 3600);
$arrSecondary = db_factory::get_table_data('*', 'witkey_article_category', 'cat_type = "help"', ' listorder asc ', '', '', 'art_cat_id', 3600);
$arrLastsHelp = db_factory::query('SELECT `art_id`,`art_cat_id`,`art_title` FROM `' . TABLEPRE . 'witkey_article` WHERE cat_type = "help" ORDER BY art_id desc LIMIT 0,5');
$arrCommonHelp = db_factory::query('SELECT `art_id`,`art_cat_id`,`art_title` FROM `' . TABLEPRE . 'witkey_article` WHERE cat_type = "help" ORDER BY views desc LIMIT 0,5');
$arrHotSearch = array('发布任务', '认证', '提现', '充值', '发布商品');
$id and $id = intval($id);
$Keyword = strval(trim($word));
$strUrl = "index.php?do=help";
$id and $strUrl .= "&id=" . intval($id);
$intPage and $strUrl .= "&intPage=" . intval($intPage);
$intPagesize and $strUrl .= "&intPagesize=" . intval($intPagesize);
$objArticleT = keke_table_class::get_instance('witkey_article');
$strWhere .= " cat_type = 'help' ";
$page and $intPage = intval($page);
$intPage = intval($intPage) ? $intPage : 1;
$intPagesize = intval($intPagesize) ? $intPagesize : 15;
$id && $id != '' and $strWhere .= " and art_cat_id=" . intval($id);
$Keyword and $strWhere .= " and ( art_title like '%" . trim($Keyword) . "%' or content like '%" . trim($Keyword) . "%' )";
$strWhere .= " order by art_id desc";
$arrDatas = $objArticleT->get_grid($strWhere, $strUrl, $intPage, $intPagesize, null, null, null);
$arrLists = $arrDatas['data'];
$intCount = $arrDatas['count'];
$strPages = $arrDatas['pages'];
unset($objArticleT);
if ($id) {
$arrHelpKerword = db_factory::get_one("select art_cat_pid from " . TABLEPRE . 'witkey_article_category where art_cat_id = ' . intval($id));
$arrHelpKerword = db_factory::get_one("select seo_title, seo_keyword,seo_desc from " . TABLEPRE . 'witkey_article_category where art_cat_id = ' . intval($arrHelpKerword['art_cat_pid']));
} else {
$arrHelpKerword = db_factory::get_one("select art_cat_pid from " . TABLEPRE . 'witkey_article_category where art_cat_id = 100');
示例13: intval
<?php
$regionCfg = keke_glob_class::getRegionConfig();
$arrDistrictInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_service where service_id=" . intval($id));
$province = CommonClass::getDistrictById($arrDistrictInfo['province']);
$city = CommonClass::getDistrictById($arrDistrictInfo['city']);
$area = CommonClass::getDistrictById($arrDistrictInfo['area']);
$intSellerGoodsNum = db_factory::get_count(sprintf("select count(service_id) from %switkey_service where model_id=6 and uid=%d and service_status=2", TABLEPRE, $arrOwnerInfo['uid']));
$intFavorite = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and obj_id = %d and keep_type = "service"', TABLEPRE . 'witkey_favorite', intval($gUid), intval($arrServiceInfo['service_id'])));
if ($type == "get") {
$arrResult1 = keke_user_class::get_user_info($uid);
$objFavorite = keke_table_class::get_instance('witkey_favorite');
$arrFields = array('keep_type' => $obj_type, 'obj_type' => $do, 'origin_id' => $service_id, 'obj_id' => $service_id, 'obj_name' => $arrServiceInfo['title'], 'uid' => $uid, 'username' => $gUsername, 'on_date' => time());
$intResult = $objFavorite->save($arrFields);
die;
}
if ($type == "getno") {
$sql1 = "DELETE FROM " . TABLEPRE . "witkey_favorite WHERE obj_id =" . $service_id . ' and uid=' . $uid;
$sql1 .= " and obj_type='" . $do . "'";
db_factory::query($sql1);
die;
}
$intFollow = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and fuid = %d', TABLEPRE . 'witkey_free_follow', intval($gUid), intval($arrServiceInfo['uid'])));
if ($gUid && $gUid !== $arrServiceInfo['uid']) {
$myOrderInfo = db_factory::get_one("select a.order_status from " . TABLEPRE . "witkey_order a left join " . TABLEPRE . "witkey_order_detail b on a.order_id=b.order_id where b.obj_type='service' and b.obj_id={$id} and a.order_uid={$gUid}");
}
$page and $intPage = intval($page);
intval($intPage) and $p['page'] = intval($intPage) or $p['page'] = '1';
intval($intPagesize) and $p['page_size'] = intval($intPagesize) or $p['page_size'] = 10;
$objTime = new goods_time_class();
$objTime->validtaskstatus();
示例14: defined
<?php
defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(33);
$kf_obj = keke_table_class::get_instance("witkey_space");
$member_obj = new Keke_witkey_member_class();
$space_obj = new Keke_witkey_space_class();
$url = 'index.php?do=user&view=custom_list&uid=' . $w[uid] . '&username=' . $w[username] . '&w[page_size]=' . $w[page_size] . '&status=' . $w[status] . '&ord[uid]=' . $ord[uid];
switch ($op) {
case "add":
if ($is_submit) {
die('1');
$m_info = db_factory::get_one(" select uid,username,group_id from " . TABLEPRE . "witkey_space where uid = '{$fds['uid']}'");
!$m_info and kekezu::admin_show_msg($_lang['user_no_exit'], $url, 3, '', 'warning');
if ($m_info) {
if ($m_info[group_id] == 7) {
kekezu::admin_show_msg($_lang['no_operate_again_for_user_is_kf_'], $url, 3, '', 'warning');
} else {
$space_obj->setUid($fds[uid]);
$space_obj->setGroup_id(7);
$res = $space_obj->edit_keke_witkey_space();
if ($res) {
kekezu::admin_system_log($_lang['add_new_kf'] . $m_info[username]);
$v_arr = array('管理员名' => $admin_info['username'], '用户名' => $spaceinfo['username']);
keke_msg_class::notify_user($fds['uid'], $m_info['username'], 'kf_set', '客服设置', $v_arr, 2);
kekezu::admin_show_msg($_lang['add_kf_successfully'], $url, 3, '', 'success');
}
}
}
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_custom_add');
示例15: __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);
}