本文整理汇总了PHP中forum_get_setting函数的典型用法代码示例。如果您正苦于以下问题:PHP forum_get_setting函数的具体用法?PHP forum_get_setting怎么用?PHP forum_get_setting使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了forum_get_setting函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: forum_links_get_links
function forum_links_get_links()
{
if (!($db = db::get())) {
return false;
}
if (!($table_prefix = get_table_prefix())) {
return false;
}
$forum_links_top_link = forum_get_setting('forum_links_top_link', null, gettext("Forum Links"));
$sql = "SELECT LID, TITLE, URI FROM `{$table_prefix}FORUM_LINKS` ";
$sql .= "ORDER BY POS ASC";
if (!($result = $db->query($sql))) {
return false;
}
if ($result->num_rows == 0) {
return false;
}
$links_array = array($forum_links_top_link);
while ($forum_links_data = $result->fetch_assoc()) {
if (!isset($forum_links_data['TITLE']) || strlen(trim($forum_links_data['TITLE'])) < 1) {
$forum_links_data['TITLE'] = '-';
}
if (!isset($forum_links_data['URI']) || strlen(trim($forum_links_data['URI'])) < 1) {
$links_array[$forum_links_data['LID']] = $forum_links_data['TITLE'];
} else {
$forum_links_data['URI'] = href_cleanup_query_keys($forum_links_data['URI']);
$links_array[$forum_links_data['URI']] = $forum_links_data['TITLE'];
}
}
return $links_array;
}
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:31,代码来源:forum_links.inc.php
示例2: __construct
public function __construct($num_chars = 6, $min_char_size = 15, $max_char_size = 25, $noise_factor = 9, $max_rotation = 30)
{
if (!is_numeric($num_chars)) {
$num_chars = 6;
}
if (!is_numeric($min_char_size)) {
$min_char_size = 20;
}
if (!is_numeric($max_char_size)) {
$max_char_size = 40;
}
if (!is_numeric($noise_factor)) {
$noise_factor = 9;
}
if (!is_numeric($max_rotation)) {
$max_rotation = 30;
}
$this->num_chars = $num_chars;
$this->min_char_size = $min_char_size;
$this->max_char_size = $max_char_size;
$this->max_rotation = $max_rotation;
$this->key = forum_get_setting('text_captcha_key');
$this->image_x = ($num_chars + 1) * (int) (($this->max_char_size + $this->min_char_size) / 1.5);
$this->image_y = (int) (2.4 * $this->max_char_size);
if (($text_captcha_dir = forum_get_setting('text_captcha_dir', 'strlen', false)) !== false) {
$this->text_captcha_dir = rtrim($text_captcha_dir, '/');
}
if ($noise_factor > 0) {
$this->noise_factor = $noise_factor;
$this->noise_level = $num_chars * $noise_factor;
} else {
$this->noise_factor = 0;
$this->noise_level = 0;
}
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:35,代码来源:text_captcha.inc.php
示例3: sfs_check_banned
function sfs_check_banned($user_data, &$cached_response = false)
{
if (forum_get_setting('sfs_enabled', 'N')) {
return false;
}
$request = array('f' => 'json');
if (isset($user_data['IPADDRESS']) && strlen(trim($user_data['IPADDRESS'])) > 0) {
$request['ip'] = ipv6_to_ipv4($user_data['IPADDRESS']);
}
if (!isset($user_data['UID']) || $user_data['UID'] > 0) {
if (isset($user_data['LOGON']) && strlen(trim($user_data['LOGON'])) > 0) {
$request['username'] = $user_data['LOGON'];
}
if (isset($user_data['EMAIL']) && strlen(trim($user_data['EMAIL'])) > 0) {
$request['email'] = $user_data['EMAIL'];
}
}
if (sizeof($request) < 2) {
return false;
}
$ban_type_array = array('ip' => BAN_TYPE_IP, 'username' => BAN_TYPE_LOGON, 'email' => BAN_TYPE_EMAIL);
$sfs_api_url_array = parse_url(forum_get_setting('sfs_api_url', null, 'http://www.stopforumspam.com/api'));
$sfs_api_url_array['query'] = http_build_query($request, false, '&');
$sfs_api_url = build_url_str($sfs_api_url_array);
$sfs_api_url_md5 = md5($sfs_api_url);
$min_confidence = forum_get_setting('sfs_min_confidence', null, 75);
$response_confidence = 0;
$cached_response = false;
try {
if (!($response = sfs_cache_get($sfs_api_url_md5, $cached_response))) {
$curl = curl_init($sfs_api_url);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT_MS, 500);
curl_setopt($curl, CURLOPT_TIMEOUT_MS, 500);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
$response = json_decode(curl_exec($curl), true);
}
if (!isset($response['success']) || $response['success'] != 1) {
return false;
}
if (!$cached_response) {
sfs_cache_put($sfs_api_url_md5, $response);
}
foreach (array_keys($ban_type_array) as $key) {
if (!isset($response[$key]['confidence'])) {
continue;
}
$response_confidence += $response[$key]['confidence'];
}
$response_confidence = $response_confidence / (count($request) - 1);
} catch (Exception $e) {
return false;
}
return $response_confidence > $min_confidence;
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:56,代码来源:sfs.inc.php
示例4: sphinx_search_connect
function sphinx_search_connect()
{
if (!($sphinx_search_host = forum_get_setting('sphinx_search_host'))) {
return false;
}
if (!($sphinx_search_port = forum_get_setting('sphinx_search_port', 'is_numeric', false))) {
return false;
}
try {
return mysqli_connect($sphinx_search_host, null, null, null, $sphinx_search_port);
} catch (Exception $e) {
return false;
}
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:14,代码来源:sphinx.inc.php
示例5: sfs_check_banned
function sfs_check_banned($user_data, &$cached_response = false)
{
if (forum_get_setting('sfs_enabled', 'N')) {
return false;
}
$request = array('f' => 'json');
if (isset($user_data['IPADDRESS']) && strlen(trim($user_data['IPADDRESS'])) > 0) {
$request['ip'] = $user_data['IPADDRESS'];
}
if (!isset($user_data['UID']) || $user_data['UID'] > 0) {
if (isset($user_data['LOGON']) && strlen(trim($user_data['LOGON'])) > 0) {
$request['username'] = $user_data['LOGON'];
}
if (isset($user_data['EMAIL']) && strlen(trim($user_data['EMAIL'])) > 0) {
$request['email'] = $user_data['EMAIL'];
}
}
if (sizeof($request) < 2) {
return false;
}
$ban_type_array = array('ip' => BAN_TYPE_IP, 'username' => BAN_TYPE_LOGON, 'email' => BAN_TYPE_EMAIL);
$sfs_api_url_array = parse_url(forum_get_setting('sfs_api_url', null, 'http://www.stopforumspam.com/api'));
$sfs_api_url_array['query'] = http_build_query($request, false, '&');
$sfs_api_url = build_url_str($sfs_api_url_array);
$sfs_api_url_md5 = md5($sfs_api_url);
$min_confidence = forum_get_setting('sfs_min_confidence', null, 75);
$response_confidence = 0;
try {
if (!($response = sfs_cache_get($sfs_api_url_md5, $cached_response))) {
$context = stream_context_create(array('http' => array('timeout' => 1)));
$response = json_decode(file_get_contents($sfs_api_url, null, $context), true);
}
sfs_cache_put($sfs_api_url_md5, $response);
if (!isset($response['success']) || $response['success'] != 1) {
return false;
}
foreach (array_keys($ban_type_array) as $key) {
if (!isset($response[$key]['confidence'])) {
continue;
}
$response_confidence += $response[$key]['confidence'];
}
$response_confidence = $response_confidence / (count($request) - 1);
} catch (Exception $e) {
return false;
}
return $response_confidence > $min_confidence;
}
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:48,代码来源:sfs.inc.php
示例6: form_check_csrf_token
function form_check_csrf_token()
{
if (!isset($_SERVER['REQUEST_METHOD']) || mb_strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST') {
return;
}
if (in_array(basename($_SERVER['PHP_SELF']), get_csrf_exempt_files()) || defined('BH_DISABLE_CSRF')) {
return;
}
if (!($token_name = forum_get_setting('csrf_token_name'))) {
html_draw_error(gettext('Sorry, you do not have access to this page.'));
}
if (!isset($_POST[$token_name]) || $_POST[$token_name] != session::get_csrf_token()) {
unset($_POST[$token_name]);
session::refresh_csrf_token();
html_draw_error(gettext('Sorry, you do not have access to this page.'));
}
unset($_POST[$token_name]);
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:18,代码来源:form.inc.php
示例7: word_filter_get_by_uid
function word_filter_get_by_uid($uid)
{
if (!is_numeric($uid)) {
return false;
}
if (!($user_prefs = user_get_prefs($uid))) {
return false;
}
static $word_filter_array = array();
if (!isset($word_filter_array[$uid])) {
$word_filter_array[$uid] = array();
if (isset($user_prefs['USE_ADMIN_FILTER']) && $user_prefs['USE_ADMIN_FILTER'] == 'Y' || forum_get_setting('force_word_filter', 'Y')) {
word_filter_get(0, $word_filter_array[$uid]);
}
if (isset($user_prefs['USE_WORD_FILTER']) && $user_prefs['USE_WORD_FILTER'] == 'Y') {
word_filter_get($uid, $word_filter_array[$uid]);
}
}
return word_filter_prepare($word_filter_array[$uid]);
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:20,代码来源:word_filter.inc.php
示例8: image_resize
function image_resize($src, $dest, $max_width = 150, $max_height = 150)
{
// Check attachment thumbnails are enabled.
if (forum_get_setting('attachment_thumbnails', 'N')) {
return false;
}
// Get the thumbnail method.
$attachment_thumbnail_method = forum_get_setting('attachment_thumbnail_method');
// Different function for each method.
switch ($attachment_thumbnail_method) {
// Use external ImageMagick binary.
case ATTACHMENT_THUMBNAIL_IMAGEMAGICK:
return image_resize_imagemagick($src, $dest, $max_width, $max_height);
break;
// Use PHP's GD image library.
// Use PHP's GD image library.
default:
return image_resize_gd($src, $dest, $max_width, $max_height);
break;
}
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:21,代码来源:image.inc.php
示例9: sphinx_search_connect
function sphinx_search_connect()
{
if (!($sphinx_search_host = forum_get_setting('sphinx_search_host'))) {
return false;
}
if (!($sphinx_search_port = forum_get_setting('sphinx_search_port', 'is_numeric', false))) {
return false;
}
if (!($sphinx = mysqli_init())) {
return false;
}
if (!$sphinx->options(MYSQLI_OPT_CONNECT_TIMEOUT, 2)) {
return false;
}
if (!$sphinx->real_connect($sphinx_search_host, null, null, null, $sphinx_search_port)) {
return false;
}
if (mysqli_connect_error()) {
return false;
}
return $sphinx;
}
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:22,代码来源:sphinx.inc.php
示例10: lang_init
function lang_init()
{
$available_languages = lang_get_available(false);
if (isset($_SESSION['LANGUAGE']) && in_array($_SESSION['LANGUAGE'], $available_languages)) {
$language = $_SESSION['LANGUAGE'];
} else {
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
$language = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
}
}
if (!isset($language)) {
$language = forum_get_setting('default_language', 'strlen', 'en_GB');
}
$languages = array($language . '.utf8', $language . '.UTF8', $language . '.utf-8', $language . '.UTF-8', $language);
setlocale(LC_ALL, $languages);
putenv('LC_ALL=' . $language);
putenv('LANG=' . $language);
putenv('LANGUAGE=' . $language);
bindtextdomain('messages', realpath(BH_INCLUDE_PATH . 'locale'));
bind_textdomain_codeset('messages', 'UTF-8');
textdomain('messages');
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:22,代码来源:lang.inc.php
示例11: form_submit
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </div>\n";
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\"> </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " ", form_submit("post", gettext("Post")), " ", form_submit("preview_poll", gettext("Preview")), " ", form_submit("preview_form", gettext("Preview Voting Form"));
echo " <a href=\"discussion.php?webtag={$webtag}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>";
if (forum_get_setting('attachments_enabled', 'Y')) {
echo " <a href=\"attachments.php?webtag={$webtag}&aid={$aid}\" class=\"button popup 660x500\" id=\"attachments\"><span>", gettext("Attachments"), "</span></a>\n";
echo " ", form_input_hidden("aid", htmlentities_array($aid)), "\n";
}
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\"> </td>\n";
echo " </tr>\n";
echo " </table>\n";
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:31,代码来源:create_poll.php
示例12: form_submit
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo form_submit("post", gettext("Post"), "tabindex=\"2\""), "\n";
echo form_submit("preview", gettext("Preview"), "tabindex=\"3\""), "\n";
if (isset($_POST['t_tid']) && is_numeric($_POST['t_tid']) && isset($_POST['t_rpid']) && is_numeric($_POST['t_rpid'])) {
echo "<a href=\"discussion.php?webtag={$webtag}&msg={$_POST['t_tid']}.{$_POST['t_rpid']}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
} else {
if (isset($_GET['replyto']) && validate_msg($_GET['replyto'])) {
echo "<a href=\"discussion.php?webtag={$webtag}&msg={$_GET['replyto']}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
} else {
echo "<a href=\"discussion.php?webtag={$webtag}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
}
}
if (forum_get_setting('attachments_enabled', 'Y') && (session::check_perm(USER_PERM_POST_ATTACHMENTS | USER_PERM_POST_READ, $t_fid) || $new_thread)) {
echo "<a href=\"attachments.php?aid={$aid}\" class=\"button popup 660x500\" id=\"attachments\"><span>", gettext("Attachments"), "</span></a>\n";
echo form_input_hidden("aid", htmlentities_array($aid));
}
if ($allow_sig == true) {
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\"> </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " <table class=\"messagefoot\" width=\"553\" cellspacing=\"0\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"subhead\">", gettext("Signature"), "</td>\n";
if (($page_prefs & POST_SIGNATURE_DISPLAY) > 0) {
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:31,代码来源:post.php
示例13: gettext
if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0, 0) && sizeof($admin_user_array['user_array']) > 0) {
echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"86%\">\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " <table class=\"box\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"posthead\">\n";
echo " <table width=\"100%\">\n";
echo " <tr>\n";
echo " <td class=\"subhead\" align=\"left\">", gettext("Options"), "</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"center\">\n";
echo " <table class=\"posthead\" width=\"95%\">\n";
echo " <tr>\n";
if (forum_get_setting('require_user_approval', 'Y')) {
echo " <td align=\"left\" valign=\"top\" style=\"white-space: nowrap\">", gettext("With selected"), ": </td>\n";
echo " <td align=\"left\" valign=\"top\" style=\"white-space: nowrap\" width=\"100%\">", form_dropdown_array("action", array(-1 => ' ', ADMIN_USER_OPTION_END_SESSION => gettext("End Session (Kick)"), ADMIN_USER_OPTION_APPROVE => gettext("Approve")), false, false, 'bhlogondropdown'), " ", form_submit("select_action", gettext("Go")), "</td>\n";
} else {
echo " <td align=\"left\" valign=\"top\" style=\"white-space: nowrap\">", gettext("With selected"), ": </td>\n";
echo " <td align=\"left\" valign=\"top\" style=\"white-space: nowrap\" width=\"100%\">", form_dropdown_array("action", array(-1 => ' ', ADMIN_USER_OPTION_END_SESSION => gettext("End Session (Kick)")), false, false, 'bhlogondropdown'), " ", form_submit("select_action", gettext("Go")), "</td>\n";
}
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\" colspan=\"6\"> </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:31,代码来源:admin_users.php
示例14: gettext
echo " <table class=\"box\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"posthead\">\n";
echo " <table class=\"posthead\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"subhead\">", gettext("Options"), "</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <table class=\"posthead\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"center\">\n";
echo " <table class=\"posthead\" width=\"95%\">\n";
echo " <tr>\n";
echo " <td align=\"left\">", form_checkbox("use_word_filter", "Y", gettext("Enable word filter."), session::get_value('USE_WORD_FILTER') == 'Y'), "</td>\n";
echo " </tr>\n";
if (!forum_get_setting('force_word_filter', 'Y')) {
echo " <tr>\n";
echo " <td align=\"left\">", form_checkbox("use_admin_filter", "Y", gettext("Include admin word filter in my list."), session::get_value('USE_ADMIN_FILTER') == 'Y'), "</td>\n";
echo " </tr>\n";
}
echo " <tr>\n";
echo " <td align=\"left\"> </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:31,代码来源:edit_wordfilter.php
示例15: stats_get_most_downloaded_attachment
function stats_get_most_downloaded_attachment()
{
if (!($db = db::get())) {
return false;
}
if (!($table_prefix = get_table_prefix())) {
return false;
}
if (!($attachment_dir = forum_get_setting('attachment_dir'))) {
return false;
}
if (!($forum_fid = get_forum_fid())) {
return false;
}
$sql = "SELECT PAI.TID, PAI.PID, PAF.AID, PAF.HASH, PAF.FILENAME, ";
$sql .= "PAF.MIMETYPE, PAF.DOWNLOADS FROM POST_ATTACHMENT_FILES PAF ";
$sql .= "LEFT JOIN POST_ATTACHMENT_IDS PAI ON (PAI.AID = PAF.AID) ";
$sql .= "WHERE PAI.FID = '{$forum_fid}' ";
$sql .= "ORDER BY PAF.DOWNLOADS DESC ";
if (!($result = $db->query($sql))) {
return false;
}
while ($attachment_data = $result->fetch_assoc()) {
if (@file_exists("{$attachment_dir}/{$attachment_data['HASH']}")) {
if (@file_exists("{$attachment_dir}/{$attachment_data['HASH']}.thumb")) {
$filesize = filesize("{$attachment_dir}/{$attachment_data['HASH']}");
$filesize += filesize("{$attachment_dir}/{$attachment_data['HASH']}.thumb");
return array("msg" => sprintf("%s.%s", $attachment_data['TID'], $attachment_data['PID']), "filename" => rawurldecode($attachment_data['FILENAME']), "filedate" => filemtime("{$attachment_dir}/{$attachment_data['HASH']}"), "filesize" => $filesize, "aid" => $attachment_data['AID'], "hash" => $attachment_data['HASH'], "mimetype" => $attachment_data['MIMETYPE'], "downloads" => $attachment_data['DOWNLOADS']);
} else {
return array("msg" => sprintf("%s.%s", $attachment_data['TID'], $attachment_data['PID']), "filename" => rawurldecode($attachment_data['FILENAME']), "filedate" => filemtime("{$attachment_dir}/{$attachment_data['HASH']}"), "filesize" => filesize("{$attachment_dir}/{$attachment_data['HASH']}"), "aid" => $attachment_data['AID'], "hash" => $attachment_data['HASH'], "mimetype" => $attachment_data['MIMETYPE'], "downloads" => $attachment_data['DOWNLOADS']);
}
}
}
return false;
}
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:35,代码来源:stats.inc.php
示例16: sprintf
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <br />\n";
}
if (forum_check_webtag_available($webtag)) {
echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\">\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " <table class=\"box\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"posthead\">\n";
echo " <table class=\"posthead\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"subhead\" colspan=\"1\">", sprintf(gettext("User Status for %s"), forum_get_setting('forum_name', null, 'A Beehive Forum')), "</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"center\">\n";
echo " <table class=\"posthead\" width=\"90%\">\n";
if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0)) {
echo " <tr>\n";
echo " <td align=\"left\">", form_checkbox("t_admintools", USER_PERM_ADMIN_TOOLS, gettext("User has access to forum admin tools"), $user_perms & USER_PERM_ADMIN_TOOLS), "</td>\n";
echo " </tr>\n";
}
echo " <tr>\n";
echo " <td align=\"left\">", form_checkbox("t_globalmod", USER_PERM_FOLDER_MODERATE, gettext("User can moderate all folders"), $user_perms & USER_PERM_FOLDER_MODERATE), "</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\">", form_checkbox("t_linksmod", USER_PERM_LINKS_MODERATE, gettext("User can moderate Links section"), $user_perms & USER_PERM_LINKS_MODERATE), "</td>\n";
echo " </tr>\n";
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:31,代码来源:admin_user.php
示例17: gettext
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " <table class=\"box\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"posthead\">\n";
echo " <table width=\"100%\">\n";
echo " <tr>\n";
echo " <td class=\"subhead\" align=\"left\">", gettext("Options"), "</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"center\">\n";
echo " <table class=\"posthead\" width=\"95%\">\n";
echo " <tr>\n";
echo " <td align=\"left\" colspan=\"2\">", form_checkbox("hide_empty", "Y", gettext("Hide rows with empty or null values in selected columns"), $hide_empty == 'Y'), "</td>\n";
echo " </tr>\n";
if (forum_get_setting('guest_show_recent', 'Y')) {
echo " <tr>\n";
echo " <td align=\"left\" colspan=\"2\">", form_checkbox("hide_guests", "Y", gettext("Show Registered Users only (hide Guests)"), $hide_guests == 'Y'), "</td>\n";
echo " </tr>\n";
}
echo " <tr>\n";
echo " <td align=\"left\"> </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:31,代码来源:visitor_log.php
示例18: sprintf
echo " <div class=\"register_confirmation\">", sprintf(gettext("To prevent automated registrations this forum requires you enter a confirmation code. The code is displayed in the image below. If you are visually impaired or cannot otherwise read the code please contact the %s."), $forum_owner_link), "</div>\n";
echo " <div class=\"register_confirmation_image\">\n";
echo " ", html_style_image('text_captcha_image', gettext("This is a captcha-picture. It is used to prevent automatic registration"), 'text_captcha_image', array('background-image' => sprintf("url('data:image/jpeg;base64,%s')", base64_encode(file_get_contents($text_captcha_image))), 'width' => "{$text_captcha->get_width()}px", 'height' => "{$text_captcha->get_height()}px")), "\n";
echo " ", html_style_image('text_captcha_reload reload', null, 'text_captcha_reload'), "\n";
echo " </div>\n";
echo " <div class=\"register_confirmation_input\">\n";
echo " ", light_form_input_text("private_key", null, 20, htmlentities_array($text_captcha->get_num_chars())), "\n";
echo " </div>\n";
//echo " <div class=\"clearer\"></div>\n";
//echo "</div>\n";
}
}
}
echo " <div class=\"register_buttons\">\n";
echo " ", light_form_submit('register', gettext("Register"));
echo " <a href=\"llogon.php?webtag={$webtag}\" class=\"button\" target=\"_self\"><span>", gettext("Cancel"), "</span></a>\n";
echo " </div>\n";
} else {
$forum_name = forum_get_setting('forum_name', 'strlen', 'A Beehive Forum');
if (($forum_rules = forum_get_setting('forum_rules_message', 'strlen', false)) !== false) {
$forum_rules = sprintf(gettext("<p><b>Forum Rules</b></p><p>Registration to %1\$s is free! We do insist that you abide by the rules and policies detailed below. If you agree to the terms, please check the 'I agree' checkbox and press the 'Register' button below. If you would like to cancel the registration, click <a href=\"index.php?webtag=%2\$s\">here</a> to return to the forums index.</p><p>Although the administrators and moderators of %1\$s will attempt to keep all objectionable messages off this forum, it is impossible for us to review all messages. All messages express the views of the author, and neither the owners of %1\$s, nor Project Beehive Forum and its affiliates will be held responsible for the content of any message.</p><p>By agreeing to these rules, you warrant that you will not post any messages that are obscene, vulgar, sexually-orientated, hateful, threatening, or otherwise in violation of any laws.</p><p>The owners of %1\$s reserve the right to remove, edit, move or close any thread for any reason.</p>"), $forum_name, $webtag);
}
echo " ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo " <div class=\"register_rules\">", fix_html($forum_rules), "</div>\n";
echo " <div class=\"register_accept\">", light_form_checkbox('user_agree_rules', 'Y', gettext("I have read, and agree to abide by the forum rules.")), "</div>\n";
echo " <div class=\"register_buttons\">", light_form_submit('forum_rules', gettext("Register")), "</div>\n";
}
echo "</div>\n";
echo "</div>\n";
echo "</form>\n";
light_html_draw_bottom();
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:31,代码来源:lregister.php
示例19: forum_check_maintenance
function forum_check_maintenance()
{
$forum_maintenance_functions_array = array('pm_system_prune_folders', 'thread_auto_prune_unread_data', 'sitemap_create_file');
$new_forum_settings = array();
if (!forum_self_clean_check_ajax()) {
return;
}
$forum_maintenance_hour = forum_get_setting('forum_maintenance_hour', 'is_numeric', 3);
$forum_maintenance_duration = forum_get_setting('forum_maintenance_duration', 'is_numeric', 1);
$forum_maintenance_function = forum_get_setting('forum_maintenance_function', 'is_numeric', 0);
$forum_maintenance_function++;
if (!isset($forum_maintenance_functions_array[$forum_maintenance_function])) {
$forum_maintenance_function = 0;
}
$forum_maintenance_date_var = sprintf("%s_last_run", $forum_maintenance_functions_array[$forum_maintenance_function]);
$forum_maintenance_last_run = forum_get_setting($forum_maintenance_date_var, 'is_numeric', 0);
if (time() - $forum_maintenance_last_run < DAY_IN_SECONDS) {
return;
}
if (time() < mktime($forum_maintenance_hour)) {
return;
}
if (time() > mktime($forum_maintenance_hour + $forum_maintenance_duration)) {
return;
}
if (!function_exists($forum_maintenance_functions_array[$forum_maintenance_function])) {
return;
}
ignore_user_abort(true);
$forum_maintenance_functions_array[$forum_maintenance_function]();
$new_forum_settings[$forum_maintenance_date_var] = time();
$new_forum_settings['forum_maintenance_function'] = $forum_maintenance_function;
forum_save_global_settings($new_forum_settings);
}
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:34,代码来源:forum.inc.php
示例20: format_date
function format_date($time)
{
if (($timezone_id = session::get_value('TIMEZONE')) === false) {
$timezone_id = forum_get_setting('forum_timezone', null, 27);
}
if (($gmt_offset = session::get_value('GMT_OFFSET')) === false) {
$gmt_offset = forum_get_setting('forum_gmt_offset', null, 0);
}
if (($dst_offset = session::get_value('DST_OFFSET')) === false) {
$dst_offset = forum_get_setting('forum_dst_offset', null, 0);
}
if (($dl_saving = session::get_value('DL_SAVING')) === false) {
$dl_saving = forum_get_setting('forum_dl_saving', null, 'N');
}
// Calculate $time in user's timezone.
$time = $time + $gmt_offset * HOUR_IN_SECONDS;
// Calculate the current time in user's timezone.
$current_time = time() + $gmt_offset * HOUR_IN_SECONDS;
// Check for DST changes
if ($dl_saving == 'Y' && timestamp_is_dst($timezone_id, $gmt_offset)) {
// Ammend t
|
请发表评论