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


PHP jieqi_getsubdir函数代码示例

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


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

示例1: jieqi_url_system_avatar

/**
 * 返回用户头像图片url
 * 
 * @param      int         $uid 用户id
 * @param      int         $size 返回类型 'd'=>图片目录, 'l'=>大图(默认), 's'=>小图, 'i'=>图标, 'a'=>返回前面几个合并的数组
 * @param      int         $type 图片类型 -1 系统自动判断,0 无头像 1=>'.gif', 2=>'.jpg', 3=>'.jpeg', 4=>'.png', 5=>'.bmp'
 * @param      bool        $retdft 无头像是否返回默认头像地址,true-是(默认),false-否
 * @access     public
 * @return     mixed
 */
function jieqi_url_system_avatar($uid, $size = 'l', $type = -1, $retdft = true)
{
    global $jieqiConfigs;
    global $jieqi_image_type;
    if (!isset($jieqiConfigs['system'])) {
        jieqi_getconfigs('system', 'configs');
    }
    if (empty($jieqi_image_type)) {
        $jieqi_image_type = array(1 => '.gif', 2 => '.jpg', 3 => '.jpeg', 4 => '.png', 5 => '.bmp');
    }
    if (function_exists('gd_info') && $jieqiConfigs['system']['avatarcut']) {
        $avatar_cut = true;
    } else {
        $avatar_cut = false;
    }
    $base_avatar = '';
    if ($uid == 0 || $type == 0 || $type > 0 && !isset($jieqi_image_type[$type])) {
        if ($retdft) {
            $base_avatar = JIEQI_USER_URL . '/images';
            $type = 2;
            $uid = 'noavatar';
        } else {
            return false;
        }
    } elseif ($type < 0) {
        return JIEQI_USER_URL . '/avatar.php?uid=' . $uid . '&size=' . $size;
    }
    $prefix = $jieqi_image_type[$type];
    if (empty($base_avatar)) {
        $base_avatar = jieqi_uploadurl($jieqiConfigs['system']['avatardir'], $jieqiConfigs['system']['avatarurl'], 'system') . jieqi_getsubdir($uid);
    }
    switch ($size) {
        case 'd':
            return $base_avatar;
            break;
        case 'l':
            return $base_avatar . '/' . $uid . $prefix;
            break;
        case 's':
            return $avatar_cut ? $base_avatar . '/' . $uid . 's' . $prefix : $base_avatar . '/' . $uid . $prefix;
            break;
        case 'i':
            return $avatar_cut ? $base_avatar . '/' . $uid . 'i' . $prefix : $base_avatar . '/' . $uid . $prefix;
            break;
        case 'a':
        default:
            if ($avatar_cut) {
                return array('l' => $base_avatar . '/' . $uid . $prefix, 's' => $base_avatar . '/' . $uid . 's' . $prefix, 'i' => $base_avatar . '/' . $uid . 'i' . $prefix, 'd' => $base_avatar);
            } else {
                return array('l' => $base_avatar . '/' . $uid . $prefix, 's' => $base_avatar . '/' . $uid . $prefix, 'i' => $base_avatar . '/' . $uid . $prefix, 'd' => $base_avatar);
            }
            break;
    }
}
开发者ID:thu0ng91,项目名称:jmc,代码行数:64,代码来源:funurl.php

示例2: pageurl

 function pageurl($page)
 {
     if (strpos($this->linkhead, '<{$page') === false) {
         $url = $this->linkhead . $page;
     } else {
         $url = str_replace(array('<{$page|subdirectory}>', '<{$page}>'), array(jieqi_getsubdir($page), $page), $this->linkhead);
     }
     if ($this->useajax == 1) {
         $url = 'javascript:Ajax.Update(\'' . urldecode($url) . '\',' . $this->ajax_parm . ');';
     }
     return $url;
 }
开发者ID:thu0ng91,项目名称:jmc,代码行数:12,代码来源:page.php

示例3: intval

