/** * Handles the live search * * @return @e void */ public function doSearchRequest() { //----------------------------------------- // Init //----------------------------------------- $search_term = IPSText::convertCharsets($this->request['search_term'], 'utf-8', IPS_DOC_CHAR_SET); $results = array(); $results = array('members' => array(), 'groups' => array(), 'groupLangs' => false, 'settings' => array(), 'forums' => array(), 'location' => array()); if (IPSLib::appIsInstalled('nexus')) { $results['nexus'] = array(); } //----------------------------------------- // Search //----------------------------------------- $results = $this->_getSettings($search_term, $results); $results = $this->_getFromXML($search_term, $results); $results = $this->_getMembers($search_term, $results); $results = $this->_checkGroups($search_term, $results); $results = $this->_checkForums($search_term, $results); if (IPSLib::appIsInstalled('nexus')) { $results = $this->_checkNexus($search_term, $results); } //----------------------------------------- // Output //----------------------------------------- $this->returnJsonArray($results); }
/** * Class entry point * * @access public * @param object Registry reference * @return void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // Security check //----------------------------------------- if ($this->request['k'] != $this->member->form_hash) { $this->registry->getClass('output')->showError('no_permission', 20314); } //----------------------------------------- // INIT //----------------------------------------- $info = array(); $id = intval($this->memberData['member_id']); //----------------------------------------- // Get HTML and skin //----------------------------------------- $this->registry->class_localization->loadLanguageFile(array('public_profile'), 'members'); //----------------------------------------- // Can we access? //----------------------------------------- if (!$this->memberData['g_mem_info']) { $this->registry->output->showError('status_off', 10268); } if (!$id) { $this->registry->output->showError('status_off', 10269); } $newStatus = trim(IPSText::getTextClass('bbcode')->stripBadWords($this->request['new_status'])); IPSMember::save($id, array('extendedProfile' => array('pp_status' => $newStatus, 'pp_status_update' => time()))); $this->registry->output->redirectScreen($this->lang->words['status_was_changed'], $this->settings['base_url'] . 'showuser='******'members_seo_name']); }
/** * Class entry point * * @access public * @param object Registry reference * @return void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // INIT //----------------------------------------- $info = array(); $id = intval($this->memberData['member_id']); //----------------------------------------- // Get HTML and skin //----------------------------------------- $this->registry->class_localization->loadLanguageFile(array('public_profile'), 'members'); //----------------------------------------- // Can we access? //----------------------------------------- if (!$this->memberData['g_mem_info'] or $this->memberData['gbw_no_status_update']) { $this->returnJsonError($this->lang->words['status_off']); } if (!$id) { $this->returnJsonError($this->lang->words['status_off']); } $newStatus = trim(IPSText::getTextClass('bbcode')->stripBadWords(IPSText::parseCleanValue($_POST['new_status']))); IPSMember::save($id, array('extendedProfile' => array('pp_status' => $newStatus, 'pp_status_update' => time()))); $this->returnJsonArray(array('status' => 'success', 'new_status' => $newStatus)); exit; }
/** * Main function executed automatically by the controller * * @param object $registry Registry object * @return @e void */ public function doExecute(ipsRegistry $registry) { /* Set up */ $inapp = trim($this->request['inapp']); $do = !empty($this->request['do']) ? $this->request['do'] : 'all'; /* Load navigation stuff */ $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/navigation/build.php', 'classes_navigation_build'); $navigation = new $classToLoad($inapp); /* Show warning if offline */ if ($this->settings['board_offline'] and !$this->memberData['g_access_offline']) { $row = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'core_sys_conf_settings', 'where' => "conf_key='offline_msg'")); IPSText::getTextClass('bbcode')->parse_bbcode = 1; IPSText::getTextClass('bbcode')->parse_html = 1; IPSText::getTextClass('bbcode')->parse_emoticons = 1; IPSText::getTextClass('bbcode')->parse_nl2br = 1; IPSText::getTextClass('bbcode')->parsing_section = 'global'; $row['conf_value'] = IPSText::getTextClass('bbcode')->preDisplayParse(IPSText::getTextClass('bbcode')->preDbParse($row['conf_value'])); return $this->returnHtml($this->registry->output->getTemplate('global_other')->quickNavigationOffline($row['conf_value'])); } /* Return */ if ($do == 'all') { return $this->returnHtml($this->registry->output->getTemplate('global_other')->quickNavigationWrapper($navigation->loadApplicationTabs(), $navigation->loadNavigationData(), $navigation->getApp())); } else { return $this->returnHtml($this->registry->output->getTemplate('global_other')->quickNavigationPanel($navigation->loadNavigationData(), $navigation->getApp())); } }
/** * Show the form * * @return @e void [Outputs to screen] */ protected function show() { //----------------------------------------- // INIT //----------------------------------------- $name = trim(IPSText::alphanumericalClean(ipsRegistry::$request['name'])); $member_id = intval(ipsRegistry::$request['member_id']); $output = ''; //----------------------------------------- // Get member data //----------------------------------------- $member = IPSMember::load($member_id, 'extendedProfile,customFields'); //----------------------------------------- // Got a member? //----------------------------------------- if (!$member['member_id']) { $this->returnJsonError($this->lang->words['t_noid']); } //----------------------------------------- // Return the form //----------------------------------------- if (method_exists($this->html, $name)) { $output = $this->html->{$name}($member); } //----------------------------------------- // Print... //----------------------------------------- $this->returnHtml($output); }
/** * Returns possible matches for the string input * * @return @e void Outputs to screen */ protected function _getMembers() { //----------------------------------------- // INIT //----------------------------------------- $name = IPSText::convertUnicode($this->convertAndMakeSafe($this->request['name'], 0), true); $name = IPSText::convertCharsets($name, 'utf-8', IPS_DOC_CHAR_SET); //----------------------------------------- // Check length //----------------------------------------- if (IPSText::mbstrlen($name) < 3) { $this->returnJsonError('requestTooShort'); } //----------------------------------------- // Try query... //----------------------------------------- $this->DB->build(array('select' => 'm.members_display_name, m.member_id, m.members_seo_name, m.member_group_id', 'from' => array('members' => 'm'), 'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes(strtolower($name)) . "%'", 'order' => $this->DB->buildLength('m.members_display_name') . ' ASC', 'limit' => array(0, 15), 'add_join' => array(array('select' => 'p.*', 'from' => array('profile_portal' => 'p'), 'where' => 'p.pp_member_id=m.member_id', 'type' => 'left')))); $this->DB->execute(); //----------------------------------------- // Got any results? //----------------------------------------- if (!$this->DB->getTotalRows()) { $this->returnJsonArray(array()); } $return = array(); while ($r = $this->DB->fetch()) { $url = $this->registry->output->buildSEOUrl("app=core&module=modcp&do=editmember&mid={$r['member_id']}", 'public'); $photo = IPSMember::buildProfilePhoto($r); $group = IPSMember::makeNameFormatted('', $r['member_group_id']); $return[$r['member_id']] = array('name' => $r['members_display_name'], 'showas' => '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')', 'img' => $photo['pp_thumb_photo'], 'img_w' => $photo['pp_mini_width'], 'img_h' => $photo['pp_mini_height'], 'url' => $url); } $this->returnJsonArray($return); }
function globalTemplate($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items = array(), $items = array(), $footer_items = array(), $stats = array()) { $IPBHTML = ""; $this->templateVars['forumActive'] = ""; $this->__default__templateVars['forumActive'] = ""; if (IPS_APP_COMPONENT == 'forums') { $this->templateVars['forumActive'] = "active"; } else { $this->templateVars['forumActive'] = $this->__default__templateVars['forumActive']; } $this->templateVars['membersActive'] = ""; $this->__default__templateVars['membersActive'] = ""; if (IPS_APP_COMPONENT == 'members') { $this->templateVars['membersActive'] = "active"; } else { $this->templateVars['membersActive'] = $this->__default__templateVars['membersActive']; } $this->templateVars['helpActive'] = ""; $this->__default__templateVars['helpActive'] = ""; if (IPS_APP_COMPONENT == 'core' and $this->request['module'] == 'help') { $this->templateVars['helpActive'] = "active"; } else { $this->templateVars['helpActive'] = $this->__default__templateVars['helpActive']; } $this->did_first = 0; $IPBHTML .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\t<html xml:lang=\"en\" lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\"" . (IPSLib::fbc_enabled() === TRUE ? " xmlns:fb=\"http://www.facebook.com/2008/fbml\"" : "") . ">\n\t<head>\n\t\t<meta http-equiv=\"content-type\" content=\"text/html; charset={$this->settings['gb_char_set']}\" />\n\t\t<title>{$header_items['title']}" . ($header_items['page'] ? " {$this->lang->words['page_title_page']} {$header_items['page']}" : "") . "</title>\n\t\t<link rel=\"shortcut icon\" href='" . ($this->registry->output->isHTTPS ? "{$this->settings['board_url_https']}" : "{$this->settings['board_url']}") . "/favicon.ico' />\n\t\t<script type='text/javascript'>\n\t\t\tjsDebug = " . intval($this->settings['_jsDebug']) . "; /* Must come before JS includes */\n\t\t\tUSE_RTE = " . ($this->memberData['members_editor_choice'] == 'rte' && $this->memberData['_canUseRTE'] === TRUE ? "1" : "0") . ";\n\t\t\tinACP = false;\n\t\t</script>\n\t\t" . $this->registry->getClass('output')->getTemplate('global')->includeCSS($css) . "\n\t\t<!--<meta http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />-->\n\t\t" . $this->registry->getClass('output')->getTemplate('global')->includeMeta($metaTags) . "" . $this->registry->getClass('output')->getTemplate('global')->includeJS($jsModules) . "" . $this->registry->getClass('output')->getTemplate('global')->includeFeeds($documentHeadItems) . "" . $this->registry->getClass('output')->getTemplate('global')->includeRTL() . "\t\t\n\t\t" . $this->registry->getClass('output')->getTemplate('global')->includeVars() . "\n\t\t<script type='text/javascript'>\n\t\t\tLoader.boot();\n\t\t</script>\n\t</head>\n\t<body id='ipboard_body'>\n\t\t<div id='ipbwrapper'>\n\t\t\t<h1>{$this->settings['board_name']}: {$header_items['title']}</h1>\n\t\t\t<p id='content_jump'><a id='top'></a><a href='#j_content' title='{$this->lang->words['jump_to_content']}' accesskey='m'>{$this->lang->words['jump_to_content']}</a></p>\n\t\t\n\t\t\t" . (($this->memberData['g_is_supmod'] == 1 or isset($this->memberData['access_report_center']) and $this->memberData['access_report_center']) ? "<div id='admin_bar'>\n\t\t\t\t\t" . (($this->memberData['g_access_cp'] == 1 and $this->settings['security_remove_acp_link'] == 0) ? "\n\t\t\t\t\t<p class='right'>\n\t\t\t\t\t\t<a href=\"{$this->settings['_admin_link']}\" title='{$this->lang->words['admin_cp']}'>{$this->lang->words['login_to_acp']} ></a>\n\t\t\t\t\t</p>\n\t\t\t\t\t" : "") . "\n\t\t\t\t\t<strong>{$this->lang->words['mod_tools']}</strong> \n\t\t\t\t\t<ul id='mod_tools'>\n\t\t\t\t\t\t" . ($this->memberData['g_is_supmod'] == 1 ? "\n\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=usercp&tab=members&area=mod_ipaddress", 'public', ''), "", "") . "' title='{$this->lang->words['ip_lookup']}'>{$this->lang->words['ip_lookup']}</a></li>\n\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=usercp&tab=forums&area=modAddAnnouncement&do=add", 'public', ''), "", "") . "' title='{$this->lang->words['post_announcement']}'>{$this->lang->words['post_announcement']}</a></li>\n\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t" . ($this->memberData['access_report_center'] ? "<li " . ($this->memberData['_cache']['report_num'] > 0 ? "class='active'" : "") . "><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=reports&do=index", 'public', ''), "", "") . "\" title='{$this->lang->words['view_reports']}'>{$this->memberData['_cache']['report_num']} {$this->lang->words['report_member_bar']}</a></li>" : "") . "\n\t\t\t\t\t</ul>\n\t\t\t\t</div>" : "") . "\n\t\t\t<div id='header'>\n\t\t\t\t<div id='branding'>\n\t\t\t\t\t" . (method_exists($this->registry->output->getTemplate($this->registry->getCurrentApplication() . '_global'), 'overwriteHeader') ? "\n\t\t\t\t\t\t" . $this->registry->getClass('output')->getTemplate('' . $this->registry->getCurrentApplication() . '_global')->overwriteHeader() . "\n\t\t\t\t\t" : "\n\t\t\t\t\t\t" . $this->registry->getClass('output')->getTemplate('global')->defaultHeader() . "\n\t\t\t\t\t") . "\n\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t" . ($this->memberData['member_id'] ? "<div id='user_navigation' class='logged_in'>\n\t\t\t\t\t\t<img src='{$this->memberData['pp_thumb_photo']}' alt=\"{$this->memberData['members_display_name']}{$this->lang->words['users_photo']}\" width='{$this->memberData['pp_thumb_width']}' height='{$this->memberData['pp_thumb_height']}' class='photo' />\n\t\t\t\t\t\t<div id='user_info'>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<span class='hide'>{$this->lang->words['logged_in_as']} </span>\nLogged in as\n\t\t\t\t\t\t\t\t<a id='user_link' class='ipbmenu' href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$this->memberData['member_id']}", 'public', ''), "{$this->memberData['members_seo_name']}", "showuser") . "\" title='{$this->lang->words['your_profile']}'>{$this->memberData['members_display_name']} <img src='{$this->settings['img_url']}/opts_arrow.png' alt='>' /></a>" . ($this->memberData['msg_count_new'] != 0 ? "<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=messaging", 'public', ''), "", "") . "' id='new_msg_count' title='{$this->memberData['msg_count_new']} {$this->lang->words['msg_new']}'>{$this->memberData['msg_count_new']}<span class='hide'> {$this->lang->words['msg_new']}</span></a>" : "") . "\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<ul id='user_link_menucontent'>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<ul id='user_other'>\n\t\t\t\t\t\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login&do=logout&k={$this->member->form_hash}", 'public', ''), "", "") . "\">{$this->lang->words['log_out']}</a></li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t" . ($this->memberData['member_group_id'] == $this->settings['auth_group'] ? "\n\t\t\t\t\t\t\t\t\t<li><strong><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=register&do=reval", 'public', ''), "", "") . "\" title='{$this->lang->words['resend_val']}'>{$this->lang->words['resend_val']}</a></strong></li>\n\t\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\tif( \$('user_link_menucontent') ){\n\t\t\t\t\t\t\t\t\t\$('user_link_menucontent').hide();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t" . $this->registry->getClass('output')->addJSModule("friends", "0") . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>" : "\n\t\t\t\t\t<div id='user_navigation' class='not_logged_in'>\n\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login", 'public', ''), "", "") . "' title='{$this->lang->words['sign_in']}'>" . $this->registry->getClass('output')->getReplacement("signin_icon") . " {$this->lang->words['sign_in']}</a>\n\t\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=register", 'public', ''), "", "") . "\" title='{$this->lang->words['register']}'>" . $this->registry->getClass('output')->getReplacement("register_icon") . " {$this->lang->words['register']}</a>\n\t\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=help", 'public', ''), "", "") . "\" title='{$this->lang->words['view_help']}' rel=\"help\" accesskey='6'>" . $this->registry->getClass('output')->getReplacement("help_icon") . " {$this->lang->words['sj_help']}</a>\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t") . "\n\t\t\t\n\t\t\t\t<div id='primary_nav'>\n\t\t\t\t\t<div id='search'>\n\t\t\t\t\t\t" . (!in_array($this->settings['search_method'], array('traditional', 'sphinx')) ? "\n\t\t\t\t\t\t<form action=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=quick_search&search_filter_app[all]=1", 'public', ''), "", "") . "\" method=\"post\" id='search-box' >\n\t\t\t\t\t\t" : "<form action=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=quick_search&search_filter_app[" . (!empty($this->request['search_app']) ? "{$this->request['search_app']}" : "" . (IPSSearchIndex::appIsSearchable($this->registry->getCurrentApplication()) ? "{$this->registry->getCurrentApplication()}" : "forums") . "") . "]=1", 'public', ''), "", "") . "\" method=\"post\" id='search-box' >") . "\n\t\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<label for='main_search' class='hide'>{$this->lang->words['sj_search']}</label>\n\t\t\t\t\t\t\t\t<input type='text' id='main_search' name='search_term' class='text_input' size='17' tabindex='6' />\n\t\t\t\t\t\t\t\t<input type='submit' class='submit_input' value='{$this->lang->words['sj_search']}' />\n\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search", 'public', ''), "", "") . "' title='{$this->lang->words['advanced_search']}' accesskey='4' rel=\"search\" id='adv_search'>{$this->lang->words['advanced']}</a>\n\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</div>\n\t\t\t\t\t<ul>\n\t\t\t\t\t" . ($this->settings['home_url'] ? "\n\t\t\t\t\t\t\t<li id='nav_home' class='left'><a href='{$this->settings['home_url']}' title='{$this->lang->words['homepage_title']}' rel=\"home\">{$this->settings['home_name']}</a></li>\n\t\t\t\t\t\t" : "") . " \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t" . ((is_array($header_items['applications']) and count($header_items['applications'])) ? "\n\t\t\t\t\t\t\t" . $this->__f__f3ef81aefc61e1ddbb3a00ce02d56217($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t" . (is_array($items['pmData']) ? "<div id='pm_notification'>\n\t\t\t\t\t\t<div id='pm_wrap'>\n\t\t\t\t\t\t\t<img src='{$items['pmData']['authorData']['pp_thumb_photo']}' alt=\"{$items['pmData']['authorData']['members_display_name']}{$this->lang->words['users_photo']}\" width='{$items['pmData']['authorData']['pp_thumb_width']}' height='{$items['pmData']['authorData']['pp_thumb_height']}' class='photo' />\n\t\t\t\t\t\t\t<h2>{$items['pmData']['authorData']['members_display_name']} " . ($items['pmData']['_type'] == 'new' ? "{$this->lang->words['sent_new_convo']}" : "{$this->lang->words['replied_convo']}") . "</h2>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<strong>{$this->lang->words['pc_subject']}</strong> {$items['pmData']['mt_title']}<br />\n\t\t\t\t\t\t\t\t<strong>{$this->lang->words['pc_replies']}</strong> " . intval($items['pmData']['mt_replies']) . "<br />\n\t\t\t\t\t\t\t\t<strong>{$this->lang->words['pc_sent']}</strong> " . $this->registry->getClass('class_localization')->getDate($items['pmData']['msg_date'], "short", 0) . "\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<p class='excerpt'>\n\t\t\t\t\t\t\t\t" . IPSText::truncate($items['pmData']['msg_post'], 500) . "\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<ul class='topic_buttons ok_thanks'>\n\t\t\t\t\t\t\t\t<li><a href='#j_content' id='close_pm_notification'><img src='{$this->settings['img_url']}/cross.png' alt='{$this->lang->words['icon']}' /> {$this->lang->words['ignore_conversation']}</a></li>\n\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=messaging&section=view&do=findMessage&topicID={$items['pmData']['mt_id']}&msgID=__firstUnread__", 'public', ''), "", "") . "'><img src='{$this->settings['img_url']}/email.png' alt='{$this->lang->words['icon']}' /> {$this->lang->words['global_pm_read']}</a></li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\$('pm_notification').hide();\n\t\t\t\t\t</script>" : "") . "\n\t\t\t\n\t\t\t<!-- NAVIGATION TOP LEFT\t<div id='secondary_nav'>\n\t\t\t\t\t<ul id='breadcrumb' class='left'>\n\t\t\t\t\t\t\t\t\t\t\t\t" . ((!$this->settings['remove_forums_nav'] or ipsRegistry::$current_application == 'forums') ? "<li class='first'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("act=idx", 'public', ''), "false", "") . "'>{$this->settings['board_name']}</a></li>\n\t\t\t\t\t\t\t" . (($this->did_first = 1) ? "" : "") . "" : "") . " \n\t\t\t\t\t\t" . $this->__f__ce9338f8ac36f63d75adce3df1cb47a3($html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats) . "\t\t\t\t\t</ul>\n\t\t\t\t\t<ul id='section_links' class='right'>\n\t\t\t\t\t\t" . (($this->settings['gl_show'] and $this->settings['gl_title']) ? "<li><a href='" . ($this->settings['gl_link'] ? "{$this->settings['gl_link']}" : "" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&module=extras&section=boardrules", 'public', ''), "", "") . "") . "'>" . ($this->settings['gl_title'] ? "{$this->settings['gl_title']}" : "{$this->lang->words['board_rules']}") . "</a></li>" : "") . "\n\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=search&do=new_posts&search_filter_app[" . (($this->registry->getCurrentApplication() != 'core' and IPSSearchIndex::appIsSearchable($this->registry->getCurrentApplication())) ? "{$this->registry->getCurrentApplication()}" : "forums") . "]=1", 'public', ''), "", "") . "' accesskey='2'>{$this->lang->words['view_new_posts']}</a></li>\n\t\t\t\t\t\t<li><img src='{$this->settings['img_url']}/feed.png' alt='{$this->lang->words['rss_feed']}' id='rss_feed' class='clickable' /></li> \n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div> -->\n\t\t\t<div id='content' class='clear'>\n\t\t\t\t<a id='j_content'></a>\n\t\t\t\t" . ($html ? "{$html}" : "") . "\n\t\t\t\t<br class='clear' />\n\t\t\t</div>\n\t\t\t<div id='footer_utilities' class='clearfix clear rounded'>\n\t\t\t\t<h2 class='hide'>{$this->lang->words['skin_and_lang']}</h2>\n\t\t\t\t" . (($this->settings['allow_skins'] and $footer_items['skin_chooser']) ? "" . (($this->memberData['userAgentLocked'] and !$this->memberData['userAgentBypass']) ? "\n\t\t\t\t\t\t<p id='useragent_msg'>\n\t\t\t\t\t\t\t{$this->lang->words['skin_browser_set']} <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$this->settings['query_string_formatted']}&unlockUserAgent=1", 'public', ''), "", "") . "'>{$this->lang->words['override_browser_theme']}</a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t" : "\n\t\t\t\t\t\t<form action=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$this->settings['query_string_formatted']}", 'public', ''), "", "") . "\" method=\"post\" class='left'>\n\t\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t\t<input type='hidden' name='k' value='{$this->member->form_hash}' />\n\t\t\t\t\t\t\t\t<label for='newSkin' class='hide'>{$this->lang->words['theme_prefix']}</label>\n\t\t\t\t\t\t\t\t<select name=\"settingNewSkin\" id='newSkin'>\n\t\t\t\t\t\t\t\t\t{$footer_items['skin_chooser']}\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t<input type='submit' value='{$this->lang->words['jmp_go']}' class='input_submit alt' id='newSkinSubmit' />\n\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t") . "" : "") . "\n\t\t\t\t<form action=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$this->settings['query_string_formatted']}", 'public', ''), "", "") . "\" method=\"post\" class='left'>\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type='hidden' name='k' value='{$this->member->form_hash}' />\n\t\t\t\t\t\t<input type='hidden' name='setlanguage' value='1' />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"langurlbits\" value=\"{$this->settings['query_string_safe']}&cal_id={$this->request['cal_id']}\" />\n\t\t\t\t\t\t<label for='newLang' class='hide'>{$this->lang->words['language_prefix']}</label>\n\t\t\t\t\t\t<select name=\"langid\" id='newLang'>\n\t\t\t\t\t\t\t\t{$footer_items['lang_chooser']}\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t<input type='submit' class='input_submit alt' value='{$this->lang->words['jmp_go']}' id='newLangSubmit' />\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t\t\t\t<h2 class='hide'>{$this->lang->words['exec_stats']}</h2>\n\t\t\t\t<ul class='right'>\n\t\t\t\t\t<li>{$this->lang->words['time_now']} {$footer_items['time']}\n\t\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['last_visit']) ? "<p>{$this->lang->words['you_last_visit']} " . $this->registry->getClass('class_localization')->getDate($this->memberData['last_visit'], "short", 0) . "</p>" : "") . "\n\t\t\t\t\t</li>\n\t\t\t\t\t" . (($this->memberData['member_id'] and $this->settings['debug_level']) ? "<li><img src='{$this->settings['img_url']}/stats_time.png' alt='{$this->lang->words['icon']}' /> {$stats['ex_time']} {$this->lang->words['stats_sec']}</li>\n\t\t\t\t\t\t<li><img src='{$this->settings['img_url']}/stats_server.png' alt='{$this->lang->words['icon']}' /> {$stats['server_load']}</li>\n\t\t\t\t\t\t<li><img src='{$this->settings['img_url']}/stats_database.png' alt='{$this->lang->words['icon']}' /> {$stats['queries']} " . (IPS_SQL_DEBUG_MODE ? "<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$this->settings['query_string_safe']}&debug=1", 'public', ''), "", "") . "'>" : "") . "{$this->lang->words['stats_queries']}" . (IPS_SQL_DEBUG_MODE ? "</a>" : "") . "</li>\n\t\t\t\t\t\t<li><img src='{$this->settings['img_url']}/stats_compression.png' alt='{$this->lang->words['icon']}' /> {$stats['gzip_status']}</li>" : "") . "\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<!-- __FOOTER__ -->\n\t\t\t<!-- /__FOOTER__ -->\n\t\t\t<!--DEBUG_STATS-->\n\t\t\t<div id='board_footer'>\n\t\t\t\t<ul id='utility_links' class='left'>\n\t\t\t\t\t<li><a href='#top' title='{$this->lang->words['go_to_top']}'>{$this->lang->words['back_to_top']}</a></li>\n\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("", 'public', ''), "", "") . "' title='{$this->lang->words['sj_home']}'>Home</a></li>\n\t\t\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=global&section=login&do=deleteCookies&k={$this->member->form_hash}", 'public', ''), "", "") . "\" title='{$this->lang->words['delete_all_cookies_title']}'>{$this->lang->words['delete_my_cookies']}</a></li>\n\t\t\t\t</ul>\n\t\t\t\t{$footer_items['copyright']}\n\t\t\t</div>\n\t\t\t{$stats['task']}\n\t\t\t" . ($this->settings['do_include_lightbox_real'] ? "" . $this->registry->getClass('output')->getTemplate('global')->include_lightbox_real() . "" : "") . "\n\t\t</div>\n\t</body>\n</html>"; return $IPBHTML; }
/** * Returns possible matches for the string input * * @access private * @return void Outputs to screen */ private function _getMemberNames() { //----------------------------------------- // INIT //----------------------------------------- $name = $this->convertAndMakeSafe(ipsRegistry::$request['name'], 0); //----------------------------------------- // Check length //----------------------------------------- if (IPSText::mbstrlen($name) < 3) { $this->returnJsonError('requestTooShort'); } //----------------------------------------- // Try query... //----------------------------------------- $this->DB->build(array('select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id', 'from' => array('members' => 'm'), 'where' => "LOWER(m.members_display_name) LIKE '" . $this->DB->addSlashes($name) . "%'", 'order' => $this->DB->buildLength('m.members_display_name') . ' ASC', 'limit' => array(0, 15), 'add_join' => array(array('select' => 'p.*', 'from' => array('profile_portal' => 'p'), 'where' => 'p.pp_member_id=m.member_id', 'type' => 'left')))); $this->DB->execute(); //----------------------------------------- // Got any results? //----------------------------------------- if (!$this->DB->getTotalRows()) { $this->returnJsonArray(array()); } $return = array(); while ($r = $this->DB->fetch()) { $photo = IPSMember::buildProfilePhoto($r); $group = IPSLib::makeNameFormatted('', $r['member_group_id']); $return[$r['member_id']] = array('name' => $r['members_display_name'], 'showas' => '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')', 'img' => $photo['pp_thumb_photo'], 'img_w' => $photo['pp_mini_width'], 'img_h' => $photo['pp_mini_height']); } $this->returnJsonArray($return); }
/** * Class entry point * * @param object ipsRegistry reference * @return @e void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { /* INIT */ $smilie_id = 0; $editor_id = IPSText::alphanumericalClean($this->request['editor_id']); /* Query the emoticons */ $this->DB->build(array('select' => 'typed, image', 'from' => 'emoticons', 'where' => "emo_set='" . $this->registry->output->skin['set_emo_dir'] . "'")); $this->DB->execute(); /* Loop through and build output array */ $rows = array(); if ($this->DB->getTotalRows()) { while ($r = $this->DB->fetch()) { $smilie_id++; if (strstr($r['typed'], """)) { $in_delim = "'"; $out_delim = '"'; } else { $in_delim = '"'; $out_delim = "'"; } $rows[] = array('code' => stripslashes($r['typed']), 'image' => stripslashes($r['image']), 'in' => $in_delim, 'out' => $out_delim, 'smilie_id' => $smilie_id); } } /* Output */ $this->returnHtml($this->registry->getClass('output')->getTemplate('legends')->emoticonPopUpList($editor_id, $rows)); }
/** * Refresh the captcha image * * @return @e void [Outputs to screen] */ public function refresh() { $captcha_unique_id = trim(IPSText::alphanumericalClean(ipsRegistry::$request['captcha_unique_id'])); $template = $this->registry->getClass('class_captcha')->getTemplate($captcha_unique_id); $newUniqueID = $this->registry->getClass('class_captcha')->captchaKey; $this->returnString($newUniqueID); }
/** * Grab the RSS document content and return it * * @return string RSS document */ public function returnRSSDocument() { //----------------------------------------- // INIT //----------------------------------------- $member_id = intval(ipsRegistry::$request['member_id']); $secure_key = IPSText::md5Clean(ipsRegistry::$request['rss_key']); $rss_data = array(); $to_print = ''; if ($secure_key and $member_id) { if ($member_id == ipsRegistry::member()->getProperty('member_id')) { //----------------------------------------- // Get RSS export //----------------------------------------- $rss_data = ipsRegistry::DB()->buildAndFetch(array('select' => 'rss_cache', 'from' => 'rc_modpref', 'where' => "mem_id=" . $member_id . " AND rss_key='" . $secure_key . "'")); //----------------------------------------- // Got one? //----------------------------------------- if ($rss_data['rss_cache']) { return $rss_data['rss_cache']; } } //----------------------------------------- // Create a dummy one //----------------------------------------- ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_reports'), 'core'); $classToLoad = IPSLib::loadLibrary(IPS_KERNEL_PATH . 'classRss.php', 'classRss'); $rss = new $classToLoad(); $channel_id = $rss->createNewChannel(array('title' => ipsRegistry::getClass('class_localization')->words['rss_feed_title'], 'link' => ipsRegistry::$settings['board_url'], 'description' => ipsRegistry::getClass('class_localization')->words['reports_rss_desc'], 'pubDate' => $rss->formatDate(time()))); $rss->createRssDocument(); return $rss->rss_document; } }
/** * Main class entry point * * @param object ipsRegistry reference * @return @e void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // Got sess ID and mem ID? //----------------------------------------- if (!$this->member->getProperty('member_id')) { $this->returnString("no"); } //----------------------------------------- // Check that we have the key //----------------------------------------- if ($this->settings['ipb_reg_number']) { $this->settings['ipschat_account_key'] = $this->settings['ipb_reg_number']; } if (!$this->settings['ipschat_account_key']) { $this->returnString("no"); } //----------------------------------------- // Can we access? //----------------------------------------- $access_groups = explode(",", $this->settings['ipschat_group_access']); $my_groups = array($this->memberData['member_group_id']); if ($this->memberData['mgroup_others']) { $my_groups = array_merge($my_groups, explode(",", IPSText::cleanPermString($this->memberData['mgroup_others']))); } $access_allowed = false; foreach ($my_groups as $group_id) { if (in_array($group_id, $access_groups)) { $access_allowed = 1; break; } } if (!$access_allowed) { $this->returnString("no"); } if ($this->memberData['chat_banned']) { $this->returnString("no"); } $permissions = 0; if ($this->settings['ipschat_mods']) { $mod_groups = explode(",", $this->settings['ipschat_mods']); foreach ($my_groups as $group_id) { if (in_array($group_id, $mod_groups)) { $permissions = 1; break; } } } if (!$permissions) { $this->returnString("no"); } //----------------------------------------- // Ban member //----------------------------------------- IPSMember::save($this->request['id'], array('core' => array('chat_banned' => 1))); //----------------------------------------- // Something to return //----------------------------------------- $this->returnString("ok"); }
/** * Class entry point * * @param object Registry reference * @return @e void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // INIT //----------------------------------------- $member_id = intval(ipsRegistry::$request['member_id']); $md5check = IPSText::md5Clean($this->request['md5check']); $CONFIG = array(); $tab = explode(':', ipsRegistry::$request['tab']); $app = substr(IPSText::alphanumericalClean(str_replace('..', '', trim($tab[0]))), 0, 20); $tab = substr(IPSText::alphanumericalClean(str_replace('..', '', trim($tab[1]))), 0, 20); $this->registry->class_localization->loadLanguageFile(array('public_profile'), 'members'); //----------------------------------------- // MD5 check //----------------------------------------- if ($md5check != $this->member->form_hash) { $this->returnString('error'); } //----------------------------------------- // Load member //----------------------------------------- $member = IPSMember::load($member_id); //----------------------------------------- // Check //----------------------------------------- if (!$member['member_id']) { $this->returnString('error'); } //----------------------------------------- // Load config //----------------------------------------- if (!is_file(IPSLib::getAppDir($app) . '/extensions/profileTabs/' . $tab . '.conf.php')) { $this->returnString('error'); } require IPSLib::getAppDir($app) . '/extensions/profileTabs/' . $tab . '.conf.php'; /*noLibHook*/ //----------------------------------------- // Active? //----------------------------------------- if (!$CONFIG['plugin_enabled']) { $this->returnString('error'); } //----------------------------------------- // Load main class... //----------------------------------------- if (!is_file(IPSLib::getAppDir($app) . '/extensions/profileTabs/' . $tab . '.php')) { $this->returnString('error'); } require IPSLib::getAppDir('members') . '/sources/tabs/pluginParentClass.php'; /*noLibHook*/ $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir($app) . '/extensions/profileTabs/' . $tab . '.php', 'profile_' . $tab, $app); $plugin = new $classToLoad($this->registry); $html = $plugin->return_html_block($member); //----------------------------------------- // Return it... //----------------------------------------- $this->returnHtml($html); }
/** * Run a task * * @access public * @return void */ public function runTask() { if (ipsRegistry::$request['ck'] and ipsRegistry::$request['ck']) { $this->type = 'cron'; $this->cron_key = substr(trim(stripslashes(IPSText::alphanumericalClean(ipsRegistry::$request['ck']))), 0, 32); } if ($this->type == 'internal') { //----------------------------------------- // Loaded by our image... // ... get next job //----------------------------------------- $this_task = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'task_manager', 'where' => 'task_enabled = 1 AND task_next_run <= ' . $this->time_now, 'order' => 'task_next_run ASC', 'limit' => array(0, 1))); } else { //----------------------------------------- // Cron.. load from cron key //----------------------------------------- $this_task = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'task_manager', 'where' => "task_cronkey='" . $this->cron_key . "'")); } if ($this_task['task_id']) { //----------------------------------------- // Locked? //----------------------------------------- if ($this_task['task_locked'] > 0) { # Yes - now, how long has it been locked for? # If longer than 30 mins, unlock as something # has gone wrong. if ($this_task['task_locked'] < time() - 1800) { $newdate = $this->generateNextRun($this_task); $this->DB->update('task_manager', array('task_next_run' => $newdate, 'task_locked' => 0), "task_id=" . $this_task['task_id']); $this->saveNextRunStamp(); } # Cancel and return return; } //----------------------------------------- // Got it, now update row, lock and run.. //----------------------------------------- $newdate = $this->generateNextRun($this_task); $this->DB->update('task_manager', array('task_next_run' => $newdate, 'task_locked' => time()), "task_id=" . $this_task['task_id']); $this->saveNextRunStamp(); if (file_exists(IPSLib::getAppDir($this_task['task_application']) . '/tasks/' . $this_task['task_file'])) { require_once IPSLib::getAppDir($this_task['task_application']) . '/tasks/' . $this_task['task_file']; $myobj = new task_item($this->registry, $this, $this_task); $myobj->runTask(); //----------------------------------------- // Any shutdown queries //----------------------------------------- $this->DB->return_die = 0; if (count($this->DB->obj['shutdown_queries'])) { foreach ($this->DB->obj['shutdown_queries'] as $q) { $this->DB->query($q); } } $this->DB->return_die = 1; $this->DB->obj['shutdown_queries'] = array(); } } }
function comment($r, $parent, $settings) { $IPBHTML = ""; // Adjust author name as needed if (empty($r['author']['member_id']) && !empty($r['author']['comment_author_name'])) { $r['author']['members_display_name'] = $r['author']['comment_author_name']; } $IPBHTML .= "<a id='comment_{$r['comment']['comment_id']}'></a>\n<div class=\"row\" id=\"comment-{$r['comment']['comment_id']}\">\n\t<div class='icon'>\n\t\t<img src='{$r['author']['pp_thumb_photo']}' width='{$r['author']['pp_thumb_width']}' height='{$r['author']['pp_thumb_height']}' class='photo' />\n\t</div>\n\t<div class='rowContent'>\n\t\t<h4>" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userHoverCard') ? $this->registry->getClass('output')->getTemplate('global')->userHoverCard($r['author']) : '') . ", <span class='desc'>" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($r['comment']['comment_date'], "short", 0)) . "</span></h4>\n\t\t{$r['comment']['comment_text']}\n\t</div>\n</div>"; return $IPBHTML; }
/** * Get tags as pop-up window * * @return @e void */ protected function _getTagsAsPopUp() { /* init */ $tag_aai_lookup = IPSText::md5Clean($this->request['key']); /* Init tags */ require_once IPS_ROOT_PATH . 'sources/classes/tags/bootstrap.php'; /*noLibHook*/ $tagClass = classes_tags_bootstrap::run($tag_aai_lookup); $formatted = $tagClass->getTagsByCacheKey($tag_aai_lookup); return $this->returnHtml($this->registry->output->getTemplate('global_other')->tagsAsPopUp($formatted)); }
/** * Redirect to Twitter * Exciting, isn't it. * * @access private * @param string Plug in * @note Removed utf8_encode() call around the title due to the linked bug report * @link http://community.invisionpower.com/resources/bugs.html/_/ip-board/twitter-share-buttonbox-r41010 */ public function share($title, $url) { $title = IPSText::convertCharsets($title, IPS_DOC_CHAR_SET, 'utf-8'); $hashMan = $this->settings['twitter_hashtag']; if ($hashMan && substr($hashMan, 0, 1) != '#') { $hashMan = urlencode('#' . $hashMan); } $hashMan = $hashMan ? '%20' . $hashMan : ''; $url = "http://twitter.com/intent/tweet?status=" . urlencode($title) . '%20-%20' . urlencode($url) . $hashMan; $this->registry->output->silentRedirect($url); }
/** * Check the email address * * @access public * @return void [Outputs to screen] */ public function checkEmail() { //----------------------------------------- // INIT //----------------------------------------- $email = ''; if (is_string($_REQUEST['email'])) { $email = strtolower(IPSText::parseCleanValue(rawurldecode($_REQUEST['email']))); } if (!$email) { $this->returnString('found'); } if (!IPSText::checkEmailAddress($email)) { $this->returnString('found'); } //----------------------------------------- // Got the member? //----------------------------------------- if (!IPSMember::checkByEmail($email)) { //----------------------------------------- // Load ban filters //----------------------------------------- $this->DB->build(array('select' => '*', 'from' => 'banfilters')); $this->DB->execute(); while ($r = $this->DB->fetch()) { $banfilters[$r['ban_type']][] = $r['ban_content']; } //----------------------------------------- // Are they banned [EMAIL]? //----------------------------------------- if (is_array($banfilters['email']) and count($banfilters['email'])) { foreach ($banfilters['email'] as $memail) { $memail = str_replace("\\*", '.*', preg_quote($memail, "/")); if (preg_match("/{$memail}/", $email)) { $this->returnString('banned'); break; } } } //----------------------------------------- // Load handler... //----------------------------------------- require_once IPS_ROOT_PATH . 'sources/handlers/han_login.php'; $han_login = new han_login($this->registry); $han_login->init(); if ($han_login->emailExistsCheck($email)) { $this->returnString('found'); } $this->returnString('notfound'); } else { $this->returnString('found'); } }
function __f__a51c649dac47de7fc673a6fcd76e6a74($topic, $replies, $members, $jump = "") { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($replies as $msg_id => $msg) { $__iteratorCount++; $_ips___x_retval .= "\r\n\t\t<messageReply>\r\n\t\t\t<user>\r\n\t\t\t\t<id>{$msg['msg_author_id']}</id>\r\n\t\t\t\t<name><![CDATA[{$members[$msg['msg_author_id']]['members_display_name']}]]></name>\r\n\t\t\t\t<date>" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($msg['msg_date'], "DATE", 0)) . "</date>\r\n\t\t\t\t<avatar><![CDATA[{$members[$msg['msg_author_id']]['pp_thumb_photo']}]]></avatar>\r\n\t\t\t\t<url><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$msg['msg_author_id']}", "public", ''), "{$members[$msg['msg_author_id']]['members_seo_name']}", "showuser") . "]]></url>\r\n\t\t\t</user>\t\r\n\t\t\t<date>" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($msg['post']['post_date'], "DATE", 0)) . "</date>\r\n\t\t\t<text><![CDATA[{$msg['msg_post']}\r\n\t\t\t{$msg['attachmentHtml']}]]></text>\r\n\t\t\t<options>\r\n\t\t\t" . (($topic['_canReport'] and $this->memberData['member_id']) ? "\r\n\t\t\t\t<reportURL><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&module=reports&rcom=messages&topicID={$this->request['topicID']}&st={$this->request['st']}&msg={$msg['msg_id']}", "public", ''), "", "") . "]]></reportURL>\r\n\t\t\t" : "") . "\r\n\t\t\t\r\n\t\t\t" . ($msg['_canEdit'] === TRUE ? "\r\n\t\t\t\t<editURL><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("module=messaging&section=send&do=editMessage&topicID={$topic['mt_id']}&msgID={$msg['msg_id']}", "publicWithApp", ''), "", "") . "]]></editURL>\r\n\t\t\t" : "") . "\r\n\t\t\t\r\n\t\t\t" . ($msg['_canDelete'] === TRUE && $msg['msg_is_first_post'] != 1 ? "\r\n\t\t\t\t<deleteURL><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("module=messaging&section=send&do=deleteReply&topicID={$topic['mt_id']}&msgID={$msg['msg_id']}&authKey={$this->member->form_hash}", "publicWithApp", ''), "", "") . "]]></deleteURL>\r\n\t\t\t" : "") . "\r\n\t\t\t\r\n\t\t\t" . (($topic['_canReply'] and empty($topic['_everyoneElseHasLeft'])) ? "\r\n\t\t\t\t<replyURL><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("module=messaging&section=send&do=replyForm&topicID={$topic['mt_id']}&msgID={$msg['msg_id']}", "publicWithApp", ''), "", "") . "]]></replyURL>\r\n\t\t\t" : "") . "\r\n\t\t\t\t</options>\t\t\t\t\t\t\t\r\n\t\t</messageReply>\r\n\t\r\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
function __f__5d3660a62477933eaa026ede06d9eee7($forum_data, $announce_data, $topic_data, $other_data, $multi_mod_data, $sub_forum_data, $footer_filter, $active_user_data, $mod_data, $inforum = 1, $_data = '') { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($_data['forum_data'] as $forum_id => $forum_data) { $__iteratorCount++; $_ips___x_retval .= "\r\n\t\t\t<forum>\r\n\t\t\t\t<id>{$forum_data['id']}</id>\r\n\t\t\t\t<title><![CDATA[{$forum_data['name']}]]></title>\r\n\t\t\t\t<url><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showforum={$forum_data['id']}", "public", ''), "{$forum_data['name_seo']}", "showforum") . "]]></url>\r\n\t\t\t\t<description><![CDATA[{$forum_data['description']}]]></description>\r\n\t\t\t\t\t" . ($forum_data['redirect_on'] ? "\t\t\t\t\t\t\t\r\n\t\t\t\t<type>redirect</type>\r\n\t\t\t\t\t" : "<type>{$forum_data['status']}</type>\r\n\t\t\t\t<topics>{$forum_data['topics']}</topics>\r\n\t\t\t\t<replies>{$forum_data['posts']}</replies>\r\n\t\t\t\t\t\t" . ($forum_data['_has_unread'] ? "\r\n\t\t\t\t\t\t\t<isRead>0</isRead>\r\n\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t<isRead>1</isRead>\r\n\t\t\t\t\t\t") . "\t\t\t\t\t\t\r\n\t\t\t\t<lastPost>\r\n\t\t\t\t\t\t" . ($forum_data['hide_last_info'] ? "\r\n\t\t\t\t\t<name>{$this->lang->words['f_protected']}</name>\r\n\t\t\t\t\t\t" : "<date>" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($forum_data['last_post'], "DATE", 0)) . "</date>\r\n\t\t\t\t\t<name><![CDATA[{$forum_data['last_title']}]]></name>\r\n\t\t\t\t\t<id>{$forum_data['last_id']}</id>\r\n\t\t\t\t\t<url><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showtopic={$forum_data['last_id']}&view=getnewpost", "public", ''), "{$forum_data['seo_last_title']}", "showtopic") . "]]></url>\r\n\t\t\t\t\t<user>\r\n\t\t\t\t\t\t\t" . ($forum_data['last_poster_id'] ? "\t\t\t\t\t\t\r\n\t\t\t\t\t\t<id>{$forum_data['last_poster_id']}</id>\r\n\t\t\t\t\t\t<name><![CDATA[{$forum_data['last_poster_name']}]]></name>\r\n\t\t\t\t\t\t<url><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$forum_data['last_poster_id']}", "public", ''), "{$forum_data['seo_last_name']}", "showuser") . "]]></url>\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t<id>0</id>\r\n\t\t\t\t\t\t<name><![CDATA[{$this->settings['guest_name_pre']}{$forum_data['last_poster_name']}{$this->settings['guest_name_suf']}]]></name>\r\n\t\t\t\t\t\t<url></url>\r\n\t\t\t\t\t\t\t") . "\r\n\t\t\t\t\t</user>") . "\r\n\t\t\t\t</lastPost>") . "\r\n\t\t\t</forum>\r\n\t\t\t\r\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
function __f__7046da7023dc6898b789bfa2de184ba2($rows, $links = "", $defaults = array()) { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($rows as $session) { $__iteratorCount++; $_ips___x_retval .= "\r\n\t\t\t\t\t<tr class='" . IPSLib::next($this->registry->templateStriping["online"]) . "'>\r\n\t\t\t\t\t\t<td>" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userSmallPhoto') ? $this->registry->getClass('output')->getTemplate('global')->userSmallPhoto(array_merge($session['_memberData'], array('alt' => sprintf($this->lang->words['users_photo'], $session['_memberData']['members_display_name'] ? $session['_memberData']['members_display_name'] : $this->lang->words['global_guestname'])))) : '') . "</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . ($session['_memberData']['member_id'] ? "\r\n\t\t\t\t\t\t\t\t" . (method_exists($this->registry->getClass('output')->getTemplate('global'), 'userHoverCard') ? $this->registry->getClass('output')->getTemplate('global')->userHoverCard(array_merge($session['_memberData'], array('members_display_name' => IPSMember::makeNameFormatted($session['_memberData']['members_display_name'], $session['_memberData']['member_group_id'])))) : '') . "\r\n\t\t\t\t\t\t\t" : "" . ($session['member_name'] ? "\r\n\t\t\t\t\t\t\t\t\t" . IPSMember::makeNameFormatted($session['member_name'], $session['member_group']) . "\r\n\t\t\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t\t\t{$this->lang->words['global_guestname']}\r\n\t\t\t\t\t\t\t\t") . "") . "\r\n\t\t\t\t\t\t\t" . ($session['login_type'] == 1 ? "" . ($this->memberData['g_access_cp'] || $session['_memberData']['member_id'] == $this->memberData['member_id'] ? "*" : "") . "" : "") . "\r\n\t\t\t\t\t\t\t" . ($this->memberData['g_is_supmod'] ? "\r\n\t\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\t\t<span class='ip desc lighter ipsText_smaller'>({$session['ip_address']})</span>\r\n\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . (!$session['where_line'] || $session['in_error'] ? "\r\n\t\t\t\t\t\t\t\t{$this->lang->words['board_index']}\r\n\t\t\t\t\t\t\t" : "" . (($session['where_link'] and !$session['where_line_more']) ? "" . ($session['_whereLinkSeo'] ? "\r\n\t\t\t\t\t\t\t\t\t\t<a href='{$session['_whereLinkSeo']}'>\r\n\t\t\t\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$session['where_link']}", "public", ''), "", "") . "'>\r\n\t\t\t\t\t\t\t\t\t") . "" : "") . "\r\n\t\t\t\t\t\t\t\t{$session['where_line']} \r\n\t\t\t\t\t\t\t\t" . ($session['where_line_more'] ? " \r\n\t\t\t\t\t\t\t\t\t" . ($session['_whereLinkSeo'] ? "\r\n\t\t\t\t\t\t\t\t\t\t<a href='{$session['_whereLinkSeo']}'>\r\n\t\t\t\t\t\t\t\t\t" : "" . ($session['where_link'] ? "<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$session['where_link']}", "public", ''), "", "") . "'>" : "") . "") . "\r\n\t\t\t\t\t\t\t\t\t{$session['where_line_more']}\r\n\t\t\t\t\t\t\t\t\t" . ($session['where_link'] ? "</a>" : "") . "" : "" . ($session['where_link'] ? "</a>" : "") . "") . "") . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($session['running_time'], "long", 1)) . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . (($session['member_id'] and $session['member_name']) ? "<ul class='ipsList_inline ipsList_nowrap right'>\r\n\t\t\t\t\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['member_id'] != $session['member_id'] && $this->settings['friends_enabled'] and $this->memberData['g_can_add_friends']) ? "" . (IPSMember::checkFriendStatus($session['member_id']) ? "\r\n\t\t\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_friend' id='friend_online_{$session['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=friends&do=remove&member_id={$session['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['remove_friend']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("remove_friend") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_not_friend' id='friend_online_{$session['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=friends&do=add&member_id={$session['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['add_friend']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("add_friend") . "</a></li>\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t") . "" : "") . "\r\n\t\t\t\t\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['member_id'] != $session['member_id'] and $this->memberData['g_use_pm'] and $this->memberData['members_disable_pm'] == 0 and IPSLib::moduleIsEnabled('messaging', 'members')) ? "\r\n\t\t\t\t\t\t\t\t\t\t<li class='pm_button' id='pm_online_{$session['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=messaging&section=send&do=form&fromMemberID={$session['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['pm_member']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("send_msg") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t\t\t" . (($session['memberData']['has_blog'] and IPSLib::appIsInstalled('blog')) ? "\r\n\t\t\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=blog&module=display&section=blog&show_members_blogs={$session['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['view_blog']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("blog_link") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t\t\t" . (($session['memberData']['has_gallery'] and IPSLib::appIsInstalled('gallery')) ? "\r\n\t\t\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=gallery&user={$session['member_id']}", "public", ''), "{$session['memberData']['members_seo_name']}", "useralbum") . "' title='{$this->lang->words['view_gallery']}' class='ipsButton_secondary'>" . $this->registry->getClass('output')->getReplacement("gallery_link") . "</a></li>\r\n\t\t\t\t\t\t\t\t\t" : "") . "\r\n\t\t\t\t\t\t\t\t</ul>" : "\r\n\t\t\t\t\t\t\t\t<span class='desc'>{$this->lang->words['no_options_available']}</span>\r\n\t\t\t\t\t\t\t") . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\r\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
/** * Send API Call * * @param string Method * @param array Arguments * @return stdClass Object from returned JSON */ public function __call($method, $args) { $send = array_merge(array('key' => $this->api_key), (isset($args[0]) and is_array($args[0])) ? $args[0] : array()); if (IPS_DOC_CHAR_SET != 'UTF-8') { $send['message']['html'] = IPSText::convertCharsets($send['message']['html'], IPS_DOC_CHAR_SET, 'utf-8'); } $response = $this->cfm->postFileContents(self::URL . str_replace('_', '/', $method) . '.json', json_encode($send)); if ($json = json_decode($response)) { return $json; } return NULL; }
function __f__b02dcf2fa1efeb4a0b49e66f3160d9d5($rows, $links = "", $defaults = array()) { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($rows as $session) { $__iteratorCount++; $_ips___x_retval .= "\n\t\t\t<tr>\n\t\t\t\t<td class='row1'>\n\t\t\t\t\t<img src='{$session['_memberData']['pp_thumb_photo']}' alt=\"" . sprintf($this->lang->words['users_photo'], $session['_memberData']['members_display_name'] ? $session['_memberData']['members_display_name'] : $this->lang->words['global_guestname']) . "\" width='{$session['_memberData']['pp_thumb_width']}' height='{$session['_memberData']['pp_thumb_height']}' class='photo' />\n\t\t\t\t</td>\n\t\t\t\t<td class='" . IPSLib::next($this->registry->templateStriping["online"]) . "'>\n\t\t\t\t\t" . ($session['member_name'] ? "" . ($session['member_id'] ? "\n\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$session['member_id']}", "public", ''), "{$session['seo_name']}", "showuser") . "' title='{$this->lang->words['view_profile']}'>" . IPSMember::makeNameFormatted($session['member_name'], $session['member_group']) . "</a>\n\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t" . IPSMember::makeNameFormatted($session['member_name'], $session['member_group']) . "\n\t\t\t\t\t\t") . "" : "\n\t\t\t\t\t\t{$this->lang->words['global_guestname']}\n\t\t\t\t\t") . "\n\t\t\t\t\t" . ($session['login_type'] == 1 ? "" . ($this->memberData['g_access_cp'] ? "*" : "") . "" : "") . "\n\t\t\t\t\t" . ($this->memberData['g_access_cp'] ? "\n\t\t\t\t\t\t<span class='ip'>( {$session['ip_address']} )</span>\n\t\t\t\t\t" : "") . "\n\t\t\t\t</td>\n\t\t\t\t<td class='" . IPSLib::next($this->registry->templateStriping["online"]) . "'>\n\t\t\t\t\t" . (!$session['where_line'] || $session['in_error'] ? "\n\t\t\t\t\t\t{$this->lang->words['board_index']}\n\t\t\t\t\t" : "" . (($session['where_link'] and !$session['where_line_more']) ? "\n\t\t\t\t\t\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$session['where_link']}", "public", ''), "", "") . "'>\n\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t{$session['where_line']} \n\t\t\t\t\t\t" . ($session['where_line_more'] ? " \n\t\t\t\t\t\t\t" . ($session['_whereLinkSeo'] ? "\n\t\t\t\t\t\t\t\t<a href='{$session['_whereLinkSeo']}'>\n\t\t\t\t\t\t\t" : "" . ($session['where_link'] ? "<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("{$session['where_link']}", "public", ''), "", "") . "'>" : "") . "") . "\n\t\t\t\t\t\t\t{$session['where_line_more']}\n\t\t\t\t\t\t\t" . ($session['where_link'] ? "</a>" : "") . "" : "" . ($session['where_link'] ? "</a>" : "") . "") . "") . "\n\t\t\t\t</td>\n\t\t\t\t<td class='" . IPSLib::next($this->registry->templateStriping["online"]) . "'>\n\t\t\t\t\t" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($session['running_time'], "long", 1)) . "\n\t\t\t\t</td>\n\t\t\t\t<td class='" . IPSLib::next($this->registry->templateStriping["online"]) . "'>\n\t\t\t\t\t" . (($session['member_id'] and $session['member_name']) ? "<ul class='user_controls clear'>\n\t\t\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['member_id'] != $session['member_id'] && $this->settings['friends_enabled'] and $this->memberData['g_can_add_friends']) ? "" . (IPSMember::checkFriendStatus($session['member_id']) ? "\n\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_friend' id='friend_online_{$session['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=friends&do=remove&member_id={$session['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['remove_friend']}'>" . $this->registry->getClass('output')->getReplacement("remove_friend") . "</a></li>\n\t\t\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t\t\t<li class='mini_friend_toggle is_not_friend' id='friend_online_{$session['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=profile&section=friends&do=add&member_id={$session['member_id']}&secure_key={$this->member->form_hash}", "public", ''), "", "") . "' title='{$this->lang->words['add_friend']}'>" . $this->registry->getClass('output')->getReplacement("add_friend") . "</a></li>\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t") . "" : "") . "\n\t\t\t\t\t\t\t" . (($this->memberData['member_id'] and $this->memberData['member_id'] != $session['member_id'] and $this->memberData['g_use_pm'] and $this->memberData['members_disable_pm'] == 0 and IPSLib::moduleIsEnabled('messaging', 'members')) ? "\n\t\t\t\t\t\t\t\t<li class='pm_button' id='pm_online_{$session['member_id']}'><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&module=messaging&section=send&do=form&fromMemberID={$session['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['pm_member']}'>" . $this->registry->getClass('output')->getReplacement("send_msg") . "</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . (($session['memberData']['has_blog'] and IPSLib::appIsInstalled('blog')) ? "\n\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=blog&module=display&section=blog&show_members_blogs={$session['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['view_blog']}'>" . $this->registry->getClass('output')->getReplacement("blog_link") . "</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t\t" . (($session['memberData']['has_gallery'] and IPSLib::appIsInstalled('gallery')) ? "\n\t\t\t\t\t\t\t\t<li><a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=gallery&module=user&section=user&user={$session['member_id']}", "public", ''), "", "") . "' title='{$this->lang->words['view_gallery']}'>" . $this->registry->getClass('output')->getReplacement("gallery_link") . "</a></li>\n\t\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t</ul>" : "\n\t\t\t\t\t\t<span class='desc'>{$this->lang->words['no_options_available']}</span>\n\t\t\t\t\t") . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
function __f__852ffa03cc7ed989c57690205007c21a($lastvisit = "", $stats = array(), $cat_data = array(), $show_side_blocks = true, $side_blocks = array(), $_data = '') { $_ips___x_retval = ''; $__iteratorCount = 0; foreach ($_data['forum_data'] as $forum_id => $forum_data) { $__iteratorCount++; $_ips___x_retval .= "\n\t\t\t\t\t<forum>\n\t\t\t\t\t\t<id>{$forum_data['id']}</id>\n\t\t\t\t\t\t<name><![CDATA[{$forum_data['name']}]]></name>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<url><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showforum={$forum_data['id']}", "public", ''), "{$forum_data['name_seo']}", "showforum") . "]]></url>\n\t\t\t\t\t\t<description><![CDATA[{$forum_data['description']}]]></description>\n\t\t\t\t\t\t\t" . ($forum_data['redirect_on'] ? "\t\t\t\t\t\t\t\n\t\t\t\t\t\t<redirect>1</redirect>\n\t\t\t\t\t\t<redirectHits>{$forum_data['redirect_hits']}</redirectHits>\n\t\t\t\t\t\t<redirect_url><![CDATA[{$forum_data['redirect_url']}]]></redirect_url>\n\t\t\t\t\t\t\t" : "" . ($forum_data['_has_unread'] ? "\n\t\t\t\t\t\t\t<isRead>0</isRead>\n\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t<isRead>1</isRead>\n\t\t\t\t\t\t") . "\n\t\t\t\t\t\t<redirect>0</redirect>\n\t\t\t\t\t\t<type>{$forum_data['status']}</type>\n\t\t\t\t\t\t<topics>{$forum_data['topics']}</topics>\n\t\t\t\t\t\t<replies>{$forum_data['posts']}</replies>\n\t\t\t\t\t\t<lastpost>\n\t\t\t\t\t\t\t\t" . ($forum_data['hide_last_info'] ? "\n\t\t\t\t\t\t\t<name>{$this->lang->words['f_protected']}</name>\n\t\t\t\t\t\t\t\t" : "<date>" . IPSText::htmlspecialchars($this->registry->getClass('class_localization')->getDate($forum_data['last_post'], "DATE", 0)) . "</date>\n\t\t\t\t\t\t\t<name><![CDATA[{$forum_data['last_title']}]]></name>\n\t\t\t\t\t\t\t<id>{$forum_data['last_id']}</id>\n\t\t\t\t\t\t\t<url><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showtopic={$forum_data['last_id']}&view=getnewpost", "public", ''), "{$forum_data['seo_last_title']}", "showtopic") . "]]></url>\n\t\t\t\t\t\t\t<user>\n\t\t\t\t\t\t\t\t" . ($forum_data['last_poster_id'] ? "\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<id>{$forum_data['last_poster_id']}</id>\n\t\t\t\t\t\t\t\t<name><![CDATA[{$forum_data['last_poster_name']}]]></name>\n\t\t\t\t\t\t\t\t<url><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$forum_data['last_poster_id']}", "public", ''), "{$forum_data['seo_last_name']}", "showuser") . "]]></url>\n\t\t\t\t\t\t\t\t\t" : "\n\t\t\t\t\t\t\t\t<id>0</id>\n\t\t\t\t\t\t\t\t<name><![CDATA[{$this->settings['guest_name_pre']}{$forum_data['last_poster_name']}{$this->settings['guest_name_suf']}]]></name>\n\t\t\t\t\t\t\t\t<url></url>\n\t\t\t\t\t\t\t\t") . "\n\t\t\t\t\t\t\t</user>") . "\n\t\t\t\t\t\t</lastpost>") . "\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t" . (($forum_data['show_subforums'] and count($forum_data['subforums']) and $forum_data['show_subforums']) ? "\n\t\t\t\t\t\t<subforums>\n\t\t\t\t\t\t\t\t\t\t\t" . $this->__f__3f7af29c3c1c98cfbaa59ecd61896319($lastvisit, $stats, $cat_data, $show_side_blocks, $side_blocks, $_data, $forum_id, $forum_data) . "\t\t\t\t\t\t</subforums>\n\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t</forum>\n\t\t\t\t\t\t\n"; } $_ips___x_retval .= ''; unset($__iteratorCount); return $_ips___x_retval; }
/** * return HTML block * * @access public * @param array Member information * @return string HTML block */ public function return_html_block($member = array()) { /* Get blog API */ require_once IPS_ROOT_PATH . 'api/api_core.php'; require_once IPS_ROOT_PATH . 'api/blog/api_blog.php'; /* Create API Object */ $blog_api = new apiBlog(); /* Language */ $this->lang->loadLanguageFile(array('public_portal'), 'blog'); $content = ''; $blog_url = $blog_api->getBlogUrl($blog_api->getBlogID($member['member_id'])); $this->lang->words['visit_blog'] = "<a href=\"{$blog_url}\">{$this->lang->words['visit_blog']}</a>"; $entry_content = ''; $entries = $blog_api->lastXEntries('member', $member['member_id'], 5); if (is_array($entries) && count($entries)) { $attachments = 0; $entry_ids = array(); foreach ($entries as $row) { $row['_post_date'] = ipsRegistry::getClass('class_localization')->getDate($row['entry_date'], 'SHORT'); $row['_date_array'] = IPSTime::date_getgmdate($row['entry_date'] + ipsRegistry::getClass('class_localization')->getTimeOffset()); $entry_ids[$row['entry_id']] = $row['entry_id']; IPSText::getTextClass('bbcode')->parse_html = $row['entry_html_state'] ? 1 : 0; IPSText::getTextClass('bbcode')->parse_nl2br = $row['entry_html_state'] == 2 ? 1 : 0; IPSText::getTextClass('bbcode')->parse_bbcode = 1; IPSText::getTextClass('bbcode')->parsing_section = 'blog'; $row['post'] = IPSText::getTextClass('bbcode')->preDisplayParse($row['entry']); $row['post'] = IPSText::getTextClass('bbcode')->memberViewImages($row['post']); if ($row['entry_has_attach']) { $parseAttachments = true; } $entry_content .= $this->registry->output->getTemplate('profile')->tabSingleColumn($row, $this->lang->words['readentry'], $row['entry_url'], $row['entry_name']); } //----------------------------------------- // Attachments (but only if necessary) //----------------------------------------- if ($parseAttachments and !is_object($this->class_attach)) { require_once IPSLib::getAppDir('core') . '/sources/classes/attach/class_attach.php'; $this->class_attach = new class_attach($this->registry); $this->class_attach->type = 'blogentry'; $this->class_attach->init(); $entry_content = $this->class_attach->renderAttachments($entry_content, $entry_ids, 'blog_show'); $entry_content = $entry_content[0]['html']; } $content = $this->registry->output->getTemplate('blog_portal')->profileTabWrap($this->lang->words['visit_blog'], $entry_content); } else { $content .= $this->registry->output->getTemplate('profile')->tabNoContent('noblogentries'); } //----------------------------------------- // Return content.. //----------------------------------------- return $content; }
/** * Main class entry point * * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ public function doExecute(ipsRegistry $registry) { //----------------------------------------- // Check online/offline first //----------------------------------------- if (!$this->settings['ccs_online']) { $show = false; if ($this->settings['ccs_offline_groups']) { $groups = explode(',', $this->settings['ccs_offline_groups']); $myGroups = array($this->memberData['member_group_id']); $secondary = IPSText::cleanPermString($this->memberData['mgroup_others']); $secondary = explode(',', $secondary); if (count($secondary)) { $myGroups = array_merge($myGroups, $secondary); } foreach ($myGroups as $groupId) { if (in_array($groupId, $groups)) { $show = true; break; } } } if (!$show) { $this->registry->output->showError($this->settings['ccs_offline_message']); } } //----------------------------------------- // Load skin file //----------------------------------------- require_once IPSLib::getAppDir('ccs') . '/sources/pages.php'; $this->pageBuilder = new pageBuilder($this->registry); $this->pageBuilder->loadSkinFile(); //----------------------------------------- // Load Language //----------------------------------------- ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_lang')); //----------------------------------------- // What to do? //----------------------------------------- switch ($this->request['do']) { case 'redirect': $this->_redirector(); break; case 'blockPreview': $this->_showBlockPreview(); break; default: $this->_view(); break; } }
function forward_form($title = "", $text = "", $lang = "", $captchaHTML = '', $msg = '') { $IPBHTML = ""; if (IPSLib::locationHasHooks('skin_emails', $this->_funcHooks['forward_form'])) { $count_7c5bc7202e6623ca381ed344e9ec6db0 = is_array($this->functionData['forward_form']) ? count($this->functionData['forward_form']) : 0; $this->functionData['forward_form'][$count_7c5bc7202e6623ca381ed344e9ec6db0]['title'] = $title; $this->functionData['forward_form'][$count_7c5bc7202e6623ca381ed344e9ec6db0]['text'] = $text; $this->functionData['forward_form'][$count_7c5bc7202e6623ca381ed344e9ec6db0]['lang'] = $lang; $this->functionData['forward_form'][$count_7c5bc7202e6623ca381ed344e9ec6db0]['captchaHTML'] = $captchaHTML; $this->functionData['forward_form'][$count_7c5bc7202e6623ca381ed344e9ec6db0]['msg'] = $msg; } $IPBHTML .= "<form action=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&module=extras&section=forward", "public", ''), "", "") . "\" method=\"post\" name='REPLIER'>\n\t<input type=\"hidden\" name=\"do\" value=\"01\" />\n\t<input type=\"hidden\" name=\"st\" value=\"{$this->request['st']}\" />\n\t<input type=\"hidden\" name=\"f\" value=\"{$this->request['f']}\" />\n\t<input type=\"hidden\" name=\"t\" value=\"{$this->request['t']}\" />\n\t<input type=\"hidden\" name=\"url\" value=\"{$this->request['url']}\" />\n\t<input type=\"hidden\" name=\"title\" value=\"{$this->request['title']}\" />\n\t<input type='hidden' name='k' value='{$this->member->form_hash}' />\n\t" . ($msg ? "\n\t\t<p class='message error'>{$this->lang->words[$msg]}</p><br />\n\t" : "\n\t\t<p class='message'>{$this->lang->words['email_friend']}</p><br />\n\t") . "\n\t\n\t<h2 class='maintitle'>{$this->lang->words['title']}</h2>\n\t<div class='generic_bar'></div>\n\t<div class='ipsForm ipsForm_horizontal'>\n\t\t<fieldset>\n\t\t\t<h3 class='bar'>{$this->lang->words['email_recepient']}</h3>\n\t\t\t<ul class='ipsPad'>\n\t\t\t\t" . (count($this->caches['lang_data']) == 1 ? "\n\t\t\t\t\t<input type='hidden' name='lang' value='{$this->caches['lang_data'][0]['lang_id']}' />\n\t\t\t\t" : "\n\t\t\t\t\t<li class='ipsField clear'>\n\t\t\t\t\t\t<label for='to_lang' class='ipsField_title'>{$this->lang->words['send_lang']}</label>\n\t\t\t\t\t\t<p class='ipsField_content'>\n\t\t\t\t\t\t\t<select name='lang' class='input_select' id='to_lang'>\n\t\t\t\t\t\t\t\t" . $this->__f__51cb3b5822a1e12831217597c9a44779($title, $text, $lang, $captchaHTML, $msg) . "\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</li>\n\t\t\t\t") . "\n\t\t\t\t<li class='ipsField clear'>\n\t\t\t\t\t<label for='to_name' class='ipsField_title'>{$this->lang->words['to_name']}</label>\n\t\t\t\t\t<p class='ipsField_content'>\n\t\t\t\t\t\t<input type=\"text\" id='to_name' class='input_text' name=\"to_name\" value=\"{$this->request['to_name']}\" size=\"30\" maxlength=\"100\" />\n\t\t\t\t\t</p>\n\t\t\t\t</li>\n\t\t\t\t<li class='ipsField clear'>\n\t\t\t\t\t<label for='to_email' class='ipsField_title'>{$this->lang->words['to_email']}</label>\n\t\t\t\t\t<p class='ipsField_content'>\n\t\t\t\t\t\t<input type=\"text\" id='to_email' class='input_text' name=\"to_email\" value=\"{$this->request['to_email']}\" size=\"30\" maxlength=\"100\" />\n\t\t\t\t\t</p>\n\t\t\t\t</li>\n\t\t\t\t<li class='ipsField clear'> \n\t\t\t\t\t<label for='subject' class='ipsField_title'>{$this->lang->words['subject']}</label>\n\t\t\t\t\t<p class='ipsField_content'>\n\t\t\t\t\t\t<input type=\"text\" id=\"subject\" class=\"input_text\" name=\"subject\" value=\"" . ($this->request['subject'] ? "{$this->request['subject']}" : "{$title}") . "\" size=\"30\" maxlength=\"120\" />\n\t\t\t\t\t</p>\n\t\t\t\t</li> \t\t\t\t\n\t\t\t\t<li class='ipsField clear'>\n\t\t\t\t\t<label for='to_message' class='ipsField_title'>{$this->lang->words['message']}</label>\n\t\t\t\t\t<p class='ipsField_content'>\n\t\t\t\t\t\t<textarea id='to_message' cols=\"60\" rows=\"12\" wrap=\"soft\" name=\"message\" class=\"input_text\">" . ($this->request['message'] ? "" . IPSText::br2nl($this->request['message']) . "" : "{$text}") . "</textarea>\n\t\t\t\t\t</p>\n\t\t\t\t</li>\n\t\t\t\t" . ($captchaHTML ? "\n\t\t\t\t\t<li class='ipsField clear'>\n\t\t\t\t\t\t{$captchaHTML}\n\t\t\t\t\t</li>\n\t\t\t\t" : "") . "\n\t\t\t</ul>\n\t\t</fieldset>\n\t\t<fieldset class='submit'>\n\t\t\t<input class='input_submit' type=\"submit\" value=\"{$this->lang->words['submit_send']}\" />\n\t\t</fieldset>\n\t</div>\n</form>"; return $IPBHTML; }
/** * Class entry point * * @param object Registry reference * @return @e void [Outputs to screen/redirects] */ public function doExecute(ipsRegistry $registry) { /* Get board rule (not cached) */ $row = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'core_sys_conf_settings', 'where' => "conf_key='gl_guidelines'")); IPSText::getTextClass('bbcode')->parse_smilies = 1; IPSText::getTextClass('bbcode')->parse_html = 1; IPSText::getTextClass('bbcode')->parse_nl2br = 1; IPSText::getTextClass('bbcode')->parse_bbcode = 1; $row['conf_value'] = IPSText::getTextClass('bbcode')->preDisplayParse($row['conf_value'] ? $row['conf_value'] : $row['conf_default']); $this->registry->output->addNavigation($this->settings['gl_title'], ''); $this->registry->output->setTitle($this->settings['gl_title'] . ' - ' . ipsRegistry::$settings['board_name']); $this->registry->output->addContent($this->registry->output->getTemplate('emails')->boardRules($this->settings['gl_title'], IPSText::getTextClass('bbcode')->preDisplayParse($row['conf_value']))); $this->registry->output->sendOutput(); }
/** * Function to format the actual message (applies BBcode, etc) * * @param string Raw text * @param array PM data * @return string Processed text */ private function _formatMessageForDisplay($msgContent, $data = array()) { IPSText::resetTextClass('bbcode'); $this->settings['max_emos'] = 0; IPSText::getTextClass('bbcode')->parse_smilies = 1; IPSText::getTextClass('bbcode')->parse_nl2br = 1; IPSText::getTextClass('bbcode')->parse_html = 0; IPSText::getTextClass('bbcode')->parse_bbcode = 1; IPSText::getTextClass('bbcode')->parsing_section = 'pms'; IPSText::getTextClass('bbcode')->parsing_mgroup = $data['member_group_id']; IPSText::getTextClass('bbcode')->parsing_mgroup_others = $data['mgroup_others']; $msgContent = IPSText::getTextClass('bbcode')->preDisplayParse($msgContent); return $msgContent; }
/** * Redirect to Print * Exciting, isn't it. * * @access private * @param string Title * @param string URL */ public function share($title, $url) { $title = IPSText::convertCharsets($title, IPS_DOC_CHAR_SET, 'utf-8'); $_qmCount = substr_count($url, '?'); $_count = $this->settings['url_type'] == 'query_string' ? 1 : 0; if ($_qmCount > $_count) { #?/furl?s=xxxx $url .= '&forceDownload=1'; } else { $url .= '?forceDownload=1'; } $url .= '&_k=' . $this->member->form_hash; $this->registry->output->silentRedirect($url); }