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


PHP kekezu::k_match方法代码示例

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


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

示例1: save_comment

 function save_comment($comment_arr, $obj_id, $is_reply = false)
 {
     global $_lang, $kekezu, $uid, $username;
     if (!$uid) {
         return -1;
         die;
     }
     $r = kekezu::check_session('task_leave', 2, 4);
     if ($r == false) {
         return -2;
         die;
     }
     strtolower(CHARSET) == 'gbk' and $comment_arr['content'] = kekezu::utftogbk(kekezu::escape($comment_arr['content']));
     if (kekezu::k_match(array($kekezu->_sys_config['ban_content']), $comment_arr['content'])) {
         return -3;
         die;
     }
     $comment_id = $this->_comment_obj->save($comment_arr);
     $model_list = $kekezu->_model_list;
     if (!$is_reply) {
         if ($this->_comment_type == 'task') {
             $res = db_factory::execute(sprintf(" update %switkey_task set leave_num =ifnull(leave_num,0)+1 where task_id='%d'", TABLEPRE, $obj_id));
             $obj_info = db_factory::get_one(sprintf("select * from %switkey_task where task_id=%d", TABLEPRE, $obj_id));
             if ($obj_info['task_cash_coverage']) {
                 $cash = $obj_info['task_cash_coverage'];
             } else {
                 $cash = $obj_info['task_cash'];
             }
         } elseif ($this->_comment_type == 'service') {
             $res = db_factory::execute(sprintf(" update %switkey_service set leave_num =ifnull(leave_num,0)+1 where service_id='%d'", TABLEPRE, $obj_id));
             $obj_info = db_factory::get_one(sprintf("select * from %switkey_service where service_id=%d", TABLEPRE, $obj_id));
         }
     }
     return $comment_id;
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:35,代码来源:keke_comment_class.php

示例2: intval

     break;
 case 'workinfo':
     $workId = intval($workId);
     $arrWorkInfo = $objTask->get_task_work($workId);
     $arrWorkFiles = $objTask->get_work_file($arrWorkInfo['work_file']);
     $intFavorite = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and obj_id = %d and keep_type = "work"', TABLEPRE . 'witkey_favorite', intval($gUid), intval($arrWorkInfo['work_id'])));
     require keke_tpl_class::template('task/workinfo');
     die;
     break;
 case 'reqedit':
     if (isset($formhash) && kekezu::submitcheck($formhash)) {
         if (strtoupper(CHARSET) == 'GBK') {
             $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;
开发者ID:xupnge1314,项目名称:project,代码行数:31,代码来源:taskhandle.php


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