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


PHP keke_tpl_class类代码示例

本文整理汇总了PHP中keke_tpl_class的典型用法代码示例。如果您正苦于以下问题:PHP keke_tpl_class类的具体用法?PHP keke_tpl_class怎么用?PHP keke_tpl_class使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: show_msg

 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;
 }
开发者ID:xupnge1314,项目名称:project,代码行数:19,代码来源:keke_core_class.php

示例2: run_backup

 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;
 }
开发者ID:pengfeiaaa,项目名称:web,代码行数:43,代码来源:keke_backup_class.php

示例3: defined

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

示例4: get_adgroup_by_target

 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']);
 }
开发者ID:xupnge1314,项目名称:project,代码行数:7,代码来源:keke_loaddata_class.php

示例5: service_shop_class

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

示例6: array_merge

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

示例7: mysql_error

 }
 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
开发者ID:xupnge1314,项目名称:project,代码行数:31,代码来源:index.php

示例8: defined

<?php

defined('IN_KEKE') or exit('Access Denied');
require keke_tpl_class::template('close');
die;
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:5,代码来源:close.php

示例9: intval

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

示例10: defined

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

示例11: intval

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

示例12: strip_tags

                $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)
开发者ID:xupnge1314,项目名称:project,代码行数:31,代码来源:taskhandle.php

示例13: intval

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

示例14: defined

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

示例15: exit

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


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