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


PHP jieqi_htmlstr函数代码示例

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


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

示例1: jieqi_ulogin_iprocess

/**
 * 用户接口,登录处理
 * 
 * @param      array       $params 参数数组
 * 必须参数: $params['username'] - 用户名,$params['password'] - 密码,$params['email'] - 邮箱
 * @access     public
 * @return     int    
 */
function jieqi_ulogin_iprocess(&$params)
{
    global $jieqiLang;
    if (!isset($jieqiLang['system'])) {
        jieqi_loadlang('users', 'system');
    }
    if (defined('JIEQI_WAP_PAGE')) {
        jieqi_wapgourl($params['jumpurl']);
    } elseif ($_REQUEST['jumphide']) {
        header('Location: ' . $params['jumpurl']);
    } else {
        jieqi_jumppage($params['jumpurl'], $jieqiLang['system']['logon_title'], sprintf($jieqiLang['system']['login_success'], jieqi_htmlstr($_REQUEST['username'])));
    }
    return true;
}
开发者ID:thu0ng91,项目名称:jmc,代码行数:23,代码来源:funuser.php

示例2: getbadgeurl

    $jieqiTpl->assign('jieqi_honor_imageurl', getbadgeurl(2, $honorid, 0, true));
    //自定义徽章
    $jieqi_jieqi_badgerows = array();
    $badgeary = unserialize($jieqiUsers->getVar('badges', 'n'));
    if (is_array($badgeary) && count($badgeary) > 0) {
        $award_query = JieqiQueryHandler::getInstance('JieqiQueryHandler');
        $criteria = new CriteriaCompo();
        $criteria->setTables(jieqi_dbprefix('badge_award') . ' a LEFT JOIN ' . jieqi_dbprefix('badge_badge') . ' b ON a.badgeid=b.badgeid');
        $criteria->add(new Criteria('a.toid', $_SESSION['jieqiUserId']));
        $criteria->setSort('b.btypeid ASC, a.awardid');
        $criteria->setOrder('ASC');
        $award_query->queryObjects($criteria);
        $k = 0;
        while ($award = $award_query->getObject()) {
            $jieqi_badgerows[$k]['imageurl'] = getbadgeurl($award->getVar('btypeid', 'n'), $award->getVar('linkid', 'n'), $award->getVar('imagetype', 'n'));
            $jieqi_badgerows[$k]['caption'] = jieqi_htmlstr($award->getVar('caption'));
            $k++;
        }
    }
    $jieqiTpl->assign_by_ref('jieqi_badgerows', $jieqi_badgerows);
    $jieqiTpl->assign('jieqi_use_badge', 1);
} else {
    $jieqiTpl->assign('jieqi_use_badge', 0);
}
//权利
jieqi_getconfigs('system', 'configs');
jieqi_getconfigs('system', 'right');
$handle = @opendir(JIEQI_ROOT_PATH . '/modules');
while ($file = @readdir($handle)) {
    if ($file != '.' && $file != '..' && is_dir(JIEQI_ROOT_PATH . '/modules' . DIRECTORY_SEPARATOR . $file)) {
        jieqi_getconfigs($file, 'configs');
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:userdetail.php

示例3: editChapter

 function editChapter($name, &$content, $type, $chapterorder, $chapterid)
 {
     global $jieqiConfigs;
     global $jieqi_file_postfix;
     $txtdir = $this->getDir('txtdir');
     jieqi_writefile($txtdir . '/' . $chapterid . $jieqi_file_postfix['txt'], $content);
     $this->loadOPF();
     $articlename = jieqi_htmlstr($this->metas['dc:Title']);
     $contenttype = $this->chapters[$chapterorder - 1]['content-type'];
     $this->chapters[$chapterorder - 1] = array('id' => $name, 'href' => $chapterid . $jieqi_file_postfix['txt'], 'media-type' => 'text/html', 'content-type' => $contenttype);
     $this->createOPF();
     //生成html
     if ($jieqiConfigs['article']['makehtml']) {
         //生成html目录
         $this->nowid = $chapterorder;
         $this->makeIndex();
         //如果是章节而不是分卷则生成相应章节的html
         if ($contenttype == 'chapter') {
             //章节
             $this->makeHtml($this->nowid);
         }
     }
     $this->makepack();
 }
开发者ID:thu0ng91,项目名称:jmc,代码行数:24,代码来源:package.php

示例4: unset

$criteria->setSort('weight');
$criteria->setOrder('ASC');
$modules_handler->queryObjects($criteria);
unset($criteria);
$jieqiModary = array();
while ($v = $modules_handler->getObject()) {
    $jieqiModary[$v->getVar('name', 'n')] = array('name' => $v->getVar('name', 'n'), 'caption' => $v->getVar('caption', 'n'), 'description' => $v->getVar('description', 'n'), 'version' => sprintf("%0.2f", intval($v->getVar('version', 'n')) / 100), 'vtype' => $v->getVar('vtype', 'n'), 'publish' => $v->getVar('publish', 'n'));
}
if (!isset($license_ary)) {
    $license_ary = jieqi_strtosary($jieqi_license_ary[2], '=', '|');
}
$licenses = array();
$i = 0;
foreach ($jieqiModary as $k => $v) {
    $licenses[$i]['modname'] = jieqi_htmlstr($jieqiModary[$k]['caption']);
    $licenses[$i]['modversion'] = jieqi_htmlstr($jieqiModary[$k]['version']);
    if (isset($license_ary[$k])) {
        $vtype = $license_ary[$k];
    } else {
        $vtype = 'Free';
    }
    if (defined('LANG_VERSION_' . strtoupper($vtype))) {
        $licenses[$i]['modvtype'] = constant('LANG_VERSION_' . strtoupper($vtype));
    } else {
        $licenses[$i]['modvtype'] = '';
    }
    $i++;
}
$jieqiTpl->assign_by_ref('licenses', $licenses);
$jieqiTpl->setCaching(0);
$jieqiTset['jieqi_contents_template'] = JIEQI_ROOT_PATH . '/templates/admin/license.html';
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:license.php

示例5: JieqiPackage

include_once $jieqiModules['article']['path'] . '/class/package.php';
$package = new JieqiPackage($_REQUEST['id']);
if ($package->loadOPF()) {
    //先扣分再下载
    if ($jieqiConfigs['article']['scoretxtfulldown'] > 0) {
        include_once JIEQI_ROOT_PATH . '/class/users.php';
        $users_handler =& JieqiUsersHandler::getInstance('JieqiUsersHandler');
        $users_handler->changeScore($_SESSION['jieqiUserId'], $jieqiConfigs['article']['scoretxtfulldown'], false, false);
        @session_write_close();
    }
    header("Content-type: text/plain");
    header("Accept-Ranges: bytes");
    if ($_REQUEST['fname'] == 'id') {
        header("Content-Disposition: attachment; filename=" . $_REQUEST['id'] . ".txt");
    } else {
        header("Content-Disposition: attachment; filename=" . jieqi_htmlstr($package->metas['dc:Title']) . ".txt");
    }
    $br = "\r\n";
    if (!empty($jieqiConfigs['article']['txtarticlehead'])) {
        echo $jieqiConfigs['article']['txtarticlehead'] . $br . $br;
    }
    echo '《' . $package->metas['dc:Title'] . '》' . $br;
    $volume = '';
    $txtdir = $package->getDir('txtdir', true, false);
    foreach ($package->chapters as $k => $chapter) {
        if ($chapter['content-type'] == 'volume') {
            $volume = $chapter['id'];
        } else {
            echo $br . $br . $volume . ' ' . $chapter['id'] . $br . $br;
            //echo jieqi_readfile($txtdir.'/'.$chapter['href']);
            @readfile($txtdir . '/' . $chapter['href']);
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:txtarticle.php

示例6: jieqi_htmlstr

    $jieqiTpl->assign('jieqi_newmessage', 0);
    $jieqiTpl->assign('jieqi_userid', 0);
    $jieqiTpl->assign('jieqi_username', '');
    $jieqiTpl->assign('jieqi_useruname', '');
    $jieqiTpl->assign('jieqi_group', JIEQI_GROUP_GUEST);
    $jieqiTpl->assign('jieqi_groupname', $jieqiGroups[JIEQI_GROUP_GUEST]);
    $jieqiTpl->assign('jieqi_score', 0);
    $jieqiTpl->assign('jieqi_experience', 0);
    $jieqiTpl->assign('jieqi_honor', '');
    $jieqiTpl->assign('jieqi_vip', 0);
    $jieqiTpl->assign('jieqi_egold', 0);
    $jieqiTpl->assign('jieqi_avatar', 0);
} else {
    $jieqiTpl->assign('jieqi_userid', $_SESSION['jieqiUserId']);
    $jieqiTpl->assign('jieqi_username', jieqi_htmlstr($_SESSION['jieqiUserName']));
    $jieqiTpl->assign('jieqi_useruname', jieqi_htmlstr($_SESSION['jieqiUserUname']));
    $jieqiTpl->assign('jieqi_group', $_SESSION['jieqiUserGroup']);
    $jieqiTpl->assign('jieqi_groupname', $jieqiGroups[$_SESSION['jieqiUserGroup']]);
    $jieqiTpl->assign('jieqi_score', $_SESSION['jieqiUserScore']);
    $jieqiTpl->assign('jieqi_experience', $_SESSION['jieqiUserExperience']);
    $jieqiTpl->assign('jieqi_honor', $_SESSION['jieqiUserHonor']);
    $jieqiTpl->assign('jieqi_vip', $_SESSION['jieqiUserVip']);
    $jieqiTpl->assign('jieqi_egold', $_SESSION['jieqiUserEgold']);
    $jieqiTpl->assign('jieqi_avatar', $_SESSION['jieqiUserAvatar']);
    if (isset($_SESSION['jieqiNewMessage']) && $_SESSION['jieqiNewMessage'] > 0) {
        $jieqiTpl->assign('jieqi_newmessage', $_SESSION['jieqiNewMessage']);
    } else {
        $jieqiTpl->assign('jieqi_newmessage', 0);
    }
}
$jieqiTpl->assign('jieqi_userstatus', $jieqiUsersStatus);
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:header.php

示例7: getVar

 /**
  * 返回合格式化后变量
  *
  * @param      string      $key 键值
  * @param      string      $format 格式化
  * @access     public
  * @return     mixed       格式化后的值
  */
 function getVar($key, $format = 's')
 {
     if (isset($this->vars[$key]['value'])) {
         if (is_string($this->vars[$key]['value'])) {
             switch (strtolower($format)) {
                 case 's':
                     return jieqi_htmlstr($this->vars[$key]['value']);
                 case 'e':
                     return preg_replace("/&#(\\d+);/isU", "&#\\1;", htmlspecialchars($this->vars[$key]['value'], ENT_QUOTES));
                 case 'q':
                     return jieqi_dbslashes($this->vars[$key]['value']);
                 case 't':
                     return $this->vars[$key]['caption'];
                 case 'o':
                     return !empty($this->vars[$key]['options'][$this->vars[$key]['value']]) ? $this->vars[$key]['options'][$this->vars[$key]['value']] : '';
                 case 'n':
                 default:
                     return $this->vars[$key]['value'];
             }
         } else {
             return $this->vars[$key]['value'];
         }
     } else {
         return false;
     }
 }
开发者ID:thu0ng91,项目名称:jmc,代码行数:34,代码来源:database.php

示例8: jieqi_printfail

    $egold = $paylog->getVar('egold');
    if ($payflag == -1) {
        jieqi_printfail($jieqiLang['pay']['no_money_confirm']);
    } elseif ($payflag == 0) {
        if ($paylog->getVar('note', 'n') == $buypass) {
            include_once JIEQI_ROOT_PATH . '/class/users.php';
            $users_handler =& JieqiUsersHandler::getInstance('JieqiUsersHandler');
            $ret = $users_handler->income($buyid, $egold, $jieqiPayset[JIEQI_PAY_TYPE]['paysilver'], $jieqiPayset[JIEQI_PAY_TYPE]['payscore'][$egold]);
            if ($ret) {
                $note = sprintf($jieqiLang['pay']['add_egold_success'], $buyname, JIEQI_EGOLD_NAME, $egold);
            } else {
                $note = sprintf($jieqiLang['pay']['add_egold_failure'], $buyid, $buyname, JIEQI_EGOLD_NAME, $egold);
            }
            $paylog->setVar('buyid', $buyid);
            $paylog->setVar('buyname', $buyname);
            $paylog->setVar('rettime', JIEQI_NOW_TIME);
            $paylog->setVar('note', $note);
            $paylog->setVar('payflag', 1);
            if (!$paylog_handler->insert($paylog)) {
                jieqi_printfail($jieqiLang['pay']['save_paylog_failure']);
            }
        } else {
            jieqi_printfail($jieqiLang['pay']['error_buy_pass']);
        }
        jieqi_msgwin(LANG_DO_SUCCESS, sprintf($jieqiLang['pay']['buy_egold_success'], jieqi_htmlstr($buyname), JIEQI_EGOLD_NAME, $egold));
    } else {
        jieqi_printfail($jieqiLang['pay']['already_add_egold']);
    }
} else {
    jieqi_printfail($jieqiLang['pay']['no_buy_record']);
}
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:ivansmsconfirm.php

示例9: date

 } else {
     $reviewrows[$k]['topflag'] = 0;
 }
 if ($v->getVar('goodflag') == 1) {
     $reviewrows[$k]['goodflag'] = 1;
     $start += 4;
 } else {
     $reviewrows[$k]['goodflag'] = 0;
 }
 $reviewrows[$k]['postdate'] = date(JIEQI_DATE_FORMAT . ' ' . JIEQI_TIME_FORMAT, $v->getVar('postdate'));
 $reviewrows[$k]['userid'] = $v->getVar('userid');
 $reviewrows[$k]['username'] = $v->getVar('username');
 if ($jieqiConfigs['article']['reviewenter'] == '0') {
     $reviewrows[$k]['content'] = jieqi_htmlstr(jieqi_limitwidth(str_replace(array("\r", "\n"), array('', ' '), $v->getVar('reviewtext', 'n')), $jieqiConfigs['article']['reviewwidth'], $start));
 } else {
     $reviewrows[$k]['content'] = jieqi_htmlstr(jieqi_limitwidth($v->getVar('reviewtext', 'n'), $jieqiConfigs['article']['reviewwidth'], $start));
 }
 $reviewrows[$k]['url_top'] = jieqi_addurlvars(array('action' => 'top', 'rid' => $v->getVar('reviewid')));
 $reviewrows[$k]['url_untop'] = jieqi_addurlvars(array('action' => 'untop', 'rid' => $v->getVar('reviewid')));
 $reviewrows[$k]['url_good'] = jieqi_addurlvars(array('action' => 'good', 'rid' => $v->getVar('reviewid')));
 $reviewrows[$k]['url_normal'] = jieqi_addurlvars(array('action' => 'normal', 'rid' => $v->getVar('reviewid')));
 $reviewrows[$k]['url_delete'] = jieqi_addurlvars(array('action' => 'del', 'rid' => $v->getVar('reviewid')));
 $reviewrows[$k]['checkbox'] = '<input type="checkbox" id="checkid[]" name="checkid[]" value="' . $v->getVar('reviewid') . '">';
 $reviewrows[$k]['articleid'] = $v->getVar('articleid');
 $reviewrows[$k]['articlename'] = $v->getVar('articlename');
 if ($jieqiConfigs['article']['fakeinfo'] > 0) {
     $reviewrows[$k]['articlesubdir'] = jieqi_getsubdir($v->getVar('articleid'));
     //子目录
     if (!empty($jieqiConfigs['article']['fakeprefix'])) {
         $tmpvar = '/' . $jieqiConfigs['article']['fakeprefix'] . 'info';
     } else {
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:review.php

示例10: foreach

             		}
             		*/
             //开始导入SQL
             foreach ($sqlfilearray as $v) {
                 $sqlfilecontent = jieqi_readfile(MYSQL_BACKUP_PATH . '/' . $v);
                 $sqlary = array();
                 $sqlerr = array();
                 jieqi_splitsqlfile($sqlary, str_replace(' jieqi', ' ' . JIEQI_DB_PREFIX, $sqlfilecontent));
                 foreach ($sqlary as $s) {
                     $s = trim($s);
                     if (!empty($s) and strlen($s) > 5) {
                         $retflag = $db_query->execute(jieqi_syntablestruct($s, MYSQL_SERVER_INFO > '4.1', JIEQI_DB_CHARSET));
                         if (!$retflag) {
                             $sqlerr[] = array('sql' => $s, 'error' => $db_query->db->error());
                             //显示错误
                             jieqi_printfail(sprintf($jieqiLang[JIEQI_MODULE_NAME]['print_sql_error'], jieqi_htmlstr($s), jieqi_htmlstr($db_query->db->error())));
                             break;
                         }
                     }
                 }
             }
             //处理成功跳转
             jieqi_jumppage('dbmanage.php?option=import', LANG_DO_SUCCESS, $jieqiLang[JIEQI_MODULE_NAME]['import_mysql_success']);
         } else {
             jieqi_printfail($jieqiLang[JIEQI_MODULE_NAME]['import_file_error']);
         }
     } else {
         jieqi_printfail($errtext);
     }
 } else {
     $jieqiTpl->assign('option', 2);
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:dbmanage.php

示例11: jieqi_ulogin_iprocess

/**
 * 用户接口,登录处理
 * 
 * @param      array       $params 参数数组
 * 必须参数: $params['username'] - 用户名,$params['password'] - 密码,$params['email'] - 邮箱
 * @access     public
 * @return     int    
 */
function jieqi_ulogin_iprocess(&$params)
{
    global $jieqiLang;
    if (!isset($jieqiLang['system'])) {
        jieqi_loadlang('users', 'system');
    }
    $ucsyncode = '';
    if ($params['uc_uid'] > 0) {
        //jieqi登录成功,uc也登陆成功,同步登录
        $ucsyncode = uc_user_synlogin($params['uc_uid']);
    } elseif ($params['uc_uid'] == -1) {
        //jieqi登录成功,uc该用户不存在,自动注册
        $params['uc_uid'] = uc_user_register($_REQUEST['username'], $_REQUEST['password'], $_SESSION['jieqiUserEmail']);
        if ($params['uc_uid'] > 0) {
            $ucsyncode = uc_user_synlogin($params['uc_uid']);
        }
    } elseif ($params['uc_uid'] == -2) {
        //jieqi登录成功,uc该用户密码错
        if ($data = uc_get_user($params['username'])) {
            $params['uc_uid'] = $data[0];
            if ($params['uc_uid'] > 0) {
                uc_user_edit($params['username'], '', $params['password'], '', 1);
                $ucsyncode = uc_user_synlogin($params['uc_uid']);
            }
        }
    } elseif ($params['uc_uid'] == -3) {
        //jieqi登录成功,uc该用户安全提问错
        if ($data = uc_get_user($params['username'])) {
            $params['uc_uid'] = $data[0];
            if ($params['uc_uid'] > 0) {
                $ucsyncode = uc_user_synlogin($params['uc_uid']);
            }
        }
    }
    if (defined('JIEQI_WAP_PAGE')) {
        jieqi_wapgourl($params['jumpurl']);
    } elseif ($_REQUEST['jumphide']) {
        jieqi_jumppage($params['jumpurl'], '', $ucsyncode, true);
    } else {
        jieqi_jumppage($params['jumpurl'], $jieqiLang['system']['logon_title'], sprintf($jieqiLang['system']['login_success'], jieqi_htmlstr($params['username'])) . $ucsyncode);
    }
    return true;
}
开发者ID:thu0ng91,项目名称:jmc,代码行数:51,代码来源:funuser_ucenter.php

示例12: define

 * @category   jieqicms
 * @package    system
 * @copyright  Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
 * @author     $Author: juny $
 * @version    $Id: left.php 344 2009-06-23 03:06:07Z juny $
 */
define('JIEQI_MODULE_NAME', 'system');
require_once '../global.php';
include_once JIEQI_ROOT_PATH . '/class/power.php';
$power_handler =& JieqiPowerHandler::getInstance('JieqiPowerHandler');
$power_handler->getSavedVars('system');
jieqi_checkpower($jieqiPower['system']['adminpanel'], $jieqiUsersStatus, $jieqiUsersGroup, false, true);
//包含页头页尾
include_once JIEQI_ROOT_PATH . '/admin/header.php';
if (!empty($_SESSION['jieqiUserId'])) {
    $jieqiTpl->assign('username', jieqi_htmlstr($_SESSION['jieqiUserName']));
    $jieqiTpl->assign('usergroup', $jieqiGroups[$_SESSION['jieqiUserGroup']]);
}
include_once JIEQI_ROOT_PATH . '/class/modules.php';
$modules_handler =& JieqiModulesHandler::getInstance('JieqiModulesHandler');
$criteria = new CriteriaCompo(new Criteria('publish', 1, '='));
$criteria->setSort('weight');
$criteria->setOrder('ASC');
$modules_handler->queryObjects($criteria);
unset($criteria);
$jieqiModary = array();
while ($v = $modules_handler->getObject()) {
    $jieqiModary[$v->getVar('name', 'n')] = array('name' => $v->getVar('name', 'n'), 'caption' => $v->getVar('caption', 'n'), 'description' => $v->getVar('description', 'n'), 'version' => sprintf("%0.2f", intval($v->getVar('version', 'n')) / 100), 'vtype' => $v->getVar('vtype', 'n'), 'publish' => $v->getVar('publish', 'n'));
    jieqi_getconfigs($v->getVar('name', 'n'), 'adminmenu');
}
jieqi_getconfigs('system', 'adminmenu');
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:left.php

示例13: jieqi_includedb

    jieqi_includedb();
    $query = JieqiQueryHandler::getInstance('JieqiQueryHandler');
    $_REQUEST['configid'] = intval($_REQUEST['configid']);
    $sql = 'select * from ' . jieqi_dbprefix('system_blockconfigs') . ' where id = \'' . jieqi_dbslashes($_REQUEST['configid']) . '\'';
    $res = $query->execute($sql);
    $modconfig = $query->getObject($res);
    if (!is_object($modconfig)) {
        jieqi_printfail($jieqiLang['system']['block_config_notexists']);
    }
    unset($jieqiBlocks);
    jieqi_getconfigs($modconfig->getVar('modules', 'n'), $modconfig->getVar('file', 'n'), 'jieqiBlocks');
    if (!isset($jieqiBlocks[$_REQUEST['key']])) {
        jieqi_printfail($jieqiLang['system']['block_not_exists']);
    }
    $blockSet = $jieqiBlocks[$_REQUEST['key']];
} else {
    jieqi_printfail(LANG_ERROR_PARAMETER);
}
$modname = $blockSet['module'];
if ($modname == 'system') {
    include JIEQI_ROOT_PATH . '/blocks/' . $blockSet['filename'] . '.php';
} else {
    include $jieqiModules[$modname]['path'] . '/blocks/' . $blockSet['filename'] . '.php';
}
$classname = $blockSet['classname'];
include_once JIEQI_ROOT_PATH . '/lib/template/template.php';
$jieqiTpl =& JieqiTpl::getInstance();
$cblock = new $classname($blockSet);
$cblock->updateContent();
jieqi_msgwin(LANG_DO_SUCCESS, sprintf($jieqiLang['system']['block_edit_success'], jieqi_htmlstr($blockSet['blockname'])));
开发者ID:thu0ng91,项目名称:jmc,代码行数:30,代码来源:blockupdate.php

