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


PHP kekezu::cutstr方法代码示例

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


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

示例1: array_filter

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

示例2: keke_rss_class

$objRss = new keke_rss_class();
$objRss->title = $kekezu->_sys_config['rss_title'];
$objRss->link = $kekezu->_sys_config['website_url'];
$objRss->description = $kekezu->_sys_config['rss_content'];
if ($kekezu->_sys_config['rss_choice_task'] == '1') {
    $arrTask = db_factory::query(sprintf("select * from %switkey_task where task_status>=2 order by task_id desc limit 10", TABLEPRE));
    foreach ($arrTask as $k => $v) {
        $arrRss[$v['start_time']]['title'] = '[任务]' . $v['task_title'];
        $arrRss[$v['start_time']]['link'] = $kekezu->_sys_config['website_url'] . '/index.php?do=task&id=' . $v['task_id'];
        $arrRss[$v['start_time']]['description'] = kekezu::cutstr(kekezu::escape(strip_tags(htmlspecialchars_decode($v['task_desc']))), 100) . '...';
    }
}
if ($kekezu->_sys_config['rss_choice_news'] == '1') {
    $arrAct = db_factory::query(sprintf("select * from %switkey_article where cat_type = 'article' order by art_id desc limit 10", TABLEPRE));
    foreach ($arrAct as $k => $v) {
        $arrRss[$v['pub_time']]['title'] = '[资讯]' . $v['art_title'];
        $arrRss[$v['pub_time']]['link'] = $kekezu->_sys_config['website_url'] . '/index.php?do=article&id=' . $v['art_id'];
        $arrRss[$v['pub_time']]['description'] = kekezu::cutstr(kekezu::escape(strip_tags(htmlspecialchars_decode($v['content']))), 100) . '...';
    }
}
krsort($arrRss);
$arr = array_slice($arrRss, 0, 10);
foreach ($arr as $v) {
    $objItem = new FeedItem();
    $objItem->title = $v['title'];
    $objItem->link = $v['link'];
    $objItem->description = $v['description'];
    $objRss->addItem($objItem);
}
$objRss->saveFeed("RSS2.0", "data/index.xml");
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:30,代码来源:rss.php

示例3: intval

            db_factory::execute(sprintf("update %switkey_article_keyword set show_count = show_count +%d where keyword_id=%d", TABLEPRE, intval($intShowCount), $v['keyword_id']));
        }
    }
}
$strWhere = " and 1=1 ";
$intCatid and $strWhere .= " and  art_cat_id  = " . intval($arrArtInfo['art_cat_id']);
$arrArtUp = db_factory::get_one(sprintf("select  art_id ,art_cat_id,art_title  from %switkey_article  where cat_type = 'article' and  art_id<'%d'  %s order by art_id desc limit 0,1", TABLEPRE, $intId, $strWhere));
$arrArtDown = db_factory::get_one(sprintf("select art_id ,art_cat_id,art_title  from %switkey_article  where cat_type = 'article' and  art_id>'%d' %s order by art_id asc limit 0,1", TABLEPRE, $intId, $strWhere));
if (!$_COOKIE["article_" . $intId]) {
    $sqlplus = "update %switkey_article set views = views+1 where art_id = %d";
    db_factory::execute(sprintf($sqlplus, TABLEPRE, $intId));
}
setcookie("article_" . $intId, "exist_" . $intId, time() + 3600 * 24, COOKIE_PATH, COOKIE_DOMAIN, NULL, TRUE);
if ($arrArtInfo['seo_title']) {
    $strPageTitle = $arrArtInfo['seo_title'];
} else {
    $strPageTitle = $arrArtInfo['art_title'] . '-' . $arrArtInfo['cat_name'] . '- ' . $_K['html_title'];
}
if ($arrArtInfo['seo_keyword']) {
    $strPageKeyword = $arrArtInfo['seo_keyword'];
} else {
    $strPageKeyword = $arrArtInfo['cat_name'];
}
if ($arrArtInfo['seo_desc']) {
    $strPageDescription = $arrArtInfo['seo_desc'];
} else {
    $strPageDescription = kekezu::cutstr($arrArtInfo['content'], 100);
}
$arrHotNews = db_factory::query("select * from " . TABLEPRE . "witkey_article where cat_type='article'  order by views desc limit 10");
$arrRecommShops = db_factory::query(sprintf("select a.username,a.uid,b.indus_id,b.indus_pid,a.shop_name,if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) as good_rate from %switkey_shop a " . " left join %switkey_space b on a.uid=b.uid  where b.recommend=1 and b.status=1 and IFNULL(a.is_close,0)=0 and shop_status=1 order by  good_rate desc limit 0,5", TABLEPRE, TABLEPRE), 1, $intIndexCacheTime);
$_SESSION['spread'] = 'index.php?do=article&id=' . intval($id);
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:31,代码来源:article.php

