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


PHP ParseTpl函数代码示例

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


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

示例1: load_header

        $tpl = 'main_posthold';
    }
    echo load_header();
    echo ParseTpl(makeUp($tpl));
}
if (!defined('HEADER_CALLED')) {
    header("Location: {$main_url}/");
    exit;
}
if (file_exists($pathToFiles . 'bb_plugins2.php')) {
    require_once $pathToFiles . 'bb_plugins2.php';
}
$freeWareKeys = array('Web Forum Software', 'Chat Forum Software', 'Discussion Forum Software', 'Light Forum Script', 'PHP Forum Software', 'Forum Script', 'Forum Software', 'Free Forum Software', 'Open Source Forum Script', 'Simple Bulletin Board', 'Bulletin Board Script', 'Bulletin Board Software', 'Community Script', 'Online Community Software', 'Easy Forum Software', 'Online Community Script');
$rndNum = strlen($sitename);
$tk = sizeof($freeWareKeys) - 1;
while ($rndNum > $tk) {
    $rndNum = $rndNum - $tk;
}
//$ck=rand(0,sizeof($freeWareKeys)-1);
$software = $freeWareKeys[$rndNum];
$violating_the_copyright_may_result_in_your_criminal_responsibility = <<<out
<a href="http://www.minibb.com/" target="_blank"><img src="{$main_url}/img/minibb.gif" alt="{$sitename} {$l_poweredBy} {$software} miniBB &reg;" title="{$sitename} {$l_poweredBy} {$software} miniBB &reg;" /></a>
out;
//Loading footer
$endtime = get_microtime();
$totaltime = sprintf("%01.3f", $endtime - $starttime);
if (isset($includeFooter) and $includeFooter != '') {
    include $includeFooter;
} else {
    echo ParseTpl(makeUp('main_footer'));
}
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:index.php

示例2: GridImage

                        require_once 'geograph/gridsquare.class.php';
                        $g_image = new GridImage();
                    }
                    $ok = $g_image->loadFromId($g_id);
                    if ($ok && $g_image->moderation_status == 'rejected' && (!isset($userRanks[$cc]) || $userRanks[$cc] == 'Member')) {
                        $ok = false;
                    }
                    if ($ok) {
                        if ($g_matches[1][$i]) {
                            $g_img = $g_image->getThumbnail(120, 120, false, true);
                            #$g_img = preg_replace('/alt="(.*?)"/','alt="'.$g_image->grid_reference.' : \1 by '.$g_image->realname.'"',$g_img);
                            $g_title = $g_image->grid_reference . ' : ' . htmlentities($g_image->title) . ' by ' . $g_image->realname;
                            $postText2 = str_replace("[[[{$g_id}]]]", "<a href=\"http://{$_SERVER['HTTP_HOST']}/photo/{$g_id}\" target=\"_blank\" title=\"{$g_title}\">{$g_img}</a>", $postText2);
                        } else {
                            $postText2 = preg_replace("/(?<!\\[)\\[\\[{$g_id}\\]\\]/", "{<a href=\"http://{$_SERVER['HTTP_HOST']}/photo/{$g_id}\" target=\"_blank\">{$g_image->grid_reference} : {$g_image->title}</a>}", $postText2);
                        }
                    }
                    $global_thumb_count++;
                }
                $thumb_count++;
            } else {
                $postText2 = str_replace("[[{$g_id}]]", "<a href=\"http://{$_SERVER['HTTP_HOST']}/gridref/" . str_replace(' ', '+', $g_id) . "\" target=\"_blank\">{$g_id}</a>", $postText2);
            }
        }
    }
    echo ParseTpl(makeUp('hack_preview2'));
    exit;
} elseif (isset($_POST['prevForm']) and trim($_POST['postText']) == '') {
    echo '';
    exit;
}
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:hack_preview2.php

示例3: load_header