示例14: floor

                    if (ord($tmpstr[$m]) > 0x80) {
                        $m++;
                        $n++;
                    } else {
                        if ($tmpstr[$m] != ' ') {
                            $n++;
                        }
                    }
                    $m++;
                }
                if ($m <= $strlen && $n == $jieqiConfigs['obook']['codecharnum']) {
                    $checkcode = $buyinfo->getVar('checkcode', 'n');
                    if (empty($checkcode)) {
                        $codenum = floor(strlen($jieqiConfigs['obook']['codechars']) / 2);
                        $codepoint = rand(0, $codenum - 1) * 2;
                        $checkcode = substr($jieqiConfigs['obook']['codechars'], $codepoint, 2);
                        $buyinfo->setVar('checkcode', $checkcode);
                        $buyinfo_handler->insert($buyinfo);
                    }
                    $contentrows[$i] = jieqi_htmlstr(substr($tmpstr, 0, $m) . $checkcode . substr($tmpstr, $m));
                }
            }
            $contentrows[$i] = '<p>' . $contentrows[$i] . '</p>';
        }
    }
    include_once JIEQI_ROOT_PATH . '/header.php';
    $jieqiTpl->assign_by_ref('contentrows', $contentrows);
    $jieqiTpl->setCaching(0);
    $jieqiTpl->display($jieqiModules['obook']['path'] . '/templates/obooktext.html');
    jieqi_freeresource();
}
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:obooktext.php