示例4: array

     if ($arrTaskInfo['seo_keyword']) {
         $strPageKeyword = $arrTaskInfo['seo_keyword'];
     } else {
         if ($indusInfo['seo_keyword']) {
             $strPageKeyword = $indusInfo['seo_keyword'];
         } else {
             $strPageKeyword = $indus_arr[$arrTaskInfo['indus_id']]['indus_name'] . ',' . $indus_p_arr[$arrTaskInfo['indus_pid']]['indus_name'];
         }
     }
     if ($arrTaskInfo['seo_desc']) {
         $strPageDescription = $arrTaskInfo['seo_desc'];
     } else {
         if ($indusInfo['seo_desc']) {
             $strPageDescription = $indusInfo['seo_desc'];
         } else {
             $strPageDescription = kekezu::cutstr(htmlspecialchars_decode(stripslashes($arrTaskInfo['task_desc'])), 100);
         }
     }
 }
 $arrCashCoves = TaskClass::getTaskCashCove();
 $arrBreadcrumbs = array(1 => array('url' => 'index.php?do=tasklist', 'name' => '任务大厅'), 2 => array('url' => 'index.php?do=tasklist&pd=' . $arrTaskInfo['indus_pid'], 'name' => $indus_p_arr[$arrTaskInfo['indus_pid']]['indus_name']), 3 => array('url' => 'index.php?do=tasklist&pd=' . $arrTaskInfo['indus_pid'] . '&i=' . $arrTaskInfo['indus_id'], 'name' => $indus_arr[$arrTaskInfo['indus_id']]['indus_name']));
 $arrWorkFlag = array(1 => array('id' => 2, 'style' => 'fa-trophy', 'name' => '一等奖'), 2 => array('id' => 2, 'style' => 'fa-trophy', 'name' => '二等奖'), 3 => array('id' => 2, 'style' => 'fa-trophy', 'name' => '三等奖'), 4 => array('id' => 4, 'style' => 'fa-check-circle', 'name' => '中标'), 5 => array('id' => 5, 'style' => 'fa-dot-circle-o', 'name' => '入围'), 6 => array('id' => 6, 'style' => 'fa-check-circle', 'name' => '合格'), 7 => array('id' => 7, 'style' => 'fa-times-circle', 'name' => '淘汰'), 8 => array('id' => 8, 'style' => 'fa-times-circle', 'name' => '不可选标'), 9 => array('id' => 9, 'style' => 'fa-times-circle', 'name' => '放弃'));
 $strUrl = "index.php?do=task&id=" . $intId;
 $arrView = array('work', 'comment', 'mark');
 if (!in_array($view, $arrView)) {
     $view = 'work';
 }
 $intDeals = TaskClass::getWikiDealbyUid($arrTaskInfo['uid']);
 $arrWorkService = TaskClass::getWorkServers($intId, $arrTaskInfo['model_id']);
 $arrUserInfo = keke_user_class::get_user_info($arrTaskInfo['uid']);
 $strMarkQuerySQl = " SELECT COUNT(mark_id) FROM `" . TABLEPRE . "witkey_mark` ";
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:31,代码来源:task.php