function load_header()
{
    //we need to load this template separately, because we load page title
    if (!isset($GLOBALS['adminPanel'])) {
        $GLOBALS['adminPanel'] = 0;
    }
    if (strlen($GLOBALS['action']) > 0 || $GLOBALS['adminPanel'] == 1) {
        $f = 1;
        $GLOBALS['l_menu'][0] = " <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}\">{$GLOBALS['l_menu'][0]}</a> ";
    } else {
        $f = 0;
        $GLOBALS['l_menu'][0] = '';
    }
    if ($GLOBALS['action'] != 'stats') {
        $GLOBALS['l_menu'][3] = ($f == 1 ? $GLOBALS['l_sepr'] : '') . " <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=stats\">{$GLOBALS['l_menu'][3]}</a> ";
    } else {
        $GLOBALS['l_menu'][3] = '';
    }
    if ($GLOBALS['viewTopicsIfOnlyOneForum'] == 1 and $GLOBALS['action'] == '') {
        $GLOBALS['l_menu'][7] = "{$GLOBALS['l_sepr']} <a href=\"#newtopic\">{$GLOBALS['l_menu'][7]}</a> ";
    }
    if (isset($GLOBALS['nTop']) && $GLOBALS['nTop'] == 1) {
        if ($GLOBALS['action'] == 'vtopic') {
            $GLOBALS['l_menu'][7] = "{$GLOBALS['l_sepr']} <a href=\"#newtopic\">{$GLOBALS['l_menu'][7]}</a> ";
        } elseif ($GLOBALS['action'] == 'vthread') {
            $GLOBALS['l_menu'][7] = "{$GLOBALS['l_sepr']} <a href=\"#newreply\">{$GLOBALS['l_reply']}</a> ";
        }
    } else {
        $GLOBALS['l_menu'][7] = '';
    }
    if ($GLOBALS['action'] != 'search') {
        $GLOBALS['l_menu'][1] = "{$GLOBALS['l_sepr']} <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=search\">{$GLOBALS['l_menu'][1]}</a> ";
    } else {
        $GLOBALS['l_menu'][1] = '';
    }
    if ($GLOBALS['action'] != 'registernew' and $GLOBALS['user_id'] == 0 and $GLOBALS['adminPanel'] != 1 and $GLOBALS['enableNewRegistrations']) {
        $GLOBALS['l_menu'][2] = "{$GLOBALS['l_sepr']} <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=registernew\">{$GLOBALS['l_menu'][2]}</a> ";
    } else {
        $GLOBALS['l_menu'][2] = '';
    }
    if ($GLOBALS['action'] != 'manual') {
        $GLOBALS['l_menu'][4] = "{$GLOBALS['l_sepr']} <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=manual\">{$GLOBALS['l_menu'][4]}</a> ";
    } else {
        $GLOBALS['l_menu'][4] = '';
    }
    if ($GLOBALS['action'] != 'prefs' && $GLOBALS['user_id'] != 0 and $GLOBALS['enableProfileUpdate']) {
        $GLOBALS['l_menu'][5] = "{$GLOBALS['l_sepr']} <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=prefs\">{$GLOBALS['l_menu'][5]}</a> ";
    } else {
        $GLOBALS['l_menu'][5] = '';
    }
    if ($GLOBALS['user_id'] != 0) {
        $GLOBALS['l_menu'][6] = "{$GLOBALS['l_sepr']} <a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}mode=logout\">{$GLOBALS['l_menu'][6]}</a> ";
    } else {
        $GLOBALS['l_menu'][6] = '';
    }
    if (!isset($GLOBALS['title']) or $GLOBALS['title'] == '') {
        $GLOBALS['title'] = $GLOBALS['sitename'];
    }
    if (isset($GLOBALS['includeHeader'])) {
        include $GLOBALS['includeHeader'];
        return;
    }
    return ParseTpl(makeUp('main_header'));
}
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:64,代码来源:bb_functions.php

