function cms_block_user_block() { global $db, $cache, $config, $template, $user, $lang; /* if($user->data['session_logged_in']) { $sql = "SELECT COUNT(post_id) as total FROM " . POSTS_TABLE . " WHERE post_time >= " . $user->data['user_lastvisit'] . " AND poster_id <> " . $user->data['user_id'] . " AND post_time < " . time(); $db->sql_return_on_error(true); $result = $db->sql_query($sql); $db->sql_return_on_error(false); if($result) { $row = $db->sql_fetchrow($result); $lang['Search_new'] = $lang['Search_new'] . " (" . $row['total'] . ")"; $db->sql_freeresult($result); } } */ // Check For Anonymous User if ($user->data['user_id'] != ANONYMOUS) { $name_link = colorize_username($user->data['user_id'], $user->data['username'], $user->data['user_color'], $user->data['user_active']); $avatar_img = user_get_avatar($user->data['user_id'], $user->data['user_level'], $user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_allowavatar']); } else { $name_link = $lang['Guest']; $avatar_img = '<img src="' . $config['default_avatar_guests_url'] . '" alt="" />'; } $s_last_visit = create_date($config['default_dateformat'], $user->data['user_lastvisit'], $config['board_timezone']); $template->assign_vars(array('U_PORTAL_NOSID' => CMS_PAGE_HOME, 'AVATAR_IMG' => $avatar_img, 'U_NAME_LINK' => $name_link, 'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit), 'L_REMEMBER_ME' => $lang['Remember_me'], 'L_SEND_PASSWORD' => $lang['Forgotten_password'], 'U_SEND_PASSWORD' => append_sid(CMS_PAGE_PROFILE . '?mode=sendpassword'), 'L_REGISTER_NEW_ACCOUNT' => sprintf($lang['Register_new_account'], '<a href="' . append_sid(CMS_PAGE_PROFILE . '?mode=register') . '">', '</a>'), 'L_NEW_SEARCH' => $lang['Search_new'])); }
function recup_liste_scores($limit = 15) { global $db; $sql = 'SELECT s.* ,u.user_id, u.username, u.user_avatar_type, u.user_allowavatar, u.user_avatar FROM ' . AREABB_SCORES_TABLE . ' as s LEFT JOIN ' . USERS_TABLE . ' as u ON s.user_id = u.user_id WHERE s.game_id = ' . $this->gid . ' ORDER BY s.score_game DESC, s.score_date ASC LIMIT 0,' . $limit; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, "Impossible d\\acceder à la tables des scrores", '', __LINE__, __FILE__, $sql); } $i = 1; $score_precedent = -999999; $position_precedente = 0; while ($row = $db->sql_fetchrow($result)) { // On compare le score actuel avec le score précédent if ($row['score_game'] == $score_precedent) { $position = $position_precedente; } else { $position++; $position_precedente = $position; } $this->liste_score[$i]['position'] = $position; $this->liste_score[$i]['avatar'] = $this->affiche_avatar($row['user_avatar_type'], $row['user_allowavatar'], $row['user_avatar']); $this->liste_score[$i]['username'] = $row['username']; $this->liste_score[$i]['user_id'] = $row['user_id']; $this->liste_score[$i]['score'] = $row['score_game']; $this->liste_score[$i]['date'] = create_date($board_config['default_dateformat'], $row['score_date'], $board_config['board_timezone']); $i++; } return true; }
public function __construct() { global $template, $db, $board_config, $phpbb_seo, $lang; global $rcs, $get, $qte; $template->assign_vars(array('MARQUEE_TOPIC' => str_replace("%s", $board_config['topics_on_index'], $lang['marquee_topic']))); if (!($result = $db->sql_query($this->getFetchSql(), false, 'topics_recent_'))) { message_die(GENERAL_ERROR, 'Could not query recent posts marquee information', '', __LINE__, __FILE__); } if ($rows = $db->sql_fetchrowset($result)) { $db->sql_freeresult($result); } $topics = count($rows) <= $board_config['topics_on_index'] ? count($rows) : $board_config['topics_on_index']; for ($i = 0; $i < $topics; ++$i) { $topic = $rows[$i]; $mar_title = $topic["topic_title"]; // www.phpBB-SEO.com SEO TOOLKIT BEGIN if (!isset($phpbb_seo->seo_url['topic'][$topic['topic_id']])) { $phpbb_seo->seo_url['topic'][$topic['topic_id']] = $phpbb_seo->format_url($mar_title); } // www.phpBB-SEO.com SEO TOOLKIT END $mar_url = $get->url('viewtopic', array(POST_TOPIC_URL => $topic["topic_id"])); $mar_user = $topic["username"]; $pic = pic_for_topic($topic); if ($board_config['allow_smilies']) { $topic["topic_title"] = smilies_pass($topic["topic_title"]); } $topic_title = $topic['topic_title']; $qte->attr($topic_title, $topic['topic_attribute']); $template->assign_block_vars('marqueerow', array('FOLD_URL' => $pic, 'TOPIC_TITLE' => $topic_title, 'TOPIC_URL' => $get->url('viewtopic', array(POST_TOPIC_URL => $topic["topic_id"]), true), 'POST_URL' => $get->url('viewtopic', array('p' => $topic["post_id"]), true) . '#' . $topic["post_id"], 'STYLE' => $rcs->get_colors($topic), 'USERNAME' => $topic["username"], 'USER_PROF' => $get->url('userlist', array('mode' => 'viewprofile', POST_USERS_URL => $topic["user_id"]), true), 'POST_DATE' => create_date($board_config['default_dateformat'], $topic["post_time"], $board_config['board_timezone']))); } }
function dateNavigator($week_no = null) { if (empty($week_no)) { $week_no = date_format(create_date(), 'W'); } return '<table border="1px" align="center" cellpadding="5px>" style="font:bold;background:#ccc"' . '<tr><td><a href="week.php?week=prior">Предыдущая' . ($week_no - 1) . '</a></td>' . '<td><a href="week.php?week=current">Текущая' . $week_no . '</a></td>' . '<td><a href="week.php?week=next">Следующая' . ($week_no + 1) . '</a></td>' . '</tr>' . '</table>'; }
function rotary_pre_user_import($userdata, $usermeta) { $usermeta['email'] = $userdata['user_email']; $userdata['role'] = 'member'; $usermeta['memberyesno'] = '1'; $membersince = date_format(create_date($usermeta['membersince']), 'm/d/Y'); $usermeta['membersince'] = $membersince ? $membersince : '01/01/2015'; $userdata['display_name'] = $userdata['first_name'] . ' ' . $userdata['last_name']; }
function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq, &$aim_img, &$aim, &$msn_img, &$msn, &$yim_img, &$yim) { global $lang, $images, $board_config, $phpEx; $from = !empty($row['user_from']) ? $row['user_from'] : ' '; $joined = create_date($date_format, $row['user_regdate'], $board_config['board_timezone']); $posts = $row['user_posts'] ? $row['user_posts'] : 0; $poster_avatar = ''; if ($row['user_avatar_type'] && $row['user_id'] != ANONYMOUS && $row['user_allowavatar']) { switch ($row['user_avatar_type']) { case USER_AVATAR_UPLOAD: $poster_avatar = $board_config['allow_avatar_upload'] ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : ''; break; case USER_AVATAR_REMOTE: $poster_avatar = $board_config['allow_avatar_remote'] ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" />' : ''; break; case USER_AVATAR_GALLERY: $poster_avatar = $board_config['allow_avatar_local'] ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : ''; break; } } if (!empty($row['user_viewemail']) || $group_mod) { $email_uri = $board_config['board_email_form'] ? append_sid("profile.{$phpEx}?mode=email&" . POST_USERS_URL . '=' . $row['user_id']) : 'mailto:' . $row['user_email']; $email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>'; $email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>'; } else { $email_img = ' '; $email = ' '; } $temp_url = append_sid("profile.{$phpEx}?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']); $profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>'; $profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>'; $temp_url = append_sid("privmsg.{$phpEx}?mode=post&" . POST_USERS_URL . "=" . $row['user_id']); $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>'; $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>'; $www_img = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : ''; $www = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : ''; if (!empty($row['user_icq'])) { $icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>'; $icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>'; $icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>'; } else { $icq_status_img = ''; $icq_img = ''; $icq = ''; } $aim_img = $row['user_aim'] ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : ''; $aim = $row['user_aim'] ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : ''; $temp_url = append_sid("profile.{$phpEx}?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']); $msn_img = $row['user_msnm'] ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : ''; $msn = $row['user_msnm'] ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : ''; $yim_img = $row['user_yim'] ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : ''; $yim = $row['user_yim'] ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : ''; $temp_url = append_sid("search.{$phpEx}?search_author=" . urlencode($row['username']) . "&showresults=posts"); $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $row['username']) . '" title="' . sprintf($lang['Search_user_posts'], $row['username']) . '" border="0" /></a>'; $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $row['username']) . '</a>'; return; }
function main($action) { global $template, $pafiledb_config, $debug, $lang, $config, $theme, $images; $template->assign_vars(array('L_HOME' => $lang['Home'], 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($config['default_dateformat'], time(), $config['board_timezone'])), 'TPL_COLOR' => $theme['body_background'], 'U_INDEX_HOME' => append_sid(CMS_PAGE_HOME), 'U_DOWNLOAD' => append_sid('dload.' . PHP_EXT), 'CAT_BLOCK_IMG' => $images['category_block'], 'SPACER' => $images['spacer'], 'DOWNLOAD' => $pafiledb_config['settings_dbname'], 'TREE' => $menu_output)); //=================================================== // Show the Category for the download database index //=================================================== $this->category_display(); $this->display($lang['Download'], 'pa_main_body.tpl'); }
function cms_block_sh_visit_counter() { global $db, $config, $template, $lang; $sql = "SELECT SUM(reg + hidden + guests) as total\n\t\t\tFROM " . SITE_HISTORY_TABLE; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $visit_counter = $row['total']; $template->assign_vars(array('VISIT_COUNTER' => sprintf($lang['SH_Visit_counter_statement'], $visit_counter, create_date($config['default_dateformat'], $config['board_startdate'], $config['board_timezone'])), 'L_VISIT_COUNTER' => $lang['Visit_counter'])); }
function process($data, $config) { $messageID = md5(time() . rand(1000, 1000000) . time()); if ($config['x_test_request'] == "TRUE") { $merchantID = "XYZ0010"; $merchantPW = "abcd1234"; } else { $merchantID = $config['merchant_id']; $merchantPW = $config['password']; } $myTransactionData = $this->set_array($data, $config); $xmlRequest = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; $xmlRequest .= "<NABTransactMessage>"; $xmlRequest .= "<MessageInfo>"; $xmlRequest .= "<messageID>" . $messageID . "</messageID>"; $xmlRequest .= "<messageTimestamp>" . create_date() . "</messageTimestamp>"; $xmlRequest .= "<timeoutValue>60</timeoutValue>"; $xmlRequest .= "<apiVersion>xml-4.2</apiVersion>"; $xmlRequest .= "</MessageInfo>"; $xmlRequest .= "<MerchantInfo>"; $xmlRequest .= "<merchantID>" . $merchantID . "</merchantID>"; $xmlRequest .= "<password>" . $merchantPW . "</password>"; $xmlRequest .= "</MerchantInfo>"; $xmlRequest .= "<RequestType>Payment</RequestType>"; $xmlRequest .= "<Payment>"; $xmlRequest .= '<TxnList count="1">'; $xmlRequest .= '<Txn ID="1">'; foreach ($myTransactionData as $key => $value) { $xmlRequest .= "<{$key}>{$value}</{$key}>"; } $xmlRequest .= "<CreditCardInfo>"; $xmlRequest .= "<cardNumber>" . $data['nab_cc_num'] . "</cardNumber>"; $xmlRequest .= "<expiryDate>" . $data['nab_cc_month'] . '/' . $data['nab_cc_year'] . "</expiryDate>"; $xmlRequest .= "</CreditCardInfo>"; $xmlRequest .= "</Txn>"; $xmlRequest .= "</TxnList>"; $xmlRequest .= "</Payment>"; $xmlRequest .= "</NABTransactMessage>"; $xmlResponse = $this->sendTransactionToNab($xmlRequest, $config['x_test_request']); if ($xmlResponse != "") { $responseFields = simplexml_load_string($xmlResponse); $responseArray = objectsIntoArray($responseFields); } if (trim($responseArray['Payment']['TxnList']['Txn']['responseCode']) != "00") { $trans = array('error' => $responseArray['Payment']['TxnList']['Txn']['responseText']); } else { $details = array("Method" => "NAB", "Approval Code" => $responseArray['Payment']['TxnList']['Txn']['responseCode'], "Transaction ID" => $responseArray['Payment']['TxnList']['Txn']['txnID'], "Transaction Ref" => $data['transaction_id'], "Transaction Info" => $responseArray['Payment']['TxnList']['Txn']['responseText']); // Return the trans details $trans = array('status' => 3, 'transaction_id' => $responseArray['Payment']['TxnList']['Txn']['txnID'], 'payment_type' => 'NAB', 'amount' => $data["order_total"], 'details' => serialize($details), 'approval' => $responseArray['Payment']['TxnList']['Txn']['responseCode']); } return $trans; }
function imp_recent_topics_block_func() { global $template, $portal_config, $userdata, $board_config, $db, $phpEx; $sql = "SELECT * FROM " . FORUMS_TABLE . " ORDER BY forum_id"; if (!($result1 = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql); } $forum_data = array(); while ($row1 = $db->sql_fetchrow($result1)) { $forum_data[] = $row1; } $is_auth_ary = array(); $is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data); if (empty($portal_config['md_except_forum_id'])) { $except_forum_id = '\'start\''; } else { $except_forum_id = $portal_config['md_except_forum_id']; } for ($i = 0; $i < count($forum_data); $i++) { if (!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_read'] or !$is_auth_ary[$forum_data[$i]['forum_id']]['auth_view']) { if ($except_forum_id == '\'start\'') { $except_forum_id = $forum_data[$i]['forum_id']; } else { $except_forum_id .= ',' . $forum_data[$i]['forum_id']; } } } if ($portal_config['md_approve_mod_installed']) { $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username\n\t\t\t\tFROM " . TOPICS_TABLE . " AS t LEFT OUTER JOIN " . APPROVE_POSTS_TABLE . " AS a ON (t.topic_first_post_id = a.post_id), " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u\n\t\t\t\tWHERE t.forum_id NOT IN (" . $except_forum_id . ")\n\t\t\t\t\tAND t.topic_status <> 2\n\t\t\t\t\tAND p.post_id = t.topic_last_post_id\n\t\t\t\t\tAND p.poster_id = u.user_id\n\t\t\t\t\tAND a.post_id is NULL\n\t\t\t\tORDER BY p.post_id DESC\n\t\t\t\tLIMIT " . $portal_config['md_num_recent_topics']; } else { $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username\n\t\t\t\tFROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u\n\t\t\t\tWHERE t.forum_id NOT IN (" . $except_forum_id . ")\n\t\t\t\t\tAND t.topic_status <> 2\n\t\t\t\t\tAND p.post_id = t.topic_last_post_id\n\t\t\t\t\tAND p.poster_id = u.user_id\n\t\t\t\tORDER BY p.post_id DESC\n\t\t\t\tLIMIT " . $portal_config['md_num_recent_topics']; } if (!($result1 = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql); } $number_recent_topics = $db->sql_numrows($result1); $recent_topic_row = array(); while ($row1 = $db->sql_fetchrow($result1)) { $recent_topic_row[] = $row1; } if ($portal_config['md_recent_topics_style']) { $style_row = 'scroll'; } else { $style_row = 'static'; } $template->assign_block_vars($style_row, ""); for ($i = 0; $i < $number_recent_topics; $i++) { $template->assign_block_vars($style_row . '.recent_topic_row', array('U_TITLE' => append_sid("viewtopic.{$phpEx}?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' . $recent_topic_row[$i]['post_id'], 'L_TITLE' => $recent_topic_row[$i]['topic_title'], 'U_POSTER' => append_sid("profile.{$phpEx}?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']), 'S_POSTER' => $recent_topic_row[$i]['username'], 'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone']))); } }
function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq) { global $lang, $images, $ft_cfg; $from = !empty($row['user_from']) ? $row['user_from'] : ' '; $joined = create_date($date_format, $row['user_regdate'], $ft_cfg['board_timezone']); $posts = $row['user_posts'] ? $row['user_posts'] : 0; $poster_avatar = ''; if ($row['user_avatar_type'] && $row['user_id'] != GUEST_UID && $row['user_allowavatar']) { switch ($row['user_avatar_type']) { case USER_AVATAR_UPLOAD: $poster_avatar = $ft_cfg['allow_avatar_upload'] ? '<img src="' . $ft_cfg['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : ''; break; case USER_AVATAR_REMOTE: $poster_avatar = $ft_cfg['allow_avatar_remote'] ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" />' : ''; break; case USER_AVATAR_GALLERY: $poster_avatar = $ft_cfg['allow_avatar_local'] ? '<img src="' . $ft_cfg['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : ''; break; } } if (!empty($row['user_viewemail']) || $group_mod) { $email_uri = $ft_cfg['board_email_form'] ? append_sid("profile.php?mode=email&" . POST_USERS_URL . '=' . $row['user_id']) : 'mailto:' . $row['user_email']; $email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>'; $email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>'; } else { $email_img = ' '; $email = ' '; } $temp_url = append_sid("profile.php?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']); $profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>'; $profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>'; $temp_url = append_sid("privmsg.php?mode=post&" . POST_USERS_URL . "=" . $row['user_id']); $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>'; $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>'; $www_img = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : ''; $www = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : ''; if (!empty($row['user_icq'])) { $icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>'; $icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>'; $icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>'; } else { $icq_status_img = ''; $icq_img = ''; $icq = ''; } $temp_url = append_sid("search.php?search_author=" . urlencode($username) . "&showresults=posts"); $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>'; $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>'; return; }
/** * FUNCTIONS */ function viewmain($per_page) { global $portal_config, $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path; $user->add_lang('lang_meeting'); // // Recent Comments ver 2 // global $portal_config, $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path; $user->add_lang('lang_meeting'); $sql = "SELECT d.meeting_subject, d.meeting_last_comm, d.meeting_id, COUNT(d.meeting_id) AS counts, d.meeting_user_last_comm, d.meeting_lastcomm_id, m.meeting_id as meet, m.meeting_edit_time, m.comment_id as number, m.user_id as user, d.meeting_comment as text, u.username, u.user_id \n\t\t\tFROM " . MEETING_DATA_TABLE . " AS d\n\t\t\t\tLEFT JOIN " . MEETING_COMMENT_TABLE . " AS m ON d.meeting_id = m.meeting_id\n\t\t\t\tLEFT JOIN " . USERS_TABLE . " AS u ON d.meeting_user_last_comm = u.user_id\n\t\t\tWHERE d.meeting_last_comm <> 0\n\t\t\tREGEXP '^[--]'\t\n\t\t\tGROUP BY d.meeting_id\n\t\t\tORDER BY d.meeting_last_comm DESC\n\t\t\tLIMIT 5"; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not query comments information', '', __LINE__, __FILE__, $sql); } $comment_data = array(); $total_comments = 0; while ($row = $db->sql_fetchrow($result)) { if ($meetings_access_ids[$row['meeting_id']] == TRUE || $userdata['user_level'] == ADMIN) { $comment_data[] = $row; $total_comments++; } } $db->sql_freeresult($result); for ($i = 0; $i < $total_comments; $i++) { $comment_count = $comment_data[$i]['counts']; if ($userdata['user_comment_num'] != 0) { $comm_str = floor($comment_count / $userdata['user_comment_num']); $ostatok = $comment_count - $comm_str * $userdata['user_comment_num']; $ostatok = $ostatok == 0 ? 1 : $ostatok; $start = '&start=' . ($comment_count - $ostatok); } else { $start = '&start=0'; } $comment_time = create_date($portal_config['default_dateformat'], $comment_data[$i]['meeting_last_comm'], $portal_config['board_timezone']); $comment_user = $user->lang['Write'] . ' <a href="' . append_sid('profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $comment_data[$i]['user_id']) . '" class="nav" target="_blank">' . $comment_data[$i]['username'] . '</a>'; $comment_meeting = $comment_data[$i]['meeting_id']; $comment_name = $comment_data[$i]['meeting_subject']; $comm_url = 'meeting.' . $phpEx . '?mode=detail&id=' . $comment_meeting . $start . '#' . $comment_data[$i]['meeting_lastcomm_id']; $comment_name = '<a href="' . $comm_url . '" class="nav">' . $comment_name . '</a>'; $text = stripslashes($comment_data[$i]['text']); // Output the values $template->assign_block_vars('last_comment', array('COMMENT_NAME' => $comment_name, 'COMMENT_COUNT' => $comment_count, 'COMMENT_USER' => $comment_user, 'COMMENT_TIME' => $comment_time, 'COMMENT_MEETING' => $comment_meeting, 'COMMENT_TEXT' => $text)); } // // END - Recent Comments // }
function AddScheduler() { include_once 'install/install_utils.php'; require_once 'modules/Schedulers/Scheduler.php'; $scheduler = new Scheduler(); $scheduler->retrieve_by_string_fields(array('job' => 'function::processAOW_Workflow')); if ($scheduler->id == '') { $scheduler->name = 'Run AOW WorkFlow'; $scheduler->job = 'function::processAOW_Workflow'; $scheduler->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1); $scheduler->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59); $scheduler->job_interval = '*::*::*::*::*'; $scheduler->status = 'Active'; $scheduler->created_by = '1'; $scheduler->modified_user_id = '1'; $scheduler->catch_up = '0'; $scheduler->save(); } }
function scrape_flora($plant) { $id = $plant->getId(); $date = create_date($plant->getCreated()); $name = $plant->getName(); $location = $plant->getLocation(); $longitude = $plant->getLongitude(); $latitude = $plant->getLatitude(); $user_id = $plant->getUserId(); //$weather_id= $plant->getWeatherId(); $weather = $plant->getWeather(); //$soil_id= $plant->getSoilId(); $soil = $plant->getSoil(); $temperature = $plant->getTemperature(); $wind = $plant->getWind(); $humidity = $plant->getHumidity(); $notes = $plant->getNotes(); return array($id, $date, $name, $location, $longitude, $latitude, $user_id, $weather, $soil, $temperature, $wind, $humidity, $notes); }
function main($action) { global $template, $lang, $config, $pafiledb_config, $db, $user, $pafiledb_functions, $pafiledb_user; $file_id = request_var('file_id', 0); if (empty($file_id)) { message_die(GENERAL_MESSAGE, $lang['File_not_exist']); } $rating = request_post_var('rating', 0); $sql = 'SELECT file_name, file_catid FROM ' . PA_FILES_TABLE . "\n\t\t\tWHERE file_id = {$file_id}"; $result = $db->sql_query($sql); if (!($file_data = $db->sql_fetchrow($result))) { message_die(GENERAL_MESSAGE, $lang['File_not_exist']); } $db->sql_freeresult($result); if (!$this->auth[$file_data['file_catid']]['auth_rate']) { if (!$user->data['session_logged_in']) { redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=dload.' . PHP_EXT . '&action=rate&file_id=' . $file_id, true)); } $message = sprintf($lang['Sorry_auth_rate'], $this->auth[$file_data['file_catid']]['auth_rate_type']); message_die(GENERAL_MESSAGE, $message); } $this->generate_category_nav($file_data['file_catid']); $template->assign_vars(array('L_INDEX' => sprintf($lang['Forum_Index'], $config['sitename']), 'L_RATE' => $lang['Rate'], 'L_HOME' => $lang['Home'], 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($config['default_dateformat'], time(), $config['board_timezone'])), 'U_INDEX_HOME' => append_sid(CMS_PAGE_HOME), 'U_DOWNLOAD_HOME' => append_sid('dload.' . PHP_EXT), 'U_FILE_NAME' => append_sid('dload.' . PHP_EXT . '?action=file&file_id=' . $file_id), 'FILE_NAME' => $file_data['file_name'], 'DOWNLOAD' => $pafiledb_config['settings_dbname'])); if (isset($_POST['submit'])) { $result_msg = str_replace("{filename}", $file_data['file_name'], $lang['Rconf']); $result_msg = str_replace("{rate}", $rating, $result_msg); if ($rating <= 0 or $rating > 10) { message_die(GENERAL_ERROR, 'Bad submited value'); } $pafiledb_user->update_voter_info($file_id, $rating); $rate_info = $pafiledb_functions->get_rating($file_id); $result_msg = str_replace("{newrating}", $rate_info, $result_msg); $message = $result_msg . '<br /><br />' . sprintf($lang['Click_return'], '<a href="' . append_sid('dload.' . PHP_EXT . '?action=file&file_id=' . $file_id) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid('index.' . PHP_EXT) . '">', '</a>'); message_die(GENERAL_MESSAGE, $message); } else { $rate_info = str_replace("{filename}", $file_data['file_name'], $lang['Rateinfo']); $template->assign_vars(array('S_RATE_ACTION' => append_sid('dload.' . PHP_EXT . '?action=rate&file_id=' . $file_id), 'L_RATE' => $lang['Rate'], 'L_RERROR' => $lang['Rerror'], 'L_R1' => $lang['R1'], 'L_R2' => $lang['R2'], 'L_R3' => $lang['R3'], 'L_R4' => $lang['R4'], 'L_R5' => $lang['R5'], 'L_R6' => $lang['R6'], 'L_R7' => $lang['R7'], 'L_R8' => $lang['R8'], 'L_R9' => $lang['R9'], 'L_R10' => $lang['R10'], 'RATEINFO' => $rate_info, 'ID' => $file_id)); } $this->display($lang['Download'], 'pa_rate_body.tpl'); }
function main($action) { global $db, $config, $template, $lang, $user; global $pafiledb_config, $pafiledb_functions; $start = request_var('start', 0); $start = $start < 0 ? 0 : $start; $sort_method = request_var('sort_method', $pafiledb_config['sort_method']); $sort_method = check_var_value($sort_method, array('file_name', 'file_time', 'file_dls', 'file_rating', 'file_update_time')); $sort_method = $sort_method == 'file_rating' ? 'rating' : $sort_method; $sort_order = request_var('order', $pafiledb_config['sort_order']); $sort_order = check_var_value($sort_order, array('DESC', 'ASC')); if (!$pafiledb_config['settings_viewall']) { message_die(GENERAL_MESSAGE, $lang['viewall_disabled']); } elseif (!$this->auth_global['auth_viewall']) { if (!$user->data['session_logged_in']) { redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=dload.' . PHP_EXT . '&action=viewall', true)); } $message = sprintf($lang['Sorry_auth_viewall'], $this->auth_global['auth_viewall_type']); message_die(GENERAL_MESSAGE, $message); } $template->assign_vars(array('L_VIEWALL' => $lang['Viewall'], 'L_INDEX' => sprintf($lang['Forum_Index'], $config['sitename']), 'L_HOME' => $lang['Home'], 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($config['default_dateformat'], time(), $config['board_timezone'])), 'U_INDEX_HOME' => append_sid(CMS_PAGE_HOME), 'U_DOWNLOAD' => append_sid('dload.' . PHP_EXT), 'DOWNLOAD' => $pafiledb_config['settings_dbname'])); $this->display_files($sort_method, $sort_order, $start, true); $this->display($lang['Download'], 'pa_viewall_body.tpl'); }
function main($action) { global $template, $lang, $config, $pafiledb_config, $db, $images, $user; $license_id = request_var('license_id', 0); if (empty($license_id)) { message_die(GENERAL_MESSAGE, $lang['License_not_exist']); } $file_id = request_var('file_id', 0); if (empty($file_id)) { message_die(GENERAL_MESSAGE, $lang['File_not_exist']); } $sql = 'SELECT file_catid, file_name FROM ' . PA_FILES_TABLE . "\n\t\t\tWHERE file_id = {$file_id}"; $result = $db->sql_query($sql); if (!($file_data = $db->sql_fetchrow($result))) { message_die(GENERAL_MESSAGE, $lang['File_not_exist']); } $db->sql_freeresult($result); if (!$this->auth[$file_data['file_catid']]['auth_download']) { if (!$user->data['session_logged_in']) { redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=dload.' . PHP_EXT . '&action=license&license_id=' . $license_id . '&file_id=' . $file_id, true)); } $message = sprintf($lang['Sorry_auth_download'], $this->auth[$file_data['file_catid']]['auth_download_type']); message_die(GENERAL_MESSAGE, $message); } $sql = 'SELECT * FROM ' . PA_LICENSE_TABLE . "\n\t\t\tWHERE license_id = {$license_id}"; $result = $db->sql_query($sql); if (!($license = $db->sql_fetchrow($result))) { message_die(GENERAL_MESSAGE, $lang['License_not_exist']); } $db->sql_freeresult($result); $this->generate_category_nav($file_data['file_catid']); $template->assign_vars(array('L_INDEX' => sprintf($lang['Forum_Index'], $config['sitename']), 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($config['default_dateformat'], time(), $config['board_timezone'])), 'L_HOME' => $lang['Home'], 'L_LICENSE' => $lang['License'], 'L_LEWARN' => $lang['Licensewarn'], 'L_AGREE' => $lang['Iagree'], 'L_NOT_AGREE' => $lang['Dontagree'], 'U_INDEX_HOME' => append_sid(CMS_PAGE_HOME), 'U_DOWNLOAD_HOME' => append_sid('dload.' . PHP_EXT), 'U_FILE_NAME' => append_sid('dload.' . PHP_EXT . '?action=file&file_id=' . $file_id), 'U_DOWNLOAD' => append_sid('dload.' . PHP_EXT . '?action=download&file_id=' . $file_id), 'L_PREVIEW' => $lang['Preview'], 'LE_NAME' => $license['license_name'], 'FILE_NAME' => $file_data['file_name'], 'LE_TEXT' => nl2br($license['license_text']), 'DOWNLOAD' => $pafiledb_config['settings_dbname'])); $this->display($lang['Download'], 'pa_license_body.tpl'); }
function make_exif($xkey, $xval) { global $config; $exif_info = array('FILE_FileDateTime' => 'File Date and Time', 'FILE_FileSize' => array('Name' => 'File Size', 'Units' => ' bytes'), 'COMPUTED_Height' => array('Name' => 'Image Height', 'Units' => ' pixels'), 'COMPUTED_Width' => array('Name' => 'Image Width', 'Units' => ' pixels'), 'COMPUTED_ApertureFNumber' => 'Aperture F Number', 'COMPUTED_UserComment' => 'User Comment', 'IFD0_ImageDescription' => 'Image Description', 'IFD0_Make' => 'Camera Make (Manufacturer)', 'IFD0_Model' => 'Camera Model', 'IFD0_XResolution' => array('Name' => 'X Resolution', 'Units' => ' Pixels per'), 'IFD0_YResolution' => array('Name' => 'Y Resolution', 'Units' => ' Pixels per'), 'IFD0_ResolutionUnit' => array('Name' => 'Resolution Unit', 2 => ' Inch', 3 => ' Centimeter'), 'IFD0_Software' => 'Software or Firmware', 'IFD0_Artist' => 'Artist', 'IFD0_Copyright' => 'Copyright', 'EXIF_ExposureTime' => array('Name' => 'Exposure Time', 'Units' => ' seconds'), 'EXIF_ExposureProgram' => array('Name' => 'Exposure Program', 0 => 'Not defined', 1 => 'Manual', 2 => 'Normal program', 3 => 'Aperture priority', 4 => 'Shutter priority', 5 => 'Creative program (biased toward depth of field)', 6 => 'Action program (biased toward fast shutter speed)', 7 => 'Portrait mode (for closeup photos with the background out of focus)', 8 => 'Landscape mode (for landscape photos with the background in focus)'), 'EXIF_ISOSpeedRatings' => 'ISO Speed Ratings', 'EXIF_DateTimeOriginal' => 'Date and Time of Original', 'EXIF_DateTimeDigitized' => 'Date and Time when Digitized', 'EXIF_ExposureBiasValue' => array('Name' => 'APEX Exposure Bias Value', 'Units' => ' EV'), 'EXIF_MaxApertureValue' => 'APEX Maximum Aperture Value', 'EXIF_MeteringMode' => array('Name' => 'Metering Mode', 0 => 'Unknown', 1 => 'Average', 2 => 'Center Weighted Average', 3 => 'Spot', 4 => 'Multi Spot', 5 => 'Pattern', 6 => 'Partial', 255 => 'Other'), 'EXIF_LightSource' => array('Name' => 'Light Source', 0 => 'Unknown', 1 => 'Daylight', 2 => 'Fluorescent', 3 => 'Tungsten (incandescent light)', 4 => 'Flash', 9 => 'Fine weather', 10 => 'Cloudy weather', 11 => 'Shade', 12 => 'Daylight fluorescent (D 5700 – 7100K)', 13 => 'Day white fluorescent (N 4600 – 5400K)', 14 => 'Cool white fluorescent (W 3900 – 4500K)', 15 => 'White fluorescent (WW 3200 – 3700K)', 17 => 'Standard light A', 18 => 'Standard light B', 19 => 'Standard light C', 20 => 'D55', 21 => 'D65', 22 => 'D75', 23 => 'D50', 24 => 'ISO studio tungsten', 255 => 'Other'), 'EXIF_Flash' => array('Name' => 'Flash Mode', 0 => 'Flash did not fire', 1 => 'Flash fired', 5 => 'Strobe return light not detected', 7 => 'Strobe return light detected', 9 => 'Flash fired, compulsory flash mode', 13 => 'Flash fired, compulsory flash mode, return light not detected', 15 => 'Flash fired, compulsory flash mode, return light detected', 16 => 'Flash did not fire, compulsory flash suppression mode', 24 => 'Flash did not fire, auto mode', 25 => 'Flash fired, auto mode', 29 => 'Flash fired, auto mode, return light not detected', 31 => 'Flash fired, auto mode, return light detected', 32 => 'No flash function', 65 => 'Flash fired, red-eye reduction mode', 69 => 'Flash fired, red-eye reduction mode, return light not detected', 71 => 'Flash fired, red-eye reduction mode, return light detected', 73 => 'Flash fired, compulsory flash mode, red-eye reduction mode', 77 => 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected', 79 => 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected', 89 => 'Flash fired, auto mode, red-eye reduction mode', 93 => 'Flash fired, auto mode, return light not detected, red-eye reduction mode', 95 => 'Flash fired, auto mode, return light detected, red-eye reduction mode'), 'EXIF_FocalLength' => array('Name' => 'Focal Length', 'Units' => 'mm'), 'EXIF_SensingMethod' => array('Name' => 'Sensing Method', 1 => 'Not defined', 2 => 'One-chip colour area sensor', 3 => 'Two-chip colour area sensor', 4 => 'Three-chip colour area sensor', 5 => 'Colour sequential area sensor', 7 => 'Trilinear sensor', 8 => 'Colour sequential linear sensor'), 'EXIF_CustomRendered' => array('Name' => 'Custom Renderd Mode', 0 => 'Normal Process', 1 => 'Custom Process'), 'EXIF_ExposureMode' => array('Name' => 'Exposure Mode', 0 => 'Auto exposure', 1 => 'Manual exposure', 2 => 'Auto bracket'), 'EXIF_WhiteBalance' => array('Name' => 'White Balance', 0 => 'Auto white balance', 1 => 'Manual white balance'), 'EXIF_DigitalZoomRatio' => array('Name' => 'Digital Zoom Ratio', 'Units' => ' ( Zero = Digital Zoom Not Used )'), 'EXIF_FocalLengthIn35mmFilm' => array('Name' => 'Equivalent Focal Length In 35mm Film', 'Units' => 'mm'), 'EXIF_SceneCaptureType' => array('Name' => 'Scene Capture Type', 0 => 'Standard', 1 => 'Landscape', 2 => 'Portrait', 3 => 'Night scene'), 'EXIF_GainControl' => array('Name' => 'Gain Control', 0 => 'None', 1 => 'Low gain up', 2 => 'High gain up', 3 => 'Low gain down', 4 => 'High gain down'), 'EXIF_Contrast' => array('Name' => 'Contrast', 0 => 'Normal', 1 => 'Soft', 2 => 'Hard'), 'EXIF_Saturation' => array('Name' => 'Saturation', 0 => 'Normal', 1 => 'Low saturation', 2 => 'High saturation'), 'EXIF_Sharpness' => array('Name' => 'Sharpness', 0 => 'Normal', 1 => 'Soft', 2 => 'Hard'), 'EXIF_SubjectDistanceRange' => array('Name' => 'Subject Distance Range', 0 => 'Unknown', 1 => 'Macro', 2 => 'Close view', 3 => 'Distant view')); $i = 0; $rexif = array(); while (!empty($xkey[$i])) { // JHL - Crashes and burns - UTF-8 problem? /* if (ereg("([0-9]{1,})/([0-9]{1,})", $xval[$i], $num)) { if ($num[1] > 1) $xval[$i] = round(($num[1] / $num[2]), 6); } */ if (is_array($exif_info[$xkey[$i]]) && $xkey[$i] != 'IFD0_ResolutionUnit') { if (isset($exif_info[$xkey[$i]]['Units'])) { if ($xkey[$i + 2] == 'IFD0_ResolutionUnit') { $rexif[$exif_info[$xkey[$i]]['Name']] = $xval[$i] . $exif_info[$xkey[$i]]['Units'] . $exif_info[$xkey[$i + 2]][$xval[$i + 2]]; } elseif ($xkey[$i + 1] == 'IFD0_ResolutionUnit') { $rexif[$exif_info[$xkey[$i]]['Name']] = $xval[$i] . $exif_info[$xkey[$i]]['Units'] . $exif_info[$xkey[$i + 1]][$xval[$i + 1]]; } else { $rexif[$exif_info[$xkey[$i]]['Name']] = $xval[$i] . $exif_info[$xkey[$i]]['Units']; } } else { $rexif[$exif_info[$xkey[$i]]['Name']] = $exif_info[$xkey[$i]][$xval[$i]]; } } elseif (isset($exif_info[$xkey[$i]]) && $xkey[$i] != 'IFD0_ResolutionUnit') { $rexif[$exif_info[$xkey[$i]]] = $xval[$i]; if ($xkey[$i] == 'FILE_FileDateTime') { $rexif[$exif_info[$xkey[$i]]] = create_date('Y:m:d H:i:s', $xval[$i], $config['board_timezone']); } } $i++; } return $rexif; }
if (!empty($profiledata['user_icq'])) { $icq_status_img = '<a href="http://wwp.icq.com/' . $profiledata['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $profiledata['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>'; $icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>'; $icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '">' . $lang['ICQ'] . '</a>'; } else { $icq_status_img = ' '; $icq_img = ' '; $icq = ' '; } $aim_img = $profiledata['user_aim'] ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : ' '; $aim = $profiledata['user_aim'] ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : ' '; $msn_img = $profiledata['user_msnm'] ? $profiledata['user_msnm'] : ' '; $msn = $msn_img; $yim_img = $profiledata['user_yim'] ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : ''; $yim = $profiledata['user_yim'] ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : ''; $temp_url = append_sid("search.{$phpEx}?search_author=" . urlencode($profiledata['username']) . "&showresults=posts"); $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" title="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" border="0" /></a>'; $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>'; // // Generate page // $page_title = $lang['Viewing_profile']; include $phpbb_root_path . 'includes/page_header.' . $phpEx; if (function_exists('get_html_translation_table')) { $u_search_author = urlencode(strtr($profiledata['username'], array_flip(get_html_translation_table(HTML_ENTITIES)))); } else { $u_search_author = urlencode(str_replace(array('&', ''', '"', '<', '>'), array('&', "'", '"', '<', '>'), $profiledata['username'])); } $template->assign_vars(array('USERNAME' => $profiledata['username'], 'JOINED' => create_date($lang['DATE_FORMAT'], $profiledata['user_regdate'], $board_config['board_timezone']), 'POSTER_RANK' => $poster_rank, 'RANK_IMAGE' => $rank_image, 'POSTS_PER_DAY' => $posts_per_day, 'POSTS' => $profiledata['user_posts'], 'PERCENTAGE' => $percentage . '%', 'POST_DAY_STATS' => sprintf($lang['User_post_day_stats'], $posts_per_day), 'POST_PERCENT_STATS' => sprintf($lang['User_post_pct_stats'], $percentage), 'SEARCH_IMG' => $search_img, 'SEARCH' => $search, 'PM_IMG' => $pm_img, 'PM' => $pm, 'EMAIL_IMG' => $email_img, 'EMAIL' => $email, 'WWW_IMG' => $www_img, 'WWW' => $www, 'ICQ_STATUS_IMG' => $icq_status_img, 'ICQ_IMG' => $icq_img, 'ICQ' => $icq, 'AIM_IMG' => $aim_img, 'AIM' => $aim, 'MSN_IMG' => $msn_img, 'MSN' => $msn, 'YIM_IMG' => $yim_img, 'YIM' => $yim, 'LOCATION' => $profiledata['user_from'] ? $profiledata['user_from'] : ' ', 'OCCUPATION' => $profiledata['user_occ'] ? $profiledata['user_occ'] : ' ', 'INTERESTS' => $profiledata['user_interests'] ? $profiledata['user_interests'] : ' ', 'AVATAR_IMG' => $avatar_img, 'AUCTION_USER_RATING' => "<a href=\"" . append_sid("auction_rating.php?mode=view&" . POST_USERS_URL . "=" . $profiledata['user_id']) . "\"><img src=\"" . $images['icon_auction_user_rating'] . "\" alt=\"" . $lang['auction_user_rating'] . "\" title=\"" . $lang['auction_user_rating'] . "\" border=\"0\" /></a>", 'L_VIEW_AUCTION_USER_RATING' => $lang['auction_user_rating'], 'L_VIEWING_PROFILE' => sprintf($lang['Viewing_user_profile'], $profiledata['username']), 'L_ABOUT_USER' => sprintf($lang['About_user'], $profiledata['username']), 'L_AVATAR' => $lang['Avatar'], 'L_POSTER_RANK' => $lang['Poster_rank'], 'L_JOINED' => $lang['Joined'], 'L_TOTAL_POSTS' => $lang['Total_posts'], 'L_SEARCH_USER_POSTS' => sprintf($lang['Search_user_posts'], $profiledata['username']), 'L_CONTACT' => $lang['Contact'], 'L_EMAIL_ADDRESS' => $lang['Email_address'], 'L_EMAIL' => $lang['Email'], 'L_PM' => $lang['Private_Message'], 'L_ICQ_NUMBER' => $lang['ICQ'], 'L_YAHOO' => $lang['YIM'], 'L_AIM' => $lang['AIM'], 'L_MESSENGER' => $lang['MSNM'], 'L_WEBSITE' => $lang['Website'], 'L_LOCATION' => $lang['Location'], 'L_OCCUPATION' => $lang['Occupation'], 'L_INTERESTS' => $lang['Interests'], 'U_SEARCH_USER' => append_sid("search.{$phpEx}?search_author=" . $u_search_author), 'S_PROFILE_ACTION' => append_sid("profile.{$phpEx}"))); $template->pparse('body'); include $phpbb_root_path . 'includes/page_tail.' . $phpEx;
break; case PAGE_FAQ: $location = $lang['Viewing_FAQ']; $location_url = "faq.{$phpEx}"; break; default: $location = $lang['Forum_index']; $location_url = "index.{$phpEx}"; } } else { $location_url = append_sid("viewforum.{$phpEx}?" . POST_FORUM_URL . '=' . $row['session_page']); $location = $forum_data[$row['session_page']]; } $row_color = ${$which_counter} % 2 ? $theme['td_color1'] : $theme['td_color2']; $row_class = ${$which_counter} % 2 ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars("{$which_row}", array('ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'USERNAME' => $username, 'LASTUPDATE' => create_date($board_config['default_dateformat'], $row['session_time'], $board_config['board_timezone']), 'FORUM_LOCATION' => $location, 'U_USER_PROFILE' => append_sid("profile.{$phpEx}?mode=viewprofile&" . POST_USERS_URL . '=' . $user_id), 'U_FORUM_LOCATION' => append_sid($location_url))); ${$which_counter}++; } } if ($registered_users == 0) { $l_r_user_s = $lang['Reg_users_zero_online']; } else { if ($registered_users == 1) { $l_r_user_s = $lang['Reg_user_online']; } else { $l_r_user_s = $lang['Reg_users_online']; } } if ($hidden_users == 0) { $l_h_user_s = $lang['Hidden_users_zero_online']; } else {
} } if (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'])) { if ($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time) { $unread_topics = false; } } } } $folder_image = $unread_topics ? $images['forum_new'] : $images['forum']; $folder_alt = $unread_topics ? $lang['New_posts'] : $lang['No_new_posts']; } $posts = $forum_data[$j]['forum_posts']; $topics = $forum_data[$j]['forum_topics']; if ($forum_data[$j]['forum_last_post_id']) { $last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']); $last_post = $last_post_time . '<br />'; $last_post .= $forum_data[$j]['user_id'] == ANONYMOUS ? $forum_data[$j]['post_username'] != '' ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' : '<a href="' . append_sid("profile.{$phpEx}?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> '; $last_post .= '<a href="' . append_sid("viewtopic.{$phpEx}?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>'; } else { $last_post = $lang['No_Posts']; } if (count($forum_moderators[$forum_id]) > 0) { $l_moderators = count($forum_moderators[$forum_id]) == 1 ? $lang['Moderator'] : $lang['Moderators']; $moderator_list = implode(', ', $forum_moderators[$forum_id]); } else { $l_moderators = ' '; $moderator_list = ' '; } $row_color = !($i % 2) ? $theme['td_color1'] : $theme['td_color2']; $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2'];
$msg_userid = $row['user_id']; $msg_username = $row['username']; //-- mod : rank color system --------------------------------------------------- //-- delete /*-MOD $u_from_user_profile = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$msg_userid"); MOD-*/ //-- add $u_from_user_profile = $get->url('userlist', array('mode' => 'viewprofile', POST_USERS_URL => $msg_userid), true); //-- fin mod : rank color system ----------------------------------------------- $msg_subject = $row['privmsgs_subject']; if (count($orig_word)) { $msg_subject = preg_replace($orig_word, $replacement_word, $msg_subject); } $u_subject = append_sid("privmsg.{$phpEx}?folder={$folder}&mode=read&" . POST_POST_URL . "={$privmsg_id}"); $msg_date = create_date($board_config['default_dateformat'], $row['privmsgs_date'], $board_config['board_timezone']); if ($flag == PRIVMSGS_NEW_MAIL && $folder == 'inbox') { $msg_subject = '<b>' . $msg_subject . '</b>'; $msg_date = '<b>' . $msg_date . '</b>'; $msg_username = '******' . $msg_username . '</b>'; } $row_color = !($i % 2) ? $theme['td_color1'] : $theme['td_color2']; $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2']; $i++; // Start Smilies Invasion Mod if ($board_config['allow_smilies']) { $msg_subject = smilies_pass($msg_subject); } // End Smilies Invasion Mod $template->assign_block_vars('listrow', array('ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'STYLE' => $rcs->get_colors($row), 'FROM' => $msg_username, 'SUBJECT' => $msg_subject, 'DATE' => $msg_date, 'PRIVMSG_ATTACHMENTS_IMG' => privmsgs_attachment_image($privmsg_id), 'PRIVMSG_FOLDER_IMG' => $icon_flag, 'L_PRIVMSG_FOLDER_ALT' => $icon_flag_alt, 'S_MARK_ID' => $privmsg_id, 'U_READ' => $u_subject, 'U_FROM_USER_PROFILE' => $u_from_user_profile)); } while ($row = $db->sql_fetchrow($result));
// Redirect to this user $row = $db->sql_fetchrow($result); $template->assign_vars(array("META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_users.{$phpEx}?mode=edit&" . POST_USERS_URL . "=" . $row['user_id']) . '">')); $message .= $lang['One_user_found']; $message .= '<br /><br />' . sprintf($lang['Click_goto_user'], '<a href="' . append_sid("admin_users.{$phpEx}?mode=edit&" . POST_USERS_URL . "=" . $row['user_id']) . '">', '</a>'); message_die(GENERAL_MESSAGE, $message); } else { // Show select screen include 'page_header_admin.' . $phpEx; $template->set_filenames(array('body' => 'user_lookup_body.tpl')); $template->assign_vars(array('L_USERNAME' => $lang['Username'], 'L_USER_TITLE' => $lang['User_admin'], 'L_POSTS' => $lang['Posts'], 'L_JOINED' => $lang['Sort_Joined'], 'L_USER_EXPLAIN' => $lang['User_admin_explain'], 'L_ACTIVE' => $lang['User_status'], 'L_EMAIL_ADDRESS' => $lang['Email_address'])); $i = 0; while ($row = $db->sql_fetchrow($result)) { $row_color = !($i % 2) ? $theme['td_color1'] : $theme['td_color2']; $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars('user_row', array('ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'USERNAME' => $row['username'], 'EMAIL' => $row['user_email'], 'POSTS' => $row['user_posts'], 'ACTIVE' => $row['user_active'] ? $lang['Yes'] : $lang['No'], 'JOINED' => create_date($lang['DATE_FORMAT'], $row['user_regdate'], $board_config['board_timezone']), 'U_USERNAME' => append_sid("admin_users.{$phpEx}?mode=edit&" . POST_USERS_URL . "=" . $row['user_id']))); $i++; } $template->pparse('body'); } } } } else { $message = $lang['No_user_id_specified']; $message .= '<br /><br />' . sprintf($lang['Click_return_useradmin'], '<a href="' . append_sid("admin_users.{$phpEx}") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.{$phpEx}?pane=right") . '">', '</a>'); message_die(GENERAL_MESSAGE, $message); } } else { // // Default user selection box //
$icon_pm = $images['pm_no_new_msg']; } if ($userdata['user_unread_privmsg']) { $l_message_unread = $userdata['user_unread_privmsg'] == 1 ? $lang['Unread_pm'] : $lang['Unread_pms']; $l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']); } else { $l_privmsgs_text_unread = $lang['No_unread_pm']; } } else { $icon_pm = $images['pm_no_new_msg']; $l_privmsgs_text = $lang['Login_check_pm']; $l_privmsgs_text_unread = ''; $s_privmsg_new = 0; } $template->assign_vars(array('PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, 'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new)); $template->assign_vars(array('SIMPLE_HEADER' => !empty($gen_simple_header), 'CONTENT_ENCODING' => 'ru_RU.UTF-8', 'IN_ADMIN' => defined('IN_ADMIN'), 'USER_HIDE_CAT' => FT_SCRIPT == 'index', 'USER_LANG' => $userdata['user_lang'], 'INCLUDE_BBCODE_JS' => !empty($page_cfg['include_bbcode_js']), 'USER_OPTIONS_JS' => IS_GUEST ? '{}' : ft_json_encode($user->opt_js), 'USE_TABLESORTER' => !empty($page_cfg['use_tablesorter']), 'SITENAME' => $ft_cfg['sitename'], 'U_INDEX' => FT_ROOT . 'index.php', 'PAGE_TITLE' => isset($page_title) ? $page_title : '', 'IS_GUEST' => IS_GUEST, 'IS_USER' => IS_USER, 'IS_ADMIN' => IS_ADMIN, 'IS_MOD' => IS_MOD, 'IS_AM' => IS_AM, 'FORUM_PATH' => FORUM_PATH, 'FULL_URL' => FULL_URL, 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($ft_cfg['default_dateformat'], time(), $ft_cfg['board_timezone'])), 'S_TIMEZONE' => preg_replace('/\\(.*?\\)/', '', sprintf($lang['ALL_TIMES'], $lang['TZ'][str_replace(',', '.', floatval($ft_cfg['board_timezone']))])), 'BOARD_TIMEZONE' => $ft_cfg['board_timezone'], 'PRIVMSG_IMG' => $icon_pm, 'LOGGED_IN' => $logged_in, 'SESSION_USER_ID' => $userdata['user_id'], 'THIS_USER' => $userdata['username'], 'SHOW_LOGIN_LINK' => !defined('IN_LOGIN'), 'AUTOLOGIN_DISABLED' => !$ft_cfg['allow_autologin'], 'S_LOGIN_ACTION' => LOGIN_URL, 'U_SEARCH_UNANSWERED' => 'search.php?search_id=unanswered', 'U_SEARCH_SELF' => 'search.php?search_id=egosearch', 'U_SEARCH_NEW' => 'search.php?search_id=newposts', 'U_REGISTER' => 'profile.php?mode=register', 'U_PROFILE' => 'profile.php?mode=editprofile', 'U_EDIT_PROFILE' => 'profile.php?mode=editprofile', 'U_PRIVATEMSGS' => 'privmsg.php?folder=inbox', 'U_PRIVATEMSGS_POPUP' => 'privmsg.php?mode=newpm', 'U_SEARCH' => 'search.php', 'U_MEMBERLIST' => 'memberlist.php', 'U_TOP-10' => 'medal.php', 'U_MODCP' => 'modcp.php', 'U_FAQ' => 'faq.php', 'U_VIEWONLINE' => 'viewonline.php', 'U_LOGIN_LOGOUT' => $u_login_logout, 'U_SEND_PASSWORD' => "profile.php?mode=sendpassword", 'U_GROUP_CP' => 'groupcp.php', 'U_PROFILE' => "profile.php?mode=viewprofile&u=" . $userdata['user_id'], 'TRACKER_HREF' => "tracker.php", 'SHOW_SIDEBAR1' => !empty($page_cfg['show_sidebar1'][FT_SCRIPT]) || $ft_cfg['show_sidebar1_on_every_page'], 'SHOW_SIDEBAR2' => !empty($page_cfg['show_sidebar2'][FT_SCRIPT]) || $ft_cfg['show_sidebar2_on_every_page'], 'CAT_URL' => FT_ROOT . CAT_URL, 'DOWNLOAD_URL' => FT_ROOT . DOWNLOAD_URL, 'FORUM_URL' => FT_ROOT . FORUM_URL, 'GROUP_URL' => FT_ROOT . GROUP_URL, 'LOGIN_URL' => $ft_cfg['login_url'], 'NEWEST_URL' => '&view=newest#newest', 'PM_URL' => $ft_cfg['pm_url'], 'POST_URL' => FT_ROOT . POST_URL, 'POSTING_URL' => $ft_cfg['posting_url'], 'PROFILE_URL' => FT_ROOT . PROFILE_URL, 'TOPIC_URL' => FT_ROOT . TOPIC_URL, 'ONLY_NEW_POSTS' => ONLY_NEW_POSTS, 'ONLY_NEW_TOPICS' => ONLY_NEW_TOPICS, 'BOT_UID' => BOT_UID, 'COOKIE_MARK' => COOKIE_MARK, 'SID' => $userdata['session_id'], 'SID_HIDDEN' => '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />', 'CHECKED' => HTML_CHECKED, 'DISABLED' => HTML_DISABLED, 'READONLY' => HTML_READONLY, 'SELECTED' => HTML_SELECTED, 'L_USERNAME' => $lang['Username'], 'L_PASSWORD' => $lang['Password'], 'L_INDEX' => sprintf($lang['Forum_Index'], $ft_cfg['sitename']), 'L_REGISTER' => $lang['Register'], 'L_PROFILE' => $lang['Profile'], 'L_SEARCH' => $lang['Search'], 'L_PRIVATEMSGS' => $lang['Private_Messages'], 'L_WHO_IS_ONLINE' => $lang['Who_is_Online'], 'L_MEMBERLIST' => $lang['Memberlist'], 'L_TOP-10' => $lang['Top-10'], 'L_FAQ' => $lang['FAQ'], 'L_TRACKER' => $lang['Tracker'], 'L_USERGROUPS' => $lang['Usergroups'], 'L_SEARCH_NEW' => $lang['Search_new'], 'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'], 'L_SEARCH_SELF' => $lang['Search_your_posts'], 'L_WHOSONLINE_ADMIN' => sprintf($lang['Admin_online_color'], '<span class="colorAdmin">', '</span>'), 'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span class="colorMod">', '</span>'), 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], 'S_CONTENT_ENCODING' => $lang['ENCODING'], 'S_CONTENT_DIR_LEFT' => $lang['LEFT'], 'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'])); //qr $template->assign_vars(array('INCL_BBCODE_JS' => defined('INCL_BBCODE_JS') ? TRUE : FALSE)); //qr end // Login box $in_out = $logged_in ? 'in' : 'out'; $template->assign_block_vars("switch_user_logged_{$in_out}", array()); if (!GUEST_UID) { header('Cache-Control: private, pre-check=0, post-check=0, max-age=0'); header('Expires: 0'); header('Pragma: no-cache'); } $template->set_filenames(array('overall_header' => 'overall_header.tpl')); $template->pparse('overall_header'); define('PAGE_HEADER_SENT', true); if (!$ft_cfg['gzip_compress']) {
function topic_review($topic_id, $is_inline_review) { global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path; global $userdata, $user_ip; global $orig_word, $replacement_word; global $starttime; if (!$is_inline_review) { if (!isset($topic_id)) { message_die(GENERAL_MESSAGE, 'Topic_not_exist'); } // // Get topic info ... // $sql = "SELECT t.topic_title, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments \n\t\t\tFROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f \n\t\t\tWHERE t.topic_id = {$topic_id}\n\t\t\t\tAND f.forum_id = t.forum_id"; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql); } if (!($forum_row = $db->sql_fetchrow($result))) { message_die(GENERAL_MESSAGE, 'Topic_post_not_exist'); } $db->sql_freeresult($result); $forum_id = $forum_row['forum_id']; $topic_title = $forum_row['topic_title']; // // Start session management // $userdata = session_pagestart($user_ip, $forum_id); init_userprefs($userdata); // // End session management // $is_auth = array(); $is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_row); if (!$is_auth['auth_read']) { message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type'])); } } // // Define censored word matches // if (empty($orig_word) && empty($replacement_word)) { $orig_word = array(); $replacement_word = array(); obtain_word_list($orig_word, $replacement_word); } // // Dump out the page header and load viewtopic body template // if (!$is_inline_review) { $gen_simple_header = TRUE; $page_title = $lang['Topic_review'] . ' - ' . $topic_title; include $phpbb_root_path . 'includes/page_header.' . $phpEx; $template->set_filenames(array('reviewbody' => 'posting_topic_review.tpl')); } // // Go ahead and pull all data for this topic // $sql = "SELECT u.username, u.user_id, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid\n\t\tFROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt\n\t\tWHERE p.topic_id = {$topic_id}\n\t\t\tAND p.poster_id = u.user_id\n\t\t\tAND p.post_id = pt.post_id\n\t\tORDER BY p.post_time DESC\n\t\tLIMIT " . $board_config['posts_per_page']; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not obtain post/user information', '', __LINE__, __FILE__, $sql); } // // Okay, let's do the loop, yeah come on baby let's do the loop // and it goes like this ... // if ($row = $db->sql_fetchrow($result)) { $mini_post_img = $images['icon_minipost']; $mini_post_alt = $lang['Post']; $i = 0; do { $poster_id = $row['user_id']; $poster = $row['username']; $post_date = create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']); // // Handle anon users posting with usernames // if ($poster_id == ANONYMOUS && $row['post_username'] != '') { $poster = $row['post_username']; $poster_rank = $lang['Guest']; } elseif ($poster_id == ANONYMOUS) { $poster = $lang['Guest']; $poster_rank = ''; } $post_subject = $row['post_subject'] != '' ? $row['post_subject'] : ''; $message = $row['post_text']; $bbcode_uid = $row['bbcode_uid']; // // If the board has HTML off but the post has HTML // on then we process it, else leave it alone // if (!$board_config['allow_html'] && $row['enable_html']) { $message = preg_replace('#(<)([\\/]?.*?)(>)#is', '<\\2>', $message); } if ($bbcode_uid != "") { $message = $board_config['allow_bbcode'] ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\\:[0-9a-z\\:]+\\]/si', ']', $message); } $message = make_clickable($message); if (count($orig_word)) { $post_subject = preg_replace($orig_word, $replacement_word, $post_subject); $message = preg_replace($orig_word, $replacement_word, $message); } if ($board_config['allow_smilies'] && $row['enable_smilies']) { $message = smilies_pass($message); } $message = str_replace("\n", '<br />', $message); // // Again this will be handled by the templating // code at some point // $row_color = !($i % 2) ? $theme['td_color1'] : $theme['td_color2']; $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars('postrow', array('ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'MINI_POST_IMG' => $mini_post_img, 'POSTER_NAME' => $poster, 'POST_DATE' => $post_date, 'POST_SUBJECT' => $post_subject, 'MESSAGE' => $message, 'L_MINI_POST_ALT' => $mini_post_alt)); $i++; } while ($row = $db->sql_fetchrow($result)); } else { message_die(GENERAL_MESSAGE, 'Topic_post_not_exist', '', __LINE__, __FILE__, $sql); } $db->sql_freeresult($result); $template->assign_vars(array('L_AUTHOR' => $lang['Author'], 'L_MESSAGE' => $lang['Message'], 'L_POSTED' => $lang['Posted'], 'L_POST_SUBJECT' => $lang['Post_subject'], 'L_TOPIC_REVIEW' => $lang['Topic_review'])); if (!$is_inline_review) { $template->pparse('reviewbody'); include $phpbb_root_path . 'includes/page_tail.' . $phpEx; } }
$folder_image = $folder_new; $folder_alt = $topicrow[$i]['topic_status'] == TOPIC_LOCKED ? $lang['Topic_locked'] : $lang['New_posts']; $newest_post_img = '<a href="' . append_sid("viewtopic.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; } } else { $folder_image = $folder; $folder_alt = $topicrow[$i]['topic_status'] == TOPIC_LOCKED ? $lang['Topic_locked'] : $lang['No_new_posts']; $newest_post_img = ''; } } else { $folder_image = $folder; $folder_alt = $topicrow[$i]['topic_status'] == TOPIC_LOCKED ? $lang['Topic_locked'] : $lang['No_new_posts']; $newest_post_img = ''; } if ($topicrow[$i]['topic_last_post_id']) { $last_post_time = create_date($board_config['default_dateformat'], $topicrow[$i]['post_time'], $board_config['board_timezone']); $last_post = $last_post_time . '<br />'; // Begin PNphpBB2 Module $last_post .= $topicrow[$i]['user_id'] == ANONYMOUS ? $topicrow[$i]['post_username'] != '' ? DataUtil::formatForDisplay($topicrow[$i]['post_username']) . ' ' : $lang['Guest'] . ' ' : '<a href="' . append_sid("profile.{$phpEx}?mode=viewprofile&" . POST_USERS_URL . '=' . $topicrow[$i]['user_id']) . '">' . DataUtil::formatForDisplay($topicrow[$i]['username']) . '</a> '; // End PNphpBB2 Module $last_post .= '<a href="' . append_sid("viewtopic.{$phpEx}?" . POST_POST_URL . '=' . $topicrow[$i]['topic_last_post_id']) . '#' . $topicrow[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>'; } else { $last_post = $lang['No_Posts']; } $topic_url = append_sid("viewtopic.{$phpEx}?" . POST_TOPIC_URL . "=" . $topicrow[$i]['topic_id']); $forum_url = append_sid("viewforum.{$phpEx}?" . POST_FORUM_URL . "=" . $topicrow[$i]['forum_id']); $template->assign_block_vars('switch_annonce.topicrow', array('ICON' => $topicrow[$i]['topic_icon'] == 0 ? " " : "<img " . $board_config['posticons_size'] . " src=\"" . $board_config['path_posticons'] . "/image_" . $topicrow[$i]['topic_icon'] . ".gif\" alt=\"" . $topicrow[$i]['topic_icon'] . "\" border=\"0\">", 'TOPIC_FOLDER_IMG' => $folder_image, 'L_TOPIC_FOLDER_ALT' => $folder_alt, 'U_VIEW_TOPIC' => $topic_url, 'TOPIC_TITLE' => $topicrow[$i]['topic_title'], 'U_VIEW_FORUM' => $forum_url, 'FORUM_TITLE' => $topicrow[$i]['forum_name'], 'LAST_POST' => $last_post)); } } } // End PNphpBB2 Module (Announcements)
if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not your auction-offers', '', __LINE__, __FILE__, $sql); } $total_offers = 0; while ($row = $db->sql_fetchrow($result)) { $auction_mywatchlist[] = $row; $total_offers++; } $template->set_filenames(array('body' => 'auction_myauction_watchlist.tpl')); for ($i = 0; $i < $total_offers; $i++) { if ($auction_mywatchlist[$i]['auction_offer_time_start'] > time()) { $template->assign_block_vars('notstartedrow', array('AUCTION_OFFER_TITLE' => $auction_mywatchlist[$i]['auction_offer_title'], 'U_AUCTION_OFFER_TITLE' => append_sid("auction_offer_view.php?" . POST_AUCTION_OFFER_URL . "=" . $auction_mywatchlist[$i]['PK_auction_offer_id']), 'AUCTION_OFFER_TIME_START' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_offer_time_start'], $board_config['board_timezone']), 'AUCTION_OFFER_TIME_STOP' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_offer_time_stop'], $board_config['board_timezone']), 'AUCTION_OFFER_ADDED_TO_WATCHLIST_TIME' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_watchlist_time'], $board_config['board_timezone']), 'AUCTION_OFFER_PRICE_LAST' => $auction_mywatchlist[$i]['auction_offer_last_bid_price'] > $auction_mywatchlist[$i]['auction_offer_price_start'] ? $auction_mywatchlist[$i]['auction_offer_last_bid_price'] . " " . $auction_config_data['currency'] : $auction_mywatchlist[$i]['auction_offer_price_start'] . " " . $auction_config_data['currency'], 'AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => $phpbb_root_path . $images['icon_auction_delete'], 'AUCTION_OFFER_ROOM_TITLE' => $auction_mywatchlist[$i]['auction_room_title'], 'U_AUCTION_OFFER_ROOM_TITLE' => append_sid("auction_room.php?" . POST_AUCTION_ROOM_URL . "=" . $auction_mywatchlist[$i]['fk_auction_offer_room_id']), 'U_AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => append_sid("auction_my_auctions.php?mode=delete_from_watchlist&" . POST_AUCTION_OFFER_URL . "=" . $auction_mywatchlist[$i]['PK_auction_offer_id'] . ""), 'L_AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => $lang['auction_offer_watchlist_delete_from'])); } elseif ($auction_mywatchlist[$i]['auction_offer_time_stop'] < time() or $auction_myoffers[$i]['auction_offer_state'] == 2) { $template->assign_block_vars('alreadyoverrow', array('AUCTION_OFFER_TITLE' => $auction_mywatchlist[$i]['auction_offer_title'], 'U_AUCTION_OFFER_TITLE' => append_sid("auction_offer_view.php?" . POST_AUCTION_OFFER_URL . "=" . $auction_mywatchlist[$i]['PK_auction_offer_id']), 'AUCTION_OFFER_TIME_START' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_offer_time_start'], $board_config['board_timezone']), 'AUCTION_OFFER_TIME_STOP' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_offer_time_stop'], $board_config['board_timezone']), 'AUCTION_OFFER_PRICE_LAST' => $auction_mywatchlist[$i]['auction_offer_last_bid_price'] > $auction_mywatchlist[$i]['auction_offer_price_start'] ? $auction_mywatchlist[$i]['auction_offer_last_bid_price'] . " " . $auction_config_data['currency'] : $auction_mywatchlist[$i]['auction_offer_price_start'] . " " . $auction_config_data['currency'], 'AUCTION_OFFER_ADDED_TO_WATCHLIST_TIME' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_watchlist_time'], $board_config['board_timezone']), 'AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => $phpbb_root_path . $images['icon_auction_delete'], 'AUCTION_OFFER_ROOM_TITLE' => $auction_mywatchlist[$i]['auction_room_title'], 'U_AUCTION_OFFER_ROOM_TITLE' => append_sid("auction_room.php?" . POST_AUCTION_ROOM_URL . "=" . $auction_mywatchlist[$i]['fk_auction_offer_room_id']), 'U_AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => append_sid("auction_my_auctions.php?mode=delete_from_watchlist&" . POST_AUCTION_OFFER_URL . "=" . $auction_mywatchlist[$i]['PK_auction_offer_id'] . ""), 'L_AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => $lang['auction_offer_watchlist_delete_from'])); } else { $template->assign_block_vars('activerow', array('AUCTION_OFFER_TITLE' => $auction_mywatchlist[$i]['auction_offer_title'], 'U_AUCTION_OFFER_TITLE' => append_sid("auction_offer_view.php?" . POST_AUCTION_OFFER_URL . "=" . $auction_mywatchlist[$i]['PK_auction_offer_id']), 'AUCTION_OFFER_TIME_START' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_offer_time_start'], $board_config['board_timezone']), 'AUCTION_OFFER_TIME_STOP' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_offer_time_stop'], $board_config['board_timezone']), 'AUCTION_OFFER_PRICE_LAST' => $auction_mywatchlist[$i]['auction_offer_last_bid_price'] > $auction_mywatchlist[$i]['auction_offer_price_start'] ? $auction_mywatchlist[$i]['auction_offer_last_bid_price'] . " " . $auction_config_data['currency'] : $auction_mywatchlist[$i]['auction_offer_price_start'] . " " . $auction_config_data['currency'], 'AUCTION_OFFER_ADDED_TO_WATCHLIST_TIME' => create_date($board_config['default_dateformat'], $auction_mywatchlist[$i]['auction_watchlist_time'], $board_config['board_timezone']), 'AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => $phpbb_root_path . $images['icon_auction_delete'], 'AUCTION_OFFER_ROOM_TITLE' => $auction_mywatchlist[$i]['auction_room_title'], 'U_AUCTION_OFFER_ROOM_TITLE' => append_sid("auction_room.php?" . POST_AUCTION_ROOM_URL . "=" . $auction_mywatchlist[$i]['fk_auction_offer_room_id']), 'U_AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => append_sid("auction_my_auctions.php?mode=delete_from_watchlist&" . POST_AUCTION_OFFER_URL . "=" . $auction_mywatchlist[$i]['PK_auction_offer_id'] . ""), 'L_AUCTION_OFFER_DELETE_FROM_WATCHLIST_IMAGE' => $lang['auction_offer_watchlist_delete_from'])); } } $template->assign_vars(array('TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts), 'TOTAL_USERS' => sprintf($l_total_user_s, $total_users), 'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.{$phpEx}?mode=viewprofile&" . POST_USERS_URL . "={$newest_uid}") . '">', $newest_user, '</a>'), 'L_ONLINE_EXPLAIN' => $lang['Online_explain'], 'L_AUCTION_ROOM' => $lang['auction_room_short'], 'L_AUCTION_OFFER_STATUS_ACTIV' => $lang['auction_offer_status_active'], 'L_AUCTION_OFFER_STATUS_NOT_STARTED_YET' => $lang['auction_offer_status_not_started_yet'], 'L_AUCTION_OFFER_STATUS_ALREADY_OVER' => $lang['auction_offer_status_already_over'], 'L_AUCTION_OFFER_ADDED_TO_WATCHLIST_TIME' => $lang['auction_offer_added_to_watchlist_time'], 'L_WATCHLIST' => $lang['auction_myauction_watchlist'], 'L_AUCTION_OFFER_TITLE' => $lang['auction_offer_title'], 'L_AUCTION_OFFER_TIME_START' => $lang['auction_offer_time_start'], 'L_AUCTION_OFFER_TIME_STOP' => $lang['auction_offer_time_stop'], 'L_AUCTION_OFFER_STATUS' => $lang['auction_offer_time_status'], 'L_AUCTION_OFFER_PRICE_LAST' => $lang['auction_offer_last_price'], 'L_DELETE' => $lang['delete'])); $template->pparse('body'); include $phpbb_root_path . 'auction/auction_footer.' . $phpEx; include $phpbb_root_path . 'includes/page_tail.' . $phpEx; break; case 'add_to_watchlist': $page_title = $lang['auction_myauction_watchlist']; include './includes/page_header.php'; if (!$userdata['session_logged_in']) { redirect("login." . $phpEx . "?redirect=auction_my_auctions." . $phpEx . "?mode=watchlist"); exit; } $offer_id = $HTTP_GET_VARS[POST_AUCTION_OFFER_URL];
//-- mod: sf - end //MOD Keep_unread * deleted // $tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array(); // $tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array(); //END MOD Keep_unread // // If you don't use these stats on your index you may want to consider // removing them // //-- mod: sf if (!defined('IN_VIEWFORUM')) { //-- mod: sf - end $total_posts = get_db_stat('postcount'); $total_users = get_db_stat('usercount'); $total_topics = get_db_stat('topiccount'); $start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); $boarddays = (time() - $board_config['board_startdate']) / 86400; $posts_per_day = sprintf("%.2f", $total_posts / $boarddays); $topics_per_day = sprintf("%.2f", $total_topics / $boarddays); $users_per_day = sprintf("%.2f", $total_users / $boarddays); $total_male = get_db_stat('gender-male'); $total_female = get_db_stat('gender-female'); $newest_userdata = get_db_stat('newestuser'); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; if ($total_posts == 0) { $l_total_post_s = $lang['Posted_articles_zero_total']; } else { if ($total_posts == 1) { $l_total_post_s = $lang['Posted_article_total']; } else {
$nav_links_html .= sprintf($nav_link_proto, $nav_item, append_sid($nav_array['url']), $nav_array['title']); } else { // We have a nested array, used for items like <link rel='chapter'> that can occur more than once. while (list(, $nested_array) = each($nav_array)) { $nav_links_html .= sprintf($nav_link_proto, $nav_item, $nested_array['url'], $nested_array['title']); } } } // Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility $l_timezone = explode('.', $board_config['board_timezone']); $l_timezone = count($l_timezone) > 1 && $l_timezone[count($l_timezone) - 1] != 0 ? $user->lang[sprintf('%.1f', $board_config['board_timezone'])] : $user->lang[number_format($board_config['board_timezone'])]; // // The following assigns all _common_ variables that may be used at any point // in a template. // $template->assign_vars(array('SITENAME' => $board_config['sitename'], 'SITE_DESCRIPTION' => $board_config['site_desc'], 'PAGE_TITLE' => $page_title, 'LAST_VISIT_DATE' => sprintf($user->lang['You_last_visit'], $s_last_visit), 'CURRENT_TIME' => sprintf($user->lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, 'RECORD_USERS' => sprintf($user->lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])), 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, 'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new, 'PRIVMSG_IMG' => $icon_pm, 'L_USERNAME' => $user->lang['Username'], 'L_PASSWORD' => $user->lang['Password'], 'L_LOGIN_LOGOUT' => $l_login_logout, 'L_LOGIN' => $user->lang['Login'], 'L_LOG_ME_IN' => $user->lang['Log_me_in'], 'L_AUTO_LOGIN' => $user->lang['Log_me_in'], 'L_INDEX' => sprintf($user->lang['Forum_Index'], $board_config['sitename']), 'L_REGISTER' => $user->lang['Register'], 'L_PROFILE' => $user->lang['Profile'], 'L_SEARCH' => $user->lang['Search'], 'L_PRIVATEMSGS' => $user->lang['Private_Messages'], 'L_WHO_IS_ONLINE' => $user->lang['Who_is_Online'], 'L_MEMBERLIST' => $user->lang['Memberlist'], 'L_FAQ' => $user->lang['FAQ'], 'L_USERGROUPS' => $user->lang['Usergroups'], 'L_SEARCH_NEW' => $user->lang['Search_new'], 'L_SEARCH_UNANSWERED' => $user->lang['Search_unanswered'], 'L_SEARCH_SELF' => $user->lang['Search_your_posts'], 'L_WHOSONLINE_ADMIN' => sprintf($user->lang['Admin_online_color'], '<span style="color:#' . $theme['fontcolor3'] . '">', '</span>'), 'L_WHOSONLINE_MOD' => sprintf($user->lang['Mod_online_color'], '<span style="color:#' . $theme['fontcolor2'] . '">', '</span>'), 'U_SEARCH_UNANSWERED' => append_sid('search.' . $phpEx . '?search_id=unanswered'), 'U_SEARCH_SELF' => append_sid('search.' . $phpEx . '?search_id=egosearch'), 'U_SEARCH_NEW' => append_sid('search.' . $phpEx . '?search_id=newposts'), 'U_INDEX' => append_sid('index.' . $phpEx), 'U_REGISTER' => append_sid('profile.' . $phpEx . '?mode=register'), 'U_PROFILE' => append_sid('profile.' . $phpEx . '?mode=editprofile'), 'U_PRIVATEMSGS' => append_sid('privmsg.' . $phpEx . '?folder=inbox'), 'U_PRIVATEMSGS_POPUP' => append_sid('privmsg.' . $phpEx . '?mode=newpm'), 'U_SEARCH' => append_sid('search.' . $phpEx), 'U_MEMBERLIST' => append_sid('memberlist.' . $phpEx), 'U_MODCP' => append_sid('modcp.' . $phpEx), 'U_FAQ' => append_sid('faq.' . $phpEx), 'U_VIEWONLINE' => append_sid('viewonline.' . $phpEx), 'U_LOGIN_LOGOUT' => append_sid($u_login_logout), 'U_GROUP_CP' => append_sid('groupcp.' . $phpEx), 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'], 'S_CONTENT_ENCODING' => $user->lang['ENCODING'], 'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'], 'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'], 'S_TIMEZONE' => sprintf($user->lang['All_times'], $l_timezone), 'S_LOGIN_ACTION' => append_sid('login.' . $phpEx), 'T_HEAD_STYLESHEET' => $theme['head_stylesheet'], 'T_BODY_BACKGROUND' => $theme['body_background'], 'T_BODY_BGCOLOR' => '#' . $theme['body_bgcolor'], 'T_BODY_TEXT' => '#' . $theme['body_text'], 'T_BODY_LINK' => '#' . $theme['body_link'], 'T_BODY_VLINK' => '#' . $theme['body_vlink'], 'T_BODY_ALINK' => '#' . $theme['body_alink'], 'T_BODY_HLINK' => '#' . $theme['body_hlink'], 'T_TR_COLOR1' => '#' . $theme['tr_color1'], 'T_TR_COLOR2' => '#' . $theme['tr_color2'], 'T_TR_COLOR3' => '#' . $theme['tr_color3'], 'T_TR_CLASS1' => $theme['tr_class1'], 'T_TR_CLASS2' => $theme['tr_class2'], 'T_TR_CLASS3' => $theme['tr_class3'], 'T_TH_COLOR1' => '#' . $theme['th_color1'], 'T_TH_COLOR2' => '#' . $theme['th_color2'], 'T_TH_COLOR3' => '#' . $theme['th_color3'], 'T_TH_CLASS1' => $theme['th_class1'], 'T_TH_CLASS2' => $theme['th_class2'], 'T_TH_CLASS3' => $theme['th_class3'], 'T_TD_COLOR1' => '#' . $theme['td_color1'], 'T_TD_COLOR2' => '#' . $theme['td_color2'], 'T_TD_COLOR3' => '#' . $theme['td_color3'], 'T_TD_CLASS1' => $theme['td_class1'], 'T_TD_CLASS2' => $theme['td_class2'], 'T_TD_CLASS3' => $theme['td_class3'], 'T_FONTFACE1' => $theme['fontface1'], 'T_FONTFACE2' => $theme['fontface2'], 'T_FONTFACE3' => $theme['fontface3'], 'T_FONTSIZE1' => $theme['fontsize1'], 'T_FONTSIZE2' => $theme['fontsize2'], 'T_FONTSIZE3' => $theme['fontsize3'], 'T_FONTCOLOR1' => '#' . $theme['fontcolor1'], 'T_FONTCOLOR2' => '#' . $theme['fontcolor2'], 'T_FONTCOLOR3' => '#' . $theme['fontcolor3'], 'T_SPAN_CLASS1' => $theme['span_class1'], 'T_SPAN_CLASS2' => $theme['span_class2'], 'T_SPAN_CLASS3' => $theme['span_class3'], 'NAV_LINKS' => $nav_links_html)); // // Login box? // if (!$user->data['session_logged_in']) { $template->assign_block_vars('switch_user_logged_out', array()); } else { $template->assign_block_vars('switch_user_logged_in', array()); if (!empty($user->data['user_popup_pm'])) { $template->assign_block_vars('switch_enable_pm_popup', array()); } } // Add no-cache control for cookies if they are set //$c_no_cache = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_data'])) ? 'no-cache="set-cookie", ' : ''; // Work around for "current" Apache 2 + PHP module which seems to not // cope with private cache control setting
//bt search $s_link = "search.php?search_id=dl&dl_status="; $template->assign_vars(array('L_SEARCH_DL' => $lang['Search_DL'], 'L_SEARCH_DL_WILL' => $lang['Search_DL_Will'], 'L_SEARCH_DL_DOWN' => $lang['Search_DL_Down'], 'L_SEARCH_DL_COMPLETE' => $lang['Search_DL_Complete'], 'L_SEARCH_DL_CANCEL' => $lang['Search_DL_Cancel'], 'U_SEARCH_DL_WILL' => $s_link . DL_STATUS_WILL, 'U_SEARCH_DL_DOWN' => $s_link . DL_STATUS_DOWN, 'U_SEARCH_DL_COMPLETE' => $s_link . DL_STATUS_COMPLETE, 'U_SEARCH_DL_CANCEL' => $s_link . DL_STATUS_CANCEL)); //bt search end // //latest news // if ($ft_cfg['show_latest_news'] and $news_forum_ids = $ft_cfg['latest_news_forum_id']) { $template->assign_vars(array('SHOW_LATEST_NEWS' => true)); $news_count = max($ft_cfg['latest_news_count'], 1); $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, p.post_time\r\n\t\tFROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . FORUMS_TABLE . " AS f\r\n\t\tWHERE t.forum_id = f.forum_id\r\n\t\tAND t.forum_id IN(" . $news_forum_ids . ")\r\n\t\tAND p.post_id = t.topic_last_post_id\r\n\t\tAND t.topic_moved_id = 0\r\n\t\tORDER BY p.post_id DESC LIMIT {$news_count}"; if (!($result = DB()->sql_query($sql))) { message_die(GENERAL_ERROR, "Could not fetch latest news information.", '', __LINE__, __FILE__, $sql); } while ($row = DB()->sql_fetchrow($result)) { $template->assign_block_vars('news', array('NEWS_TIME' => create_date('d-M', $row['post_time'], $ft_cfg['board_timezone']), 'NEWS_TOPIC_ID' => $row['topic_id'], 'NEWS_TOPIC_NAME' => str_replace("'", "\\'", $row['topic_title']), 'NEWS_IS_NEW' => $row['post_time'] > $userdata['user_lastvisit'])); } } // //latest news end // // // peer info begin // $cur_time = time(); $peers = $seeds = $leechs = $sl_ratio = $torrents = $torrents_size = $torrents_act = $up = $down = $total = 'unknown'; // // peer, leech, seed // $sql = " SELECT COUNT(peer_id) AS peers, SUM(seeder) AS seeds\r\n FROM " . BT_TRACKER_TABLE . "\r\n WHERE expire_time > {$cur_time} "; if ($row = DB()->sql_fetchrow(DB()->sql_query($sql))) {