$_REQUEST['oid'] = intval($_REQUEST['oid']);
//更新书架的最后访问
if (!empty($_REQUEST['bid'])) {
    $_REQUEST['bid'] = intval($_REQUEST['bid']);
    include_once $jieqiModules['obook']['path'] . '/class/obookcase.php';
    $obookcase_handler =& JieqiObookcaseHandler::getInstance('JieqiObookcaseHandler');
    $obookcase_handler->db->query('UPDATE ' . jieqi_dbprefix('obook_obookcase') . ' SET lastvisit=' . JIEQI_NOW_TIME . ' WHERE ocaseid=' . $_REQUEST['bid']);
}
jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs');
$obook_static_url = empty($jieqiConfigs['obook']['staticurl']) ? $jieqiModules['obook']['url'] : $jieqiConfigs['obook']['staticurl'];
$obook_dynamic_url = empty($jieqiConfigs['obook']['dynamicurl']) ? $jieqiModules['obook']['url'] : $jieqiConfigs['obook']['dynamicurl'];
if (!empty($_REQUEST['cid'])) {
    header('Location: ' . $obook_static_url . '/reader.php?oid=' . $_REQUEST['oid'] . '&cid=' . $_REQUEST['cid']);
    exit;
} else {
    if (empty($indexflag)) {
        if ($jieqiConfigs['obook']['fakeinfo'] == 1) {
            if (!empty($jieqiConfigs['obook']['fakeprefix'])) {
                $tmpvar = '/' . $jieqiConfigs['obook']['fakeprefix'] . 'info';
            } else {
                $tmpvar = '/files/obook/info';
            }
            header('Location: ' . $obook_dynamic_url . $tmpvar . jieqi_getsubdir($_REQUEST['oid']) . '/' . $_REQUEST['oid'] . $jieqiConfigs['obook']['fakefile']);
        } else {
            header('Location: ' . $obook_dynamic_url . '/obookinfo.php?id=' . $_REQUEST['oid']);
        }
    } else {
        header('Location: ' . $obook_static_url . '/reader.php?oid=' . $_REQUEST['oid']);
    }
    exit;
}
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:readbookcase.php

示例4: delete

 function delete()
 {
     global $jieqiConfigs;
     global $jieqi_file_postfix;
     jieqi_delfolder($this->getDir('txtdir', true, false));
     if ($jieqiConfigs['article']['makehtml']) {
         jieqi_delfolder($this->getDir('htmldir', true, false));
     }
     if ($jieqiConfigs['article']['makezip']) {
         jieqi_delfile($this->getDir('zipdir', false, false) . '/' . $this->id . $jieqi_file_postfix['zip']);
     }
     if ($jieqiConfigs['article']['makefull']) {
         jieqi_delfile($this->getDir('fulldir', false, false) . '/' . $this->id . $jieqiConfigs['article']['htmlfile']);
     }
     if ($jieqiConfigs['article']['maketxtfull']) {
         jieqi_delfile($this->getDir('txtfulldir', false, false) . '/' . $this->id . $jieqi_file_postfix['txt']);
     }
     //if($jieqiConfigs['article']['makeumd']) jieqi_delfile($this->getDir('umddir', false, false).'/'.$this->id.$jieqi_file_postfix['umd']);
     if ($jieqiConfigs['article']['makeumd']) {
         jieqi_delfolder($this->getDir('umddir', true, false));
     }
     if ($jieqiConfigs['article']['makejar']) {
         jieqi_delfolder($this->getDir('jardir', true, false));
         jieqi_delfolder($this->getDir('jardir', true, false));
     }
     //删除附件
     $attachdir = jieqi_uploadpath($jieqiConfigs['article']['attachdir'], 'article') . jieqi_getsubdir($this->id) . '/' . $this->id;
     if (is_dir($attachdir)) {
         jieqi_delfolder($attachdir);
     }
 }
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:package.php

示例5: XMLArray

            include_once JIEQI_ROOT_PATH . '/lib/xml/xmlarray.php';
            $xmlarray = new XMLArray();
            if ($_REQUEST['vsize'] <= 1) {
                $packrows[1] = $xmlarray->xml2array(jieqi_readfile($packxml));
            } else {
                $packrows = $xmlarray->xml2array(jieqi_readfile($packxml));
            }
        }
        $jieqiTpl->assign_by_ref('packrows', $packrows);
        $jieqiTset['jieqi_contents_template'] = $jieqiModules['article']['path'] . '/templates/packumd.html';
        break;
    case 'txtchapter':
    default:
        $jieqiTpl->assign('type', 'txtchapter');
        $jieqiConfigs['article']['maketxt'] = intval($jieqiConfigs['article']['maketxt']);
        if (empty($jieqiConfigs['article']['maketxt'])) {
            jieqi_printfail($jieqiLang['article']['down_file_notopen']);
        }
        $packsize = array();
        $jieqiTpl->assign_by_ref('packsize', $packsize);
        $jieqiTpl->assign('vsize', 0);
        foreach ($opf_chapters as $k => $v) {
            $path = jieqi_uploadpath($jieqiConfigs['article']['txtdir'], 'article') . jieqi_getsubdir($_REQUEST['id']) . '/' . $_REQUEST['id'] . '/' . $v['chapterid'] . $jieqi_file_postfix['txt'];
            $opf_chapters[$k]['maketime'] = intval(@filemtime($path));
            $opf_chapters[$k]['filesize'] = intval(@filesize($path));
        }
        $jieqiTpl->assign_by_ref('packrows', $opf_chapters);
        $jieqiTset['jieqi_contents_template'] = $jieqiModules['article']['path'] . '/templates/packtxtchapter.html';
        break;
}
include_once JIEQI_ROOT_PATH . '/footer.php';
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:packshow.php