示例4: ParseTpl

            $USERINFO .= ParseTpl($usrCell);
        }
        //if posts
    }
    if ($user > 1 and ($user_id == 1 or $isMod == 1 and $user_id != $user and !$blockedMod)) {
        /* activity link */
        $act = $row[0];
        $actnew = $act == 0 ? 1 : 0;
        $mes1 = $act == 0 ? $l_no : $l_yes;
        $mes2 = $act == 0 ? $l_yes : $l_no;
        $what = $l_member;
        $whatValue = "{$mes1} [<a href=\"{$main_url}/{$indexphp}action=userinfo&amp;user={$user}&amp;activity={$actnew}\">{$mes2}</a>]";
        $USERINFO .= ParseTpl($usrCell);
        /* edit profile link */
        $what = $l_editPrefs;
        $whatValue = "<a href=\"{$main_url}/{$indexphp}action=prefs&amp;adminUser={$user}\">&gt;&gt;&gt;</a>";
        $USERINFO .= ParseTpl($usrCell);
    }
    /* finally */
    $userInfo = $l_about . ' &ldquo;' . $row[1] . '&rdquo;';
    $title .= $l_about . ' ' . $row[1];
    $tpl = makeUp('main_user_info');
} else {
    $title .= $l_userNotExists;
    $errorMSG = $l_userNotExists;
    $correctErr = $backErrorLink;
    $tpl = makeUp('main_warning');
}
echo load_header();
echo ParseTpl($tpl);
return;
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:bb_func_usernfo.php

示例5: while

        if ($show) {
            $sel = '';
            if (isset($forumGroups) and isset($forumGroupsDesc) and in_array($row[0], $forumGroups)) {
                $forumGroupName = $forumGroupsDesc[$keyAr];
                $listForums .= "<option value={$row[0]}>{$forumGroupName}</option>";
                $keyAr++;
            }
            if ($keyAr > 0) {
                $sp = '&nbsp;&nbsp;&nbsp;';
            } else {
                $sp = '';
            }
            if (isset($st) && $st == 1) {
                if ($row[0] != $frm) {
                    $listForums .= "<option value={$row[0]}>{$sp}{$row[1]}</option>\n";
                }
            } else {
                if ($row[0] == $frm) {
                    $sel = ' selected';
                }
                $listForums .= "<option value={$row[0]}{$sel}>{$sp}{$row[1]}</option>\n";
            }
            $i++;
        }
    } while ($row = db_simpleSelect(1));
    unset($result);
    unset($countRes);
    if ($i > 1) {
        $forumsList = ParseTpl($tpl);
    }
}
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:bb_func_forums.php

示例6: load_header

