本文整理汇总了PHP中forum_opt函数的典型用法代码示例。如果您正苦于以下问题:PHP forum_opt函数的具体用法?PHP forum_opt怎么用?PHP forum_opt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了forum_opt函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_headboards
$last = $fc[$info['board']];
$topforums = get_headboards($fc, $last, true);
$prefix = '';
if ($info['prefix'] > 0) {
$prefix_obj = $scache->load('prefix');
$prefix_arr = $prefix_obj->get($info['board']);
if (isset($prefix[$info['prefix']])) {
$prefix = $prefix_arr[$info['prefix']]['value'];
$prefix = $lang->phrase('showtopic_prefix_title');
}
}
$breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x);
$breadcrumb->Add($prefix . $info['topic'], "showtopic.php?id=" . $info['id'] . SID2URL_x);
$breadcrumb->Add($lang->phrase('teamcp'));
echo $tpl->parse("header");
forum_opt($last);
if ($my->vlogin && $my->mp[0] == 1) {
($code = $plugins->load('managetopic_start')) ? eval($code) : null;
if ($action == "delete") {
if ($my->mp[0] == 1 && $my->mp[4] == 0) {
errorLogin($lang->phrase('not_allowed'), 'showtopic.php?id=' . $info['id'] . SID2URL_x);
}
echo $tpl->parse("menu");
echo $tpl->parse("admin/topic/delete");
} elseif ($action == "delete2") {
if ($my->mp[0] == 1 && $my->mp[4] == 0) {
errorLogin($lang->phrase('not_allowed'), 'showtopic.php?id=' . $info['id'] . SID2URL_x);
}
if ($config['updatepostcounter'] == 1 && $last['count_posts'] == 1) {
$result = $db->query("SELECT COUNT(*) AS posts, name FROM {$db->pre}replies WHERE guest = '0' AND topic_id = '{$info['id']}' GROUP BY name", __LINE__, __FILE__);
while ($row = $db->fetch_assoc($result)) {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:managetopic.php
示例2: array
$error = array();
if ($db->num_rows($result) < 1) {
$error[] = $lang->phrase('query_string_error');
}
$my->p = $slog->Permissions($row['board']);
if ($my->p['forum'] == 0) {
$error[] = $lang->phrase('not_allowed');
}
if (count($error) > 0) {
errorLogin($error, 'forum.php' . SID2URL_1);
}
$result = $db->query("SELECT status, prefix FROM {$db->pre}topics WHERE id = {$row['topic_id']} LIMIT 1");
$topic = $db->fetch_assoc($result);
$fc = cache_cat_bid();
$last = $fc[$row['board']];
forum_opt($last['opt'], $last['optvalue'], $last['id']);
$memberdata = cache_memberdata();
if (empty($row['email']) && isset($memberdata[$row['name']])) {
$row['name'] = $memberdata[$row['name']];
}
$row['date'] = gmdate($lang->phrase('dformat1'), times($row['date']));
$bbcode = initBBCodes();
$bbcode->setSmileys($row['dosmileys']);
$bbcode->setReplace($config['wordstatus']);
if ($topic['status'] == 2) {
$row['comment'] = $bbcode->ReplaceTextOnce($row['comment'], 'moved');
}
$text = $bbcode->parse($row['comment'], 'plain');
if (!empty($my->notice)) {
$notes = explode('[VSEP]', $my->notice);
if (!is_array($notes)) {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:editprofile.php
示例3: elseif
} elseif ($_GET['action'] == "board_rules") {
$my->p = $slog->Permissions($_GET['id']);
$catbid = $scache->load('cat_bid');
$fc = $catbid->get();
if (!isset($fc[$_GET['id']])) {
error($lang->phrase('query_string_error'));
}
$info = $fc[$_GET['id']];
if ($info['message_active'] == '0') {
error($lang->phrase('no_board_rules_specified'));
}
($code = $plugins->load('misc_board_rules_start')) ? eval($code) : null;
$topforums = get_headboards($fc, $info);
$breadcrumb->Add($info['name'], "showforum.php?id=" . $info['id'] . SID2URL_x);
$breadcrumb->Add($lang->phrase('board_rules'));
forum_opt($info);
echo $tpl->parse("header");
echo $tpl->parse("menu");
($code = $plugins->load('misc_board_rules_prepared')) ? eval($code) : null;
echo $tpl->parse("misc/board_rules");
($code = $plugins->load('misc_board_rules_end')) ? eval($code) : null;
} elseif ($_GET['action'] == "error") {
$my->p = $slog->Permissions();
$errid = $gpc->get('id', int);
if ($errid != 400 && $errid != 404 && $errid != 401 && $errid != 403 && $errid != 500) {
$errid = 0;
}
($code = $plugins->load('misc_error_prepared')) ? eval($code) : null;
$breadcrumb->Add($lang->phrase('htaccess_error_' . $_GET['id']));
echo $tpl->parse("header");
echo $tpl->parse("misc/error");
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:misc.php
示例4: error
$result = $db->query('
SELECT id, prefix, topic, board, posts, status
FROM ' . $db->pre . 'topics
WHERE id = "' . $_GET['id'] . '"
LIMIT 1
', __LINE__, __FILE__);
$info = $db->fetch_assoc($result);
if ($info['id'] < 1 || $db->num_rows($result) != 1) {
error($lang->phrase('query_string_error'));
}
$info['topic'] = $gpc->prepare($info['topic']);
$my->p = $slog->Permissions($info['board']);
$cat_bid_obj = $scache->load('cat_bid');
$fc = $cat_bid_obj->get();
$last = $fc[$info['board']];
forum_opt($last, 'postreplies');
$prefix = '';
if ($info['prefix'] > 0) {
$prefix_obj = $scache->load('prefix');
$prefix_arr = $prefix_obj->get($info['board']);
if (isset($prefix_arr[$info['prefix']])) {
$prefix = $prefix_arr[$info['prefix']]['value'];
$prefix = $lang->phrase('showtopic_prefix_title');
}
}
get_headboards($fc, $last);
$breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x);
$breadcrumb->Add($prefix . $info['topic'], 'showtopic.php?id=' . $_GET['id'] . SID2URL_x);
$breadcrumb->Add($lang->phrase('addreply_title'));
if ($info['status'] != 0) {
error($lang->phrase('topic_closed'));
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:addreply.php
示例5: error
SELECT r.topic, r.board, r.name, r.comment, r.topic_id, r.dosmileys, r.dowords, t.posts, r.topic_id, r.date, t.prefix, r.id, r.edit, t.vquestion, r.tstart, t.status, r.guest
FROM ' . $db->pre . 'replies AS r
LEFT JOIN ' . $db->pre . 'topics AS t ON r.topic_id = t.id
WHERE r.id = "' . $_GET['id'] . '"
LIMIT 1
', __LINE__, __FILE__);
if ($db->num_rows($result) != 1) {
error(array($lang->phrase('query_string_error')));
}
$info = $gpc->prepare($db->fetch_assoc($result));
$my->p = $slog->Permissions($info['board']);
$my->mp = $slog->ModPermissions($info['board']);
$cat_bid_obj = $scache->load('cat_bid');
$fc = $cat_bid_obj->get();
$last = $fc[$info['board']];
forum_opt($last, 'edit');
$prefix_obj = $scache->load('prefix');
$prefix_arr = $prefix_obj->get($info['board']);
$prefix = '';
if ($info['prefix'] > 0) {
if (isset($prefix_arr[$info['prefix']])) {
$prefix = $prefix_arr[$info['prefix']]['value'];
$prefix = $lang->phrase('showtopic_prefix_title');
}
}
get_headboards($fc, $last);
$breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x);
$breadcrumb->Add($prefix . $info['topic'], 'showtopic.php?id=' . $info['topic_id'] . SID2URL_x);
$breadcrumb->Add($lang->phrase('edit'));
echo $tpl->parse("header");
if ($info['status'] != 0) {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:edit.php
示例6: forum_opt
$catbid = $scache->load('cat_bid');
$fc = $catbid->get();
$last = $fc[$info['board']];
if ($last['topiczahl'] < 1) {
$last['topiczahl'] = $config['topiczahl'];
}
$prefix = '';
if ($info['prefix'] > 0) {
$prefix_obj = $scache->load('prefix');
$prefix_arr = $prefix_obj->get($info['board']);
if (isset($prefix_arr[$info['prefix']])) {
$prefix = $prefix_arr[$info['prefix']]['value'];
$prefix = $lang->phrase('showtopic_prefix_title');
}
}
forum_opt($last, 'pdf');
$start = $_GET['page'] * $last['topiczahl'];
$start = $start - $last['topiczahl'];
// Some speed optimisation
$speeder = $info['posts'] + 1;
if ($speeder > $last['topiczahl']) {
$searchsql = " LIMIT " . $start . "," . $last['topiczahl'];
} else {
$searchsql = " LIMIT " . $speeder;
}
BBProfile($bbcode);
$memberdata_obj = $scache->load('memberdata');
$memberdata = $memberdata_obj->get();
$pdf = new PDF();
$pdftitle = html_entity_decode($config['fname'] . ": " . $prefix . $info['topic']);
$pdf->SetCompression($config['pdfcompress']);
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:pdf.php
示例7: t1
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$board = $gpc->get('id', int);
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions($board);
$catbid = $scache->load('cat_bid');
$fc = $catbid->get();
if (empty($board) || !isset($fc[$board])) {
error($lang->phrase('query_string_error'));
}
$last = $fc[$board];
forum_opt($last, 'posttopics');
if ($config['tpcallow'] == 1 && $my->p['attachments'] == 1) {
$p_upload = 1;
} else {
$p_upload = 0;
}
get_headboards($fc, $last);
$breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x);
$breadcrumb->Add($lang->phrase('newtopic_title'));
($code = $plugins->load('newtopic_start')) ? eval($code) : null;
if ($_GET['action'] == "startvote") {
$result = $db->query("SELECT id, vquestion, name, board FROM {$db->pre}topics WHERE id = '{$_GET['topic_id']}' LIMIT 1", __LINE__, __FILE__);
$info = $db->fetch_assoc($result);
$my->mp = $slog->ModPermissions($info['board']);
$temp = $gpc->get('temp', int, 2);
if ($temp < 2) {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:newtopic.php
示例8: slog
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$catbid = $scache->load('cat_bid');
$fc = $catbid->get();
if (empty($board) || !isset($fc[$board])) {
error($lang->phrase('query_string_error'));
}
$info = $fc[$board];
if ($info['forumzahl'] < 1) {
$info['forumzahl'] = $config['forumzahl'];
}
$my->p = $slog->Permissions($info['id']);
$my->mp = $slog->ModPermissions($info['id']);
forum_opt($info['opt'], $info['optvalue'], $info['id']);
$breadcrumb->Add($lang->phrase('teamcp'));
echo $tpl->parse("header");
if ($my->vlogin && $my->mp[0] == 1) {
($code = $plugins->load('manageforum_start')) ? eval($code) : null;
if ($_GET['action'] == "index") {
if ($_GET['type'] == 'open') {
$marksql = ' AND status = "1" ';
} elseif ($_GET['type'] == 'close') {
$marksql = ' AND status = "0" ';
} else {
// 'close' or 'move'
$marksql = '';
}
($code = $plugins->load('manageforum_filter_query')) ? eval($code) : null;
if (!empty($marksql)) {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:manageforum.php
注:本文中的forum_opt函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论