示例6: array

$criteria->setSort('lastupdate');
$criteria->setOrder('DESC');
$criteria->setLimit($jieqiConfigs['obook']['pagenum']);
$criteria->setStart(($_REQUEST['page'] - 1) * $jieqiConfigs['obook']['pagenum']);
$obook_handler->queryObjects($criteria);
$obookrows = array();
$k = 0;
while ($v = $obook_handler->getObject()) {
    $obookrows[$k]['checkid'] = $k;
    //显示序号
    $obookrows[$k]['obookid'] = $v->getVar('obookid');
    //文章序号
    $obookrows[$k]['obookname'] = $v->getVar('obookname');
    //文章名称
    if ($jieqiConfigs['obook']['fakeinfo'] == 1) {
        $obookrows[$k]['obooksubdir'] = jieqi_getsubdir($v->getVar('obookid'));
        //子目录
        if (!empty($jieqiConfigs['obook']['fakeprefix'])) {
            $tmpvar = '/' . $jieqiConfigs['obook']['fakeprefix'] . 'info';
        } else {
            $tmpvar = '/files/obook/info';
        }
        $obookrows[$k]['url_obookinfo'] = $obook_dynamic_url . $tmpvar . $obookrows[$k]['obooksubdir'] . '/' . $v->getVar('obookid') . $jieqiConfigs['obook']['fakefile'];
        //子目录
    } else {
        $obookrows[$k]['obooksubdir'] = '';
        $obookrows[$k]['url_obookinfo'] = $obook_dynamic_url . '/obookinfo.php?id=' . $v->getVar('obookid');
        //子目录
    }
    if ($v->getVar('lastchapter') == '') {
        $obookrows[$k]['lastchapterid'] = 0;
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:sharecontent.php

示例7: jieqi_getcachevars

/**
 * 获取缓存变量
 * 
 * @param      string     $module 模块名
 * @param      string     $fname 文件名,不带后缀
 * @param      string     $vname 提取的变量名
 * @param      int        $cacheid 缓存id
 * @access     public
 * @return     bool
 */
function jieqi_getcachevars($module, $fname, $vname = '', $cacheid = 0)
{
    global $jieqiModules;
    global $jieqiCache;
    if (empty($module) || empty($fname)) {
        return false;
    }
    if ($vname !== false) {
        if ($vname == '') {
            $vname = 'jieqi' . ucfirst($fname);
        }
        global ${$vname};
    }
    $cachefile = JIEQI_CACHE_PATH . '/cachevars';
    if (isset($jieqiModules[$module])) {
        $cachefile .= '/' . $module;
    }
    if (empty($cacheid)) {
        $cachefile .= '/' . $fname . '.php';
    } else {
        $cacheid = intval($cacheid);
        $cachefile .= '/' . $fname . jieqi_getsubdir($cacheid) . '/' . $cacheid . '.php';
    }
    if (is_a($jieqiCache, 'JieqiCacheMemcached')) {
        ${$vname} = $jieqiCache->get($cachefile);
    } else {
        $cachefile = @realpath($cachefile);
        if (is_file($cachefile) && preg_match('/\\.php$/i', $cachefile)) {
            include_once $cachefile;
        }
    }
}
开发者ID:thu0ng91,项目名称:jmc,代码行数:42,代码来源:global.php

示例8: setContent

 function setContent($isreturn = false)
 {
     global $jieqiTpl;
     global $jieqiConfigs;
     global $jieqiSort;
     $obookrows = array();
     if (count($this->exevars) > 0) {
         include_once $GLOBALS['jieqiModules']['obook']['path'] . '/class/obook.php';
         jieqi_getconfigs('obook', 'configs');
         $obook_static_url = empty($jieqiConfigs['obook']['staticurl']) ? $GLOBALS['jieqiModules']['obook']['url'] : $jieqiConfigs['obook']['staticurl'];
         $obook_dynamic_url = empty($jieqiConfigs['obook']['dynamicurl']) ? $GLOBALS['jieqiModules']['obook']['url'] : $jieqiConfigs['obook']['dynamicurl'];
         $jieqiTpl->assign('obook_static_url', $obook_static_url);
         $jieqiTpl->assign('obook_dynamic_url', $obook_dynamic_url);
         $tmpvar = explode('-', date('Y-m-d', JIEQI_NOW_TIME));
         $daystart = mktime(0, 0, 0, (int) $tmpvar[1], (int) $tmpvar[2], (int) $tmpvar[0]);
         $monthstart = mktime(0, 0, 0, (int) $tmpvar[1], 1, (int) $tmpvar[0]);
         $tmpvar = date('w', JIEQI_NOW_TIME);
         if ($tmpvar == 0) {
             $tmpvar = 7;
         }
         //星期天是0,国人习惯作为作为一星期的最后一天
         $weekstart = $daystart;
         if ($tmpvar > 1) {
             $weekstart -= ($tmpvar - 1) * 86400;
         }
         $obook_handler =& JieqiObookHandler::getInstance('JieqiObookHandler');
         $criteria = new CriteriaCompo();
         $criteria->add(new Criteria('obookid', '(0,' . implode(',', $this->exevars) . ')', 'IN'));
         $criteria->add(new Criteria('display', 0, '='));
         $criteria->setLimit(100);
         $criteria->setStart(0);
         $obook_handler->queryObjects($criteria);
         jieqi_getconfigs('obook', 'sort');
         $k = 0;
         while ($v = $obook_handler->getObject()) {
             $obookrows[$k]['order'] = $k + 1;
             $obookrows[$k]['obookid'] = $v->getVar('obookid');
             //文章序号
             $obookrows[$k]['obookname'] = $v->getVar('obookname');
             //文章名称
             $obookrows[$k]['articleid'] = $v->getVar('articleid');
             //文章序号
             if ($jieqiConfigs['obook']['fakeinfo'] == 1) {
                 $obookrows[$k]['obooksubdir'] = jieqi_getsubdir($v->getVar('obookid'));
                 //子目录
                 if (!empty($jieqiConfigs['obook']['fakeprefix'])) {
                     $tmpvar = '/' . $jieqiConfigs['obook']['fakeprefix'] . 'info';
                 } else {
                     $tmpvar = '/files/obook/info';
                 }
                 $obookrows[$k]['url_obookinfo'] = $obook_dynamic_url . $tmpvar . $obookrows[$k]['obooksubdir'] . '/' . $v->getVar('obookid') . $jieqiConfigs['obook']['fakefile'];
                 //子目录
             } else {
                 $obookrows[$k]['obooksubdir'] = '';
                 $obookrows[$k]['url_obookinfo'] = $obook_dynamic_url . '/obookinfo.php?id=' . $v->getVar('obookid');
                 //子目录
             }
             if ($v->getVar('lastchapter') == '') {
                 $obookrows[$k]['lastchapterid'] = 0;
                 //章节序号
                 $obookrows[$k]['lastchapter'] = '';
                 //章节名称
                 $obookrows[$k]['url_lastchapter'] = '';
                 //章节地址
             } else {
                 $obookrows[$k]['lastchapterid'] = $v->getVar('lastchapterid');
                 $obookrows[$k]['lastchapter'] = $v->getVar('lastchapter');
                 $obookrows[$k]['url_lastchapter'] = $obook_static_url . '/reader.php?aid=' . $v->getVar('obookid') . '&cid=' . $v->getVar('lastchapterid');
             }
             //公众章节
             if ($obookrows[$k]['articleid'] > 0) {
                 if ($jieqiConfigs['article']['makehtml'] == 0 || JIEQI_CHAR_SET != JIEQI_SYSTEM_CHARSET) {
                     $obookrows[$k]['url_read'] = $article_static_url . '/reader.php?aid=' . $obookrows[$k]['articleid'];
                 } else {
                     $obookrows[$k]['url_read'] = jieqi_uploadurl($jieqiConfigs['article']['htmldir'], $jieqiConfigs['article']['htmlurl'], 'article', $article_static_url) . jieqi_getsubdir($obookrows[$k]['articleid']) . '/' . $obookrows[$k]['articleid'] . '/index' . $jieqiConfigs['article']['htmlfile'];
                 }
             }
             $obookrows[$k]['lastvolume'] = $v->getVar('lastvolumeid');
             //分卷序号
             $obookrows[$k]['lastvolume'] = $v->getVar('lastvolume');
             //分卷名称
             $obookrows[$k]['authorid'] = $v->getVar('authorid');
             //作者
             $obookrows[$k]['author'] = $v->getVar('author');
             $obookrows[$k]['posterid'] = $v->getVar('posterid');
             //发表者
             $obookrows[$k]['poster'] = $v->getVar('poster');
             $obookrows[$k]['agentid'] = $v->getVar('agentid');
             //代理者
             $obookrows[$k]['agent'] = $v->getVar('agent');
             $obookrows[$k]['sortid'] = $v->getVar('sortid');
             //类别序号
             $obookrows[$k]['sort'] = $jieqiSort['obook'][$v->getVar('sortid')]['shortname'];
             //类别
             $obookrows[$k]['size'] = $v->getVar('size');
             $obookrows[$k]['size_k'] = ceil($v->getVar('size') / 1024);
             $obookrows[$k]['size_c'] = ceil($v->getVar('size') / 2);
             $obookrows[$k]['daysale'] = $v->getVar('daysale');
             $obookrows[$k]['weeksale'] = $v->getVar('weeksale');
             $obookrows[$k]['monthsale'] = $v->getVar('monthsale');
//.........这里部分代码省略.........
开发者ID:thu0ng91,项目名称:jmc,代码行数:101,代码来源:block_obookcommend.php

示例9: intval

        if (!empty($jieqiObookdata['ochapter']['0']['ochapterid'])) {
            $jumpurl = $obook_static_url . '/reader.php?aid=' . intval($jieqiObookdata['obook']['obookid']) . '&cid=' . intval($jieqiObookdata['ochapter']['0']['ochapterid']);
        } else {
            $jumpurl = $obook_static_url . '/obookread.php?oid=' . intval($jieqiObookdata['obook']['obookid']) . '&page=index';
        }
        $hasobook = 1;
    }
}
jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs');
$article_static_url = empty($jieqiConfigs['article']['staticurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['staticurl'];
$article_dynamic_url = empty($jieqiConfigs['article']['dynamicurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['dynamicurl'];
if (empty($jumpurl)) {
    if ($_REQUEST['dynamic']) {
        $jumpurl = $article_static_url . '/reader.php?aid=' . $_REQUEST['aid'];
    } else {
        $jumpurl = jieqi_uploadurl($jieqiConfigs['article']['htmldir'], $jieqiConfigs['article']['htmlurl'], 'article', $article_static_url) . jieqi_getsubdir($_REQUEST['aid']) . '/' . $_REQUEST['aid'] . '/index' . $jieqiConfigs['article']['htmlfile'];
    }
}
if (file_exists($jieqiModules['article']['path'] . '/templates/lastchapter.html')) {
    include_once JIEQI_ROOT_PATH . '/header.php';
    $jieqiTpl->assign('articleid', $_REQUEST['aid']);
    $jieqiTpl->assign('dynamic', $_REQUEST['dynamic']);
    $jieqiTpl->assign('hasebook', $hasebook);
    $jieqiTpl->assign('hasobook', $hasobook);
    $jieqiTpl->assign('hastbook', $hastbook);
    $jieqiTpl->assign('article_static_url', $article_static_url);
    $jieqiTpl->assign('article_dynamic_url', $article_dynamic_url);
    $jieqiTpl->assign('jumpurl', $jumpurl);
    $jieqiTset['jieqi_page_template'] = $jieqiModules['article']['path'] . '/templates/lastchapter.html';
    include_once JIEQI_ROOT_PATH . '/footer.php';
} else {
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:lastchapter.php

示例10: replace_path

function replace_path($articleid, $dirtype, $filetype, $idisdir = true)
{
    global $showinfo;
    global $fromary;
    global $toary;
    global $jieqiLang;
    $dirname = jieqi_uploadpath($dirtype, 'article') . jieqi_getsubdir($articleid);
    if ($idisdir) {
        $dirname .= '/' . $articleid;
    } else {
        $dirname .= '/' . $articleid . $filetype;
    }
    if (file_exists($dirname)) {
        echo '                                                                                                                                                                                                                                                                ';
        echo sprintf($jieqiLang['article']['replace_id_doing'], $articleid);
        ob_flush();
        flush();
        if (is_dir($dirname)) {
            $handle = @opendir($dirname);
            while ($file = @readdir($handle)) {
                if ($file != '.' && $file != '..') {
                    $filename = $dirname . '/' . $file;
                    if (is_file($filename) && is_writable($filename) && substr($filename, 0 - strlen($filetype)) == $filetype) {
                        if (empty($_REQUEST['filesize']) || $_REQUEST['filesize'] == 'sizeunlimit' || $_REQUEST['filesize'] == 'sizeless' && filesize($filename) <= 1024 || $_REQUEST['filesize'] == 'sizemore' && filesize($filename) >= 1024) {
                            $filedata = jieqi_readfile($filename);
                            if ($_REQUEST['replacetype'] == 1) {
                                $filedata = str_replace($fromary, $toary, $filedata);
                            } else {
                                $filedata = str_replace($_REQUEST['txtsearch'], $_REQUEST['txtreplace'], $filedata);
                            }
                            jieqi_writefile($filename, $filedata);
                        }
                    }
                }
            }
        } elseif (is_file($dirname)) {
            $filename = $dirname;
            if (is_file($filename) && is_writable($filename) && substr($filename, 0 - strlen($filetype)) == $filetype) {
                if (empty($_REQUEST['filesize']) || $_REQUEST['filesize'] == 'sizeunlimit' || $_REQUEST['filesize'] == 'sizeless' && filesize($filename) <= 1024 || $_REQUEST['filesize'] == 'sizemore' && filesize($filename) >= 1024) {
                    $filedata = jieqi_readfile($filename);
                    if ($_REQUEST['replacetype'] == 1) {
                        $filedata = str_replace($fromary, $toary, $filedata);
                    } else {
                        $filedata = str_replace($_REQUEST['txtsearch'], $_REQUEST['txtreplace'], $filedata);
                    }
                    jieqi_writefile($filename, $filedata);
                }
            }
        }
        $showinfo = $jieqiLang['article']['replace_success_next'];
    } else {
        $showinfo = $jieqiLang['article']['replace_noid_next'];
    }
}
开发者ID:thu0ng91,项目名称:jmc,代码行数:54,代码来源:batchreplace.php

示例11: jieqi_url_article_initial

/**
 * 显示首字母分类列表url
 * 
 * @param      int        $page 页码
 * @param      string     $initial 首字母
 * @access     public
 * @return     string
 */
function jieqi_url_article_initial($page = 1, $initial = '0')
{
    global $jieqiConfigs;
    global $article_dynamic_url;
    global $article_static_url;
    if (!empty($page)) {
        $page = intval($page);
        if ($page < 1) {
            $page = 1;
        }
    }
    $initial = strtoupper($initial);
    if ($initial == '~') {
        $initial = '0';
    }
    $initials = array('1', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0');
    if (!in_array($initial, $initials)) {
        $initial = 'A';
    }
    if (!empty($jieqiConfigs['article']['fakeinitial'])) {
        if (is_numeric($jieqiConfigs['article']['fakeinitial'])) {
            if (!empty($jieqiConfigs['article']['fakeprefix'])) {
                $jieqiConfigs['article']['fakeinitial'] = '/' . $jieqiConfigs['article']['fakeprefix'] . 'initial<{$initial}><{$page|subdirectory}>/<{$page}>' . $jieqiConfigs['article']['fakefile'];
            } else {
                $jieqiConfigs['article']['fakeinitial'] = '/files/article/initial<{$initial}><{$page|subdirectory}>/<{$page}>' . $jieqiConfigs['article']['fakefile'];
            }
        }
        $repfrom = array('<{$jieqi_url}>', '<{$initial}>');
        $repto = array(JIEQI_URL, $initial);
        if (!empty($page)) {
            $repfrom[] = '<{$page|subdirectory}>';
            $repfrom[] = '<{$page}>';
            $repto[] = jieqi_getsubdir($page);
            $repto[] = $page;
        }
        $ret = trim(str_replace($repfrom, $repto, $jieqiConfigs['article']['fakeinitial']));
        if (substr($ret, 0, 4) != 'http') {
            $ret = JIEQI_URL . $ret;
        }
        return $ret;
    } else {
        return $article_dynamic_url . '/articlelist.php?initial=' . $initial;
    }
}
开发者ID:thu0ng91,项目名称:jmc,代码行数:52,代码来源:funurl.php

示例12: jieqi_extractvars

            $obookinfo['chapters'] = $obook->getVar('chapters', 'n');
            $obookinfo['size'] = $obook->getVar('size', 'n');
            $obookinfo['authorid'] = $obook->getVar('authorid', 'n');
            $obookinfo['author'] = $obook->getVar('author', 'n');
            $obookinfo['publishid'] = $obook->getVar('publishid', 'n');
            $obookinfo['saleprice'] = $obook->getVar('saleprice', 'n');
            $obookinfo['display'] = $obook->getVar('display', 'n');
            $obookdata['obook'] =& $obookinfo;
            $obookdata['ochapter'] =& $chapterary;
            $varstring = "<?php\n" . jieqi_extractvars('jieqiObookdata', $obookdata) . "\n?>";
            jieqi_writefile($linkfile, $varstring);
            $updatearticle = true;
        }
    } else {
        //没关联文章,如果原来有关联的话删除
        $linkfile = JIEQI_ROOT_PATH . '/files/obook/articlelink' . jieqi_getsubdir($articleid) . '/' . $articleid . '.php';
        if (file_exists($linkfile)) {
            jieqi_delfile($linkfile);
            $updatearticle = true;
        }
    }
    //重新生成文章的目录页(暂时用js调用)
    /*
    if($updatearticle && file_exists($jieqiModules['obook']['path'].'/class/package.php')){
    	include_once($jieqiModules['obook']['path'].'/class/package.php');
    	$package=new JieqiPackage($articleid);
    	$package->loadOPF();
    	$package->makeIndex();
    }
    */
}
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:obookmanage.php

示例13: jieqi_article_vars

/**
 * 传入小说实例对象,返回适合模板赋值的小说信息数组
 * 
 * @param      object      $article 论坛实例
 * @access     public
 * @return     array
 */
function jieqi_article_vars($article)
{
    global $jieqiModules;
    global $jieqiSort;
    global $jieqiConfigs;
    global $jieqiLang;
    global $article_static_url;
    global $article_dynamic_url;
    global $jieqiOption;
    if (!isset($jieqiSort['article'])) {
        jieqi_getconfigs('article', 'sort');
    }
    if (!isset($jieqiConfigs['article'])) {
        jieqi_getconfigs('article', 'configs');
    }
    if (!isset($jieqiLang['article'])) {
        jieqi_loadlang('list', JIEQI_MODULE_NAME);
    }
    if (!isset($article_static_url)) {
        $article_static_url = empty($jieqiConfigs['article']['staticurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['staticurl'];
    }
    if (!isset($article_dynamic_url)) {
        $article_dynamic_url = empty($jieqiConfigs['article']['dynamicurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['dynamicurl'];
    }
    $ret = array();
    $ret['articleid'] = $article->getVar('articleid');
    //文章序号
    $ret['articlename'] = $article->getVar('articlename');
    //文章名称
    $ret['intro'] = htmlspecialchars(jieqi_substr($article->getVar('intro', 'n'), 0, 250));
    $ret['articlesubdir'] = jieqi_getsubdir($article->getVar('articleid'));
    //子目录
    $ret['url_articleinfo'] = jieqi_geturl('article', 'article', $article->getVar('articleid'), 'info');
    if ($article->getVar('lastchapter') == '') {
        $ret['lastchapterid'] = 0;
        //章节序号
        $ret['lastchapter'] = '';
        //章节名称
        $ret['url_lastchapter'] = '';
        //章节地址
    } else {
        $ret['lastchapterid'] = $article->getVar('lastchapterid');
        $ret['lastchapter'] = $article->getVar('lastchapter');
        $ret['url_articleindex'] = jieqi_geturl('article', 'article', $article->getVar('articleid'), 'index');
        $ret['url_lastchapter'] = jieqi_geturl('article', 'chapter', $article->getVar('lastchapterid'), $article->getVar('articleid'));
    }
    $ret['url_index'] = $ret['url_articleindex'];
    $ret['lastvolumeid'] = $article->getVar('lastvolumeid');
    //分卷序号
    $ret['lastvolume'] = $article->getVar('lastvolume');
    //分卷名称
    $ret['authorid'] = $article->getVar('authorid');
    //作者
    $ret['author'] = $article->getVar('author');
    $ret['posterid'] = $article->getVar('posterid');
    //发表者
    $ret['poster'] = $article->getVar('poster');
    $ret['agentid'] = $article->getVar('agentid');
    //代理者
    $ret['agent'] = $article->getVar('agent');
    $ret['sortid'] = $article->getVar('sortid');
    //类别序号
    if (isset($jieqiSort['article'][$ret['sortid']]['caption'])) {
        $ret['sort'] = $jieqiSort['article'][$ret['sortid']]['caption'];
    } else {
        $ret['sort'] = '';
    }
    $ret['typeid'] = $article->getVar('typeid');
    //字类别序号
    if ($ret['typeid'] > 0 && isset($jieqiSort['article'][$ret['sortid']]['types'][$ret['typeid']])) {
        $ret['type'] = $jieqiSort['article'][$ret['sortid']]['types'][$ret['typeid']];
    } else {
        $ret['type'] = '';
    }
    if (empty($ret['type'])) {
        $ret['type'] = $ret['sort'];
    }
    $ret['size'] = $article->getVar('size');
    $ret['size_k'] = ceil($article->getVar('size') / 1024);
    $ret['size_c'] = ceil($article->getVar('size') / 2);
    $ret['dayvisit'] = $article->getVar('dayvisit');
    $ret['weekvisit'] = $article->getVar('weekvisit');
    $ret['monthvisit'] = $article->getVar('monthvisit');
    $ret['allvisit'] = $article->getVar('allvisit');
    $ret['dayvote'] = $article->getVar('dayvote');
    $ret['weekvote'] = $article->getVar('weekvote');
    $ret['monthvote'] = $article->getVar('monthvote');
    $ret['allvote'] = $article->getVar('allvote');
    $ret['goodnum'] = $article->getVar('goodnum');
    $ret['badnum'] = $article->getVar('badnum');
    $ret['display'] = $article->getVar('display');
    $ret['lastupdate'] = date('y-m-d', $article->getVar('lastupdate'));
    $ret['update'] = date('m-d', $article->getVar('lastupdate'));
//.........这里部分代码省略.........
开发者ID:thu0ng91,项目名称:jmc,代码行数:101,代码来源:funarticle.php

示例14: jieqi_uploadurl

     //章节序号
     $obookrows[$k]['lastchapter'] = '';
     //章节名称
     $obookrows[$k]['url_lastchapter'] = '';
     //章节地址
 } else {
     $obookrows[$k]['lastchapterid'] = $v->getVar('lastchapterid');
     $obookrows[$k]['lastchapter'] = $v->getVar('lastchapter');
     $obookrows[$k]['url_lastchapter'] = $obook_static_url . '/reader.php?aid=' . $v->getVar('obookid') . '&cid=' . $v->getVar('lastchapterid');
 }
 //公众章节
 if ($obookrows[$k]['articleid'] > 0) {
     if ($jieqiConfigs['article']['makehtml'] == 0 || JIEQI_CHAR_SET != JIEQI_SYSTEM_CHARSET) {
         $obookrows[$k]['url_read'] = $article_static_url . '/reader.php?aid=' . $obookrows[$k]['articleid'];
     } else {
         $obookrows[$k]['url_read'] = jieqi_uploadurl($jieqiConfigs['article']['htmldir'], $jieqiConfigs['article']['htmlurl'], 'article', $article_static_url) . jieqi_getsubdir($obookrows[$k]['articleid']) . '/' . $obookrows[$k]['articleid'] . '/index' . $jieqiConfigs['article']['htmlfile'];
     }
 }
 $obookrows[$k]['lastvolume'] = $v->getVar('lastvolumeid');
 //分卷序号
 $obookrows[$k]['lastvolume'] = $v->getVar('lastvolume');
 //分卷名称
 $obookrows[$k]['authorid'] = $v->getVar('authorid');
 //作者
 $obookrows[$k]['author'] = $v->getVar('author');
 $obookrows[$k]['posterid'] = $v->getVar('posterid');
 //发表者
 $obookrows[$k]['poster'] = $v->getVar('poster');
 $obookrows[$k]['agentid'] = $v->getVar('agentid');
 //代理者
 $obookrows[$k]['agent'] = $v->getVar('agent');
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:obooklist.php

示例15: jieqi_printfail

 $newObook->setVar('imgflag', $imgflag);
 if (jieqi_checkpower($jieqiPower['obook']['needcheck'], $jieqiUsersStatus, $jieqiUsersGroup, true)) {
     $newObook->setVar('display', 0);
 } else {
     $newObook->setVar('display', 1);
     //待审文章
 }
 if (!$obook_handler->insert($newObook)) {
     jieqi_printfail($jieqiLang['obook']['add_obook_failure']);
 } else {
     $id = $newObook->getVar('obookid');
     $imagedir = jieqi_uploadpath($jieqiConfigs['obook']['imagedir'], 'obook');
     if (!file_exists($imagedir)) {
         jieqi_createdir($imagedir);
     }
     $imagedir .= jieqi_getsubdir($id);
     if (!file_exists($imagedir)) {
         jieqi_createdir($imagedir);
     }
     $imagedir .= '/' . $id;
     if (!file_exists($imagedir)) {
         jieqi_createdir($imagedir);
     }
     //保存小图
     if (!empty($_FILES['obookspic']['name'])) {
         if (strstr(strtolower($_FILES['obookspic']['name']), strtolower($jieqiConfigs['obook']['imagetype'])) == strtolower($jieqiConfigs['obook']['imagetype'])) {
             jieqi_copyfile($_FILES['obookspic']['tmp_name'], $imagedir . '/' . $id . 's' . $jieqiConfigs['obook']['imagetype'], 0777, true);
         }
     }
     //保存大图
     if (!empty($_FILES['obooklpic']['name'])) {
开发者ID:thu0ng91,项目名称:jmc,代码行数:31,代码来源:newobook.php


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