function load_header()
{
    //we need to load this template separately, because we load page title
    if (!isset($GLOBALS['forum'])) {
        $GLOBALS['forum'] = 0;
    }
    if (!isset($GLOBALS['topic'])) {
        $GLOBALS['topic'] = 0;
    }
    if (!isset($GLOBALS['page'])) {
        $GLOBALS['page'] = 0;
    }
    define('HEADER_CALLED', 1);
    if (!isset($GLOBALS['adminPanel'])) {
        $GLOBALS['adminPanel'] = 0;
    }
    if (strlen($GLOBALS['action']) > 0 || $GLOBALS['adminPanel'] == 1) {
        $GLOBALS['l_menu'][0] = "<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['startIndex']}\">{$GLOBALS['l_menu'][0]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][0] = '';
    }
    if ($GLOBALS['action'] != 'stats') {
        $GLOBALS['l_menu'][3] = "<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=stats\">{$GLOBALS['l_menu'][3]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][3] = '';
    }
    if ($GLOBALS['viewTopicsIfOnlyOneForum'] == 1 and $GLOBALS['action'] == 'vtopic') {
        $GLOBALS['l_menu'][7] = "<a href=\"#newtopic\">{$GLOBALS['l_menu'][7]}</a> " . $GLOBALS['l_sepr'] . ' ';
    } elseif (isset($GLOBALS['nTop']) && $GLOBALS['nTop'] == 1 && (!isset($_GET['showSep']) || $_GET['showSep'] != 1)) {
        if ($GLOBALS['action'] == 'vtopic' && isset($_GET['showSep'])) {
            $GLOBALS['l_menu'][7] = isset($GLOBALS['newTopicLink']) ? $GLOBALS['newTopicLink'] . ' ' . $GLOBALS['l_sepr'] . ' ' : '';
        } elseif ($GLOBALS['action'] == 'vtopic') {
            $GLOBALS['l_menu'][7] = "<a href=\"#newtopic\">{$GLOBALS['l_menu'][7]}</a> {$GLOBALS['l_sepr']} ";
        } elseif ($GLOBALS['action'] == 'vthread') {
            $GLOBALS['l_menu'][7] = "<a href=\"#newreply\">{$GLOBALS['l_reply']}</a> {$GLOBALS['l_sepr']} ";
        } else {
            $GLOBALS['l_menu'][7] = '';
        }
    } elseif (isset($GLOBALS['mTop']) && $GLOBALS['mTop'] == 1 && $GLOBALS['action'] == '') {
        $GLOBALS['l_menu'][7] = "<a href=\"#newtopic\">{$GLOBALS['l_menu'][7]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][7] = '';
    }
    if ($GLOBALS['action'] != 'search') {
        $GLOBALS['l_menu'][1] = "<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=search\">{$GLOBALS['l_menu'][1]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][1] = '';
    }
    if ($GLOBALS['action'] != 'registernew' and $GLOBALS['user_id'] == 0 and $GLOBALS['adminPanel'] != 1 and $GLOBALS['enableNewRegistrations']) {
        $GLOBALS['l_menu'][2] = "<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=registernew\">{$GLOBALS['l_menu'][2]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][2] = '';
    }
    if ($GLOBALS['action'] != 'manual') {
        if (isset($GLOBALS['mod_rewrite']) and $GLOBALS['mod_rewrite']) {
            $urlp = $GLOBALS['manualIndex'];
        } else {
            $urlp = "{$GLOBALS['indexphp']}action=manual";
        }
        $GLOBALS['l_menu'][4] = "<a href=\"{$GLOBALS['main_url']}/{$urlp}\">{$GLOBALS['l_menu'][4]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][4] = '';
    }
    if ($GLOBALS['action'] == 'prefs' and isset($GLOBALS['adminUser']) and $GLOBALS['adminUser'] == 0 or $GLOBALS['user_id'] == 0 or !$GLOBALS['enableProfileUpdate']) {
        $GLOBALS['l_menu'][5] = '';
    } else {
        $GLOBALS['l_menu'][5] = "<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}action=prefs\">{$GLOBALS['l_menu'][5]}</a> {$GLOBALS['l_sepr']} ";
    }
    if ($GLOBALS['user_id'] != 0) {
        $GLOBALS['l_menu'][6] = "<a href=\"{$GLOBALS['main_url']}/{$GLOBALS['indexphp']}mode=logout\">{$GLOBALS['l_menu'][6]}</a> {$GLOBALS['l_sepr']} ";
    } else {
        $GLOBALS['l_menu'][6] = '';
    }
    if (!isset($GLOBALS['title']) or $GLOBALS['title'] == '') {
        $GLOBALS['title'] = $GLOBALS['sitename'];
    }
    if (isset($GLOBALS['includeHeader']) and $GLOBALS['includeHeader'] != '') {
        include $GLOBALS['includeHeader'];
        return;
    }
    return ParseTpl(makeUp('main_header'));
}
开发者ID:amenski,项目名称:BookSharing,代码行数:82,代码来源:bb_functions.php

示例7: highlightText

            if ($row = db_searchSelect(0, $Tt, 'topic_id, forum_id, topic_title, topic_time', $sqlStr, $makeLim, 'topic_id desc')) {
                $num = 1 + $page * $viewmaxsearch - (PAGE1_OFFSET + 1) * $viewmaxsearch;
                do {
                    $txt = highlightText($row[2], $phrase, $searchType);
                    $datetime = convert_date($row[3]);
                    $forum_name = isset($forums[$row[1]]) ? $forums[$row[1]] : 'N/A';
                    if (isset($preModerationType) and $preModerationType > 0 and isset($premodTopics) and in_array($row[0], $premodTopics)) {
                        $txt = $l_topicQueued;
                    }
                    if (isset($mod_rewrite) and $mod_rewrite) {
                        $furl = addTopicURLPage(genTopicURL($main_url, $row[1], $forum_name, $row[0], $row[2]), PAGE1_OFFSET + 1);
                    } else {
                        $furl = "{$main_url}/{$indexphp}action=vthread&amp;forum={$row[1]}&amp;topic={$row[0]}";
                    }
                    $searchResults .= <<<out
<table class="tbTransparent" style="width:100%"><tr><td class="tbTransparentCell">{$num}. <span class="txtSm"><strong>{$l_posted}</strong>: {$datetime} - <strong>{$forum_name}</strong></span> / <a href="{$furl}">{$txt}</a>
</td></tr></table><br />
out;
                    $num++;
                } while ($row = db_searchSelect(1));
            }
        }
        //where topics
    }
    //numRows>0
} else {
    $warning = $l_search[10];
}
echo load_header();
echo ParseTpl(makeUp('search'));
return;
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:bb_func_search.php