示例15: setContent

 function setContent()
 {
     global $jieqiTpl;
     global $jieqiGroups;
     global $jieqiConfigs;
     global $jieqi_image_type;
     global $jieqiModules;
     global $jieqiUsersStatus;
     global $jieqiUsersGroup;
     if (!empty($_SESSION['jieqiUserId'])) {
         if ($jieqiUsersStatus == JIEQI_GROUP_GUEST) {
             $jieqiTpl->assign('jieqi_newmessage', 0);
             $jieqiTpl->assign('jieqi_userid', 0);
             $jieqiTpl->assign('jieqi_username', '');
             $jieqiTpl->assign('jieqi_useruname', '');
             $jieqiTpl->assign('jieqi_group', JIEQI_GROUP_GUEST);
             $jieqiTpl->assign('jieqi_groupname', $jieqiGroups[JIEQI_GROUP_GUEST]);
             $jieqiTpl->assign('jieqi_score', 0);
             $jieqiTpl->assign('jieqi_experience', 0);
             $jieqiTpl->assign('jieqi_honor', '');
             $jieqiTpl->assign('jieqi_vip', 0);
             $jieqiTpl->assign('jieqi_egold', 0);
             $jieqiTpl->assign('jieqi_avatar', 0);
         } else {
             $jieqiTpl->assign('jieqi_userid', $_SESSION['jieqiUserId']);
             $jieqiTpl->assign('jieqi_username', jieqi_htmlstr($_SESSION['jieqiUserName']));
             $jieqiTpl->assign('jieqi_useruname', jieqi_htmlstr($_SESSION['jieqiUserUname']));
             $jieqiTpl->assign('jieqi_group', $_SESSION['jieqiUserGroup']);
             $jieqiTpl->assign('jieqi_groupname', $jieqiGroups[$_SESSION['jieqiUserGroup']]);
             $jieqiTpl->assign('jieqi_score', $_SESSION['jieqiUserScore']);
             $jieqiTpl->assign('jieqi_experience', $_SESSION['jieqiUserExperience']);
             $jieqiTpl->assign('jieqi_honor', $_SESSION['jieqiUserHonor']);
             $jieqiTpl->assign('jieqi_vip', $_SESSION['jieqiUserVip']);
             $jieqiTpl->assign('jieqi_egold', $_SESSION['jieqiUserEgold']);
             $jieqiTpl->assign('jieqi_avatar', $_SESSION['jieqiUserAvatar']);
             if (isset($_SESSION['jieqiNewMessage']) && $_SESSION['jieqiNewMessage'] > 0) {
                 $jieqiTpl->assign('jieqi_newmessage', $_SESSION['jieqiNewMessage']);
             } else {
                 $jieqiTpl->assign('jieqi_newmessage', 0);
             }
         }
         $jieqiTpl->assign('jieqi_userstatus', $jieqiUsersStatus);
         //显示徽章
         if (!empty($jieqiModules['badge']['publish']) && is_file($jieqiModules['badge']['path'] . '/include/badgefunction.php')) {
             include_once $jieqiModules['badge']['path'] . '/include/badgefunction.php';
             //等级徽章
             $jieqiTpl->assign('jieqi_group_imageurl', getbadgeurl(1, $_SESSION['jieqiUserGroup'], 0, true));
             //头衔徽章
             $jieqiTpl->assign('jieqi_honor_imageurl', getbadgeurl(2, $_SESSION['jieqiUserHonorid'], 0, true));
             //自定义徽章
             if (!empty($_SESSION['jieqiUserBadges'])) {
                 $badgeary = unserialize($_SESSION['jieqiUserBadges']);
             } else {
                 $badgeary = array();
             }
             $jieqi_jieqi_badgerows = array();
             if (is_array($badgeary)) {
                 $k = 0;
                 foreach ($badgeary as $badge) {
                     $jieqi_badgerows[$k]['imageurl'] = getbadgeurl($badge['btypeid'], $badge['linkid'], $badge['imagetype']);
                     $jieqi_badgerows[$k]['caption'] = jieqi_htmlstr($badge['caption']);
                     $k++;
                 }
             }
             $jieqiTpl->assign_by_ref('jieqi_badgerows', $jieqi_badgerows);
             $jieqiTpl->assign('jieqi_use_badge', 1);
         } else {
             $jieqiTpl->assign('jieqi_use_badge', 0);
         }
     } else {
         return false;
     }
 }
开发者ID:thu0ng91,项目名称:jmc,代码行数:73,代码来源:block_userstatus.php


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