示例5: switch

 if ($arrServiceInfo['seo_keyword']) {
     $strPageKeyword = $arrServiceInfo['seo_keyword'];
 } else {
     if ($indusInfo['seo_keyword']) {
         $strPageTitle = $indusInfo['seo_keyword'];
     } else {
         $strPageKeyword = $indus_arr[$arrServiceInfo['indus_id']]['indus_name'] . ',' . $indus_p_arr[$arrServiceInfo['indus_pid']]['indus_name'];
     }
 }
 if ($arrServiceInfo['seo_desc']) {
     $strPageDescription = $arrServiceInfo['seo_desc'];
 } else {
     if ($indusInfo['seo_desc']) {
         $strPageTitle = $indusInfo['seo_desc'];
     } else {
         $strPageDescription = kekezu::cutstr($arrServiceInfo['content'], 100);
     }
 }
 $floatGoodMark = CommonClass::getGoodsMark(intval($intId));
 if ($uid != $arrServiceInfo['uid'] && $arrServiceInfo['service_status'] != 2 && $arrServiceInfo['service_status'] != 5) {
     $gUid == ADMIN_UID or kekezu::show_msg('操作提示', "index.php?do=goodslist", '1', '商品不存在', 'warning');
 }
 if (isset($op)) {
     switch ($op) {
         case "report":
             $transname = keke_report_class::get_transrights_name($type);
             $report_reason = keke_report_class::get_report_product_reason();
             if (isset($formhash) && kekezu::submitcheck($formhash)) {
                 $resCheck = keke_report_class::check_if_report($type, $objType, $objId, $uid, $toUid);
                 if ($resCheck === true) {
                     $tarContent = kekezu::escape($tarContent);
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:31,代码来源:goods.php

示例6: array

     if ($arrTaskInfo['seo_keyword']) {
         $strPageKeyword = $arrTaskInfo['seo_keyword'];
     } else {
         if ($indusInfo['seo_keyword']) {
             $strPageTitle = $indusInfo['seo_keyword'];
         } else {
             $strPageKeyword = $indus_arr[$arrTaskInfo['indus_id']]['indus_name'] . ',' . $indus_p_arr[$arrTaskInfo['indus_pid']]['indus_name'];
         }
     }
     if ($arrTaskInfo['seo_desc']) {
         $strPageDescription = $arrTaskInfo['seo_desc'];
     } else {
         if ($indusInfo['seo_desc']) {
             $strPageTitle = $indusInfo['seo_desc'];
         } else {
             $strPageDescription = kekezu::cutstr($arrTaskInfo['task_desc'], 100);
         }
     }
 }
 $arrCashCoves = TaskClass::getTaskCashCove();
 $arrBreadcrumbs = array(1 => array('url' => 'index.php?do=tasklist', 'name' => '任务大厅'), 2 => array('url' => 'index.php?do=tasklist&pd=' . $arrTaskInfo['indus_pid'], 'name' => $indus_p_arr[$arrTaskInfo['indus_pid']]['indus_name']), 3 => array('url' => 'index.php?do=tasklist&pd=' . $arrTaskInfo['indus_pid'] . '&i=' . $arrTaskInfo['indus_id'], 'name' => $indus_arr[$arrTaskInfo['indus_id']]['indus_name']));
 $arrWorkFlag = array(1 => array('id' => 2, 'style' => 'fa-trophy', 'name' => '一等奖'), 2 => array('id' => 2, 'style' => 'fa-trophy', 'name' => '二等奖'), 3 => array('id' => 2, 'style' => 'fa-trophy', 'name' => '三等奖'), 4 => array('id' => 4, 'style' => 'fa-check-circle', 'name' => '中标'), 5 => array('id' => 5, 'style' => 'fa-dot-circle-o', 'name' => '入围'), 6 => array('id' => 6, 'style' => 'fa-check-circle', 'name' => '合格'), 7 => array('id' => 7, 'style' => 'fa-times-circle', 'name' => '淘汰'), 8 => array('id' => 8, 'style' => 'fa-times-circle', 'name' => '不可选标'), 9 => array('id' => 9, 'style' => 'fa-times-circle', 'name' => '放弃'));
 $strUrl = "index.php?do=task&id=" . $intId;
 $arrView = array('work', 'comment', 'mark');
 if (!in_array($view, $arrView)) {
     $view = 'work';
 }
 $intDeals = TaskClass::getWikiDealbyUid($arrTaskInfo['uid']);
 $arrWorkService = TaskClass::getWorkServers($intId, $arrTaskInfo['model_id']);
 $arrUserInfo = keke_user_class::get_user_info($arrTaskInfo['uid']);
 $strMarkQuerySQl = " SELECT COUNT(mark_id) FROM `" . TABLEPRE . "witkey_mark` ";
开发者ID:pengfeiaaa,项目名称:web,代码行数:31,代码来源:task.php

示例7: foreach

    $objRss->title = $kekezu->_sys_config['rss_title'];
    $objRss->link = $kekezu->_sys_config['website_url'];
    $objRss->description = $kekezu->_sys_config['rss_content'];
    if ($kekezu->_sys_config['rss_choice_task'] == '1') {
        $arrTask = db_factory::query(sprintf("select * from %switkey_task where task_status>=2 order by task_id desc limit 10", TABLEPRE));
        foreach ($arrTask as $k => $v) {
            $arrRss[$v['start_time']]['title'] = '[任务]' . $v['task_title'];
            $arrRss[$v['start_time']]['link'] = $kekezu->_sys_config['website_url'] . '/index.php?do=task&id=' . $v['task_id'];
            $arrRss[$v['start_time']]['description'] = $v['task_desc'] . '...';
        }
    }
    if ($kekezu->_sys_config['rss_choice_news'] == '1') {
        $arrAct = db_factory::query(sprintf("select * from %switkey_article order by art_id desc limit 10", TABLEPRE));
        foreach ($arrAct as $k => $v) {
            $arrRss[$v['pub_time']]['title'] = '[资讯]' . $v['art_title'];
            $arrRss[$v['pub_time']]['link'] = $kekezu->_sys_config['website_url'] . '/index.php?do=article&id=' . $v['art_id'];
            $arrRss[$v['pub_time']]['description'] = kekezu::cutstr(kekezu::escape(strip_tags($v['content'])), 100) . '...';
        }
    }
    krsort($arrRss);
    $arr = array_slice($arrRss, 0, 10);
    foreach ($arr as $v) {
        $objItem = new FeedItem();
        $objItem->title = $v['title'];
        $objItem->link = $v['link'];
        $objItem->description = $v['description'];
        $objRss->addItem($objItem);
    }
    $objRss->saveFeed("RSS2.0", "../data/index.xml");
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view);
开发者ID:pengfeiaaa,项目名称:web,代码行数:31,代码来源:admin_config_rss.php


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