示例8: sendMail

                sendMail($admin_email, $subS, $msgS, $reply_to_email, $reply_to_email);
            }
            unset($setTpls);
            $emailusers = $tmpUe;
            $insresOrig = $insres;
            //Insert user into email notifies if allowed
            if (isset($_POST['CheckSendMail']) and emailCheckBox() != '' and substr(emailCheckBox(), 0, 8) != '<!--U-->') {
                $ae = db_simpleSelect(0, $Ts, 'count(*)', 'user_id', '=', $user_id, '', '', 'topic_id', '=', $topic);
                $ae = $ae[0];
                if ($ae == 0) {
                    $topic_id = $topic;
                    insertArray(array('user_id', 'topic_id'), $Ts);
                }
            }
            $insres = $insresOrig;
        }
        //inserted post successfully
    } else {
        $errorMSG = $l_antiSpam;
        $title .= $l_antiSpam;
        $displayFormElements = array('topicTitle' => 1, 'postText' => 1);
        $antiWarn = $l_antiSpamWait;
        $antiSpam = 1;
        include $pathToFiles . 'bb_func_posthold.php';
        echo load_header();
        echo ParseTpl(makeUp('main_posthold'));
        return;
    }
    $anchor = $topic_last_post_id;
    $totalPosts = $topic_d[2] + 1;
}
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:bb_func_pthread.php

示例9: writeUserPwd

     $caseComp2 = '';
 }
 if ($row = db_simpleSelect(FALSE, $Tu, $dbUserSheme['username'][1] . ',' . $dbUserSheme['user_password'][1], $caseComp1 . $dbUserSheme['username'][1] . $caseComp2, '=', $user_usr, '', 1)) {
     // It means that username exists in database; so let's check a password
     $username = $row[0];
     $userpassword = $row[1];
     if (($user_usr == $username or isset($loginsCase) and $loginsCase and strtolower($user_usr) == strtolower($username)) and $userpassword == writeUserPwd($user_pwd)) {
         $logged_user = 1;
         $cook = $username . "|" . writeUserPwd($user_pwd) . "|" . $cookieexptime;
         deleteMyCookie();
         setMyCookie($username, $user_pwd, $cookieexptime);
         setCSRFCheckCookie();
         if ($action == '') {
             if (isset($metaLocation)) {
                 $meta_relocate = "{$main_url}/{$indexphp}{$queryStr}";
                 echo ParseTpl(makeUp($metaLocation));
                 exit;
             } elseif ($queryStr2 != '') {
                 header("Location: {$queryStr2}");
                 exit;
             } else {
                 header("Location: {$urlp}");
             }
         }
     } else {
         include $pathToFiles . "lang/{$lang}.php";
         $errorMSG = $l_loginpasswordincorrect;
         $title .= $l_errorUserData;
         if (!isset($_POST['postText'])) {
             $loginError = 1;
             $correctErr = "<a href=\"JavaScript:history.back(-1)\">{$l_correctLoginpassword}</a>";
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:bb_func_login.php

示例10: elseif

    } elseif ($user_id == $topicPoster and $user_id != 0 and $user_id != 1 and $topicSticky != 1) {
        if ($topicStatus == 0) {
            $closeTopic = "<a href=\"{$main_url}/{$indexphp}action=locktopic&amp;forum={$forum}&amp;topic={$topic}&amp;chstat=1\">{$l_closeTopic}</a>";
        } elseif ($topicStatus == 1 and $userUnlock == 1) {
            $closeTopic = "<a href=\"{$main_url}/{$indexphp}action=locktopic&amp;forum={$forum}&amp;topic={$topic}&amp;chstat=0\">{$l_unlockTopic}</a>";
        } else {
            $closeTopic = '';
        }
    }
    $title = $title . $topicName;
}
//if posts
$st = 0;
$frm = $forum;
#$l_chooseForum = 'Jump To Forum';
include $pathToFiles . 'bb_func_forums.php';
if (isset($mod_rewrite) and $mod_rewrite) {
    $linkToForums = "{$main_url}/{$forum}_0.html";
} else {
    $linkToForums = "{$main_url}/{$indexphp}action=vtopic&amp;forum={$forum}";
}
if (!$USER->hasPerm("basic") && file_exists("templates/main_posts_{$CONF['forum_to_template'][$forum]}_anon.html")) {
    $templatename = "main_posts_{$CONF['forum_to_template'][$forum]}_anon";
} elseif (file_exists("templates/main_posts_{$CONF['forum_to_template'][$forum]}.html")) {
    $templatename = "main_posts_{$CONF['forum_to_template'][$forum]}";
} else {
    $templatename = 'main_posts';
}
echo load_header();
echo ParseTpl(makeUp($templatename));
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:30,代码来源:bb_func_vthread.php

示例11: elseif

    } elseif ($user_id == $topicPoster and $user_id != 0 and $user_id != 1 and $topicSticky != 1 and !$c4) {
        if ($topicStatus == 0 and $userUnlock != 2) {
            $closeTopic = "<a href=\"{$main_url}/{$indexphp}action=locktopic&amp;forum={$forum}&amp;topic={$topic}&amp;chstat=1\">{$l_closeTopic}</a>";
        } elseif ($topicStatus == 1 and $userUnlock == 1 and $userUnlock != 2) {
            $closeTopic = "<a href=\"{$main_url}/{$indexphp}action=locktopic&amp;forum={$forum}&amp;topic={$topic}&amp;chstat=0\">{$l_unlockTopic}</a>";
        } else {
            $closeTopic = '';
        }
    }
    if ($page > PAGE1_OFFSET + 1) {
        $tpage = ' - ' . $l_page . ' ' . ($page - PAGE1_OFFSET);
    } else {
        $tpage = '';
    }
    $title1 = $title;
    $title = strip_tags($topicName);
    if (isset($addMainTitle)) {
        $title .= ' - ' . str_replace(' - ', '', $title1);
    }
    $title .= $tpage;
    //$title=strip_tags($topicName).' - '.str_replace(' - ','',$title).$tpage;
}
//if posts
if (isset($mod_rewrite) and $mod_rewrite) {
    $linkToForums = addForumURLPage(genForumURL($main_url, $forum, $forumsArray[$forum][0]), PAGE1_OFFSET + 1);
} else {
    $linkToForums = "{$main_url}/{$indexphp}action=vtopic&amp;forum={$forum}";
}
echo load_header();
echo ParseTpl(makeUp('main_posts'));
开发者ID:amenski,项目名称:BookSharing,代码行数:30,代码来源:bb_func_vthread.php

示例12: round

        if ($cols[1]) {
            if (isset($preModerationType) and $preModerationType > 0 and isset($premodTopics) and in_array($cols[0], $premodTopics)) {
                $cols[2] = $l_topicQueued;
            }
            if (!isset($vMax)) {
                $vMax = $cols[1];
            }
            $val = $cols[1];
            $stats_barWidth = round(100 * ($val / $vMax));
            if ($stats_barWidth > $stats_barWidthLim) {
                $key = '<a href="' . gen_vthread_url($cols[3], $forumNames[$cols[3]], $cols[0], $cols[2], PAGE1_OFFSET + 1) . '"' . $nof . '>' . $cols[2] . '</a>';
            } else {
                $key2 = '<a href="' . gen_vthread_url($cols[3], $forumNames[$cols[3]], $cols[0], $cols[2], PAGE1_OFFSET + 1) . '"' . $nof . '>' . $cols[2] . '</a>';
                $key = '<a href="' . gen_vthread_url($cols[3], $forumNames[$cols[3]], $cols[0], $cols[2], PAGE1_OFFSET + 1) . '"' . $nof . '>...</a>';
            }
            $list_stats_viewed .= ParseTpl($tpl);
        } else {
            break;
        }
    } while ($cols = db_simpleSelect(1));
}
unset($xtr);
$numUsers = db_simpleSelect(2, $Tu, 'count(*)') - 1;
$numTopics = db_simpleSelect(2, $Tf, 'SUM(topics_count)');
$numPosts = db_simpleSelect(2, $Tf, 'SUM(posts_count)') - $numTopics;
$adminInf = db_simpleSelect(2, $Tu, $dbUserSheme['username'][1], $dbUserId, '=', 1);
$lastRegUsr = db_simpleSelect(0, $Tu, "{$dbUserId}, {$dbUserSheme['username'][1]}", '', '', '', "{$dbUserId} DESC", 1);
$title = $title . $l_stats;
echo load_header();
echo ParseTpl(makeUp('stats'));
开发者ID:amenski,项目名称:BookSharing,代码行数:30,代码来源:bb_func_stats.php

示例13: str_replace

} else {
    $tpage = '';
}
$title1 = $title;
$title = $forumName;
if (isset($addMainTitle)) {
    $title .= ' - ' . str_replace(' - ', '', $title1);
}
$title .= $tpage;
if (!isset($_GET['showSep'])) {
    $main = makeUp('main_topics');
} else {
    $main = '';
}
$nTop = 1;
$allowForm = ($user_id == 1 or $isMod == 1);
$c1 = (in_array($forum, $clForums) and isset($clForumsUsers[$forum]) and !in_array($user_id, $clForumsUsers[$forum]) and !$allowForm);
$c3 = (isset($poForums) and in_array($forum, $poForums) and !$allowForm);
$c4 = (isset($roForums) and in_array($forum, $roForums) and !$allowForm);
if ($c1 or $c3 or $c4) {
    $main = preg_replace("/(<form.*<\\/form>)/Uis", '', $main);
    $nTop = 0;
    $newTopicLink = '';
}
if ($user_id == 0) {
    $l_sub_post_tpc = $l_enterforums . '/' . $l_sub_post_tpc;
}
echo load_header();
echo $warn;
echo ParseTpl($main);
开发者ID:amenski,项目名称:BookSharing,代码行数:30,代码来源:bb_func_vtopic.php

示例14: substr

                    if (isset($modsForums[$ms])) {
                        $moderatorsList .= $modsForums[$ms] . ', ';
                    }
                }
                if ($moderatorsList != '') {
                    $moderatorsList = '<br><span class=txtSm>' . $l_moderatorsAre . ': ' . substr($moderatorsList, 0, strlen($moderatorsList) - 2) . '</span>';
                }
            }
            if (isset($forumGroups) and isset($forumGroupsDesc) and in_array($forum, $forumGroups)) {
                $forumGroupName = $forumGroupsDesc[$keyAr];
                $list_forums .= ParseTpl(makeUp('main_forumgroup'));
                $keyAr++;
            }
            if (isset($mod_rewrite) and $mod_rewrite) {
                $linkToForums = "{$main_url}/{$forum}_0.html";
            } else {
                $linkToForums = "{$main_url}/{$indexphp}action=vtopic&amp;forum={$forum}";
            }
            $checked = empty($showIds) && $forum != $CONF['forum_gridsquare'] || in_array($forum, $showIds) ? ' checked' : '';
            $list_forums .= ParseTpl($tpl);
            $i = -$i;
        }
    } while ($cols = db_simpleSelect(1));
    $forum = 0;
    unset($result);
    unset($countRes);
}
$title = $sitename;
echo load_header();
echo ParseTpl(makeUp('main_forums'));
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:30,代码来源:bb_func_vforum.php

示例15: load_header

         }
         //inserted post successfully
     } else {
         $errorMSG = $l_antiSpam;
         $correctErr = $backErrorLink;
         $title .= $l_antiSpam;
         echo load_header();
         echo ParseTpl(makeUp('main_warning'));
         return;
     }
 } else {
     $errorMSG = $l_forbidden;
     $correctErr = $backErrorLink;
     $title .= $l_forbidden;
     echo load_header();
     echo ParseTpl(makeUp('main_warning'));
     return;
 }
 if (isset($themeDesc) and in_array($topic, $themeDesc)) {
     $anchor = 1;
 } else {
     $totalPosts = db_simpleSelect(0, $Tt, 'posts_count', 'topic_id', '=', $topic);
     $vmax = $viewmaxreplys;
     $anchor = $totalPosts[0];
     if ($anchor > $vmax) {
         $anchor = $totalPosts[0] - floor($totalPosts[0] / $vmax) * $vmax;
         if ($anchor == 0) {
             $anchor = $vmax;
         }
     }
 }
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:bb_func_pthread.php


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