當前位置: 首頁>>代碼示例>>PHP>>正文


PHP IPSCookie::get方法代碼示例

本文整理匯總了PHP中IPSCookie::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSCookie::get方法的具體用法?PHP IPSCookie::get怎麽用?PHP IPSCookie::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在IPSCookie的用法示例。


在下文中一共展示了IPSCookie::get方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _toggleSidePanel

 /**
  * Toggle side panel on/off without JS
  *
  * @access	public
  * @return	void
  * @see		The Dark Knight (it was an awesome movie)
  */
 public function _toggleSidePanel()
 {
     $current = IPSCookie::get('hide_sidebar');
     $new = $current ? 0 : 1;
     IPSCookie::set('hide_sidebar', $new);
     $this->registry->getClass('output')->silentRedirect($this->settings['base_url']);
 }
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:14,代碼來源:toggle.php

示例2: boardIndexTemplate

 function boardIndexTemplate($lastvisit = "", $stats = array(), $calendar_events = FALSE, $birthdays = FALSE, $chat_html = '', $news_data = array(), $cat_data = array(), $show_side_blocks = true, $side_blocks = array())
 {
     $IPBHTML = "";
     $this->templateVars['sidebar_enabled'] = "{$show_side_blocks}";
     $this->__default__templateVars['sidebar_enabled'] = "{$show_side_blocks}";
     $IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("board", "0") . "\n" . $this->registry->getClass('output')->addJSModule("hooks", "0") . "<script type='text/javascript'>\n//<![CDATA[\n\tipb.global.boardMarkers = {$H}({\n\t\t'f_cat_unread': \"" . $this->registry->getClass('output')->getReplacement("f_cat_read") . "\",\n\t\t'f_unread': \"" . $this->registry->getClass('output')->getReplacement("f_read") . "\",\n\t\t'f_pass_unread': \"" . $this->registry->getClass('output')->getReplacement("f_pass_read") . "\"\n\t});\n\tvar markerURL = \"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&module=ajax&section=markasread&secure_key={$this->member->form_hash}&i=1&forumid=", 'public', ''), "", "") . "\"; // Ajax URL so don't use &amp;\n//]]>\n</script>\n" . ($this->templateVars['sidebar_enabled'] ? "<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=toggle", 'public', ''), "", "") . "' id='close_sidebar'  class='sidebar_toggle rounded' " . (IPSCookie::get('hide_sidebar') != '1' ? "style='display: none'" : "") . "><img src='{$this->settings['img_url']}/sidebar_close.png' alt='{$this->lang->words['sidebar_close']}' /></a>\n\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=toggle", 'public', ''), "", "") . "' id='open_sidebar' class='sidebar_toggle rounded' " . (IPSCookie::get('hide_sidebar') == '1' ? "style='display: none'" : "") . "><img src='{$this->settings['img_url']}/sidebar_open.png' alt='{$this->lang->words['sidebar_open']}' /></a>" : "") . "\n<h2 class='hide'>{$this->lang->words['board_index_title']}</h2>\n<div id='board_index' class='clearfix'>\n\t" . ($this->templateVars['sidebar_enabled'] ? "<div id='index_stats' class='right clearfix' " . (IPSCookie::get('hide_sidebar') == '1' ? "style='display: none'" : "") . ">\n\t\t\t" . $this->__f__ff88473eff708eb9314ce7282dac4715($lastvisit, $stats, $calendar_events, $birthdays, $chat_html, $news_data, $cat_data, $show_side_blocks, $side_blocks) . "\t\t</div>" : "") . "\n\t\n\t\n\t<div id='categories' class='" . (IPSCookie::get('hide_sidebar') == '1' || !$this->templateVars['sidebar_enabled'] ? "no_sidebar" : "") . " clearfix'>\n\t\t" . ((is_array($news_data) and count($news_data)) ? "\n\t\t\t<div id='latest_news' class='row2'><strong>{$this->lang->words['newslink']}</strong> <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showtopic={$news_data['id']}", 'public', ''), "{$news_data['seo_title']}", "showtopic") . "' title='{$this->lang->words['newslink']}'>{$news_data['title']}</a></div>\n\t\t" : "") . "\n\t<!-- CATS AND FORUMS -->\n\t\t" . ((is_array($cat_data) and count($cat_data)) ? "\n\t\t\t" . $this->__f__055700bb587a2b33772bc541b89a163e($lastvisit, $stats, $calendar_events, $birthdays, $chat_html, $news_data, $cat_data, $show_side_blocks, $side_blocks) . "\t\t" : "") . "\n\t</div>\n</div>\n<ul id='stat_links' class='filter_bar rounded'>\n\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=search&amp;do=active", 'public', ''), "", "") . "\" title=\"{$this->lang->words['today_active_cont']}\">{$this->lang->words['new_active_cont']}</a></li>\n\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=stats&amp;do=leaders", 'public', ''), "", "") . "\" title=\"{$this->lang->words['sm_forum_leaders_title']}\">{$this->lang->words['sm_forum_leaders']}</a></li>\n\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=stats", 'public', ''), "", "") . "\" title=\"{$this->lang->words['sm_all_posters_title']}\">{$this->lang->words['sm_today_posters']}</a></li>\n\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&amp;section=view&amp;module=list&amp;max_results=20&amp;sort_key=posts&amp;sort_order=desc&amp;filter=ALL", 'public', ''), "", "") . "\" title=\"{$this->lang->words['sm_overall_posters_title']}\">{$this->lang->words['sm_overall_posters']}</a></li>\n</ul>\n<div id='board_statistics' class='statistics general_box clearfix'>\n\t" . ($this->settings['show_totals'] ? "\n\t\t<div id='stats'>\n\t\t\t<h2>{$this->lang->words['board_stats']}</h2>\n\t\t\t<dl>\n\t\t\t\t<dt>{$this->lang->words['total_posts']}</dt>\n\t\t\t\t<dd>{$stats['info']['total_posts']}</dd>\n\t\t\t\t<dt>{$this->lang->words['total_members']}</dt>\n\t\t\t\t<dd>{$stats['info']['mem_count']}</dd>\n\t\t\t\t<dt>{$this->lang->words['newest_member']}</dt>\n\t\t\t\t<dd><a href='{$stats['info']['last_mem_link']}' title='{$this->lang->words['view_profile']}'>{$stats['info']['last_mem_name']}</a>" . $this->registry->getClass('output')->getTemplate('global')->user_popup($stats['info']['last_mem_id'], $stats['info']['last_mem_seo']) . "&nbsp;</dd>\n\t\t\t\t<dt>{$this->lang->words['online_at_once']}</dt>\n\t\t\t\t<dd>{$stats['info']['most_online']}<br /><span class='extra'>{$this->lang->words['on']} {$stats['info']['most_time']}</span></dd>\n\t\t\t</dl>\n\t\t</div>\n\t" : "") . "\n\t" . ($this->settings['show_active'] ? "<div id='active_users' class='stats_list'>\n\t\t\t<h2>\n\t\t\t\t{$stats['TOTAL']} {$this->lang->words['active_users_text']} <span>{$this->lang->words['active_users']}</span><br />\n\t\t\t\t<span class='desc'>{$stats['MEMBERS']} {$this->lang->words['members']}, {$stats['GUESTS']} {$this->lang->words['guests']}, {$stats['ANON']} {$this->lang->words['anon_users']} | {$this->lang->words['show_by']}: <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&amp;module=online&amp;sort_order=desc", 'public', ''), "", "") . "'>{$this->lang->words['oul_click']}</a> {$this->lang->words['or']} <a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&amp;module=online&amp;sort_key=name&amp;sort_order=asc&amp;show_mem=reg", 'public', ''), "", "") . "'>{$this->lang->words['oul_name']}</a></span>\n\t\t\t</h2>\n\t\t\t" . (count($stats['NAMES']) ? "\n\t\t\t\t<p>\n\t\t\t\t\t<span class='name'>" . implode(",</span> <span class='name'>", $stats['NAMES']) . "</span>\t\t\t\t\t\n\t\t\t\t</p>\n\t\t\t" : "") . "\n\t\t</div>" : "") . "\n\t" . ($calendar_events ? "<div id='cal_events' class='stats_list'>\n\t\t<h2>{$this->lang->words['upcoming_events']}</h2>\n\t\t" . (is_array($calendar_events) ? "\n\t\t\t<p>\n\t\t\t\t<span class='name'>" . implode(",</span> <span class='name'>", $calendar_events) . "</span>\n\t\t\t</p>\n\t\t" : "\n\t\t\t<p>{$calendar_events}</p>\n\t\t") . "\n\t</div>" : "") . "\n\t\n\t" . (($birthdays !== FALSE and is_array($birthdays['users']) and count($birthdays['users'])) ? "\n\t\t<div id='cal_bdays' class='stats_list'>\n\t\t\t<h2>{$birthdays['count']} {$this->lang->words['birthdays_today']}</h2>\n\t\t\t<p>\n\t\t\t\t<span class='name'>" . implode(",</span> <span class='name'>", $birthdays['users']) . "</span>\t\t\t\t\t\n\t\t\t</p>\n\t\t</div>\n\t" : "" . (($this->settings['show_birthdays'] and !$this->settings['autohide_bday']) ? "\n\t\t\t<div id='cal_bdays' class='stats_list'>\n\t\t\t\t<h2>0 {$this->lang->words['birthdays_today']}</h2>\n\t\t\t\t<p>{$this->lang->words['no_birth_users']}</p>\n\t\t\t</div>\n\t\t" : "") . "") . "\n\t\n</div>\n" . (($this->memberData['members_auto_dst'] == 1 and $this->settings['time_dst_auto_correction']) ? "\n<script type='text/javascript'>\n\tipb.vars['dst_on']\t= parseInt(\"{$this->memberData['dst_in_use']}\");\n\t\n\tipb.board.checkDST();\n</script>\n" : "") . "";
     return $IPBHTML;
 }
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:8,代碼來源:skin_boards.php

示例3: chatRoom

 function chatRoom($options = array(), $chatters = array())
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_ipchat', $this->_funcHooks['chatRoom'])) {
         $count_fc473221c0d8519b3b35e078488c45d5 = is_array($this->functionData['chatRoom']) ? count($this->functionData['chatRoom']) : 0;
         $this->functionData['chatRoom'][$count_fc473221c0d8519b3b35e078488c45d5]['options'] = $options;
         $this->functionData['chatRoom'][$count_fc473221c0d8519b3b35e078488c45d5]['chatters'] = $chatters;
     }
     $IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("chat", "0") . "\n" . $this->registry->getClass('output')->addToDocumentHead('importcss', "{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_editor.css") . "\n<script type='text/javascript'>\n\t// Basic variables\n\tvar roomId\t\t= {$options['roomId']};\n\tvar userId\t\t= {$options['userId']};\n\tvar userName\t= '" . ($this->memberData['member_id'] ? "{$this->memberData['members_display_name']}" : "{$this->memberData['members_display_name']}_{$options['userId']}") . "';\n\tvar accessKey\t= '{$options['accessKey']}';\n\tvar serverHost\t= '{$options['serverHost']}';\n\tvar serverPath\t= '{$options['serverPath']}';\n\tvar ourUrl\t\t= '{$options['ourUrl']}';\n\tUSE_RTE\t\t\t= 0;\n\tvar isMobile\t= 0;\n\t// Chat settings\t\n\tipb.chat.condenseTime\t\t= parseInt({$this->settings['ipchat_limit_time']});\n\tipb.chat.maxMessages\t\t= parseInt({$this->settings['ipchat_max_messages']});\n\tipb.chat.moderator\t\t\t= parseInt({$options['moderator']});\n\tipb.chat.private\t\t\t= parseInt({$options['private']});\n\tipb.chat.hideEnterExit\t\t= parseInt({$this->settings['ipchat_hide_usermessage']});\n\tipb.chat.noBuffer\t\t\t= parseInt('{$this->settings['ipchat_no_buffer']}');\n\tipb.chat.inactiveKick\t\t= parseInt('{$this->settings['ipchat_inactive_minutes']}');\n\tipb.chat.user24hour \t\t= parseInt('{$this->settings['ipchat_24hour']}');\n\t\n\t// Set up templates\n\tipb.chat.templates['msg-1']\t\t\t\t= new Template( \"<li class='post chat-message #{ownclass}'>#{photo} <label>#{username}</label> <div>#{message}</div></li>\" );\n\tipb.chat.templates['msg-1-compound']\t= new Template( \"<li class='post chat-message #{ownclass}'><div class='hider'>&nbsp;</div><div>#{message}</div></li>\" );\n\tipb.chat.templates['msg-2']\t\t\t\t= new Template( \"<li class='post chat-notice'>#{photo} <label>#{username}</label> <div>#{action}</div></li>\" );\n\tipb.chat.templates['msg-3']\t\t\t\t= new Template( \"<li class='post chat-me'>#{photo} <label>#{username}</label> <div>**#{message}**</div></li>\" );\n\tipb.chat.templates['msg-4']\t\t\t\t= new Template( \"<li class='post chat-system'>{$this->lang->words['sys_message_pre']} #{message}</li>\" );\n\tipb.chat.templates['msg-5']\t\t\t\t= new Template( \"<li class='post chat-moderator'><label class='fluid'>#{username}</label> <div>{$this->lang->words['_kicked']} #{extra}</div></li>\" );\n\tipb.chat.templates['msg-K']\t\t\t\t= new Template( \"<li class='post chat-moderator'><div>{$this->lang->words['youve_been_kicked']}</div></li>\" );\n\tipb.chat.templates['send_private']\t\t= new Template( \"<div id='priv_#{id}_wrap'><h3 class='bar'>{$this->lang->words['sendprivatechat']}</h3><div class='chat-private-message'><textarea name='message_content' id='priv_chat_text_#{id}' cols='25' rows='2'></textarea> <input type='submit' value='{$this->lang->words['sendprivatebutton']}' class='input_submit add_folder' id='#{id}_submit' onclick='return ipb.chat.sendPrivateChat( #{id} );' /></div></div>\" );\n\tipb.chat.templates['new-tab']\t\t\t= new Template( \"<a href='#tab-#{id}' rel='#{id}'>#{name}&nbsp;&nbsp;&nbsp;<img src='{$this->settings['img_url']}/cross.png' alt='x' class='right' id='close-chat-tab-#{id}' /></a>\" );\n\tipb.chat.templates['count-title']\t\t= new Template( \"" . str_replace('%s', '#{count}', $this->lang->words['chattab_count']) . "\" );\n\t\n\t// Set some language vars\n\tipb.lang['time_am']\t\t\t\t= \"{$this->lang->words['time_am']}\";\n\tipb.lang['time_pm']\t\t\t\t= \"{$this->lang->words['time_pm']}\";\n\tipb.lang['entered_room']\t\t= \" {$this->lang->words['entered_room']}\";\n\tipb.lang['left_room']\t\t\t= \" {$this->lang->words['left_room']}\";\n\tipb.lang['chat_kick_user']\t\t= \"{$this->lang->words['chat_kick_user']}\";\n\tipb.lang['chat_ban_user']\t\t= \"{$this->lang->words['chat_ban_user']}\";\n\tipb.lang['chat_priv_user']\t\t= \"{$this->lang->words['chat_priv_user']}\";\n\tipb.lang['cant_kick_self']\t\t= \"{$this->lang->words['cant_kick_self']}\";\n\tipb.lang['youve_been_kicked']\t= \"{$this->lang->words['youve_been_kicked']}\";\n\tipb.lang['block_priv_user']\t\t= \"{$this->lang->words['block_priv_user']}\";\n\tipb.lang['unblock_priv_user']\t= \"{$this->lang->words['unblock_priv_user']}\";\n\tipb.lang['cant_block_user']\t\t= \"{$this->lang->words['cant_block_user']}\";\n\tipb.lang['noprivate_withignored'] = \"{$this->lang->words['noprivate_withignored']}\";\n\tipb.lang['ban_user_confirm']\t= \"{$this->lang->words['banconfirmpopup']}\";\n\t\n\t// Emoticons\n\tipb.chat.emoticons\t\t\t= \$H({ " . IPSLib::fetchEmoticonsAsJson($this->registry->output->skin['set_emo_dir'], true) . " });\n\tipb.vars['emoticon_url']\t= \"{$this->settings['emoticons_url']}\";\n\tipb.vars['img_url']\t\t\t= '{$this->settings['img_url']}';\n\t\n\t// Sound\n\tipb.chat.soundEnabled\t\t= " . (IPSCookie::get('chat_sounds') == 'off' ? "0" : "1") . ";\n\tipb.chat.soundOnImg\t\t\t= \"{$this->settings['img_url']}/bell.png\";\n\tipb.chat.soundOffImg\t\t= \"{$this->settings['img_url']}/bell_off.png\";\n\t\n\t// Chatters name formatting\n\t" . $this->__f__776f6e2cf0409238d7f8b06df58633b5($options, $chatters) . "\t// Ignore private chats from..\n\t" . $this->__f__5cb7dc707613b708061e35c39c0315de($options, $chatters) . "\t" . ((isset($this->memberData['_ignoredUsers']) and count($this->memberData['_ignoredUsers'])) ? "\n\t\t" . $this->__f__912a9882eb2468aa711103e006f1db77($options, $chatters) . "\t" : "") . "\n\t\n\t// Badwords\n\t" . ((is_array($this->caches['badwords']) and count($this->caches['badwords'])) ? "\n\t\t" . $this->__f__a322b0264fb42d72e2ed89b6f99a822a($options, $chatters) . "\t" : "") . "\n\t\n\t// Groups\n\t" . $this->__f__2a73ab0bb6c4c786423dde2785d55fd9($options, $chatters) . "</script>\n<script type='text/javascript' src='{$this->settings['public_dir']}js/ips.editor.js'></script>\n" . (!$this->request['_popup'] ? "\n\t<h1 class='ipsType_pagetitle'>" . IPSLib::getAppTitle('ipchat') . "</h1>\n\t<br /><br />\n" : "") . "\n<div class='ipsBox ipsLayout ipsLayout_withright ipsPostForm clearfix'>\n\t<div class='ipsBox_container ipsLayout_right ipsPostForm_sidebar'>\n\t\t<div id='chat-room-list' style='display:none'>\n\t\t\t<h3 class='bar'>{$this->lang->words['chats']}</h3>\n\t\t\t<div class='ipsPad ipsSideMenu'>\n\t\t\t\t<ul id='chat-tab-holder'>\n\t\t\t\t\t<li class='active' id='tab-chatroom'><a href='#tab-chatroom' rel='chatroom'>{$this->lang->words['chat_tab_home']}</a></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\t\n\t\t<h3 class='bar'><span id='online-chat-count'>" . (($_count = count($chatters)) ? "{$_count}" : "0") . "</span> {$this->lang->words['whos_chatting_ttl']}</h3>\n\t\t<div class='ipsPad' id='chatters-online-wrap'>\n\t\t\t<ul id='chatters-online'>\n\t\t\t\t" . $this->__f__85f7a2a7de7bd273e202a92898fb0067($options, $chatters) . "\t\t\t</ul>\n\t\t</div>\n\t\t<div class='ipsPad right'>\n\t\t\t<ul class='ipsList_inline'>\n\t\t\t\t<li>\n\t\t\t\t\t<a class='ipsButton_secondary' href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("module=ipschat&amp;section=chat&amp;do=leave&amp;room={$options['roomId']}&amp;user={$options['userId']}&amp;access_key={$options['accessKey']}&amp;secure_key={$this->member->form_hash}" . ($this->request['_popup'] ? "&amp;popup=1" : "") . "", "publicWithApp", ''), "", "") . "' title='{$this->lang->words['leave_room']}' id='leave_room'><img src='{$this->settings['img_url']}/cross.png' alt='{$this->lang->words['leave_room']}' /> {$this->lang->words['leave_room']}</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a class='ipsButton_secondary' href='#' title='{$this->lang->words['toggle_sound']}' id='sound_toggle'>&nbsp;<img id='sound_toggle_img' src='{$this->settings['img_url']}/" . (IPSCookie::get('chat_sounds') == 'off' ? "bell_off.png" : "bell.png") . "' alt='{$this->lang->words['toggle_sound']}' />&nbsp;</a>\n\t\t\t\t</li>\n\t\t\t\t" . (!$this->request['_popup'] ? "\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a class='ipsButton_secondary' href='#' title='{$this->lang->words['chat_new_window']}' id='chat_new_window'><img src='{$this->settings['img_url']}/chat/window_open.png' alt='{$this->lang->words['chat_new_window']}' /></a>\n\t\t\t\t\t</li>\n\t\t\t\t" : "") . "\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n\t<div class='ipsBox_container ipsLayout_content'>\n\t\t<div id='scrollbar_container'>\n\t\t\t<div id='messages-display'><span id='initial_message'>{$this->lang->words['please_wait_chats']}</span></div>\n\t\t</div>\n\t\t<form id='chat-form' action='#' method='post'>\n\t\t\t<input type='hidden' name='1_wysiwyg_used' id='1_wysiwyg_used' value='0' />\n\t\t\t<input type='hidden' name='editor_ids[]' value='1' />\n\t\t\t<div class='ips_editor' id='editor_message'>\n\t\t\t\t<div id='message_controls' class='controls'>\n\t\t\t\t\t<ul id='message_toolbar_2' class='toolbar' style='display: none'>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<span id='message_cmd_bold' class='rte_control rte_button' title='{$this->lang->words['js_tt_bold']}'><img src='{$this->settings['img_url']}/rte_icons/bold.png' alt='{$this->lang->words['js_tt_bold']}' /></span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<span id='message_cmd_italic' class='rte_control rte_button' title='{$this->lang->words['js_tt_italic']}'><img src='{$this->settings['img_url']}/rte_icons/italic.png' alt='{$this->lang->words['js_tt_italic']}' /></span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<span id='message_cmd_underline' class='rte_control rte_button' title='{$this->lang->words['js_tt_underline']}'><img src='{$this->settings['img_url']}/rte_icons/underline.png' alt='{$this->lang->words['js_tt_underline']}' /></span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<span id='emoticons_custom_menu' class='ipbmenu rte_control rte_button' title='{$this->lang->words['js_tt_emoticons']}'><img src='{$this->settings['img_url']}/rte_icons/emoticons.png' alt='{$this->lang->words['js_tt_emoticons']}' /></span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<span id='message_cmd_link' class='rte_control rte_palette' title='{$this->lang->words['js_tt_link']}'><img src='{$this->settings['img_url']}/rte_icons/link.png' alt='{$this->lang->words['js_tt_link']}' /></span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<div id='message_wrap' class='editor'>\n\t\t\t\t\t<textarea name=\"message\" class=\"input_rte\" id=\"message_textarea\" rows=\"3\" cols=\"50\" tabindex=\"0\" maxlength=\"450\"></textarea>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<input type='submit' id='chat-submit' class='input_submit' value='{$this->lang->words['chat_post_button']}' />\n\t\t</form>\n\t</div>\n</div>\n<div id='mod-menu-container'>\n\t" . $this->__f__b9925e475553743bdec6c74675fb1a60($options, $chatters) . "</div>\n<div id='emoticons_custom_menu_menucontent'></div>\n<script type='text/javascript'>\n\tif( \$( 'message_toolbar_2' ) ){ \$( 'message_toolbar_2' ).show(); }\n\tipb.editor_values.get('templates')['link'] = new Template(\"<label for='#{id}_url'>{$this->lang->words['js_template_url']}</label><input type='text' class='input_text' id='#{id}_url' value='http://' tabindex='10' /><label for='#{id}_urltext'>{$this->lang->words['js_template_link']}</label><input type='text' class='input_text _select' id='#{id}_urltext' value='{$this->lang->words['js_template_default']}' tabindex='11' /><input type='submit' value='{$this->lang->words['js_template_insert_link']}' tabindex='12' />\");\n\tipb.editor_values.get('templates')['emoticons_showall'] = new Template(\"<input class='input_submit emoticons' type='button' id='#{id}_all_emoticons' value='{$this->lang->words['show_all_emoticons']}' />\");\n\tipb.editor_values.get('templates')['emoticon_wrapper'] = new Template(\"<h4><span>{$this->lang->words['emoticons_template_title']}</span></h4><div id='#{id}_emoticon_holder' class='emoticon_holder'></div>\");\n\tipb.editor_values.set( 'show_emoticon_link', false );\n\tipb.editor_values.set( 'emoticons', ipb.chat.emoticons );\n\tipb.editor_values.set( 'bbcodes', \$H(" . IPSLib::fetchBbcodeAsJson() . ") );\n\tipb.editors[ 'message' ] = new ipb.editor( 'message', 0 );\n\t/* Load emoticons on the fly ... */\n\tvar _emoticonsLoaded\t= false;\n\t\$('emoticons_custom_menu').observe( 'click', function( e ){ \n\t\tif( !_emoticonsLoaded )\n\t\t{\n\t\t\tnew Ajax.Request( \n\t\t\t\t\t\t\t\tipb.vars['base_url'] + \"&app=ipchat&module=ajax&section=getemoticons&md5check=\" + ipb.vars['secure_hash'], \n\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\tmethod: 'get',\n\t\t\t\t\t\t\t\t\tonSuccess: function(t)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\$('emoticons_custom_menu_menucontent').update( t.responseText );\n\t\t\t\t\t\t\t\t\t\t_emoticonsLoaded\t= true;\n\t\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);\n\t\t}\n\t});\n\tfunction addEmoImage(elem){\n\t\tvar code = elem.up('tr').down('a').innerHTML;\n\t\tvar title = elem.up('tr').down('img').readAttribute('title');\n\t\tipb.editors[ 'message' ].insert_emoticon('', title, code,'');\n\t}\n</script>\n\t\t\t\n<!--Iframes used for cross-domain \"AJAX\"-->\n<div id='iframeContainer'>\n<div id='storage_container_chatroom' class='storage-container'><ul id='storage_chatroom'></ul></div>\n</div>";
     return $IPBHTML;
 }
開發者ID:mover5,項目名稱:imobackup,代碼行數:11,代碼來源:skin_ipchat.php

示例4: _toggleSidePanel

 /**
  * Toggle side panel on/off without JS
  *
  * @return	@e void
  * @see		The Dark Knight (it was an awesome movie)
  */
 public function _toggleSidePanel()
 {
     /* Security Check */
     if ($this->request['secure_key'] != $this->member->form_hash) {
         $this->registry->output->showError('usercp_forums_bad_key', 102998, null, null, 403);
     }
     $current = IPSCookie::get('hide_sidebar');
     $new = $current ? 0 : 1;
     IPSCookie::set('hide_sidebar', $new);
     $this->registry->getClass('output')->silentRedirect($this->settings['base_url'] . 'act=idx', 'false');
 }
開發者ID:ConnorChristie,項目名稱:GrabViews-Live,代碼行數:17,代碼來源:toggle.php

示例5: boardIndexTemplate

 function boardIndexTemplate($lastvisit = "", $stats = array(), $cat_data = array(), $show_side_blocks = true, $side_blocks = array())
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_boards', $this->_funcHooks['boardIndexTemplate'])) {
         $count_3caeb9bb43000ee1df74d49ffc12eae7 = is_array($this->functionData['boardIndexTemplate']) ? count($this->functionData['boardIndexTemplate']) : 0;
         $this->functionData['boardIndexTemplate'][$count_3caeb9bb43000ee1df74d49ffc12eae7]['lastvisit'] = $lastvisit;
         $this->functionData['boardIndexTemplate'][$count_3caeb9bb43000ee1df74d49ffc12eae7]['stats'] = $stats;
         $this->functionData['boardIndexTemplate'][$count_3caeb9bb43000ee1df74d49ffc12eae7]['cat_data'] = $cat_data;
         $this->functionData['boardIndexTemplate'][$count_3caeb9bb43000ee1df74d49ffc12eae7]['show_side_blocks'] = $show_side_blocks;
         $this->functionData['boardIndexTemplate'][$count_3caeb9bb43000ee1df74d49ffc12eae7]['side_blocks'] = $side_blocks;
     }
     $this->templateVars['sidebar_enabled'] = "{$show_side_blocks}";
     $this->__default__templateVars['sidebar_enabled'] = "{$show_side_blocks}";
     $IPBHTML .= "" . (($this->settings['hoverDescriptions'] = 'no') ? "" : "") . "\n" . (($this->settings['removeStatsColumn'] = 'no') ? "" : "") . "\n" . (($this->settings['customForumIcons'] = 'no') ? "" : "") . "\n" . (($this->settings['clickableRows'] = 'yes') ? "" : "") . "" . $this->registry->getClass('output')->addJSModule("board", "0") . "" . (true ? "" : "") . "\n<div id='board_index' class='ipsLayout " . ($this->templateVars['sidebar_enabled'] ? "ipsLayout_withleft" : "") . " ipsLayout_largeleft clearfix " . (IPSCookie::get('hide_sidebar') == '1' ? "no_sidebar" : "") . "'>\n\t" . ($this->templateVars['sidebar_enabled'] ? "<div id='index_stats' class='ipsLayout_left clearfix' " . (IPSCookie::get('hide_sidebar') == '1' ? "style='display: none'" : "") . ">\n" . ($this->settings['show_totals'] ? "\n  <div class='ipsSideBlock clearfix'>\n    <h3><span class='icon icon-span-text icon-block'></span>Статистика форума</h3>\n    <div class='_sbcollapsable'>\n      <ul class='ipsList_data csoStatistics clearfix'>\n        <li class='clearfix'>\n          <span class='value right'>" . $this->registry->getClass('class_localization')->formatNumber($this->caches['stats']['total_topics']) . "</span>\n          <span class='label left'><i class=\"fa fa-comment\"></i> Всего тем</span>\n        </li>\n        <li class='clearfix'>\n          <span class='value right'>{$stats['info']['total_posts']}</span>\n          <span class='label left'><i class=\"fa fa-pencil-square-o\"></i> {$this->lang->words['total_posts']}</span>\n        </li>\n        <li class='clearfix'>\n          <span class='value right'>{$stats['info']['mem_count']}</span>\n          <span class='label left'><i class=\"fa fa-users\"></i> {$this->lang->words['total_members']}</span>\n        </li>\n        <li class='clearfix'>\n          <span class='value right '>" . IPSMember::makeProfileLink($stats['info']['last_mem_name'], $stats['info']['last_mem_id'], $stats['info']['last_mem_seo'], 'value') . "</span>\n          <span class='label left'><i class=\"fa fa-user\"></i> {$this->lang->words['newest_member']}</span>\n        </li>\n        <li class='clearfix' data-tooltip='{$stats['info']['most_time']}'>\n          <span class='value right'>{$stats['info']['most_online']}</span>\n          <span class='label left'><i class=\"fa fa-signal\"></i> {$this->lang->words['online_at_once']}</span>\n        </li>                                                              \n      </ul>\n    </div>\n  </div>\n" : "") . "\n\t\t\t" . $this->__f__b29a9c9cce830e12603033197489dc70($lastvisit, $stats, $cat_data, $show_side_blocks, $side_blocks) . "\t\t</div>\n\t\t<a href='#' id='toggle_sidebar' title='{$this->lang->words['toggle_sidebar']}' data-closed=\"{$this->lang->words['_laquo']}\" data-open=\"&times;\">&nbsp;</a>" : "") . "\n\t<div id='categories' class='ipsLayout_content clearfix'>\n\t<!-- CATS AND FORUMS -->\n\t\t" . ((is_array($cat_data) and count($cat_data)) ? "\n\t\t\t" . $this->__f__5147475eaba97cbcedc3e8701382c4a7($lastvisit, $stats, $cat_data, $show_side_blocks, $side_blocks) . "\t\t" : "") . "\n\t</div>\n</div>\n<script type='text/javascript'>\n//<![CDATA[\n\tvar markerURL  = ipb.vars['base_url'] + \"app=forums&module=ajax&section=markasread&i=1\"; // Ajax URL so don't use &amp;\n\tvar unreadIcon = \"<img src='{$this->settings['img_url']}/f_icon_read.png' />\";\n\t\n\t" . ((is_array($cat_data) and count($cat_data)) ? "\n\t\t" . $this->__f__a75b64ad1448186d22b780ae5692d94a($lastvisit, $stats, $cat_data, $show_side_blocks, $side_blocks) . "\t" : "") . "\n//]]>\n</script>\n<div id='board_statistics' class='statistics clearfix'>\n\t<h4 class='statistics_head clearfix'><ul id='stat_links' class='ipsList_inline right ipsType_small'>\n\t\t" . (1 == 1 ? "<!-- Hook point -->\n\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=stats&amp;do=leaders", "public", ''), "", "") . "\" title=\"{$this->lang->words['sm_forum_leaders_title']}\">{$this->lang->words['sm_forum_leaders']}</a></li>\n\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=stats", "public", ''), "", "") . "\" title=\"{$this->lang->words['sm_all_posters_title']}\">{$this->lang->words['sm_today_posters']}</a></li>\n\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&amp;module=list&amp;max_results=20&amp;sort_key=posts&amp;sort_order=desc&amp;filter=ALL", "public", ''), "false", "") . "\" title=\"{$this->lang->words['sm_overall_posters_title']}\">{$this->lang->words['sm_overall_posters']}</a></li>\n            " . ($this->settings['reputation_enabled'] ? "<li>\n                    <a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&amp;module=reputation&amp;section=most", "public", ''), "most_liked", "most_liked") . "\" title=\"" . ($this->settings['reputation_point_types'] == 'like' ? "{$this->lang->words['most_rep_likes']}" : "{$this->lang->words['most_rep_rep']}") . "\">\n                        " . ($this->settings['reputation_point_types'] == 'like' ? "\n                            {$this->lang->words['most_rep_likes']}\n                        " : "\n                            {$this->lang->words['most_rep_rep']}\n                        ") . "\n                    </a>\n                </li>" : "") . "" : "") . "\n\t</ul>\n" . ($this->settings['show_active'] && $this->memberData['gbw_view_online_lists'] ? "" . sprintf($this->lang->words['online_right_now'], $stats['TOTAL']) . " {$this->lang->words['active_users']}" : "") . "</h4>\n\t" . ($this->settings['show_active'] ? "<p class='statistics_brief desc'>\n\t\t" . sprintf($this->lang->words['active_users_detail'], $stats['MEMBERS'], $stats['GUESTS'], $stats['ANON']) . "\n\t\t" . ($this->settings['allow_online_list'] ? "&nbsp;&nbsp;<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&amp;module=online&amp;sort_order=desc", "public", ''), "", "") . "' title='{$this->lang->words['online_link']}'>({$this->lang->words['online_link']})</a>" : "") . "\n\t</p>" : "") . "\n\t\n\t" . (count($stats['NAMES']) && $this->settings['show_active'] ? "\n\t\t<br />\n\t\t<p>\n\t\t\t<span class='name'>" . implode(",</span> <span class='name'>", $stats['NAMES']) . "</span>\t\t\t\t\t\n\t\t</p>\n\t" : "") . "\n</div>";
     return $IPBHTML;
 }
開發者ID:Advanture,項目名稱:Online-RolePlay,代碼行數:16,代碼來源:skin_boards.php

示例6: boardIndexTemplate

 function boardIndexTemplate($lastvisit = "", $stats = array(), $cat_data = array(), $show_side_blocks = true, $side_blocks = array())
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_boards', $this->_funcHooks['boardIndexTemplate'])) {
         $count_d79a4680f047b95f9c696f93b859d2a2 = is_array($this->functionData['boardIndexTemplate']) ? count($this->functionData['boardIndexTemplate']) : 0;
         $this->functionData['boardIndexTemplate'][$count_d79a4680f047b95f9c696f93b859d2a2]['lastvisit'] = $lastvisit;
         $this->functionData['boardIndexTemplate'][$count_d79a4680f047b95f9c696f93b859d2a2]['stats'] = $stats;
         $this->functionData['boardIndexTemplate'][$count_d79a4680f047b95f9c696f93b859d2a2]['cat_data'] = $cat_data;
         $this->functionData['boardIndexTemplate'][$count_d79a4680f047b95f9c696f93b859d2a2]['show_side_blocks'] = $show_side_blocks;
         $this->functionData['boardIndexTemplate'][$count_d79a4680f047b95f9c696f93b859d2a2]['side_blocks'] = $side_blocks;
     }
     $this->templateVars['sidebar_enabled'] = "{$show_side_blocks}";
     $this->__default__templateVars['sidebar_enabled'] = "{$show_side_blocks}";
     $IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("board", "0") . "" . (true ? "" : "") . "\r\n<div id='board_index' class='ipsLayout " . ($this->templateVars['sidebar_enabled'] ? "ipsLayout_withright" : "") . " ipsLayout_largeright clearfix " . (IPSCookie::get('hide_sidebar') == '1' ? "no_sidebar" : "") . "'>\t\r\n\t<div id='categories' class='ipsLayout_content clearfix'>\r\n\t<!-- CATS AND FORUMS -->\r\n\t\t" . ((is_array($cat_data) and count($cat_data)) ? "\r\n\t\t\t" . $this->__f__f3046b4671aec0807f8ac620415036a8($lastvisit, $stats, $cat_data, $show_side_blocks, $side_blocks) . "\t\t" : "") . "\r\n\t</div>\r\n\t" . ($this->templateVars['sidebar_enabled'] ? "<div id='index_stats' class='ipsLayout_right clearfix' " . (IPSCookie::get('hide_sidebar') == '1' ? "style='display: none'" : "") . ">\r\n\t\t\t" . $this->__f__89030e7582e797890a67a50f095f2544($lastvisit, $stats, $cat_data, $show_side_blocks, $side_blocks) . "\t\t</div>\r\n\t\t<a href='#' id='toggle_sidebar' title='{$this->lang->words['toggle_sidebar']}' data-closed=\"{$this->lang->words['_laquo']}\" data-open=\"&times;\">&nbsp;</a>" : "") . "\r\n</div>\r\n<script type='text/javascript'>\r\n//<![CDATA[\r\n\tvar markerURL  = ipb.vars['base_url'] + \"app=forums&module=ajax&section=markasread&i=1\"; // Ajax URL so don't use &amp;\r\n\tvar unreadIcon = \"<img src='{$this->settings['img_url']}/f_icon_read.png' />\";\r\n\t\r\n\t" . ((is_array($cat_data) and count($cat_data)) ? "\r\n\t\t" . $this->__f__2d7df5c3f0ad6083957d5ca77bafc27f($lastvisit, $stats, $cat_data, $show_side_blocks, $side_blocks) . "\t" : "") . "\r\n//]]>\r\n</script>\r\n" . ($this->settings['show_totals'] ? "\r\n\t<div id='board_stats'>\t\t\r\n\t\t<ul class='ipsType_small ipsList_inline'>\r\n\t\t\t<li class='clear'>\r\n\t\t\t\t<span class='value'>{$stats['info']['total_posts']}</span>\r\n\t\t\t\t{$this->lang->words['total_posts']}\r\n\t\t\t</li>\r\n\t\t\t<li class='clear'>\r\n\t\t\t\t<span class='value'>{$stats['info']['mem_count']}</span>\r\n\t\t\t\t{$this->lang->words['total_members']}\r\n\t\t\t</li>\r\n\t\t\t<li class='clear'>\r\n\t\t\t\t" . IPSMember::makeProfileLink($stats['info']['last_mem_name'], $stats['info']['last_mem_id'], $stats['info']['last_mem_seo'], 'value') . "\r\n\t\t\t\t{$this->lang->words['newest_member']}\r\n\t\t\t</li>\r\n\t\t\t<li class='clear' data-tooltip=\"{$stats['info']['most_time']}\">\r\n\t\t\t\t<span class='value'>{$stats['info']['most_online']}</span>\r\n\t\t\t\t{$this->lang->words['online_at_once']}\r\n\t\t\t</li>\r\n\t\t</ul>\r\n\t</div>\r\n" : "") . "\r\n<div id='board_statistics' class='statistics clearfix'>\r\n\t<ul id='stat_links' class='ipsList_inline right ipsType_small'>\r\n\t\t" . (1 == 1 ? "<!-- Hook point -->\r\n\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=stats&amp;do=leaders", "public", ''), "", "") . "\" title=\"{$this->lang->words['sm_forum_leaders_title']}\">{$this->lang->words['sm_forum_leaders']}</a></li>\r\n\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=forums&amp;module=extras&amp;section=stats", "public", ''), "", "") . "\" title=\"{$this->lang->words['sm_all_posters_title']}\">{$this->lang->words['sm_today_posters']}</a></li>\r\n\t\t\t<li><a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&amp;module=list&amp;max_results=20&amp;sort_key=posts&amp;sort_order=desc&amp;filter=ALL", "public", ''), "false", "") . "\" title=\"{$this->lang->words['sm_overall_posters_title']}\">{$this->lang->words['sm_overall_posters']}</a></li>\r\n\t\t\t" . ($this->settings['reputation_enabled'] ? "<li>\r\n\t\t\t\t\t<a href=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&amp;module=reputation&amp;section=most", "public", ''), "most_liked", "most_liked") . "\" title=\"" . ($this->settings['reputation_point_types'] == 'like' ? "{$this->lang->words['most_rep_likes']}" : "{$this->lang->words['most_rep_rep']}") . "\">\r\n\t\t\t\t\t\t" . ($this->settings['reputation_point_types'] == 'like' ? "\r\n\t\t\t\t\t\t\t{$this->lang->words['most_rep_likes']}\r\n\t\t\t\t\t\t" : "\r\n\t\t\t\t\t\t\t{$this->lang->words['most_rep_rep']}\r\n\t\t\t\t\t\t") . "\r\n\t\t\t\t\t</a>\r\n\t\t\t\t</li>" : "") . "" : "") . "\r\n\t</ul>\r\n\t\r\n\t" . ($this->settings['show_active'] && $this->memberData['gbw_view_online_lists'] ? "<h4 class='statistics_head'>" . sprintf($this->lang->words['online_right_now'], $stats['TOTAL']) . " {$this->lang->words['active_users']}</h4>\r\n\t\t<p class='statistics_brief desc'>\r\n\t\t\t" . sprintf($this->lang->words['active_users_detail'], $stats['MEMBERS'], $stats['GUESTS'], $stats['ANON']) . "\r\n\t\t\t" . ($this->settings['allow_online_list'] ? "&nbsp;&nbsp;<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=members&amp;module=online&amp;sort_order=desc", "public", ''), "", "") . "' title='{$this->lang->words['online_link']}'>({$this->lang->words['online_link']})</a>" : "") . "\r\n\t\t</p>" : "") . "\r\n\t" . (count($stats['NAMES']) && $this->settings['show_active'] ? "\r\n\t\t<br />\r\n\t\t<p>\r\n\t\t\t<span class='name'>" . implode(",</span> <span class='name'>", $stats['NAMES']) . "</span>\r\n\t\t</p>\r\n\t" : "") . "\r\n</div>";
     return $IPBHTML;
 }
開發者ID:ConnorChristie,項目名稱:GrabViews,代碼行數:16,代碼來源:skin_boards.php

示例7: _checkMultiQuote

 /**
  * Check Multi Quote
  * Checks for quoted information
  *
  * @param	string	Any raw post
  * @return	string	Formatted post
  */
 protected function _checkMultiQuote($postContent)
 {
     $raw_post = '';
     if (!$this->request['qpid']) {
         $this->request['qpid'] = IPSCookie::get('mqtids');
         if ($this->request['qpid'] == ",") {
             $this->request['qpid'] = "";
         }
     } else {
         //-----------------------------------------
         // Came from reply button
         //-----------------------------------------
         $this->request['parent_id'] = $this->request['qpid'];
     }
     $this->request['qpid'] = preg_replace('/[^,\\d]/', "", trim($this->request['qpid']));
     /* Load parser */
     $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser');
     $parser = new $classToLoad();
     if ($this->request['qpid']) {
         $this->quoted_pids = preg_split('/,/', $this->request['qpid'], -1, PREG_SPLIT_NO_EMPTY);
         //-----------------------------------------
         // Get the posts from the DB and ensure we have
         // suitable read permissions to quote them
         //-----------------------------------------
         if (count($this->quoted_pids)) {
             $perm_id = $this->getAuthor('org_perm_id') ? $this->getAuthor('org_perm_id') : $this->getAuthor('g_perm_id');
             $perm_array = explode(",", $perm_id);
             $this->DB->build(array('select' => 'p.*', 'from' => array('posts' => 'p'), 'where' => "p.pid IN(" . implode(',', $this->quoted_pids) . ")", 'add_join' => array(array('select' => 't.*', 'from' => array('topics' => 't'), 'where' => 't.tid=p.topic_id', 'type' => 'left'), array('select' => 'member_id, members_display_name', 'from' => array('members' => 'm'), 'where' => 'p.author_id=m.member_id', 'type' => 'left'))));
             $this->DB->execute();
             while ($tp = $this->DB->fetch()) {
                 $canSee = $this->registry->getClass('topics')->canView($tp);
                 /* Direct quote/reply access */
                 if ($this->request['qpid'] && !$canSee) {
                     $msg = str_replace('EX_', '', $this->registry->getClass('topics')->getErrorMessage());
                     $this->registry->output->showError($msg, 10340, null, null, 404);
                 }
                 if ($canSee === true && $this->registry->permissions->check('read', $this->registry->class_forums->forum_by_id[$tp['forum_id']], $perm_array) === true) {
                     $tmp_post = $tp['post'];
                     $tp['author_name'] = $tp['members_display_name'] ? $tp['members_display_name'] : $tp['author_name'];
                     $tmp_post = $parser->stripSharedMedia($tmp_post);
                     if ($this->settings['strip_quotes']) {
                         $oldPost = $tmp_post;
                         $tmp_post = $parser->stripQuotes($tmp_post);
                         if (!preg_match('#\\S+?#', trim(IPSText::stripTags($tmp_post)))) {
                             $tmp_post = $oldPost;
                         }
                         unset($oldPost);
                     }
                     if ($tmp_post) {
                         $raw_post .= $parser->buildQuoteTag($tmp_post, $tp['author_name'], $tp['post_date'], 0, $tp['pid']);
                     }
                 }
             }
             $raw_post = trim($raw_post) . "<br />";
         }
     }
     //-----------------------------------------
     // Make raw POST safe for the text area
     //-----------------------------------------
     $raw_post .= $postContent;
     return $raw_post;
 }
開發者ID:ConnorChristie,項目名稱:GrabViews,代碼行數:69,代碼來源:classPost.php

示例8: setMember

 /**
  * Set current member to the member ID specified
  *
  * @param	integer		Member ID
  * @return	@e void
  */
 public static function setMember($member_id)
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $member_id = intval($member_id);
     $addrs = array();
     //-----------------------------------------
     // If we have a member ID, set up the member
     //-----------------------------------------
     if ($member_id) {
         self::$data_store = IPSMember::load($member_id, 'extendedProfile,customFields,groups');
     }
     /* Got a member ID? */
     if (!empty($member_id) && self::$data_store['member_id']) {
         self::setUpMember();
         self::instance()->language_id = self::$data_store['language'];
         # Form hash
         self::instance()->form_hash = md5(self::$data_store['email'] . '&' . self::$data_store['member_login_key'] . '&' . self::$data_store['joined']);
     } else {
         self::$data_store = IPSMember::setUpGuest();
         self::instance()->perm_id = !empty(self::$data_store['org_perm_id']) ? self::$data_store['org_perm_id'] : self::$data_store['g_perm_id'];
         self::instance()->perm_id_array = explode(',', self::instance()->perm_id);
         if (IPSCookie::get('language')) {
             self::instance()->language_id = IPSCookie::get('language');
         }
         # Form hash
         self::instance()->form_hash = md5("this is only here to prevent it breaking on guests");
     }
     /* Get the ignored users */
     if (IPS_AREA == 'public') {
         /* Ok, Fetch ignored users */
         self::instance()->ignored_users = IPSMember::fetchIgnoredUsers(self::$data_store);
     }
     //-----------------------------------------
     // Set member data
     //-----------------------------------------
     self::instance()->member_id = $member_id;
 }
開發者ID:ConnorChristie,項目名稱:GrabViews,代碼行數:45,代碼來源:ipsRegistry.php

示例9: forumsComparePassword

 /**
  * Compare forum pasword
  *
  * @param	integer	$fid	Forum ID
  * @return	bool
  */
 public function forumsComparePassword($fid)
 {
     $cookie_pass = IPSCookie::get('ipbforumpass_' . $fid);
     if (trim($cookie_pass) == md5($this->forum_by_id[$fid]['password'])) {
         return TRUE;
     } else {
         return FALSE;
     }
 }
開發者ID:ConnorChristie,項目名稱:GrabViews-Live,代碼行數:15,代碼來源:class_forums.php

示例10: __construct

 /**
  * Constructor :: Authorizes the session
  *
  * @access	public
  * @return	mixed		Void normally, but can print error message
  */
 public function __construct()
 {
     /* Make object */
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
     $this->_member = self::instance();
     $this->_memberData =& self::instance()->fetchMemberData();
     /* Delete immediately */
     $this->_deleteNow = true;
     /**
      * If the sso.php file is present in this folder, we'll load it.
      * This file can be used to easily integrate single-sign on in
      * situations where you need to check session data
      */
     if (file_exists(IPS_ROOT_PATH . '/sources/classes/session/sso.php')) {
         require_once IPS_ROOT_PATH . '/sources/classes/session/sso.php';
         if (class_exists("ssoSessionExtension")) {
             $this->sso = new ssoSessionExtension($this->registry);
         }
     }
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $cookie = array();
     $this->_userAgent = substr($this->_member->user_agent, 0, 200);
     //-----------------------------------------
     // Fix up app / section / module
     //-----------------------------------------
     $this->current_appcomponent = IPS_APP_COMPONENT;
     $this->current_module = IPSText::alphanumericalClean($this->request['module']);
     $this->current_section = IPSText::alphanumericalClean($this->request['section']);
     $this->settings['session_expiration'] = $this->settings['session_expiration'] ? $this->settings['session_expiration'] : 3600;
     //-----------------------------------------
     // Return as guest if running a task
     //-----------------------------------------
     if (IPS_IS_TASK) {
         self::$data_store = IPSMember::setUpGuest();
         self::$data_store['last_activity'] = time();
         self::$data_store['last_visit'] = time();
         return true;
     }
     //-----------------------------------------
     // no new headers if we're simply viewing an attachment..
     //-----------------------------------------
     if ($this->request['section'] == 'attach') {
         $this->settings['no_print_header'] = 1;
     }
     //-----------------------------------------
     // no new headers if we're updating chat
     //-----------------------------------------
     if (IPS_IS_AJAX && $this->request['section'] != 'login' or $this->request['section'] == 'attach' or $this->request['section'] == 'captcha') {
         $this->settings['no_print_header'] = 1;
         $this->do_update = 0;
     }
     //-----------------------------------------
     // Continue!
     //-----------------------------------------
     $cookie['session_id'] = IPSCookie::get('session_id');
     $cookie['member_id'] = IPSCookie::get('member_id');
     $cookie['pass_hash'] = IPSCookie::get('pass_hash');
     if ($cookie['session_id']) {
         $this->getSession($cookie['session_id']);
         $this->session_type = 'cookie';
     } elseif (isset($this->request['s']) and $this->request['s']) {
         $this->getSession($this->request['s']);
         $this->session_type = 'url';
     } else {
         $this->session_id = 0;
     }
     //-----------------------------------------
     // Do we have a valid session ID?
     //-----------------------------------------
     if ($this->session_id) {
         //-----------------------------------------
         // We've checked the IP addy and browser, so we can assume that this is
         // a valid session.
         //-----------------------------------------
         if ($this->session_user_id != 0 and !empty($this->session_user_id)) {
             //-----------------------------------------
             // It's a member session, so load the member.
             //-----------------------------------------
             self::setMember($this->session_user_id);
             //-----------------------------------------
             // Did we get a member?
             //-----------------------------------------
             if (!self::$data_store['member_id'] or self::$data_store['member_id'] == 0) {
                 $this->_updateGuestSession();
                 /**
                  * If we have an SSO object, run it for the update guest session call
                  */
//.........這裏部分代碼省略.........
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:101,代碼來源:publicSessions.php

示例11: registerForm

 function registerForm($general_errors = array(), $data = array(), $inline_errors = array(), $time_select = array(), $custom_fields = array(), $nexusFields = array(), $nexusStates = array())
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_register', $this->_funcHooks['registerForm'])) {
         $count_cddbc826bab17032ea84f409e00836ae = is_array($this->functionData['registerForm']) ? count($this->functionData['registerForm']) : 0;
         $this->functionData['registerForm'][$count_cddbc826bab17032ea84f409e00836ae]['general_errors'] = $general_errors;
         $this->functionData['registerForm'][$count_cddbc826bab17032ea84f409e00836ae]['data'] = $data;
         $this->functionData['registerForm'][$count_cddbc826bab17032ea84f409e00836ae]['inline_errors'] = $inline_errors;
         $this->functionData['registerForm'][$count_cddbc826bab17032ea84f409e00836ae]['time_select'] = $time_select;
         $this->functionData['registerForm'][$count_cddbc826bab17032ea84f409e00836ae]['custom_fields'] = $custom_fields;
         $this->functionData['registerForm'][$count_cddbc826bab17032ea84f409e00836ae]['nexusFields'] = $nexusFields;
         $this->functionData['registerForm'][$count_cddbc826bab17032ea84f409e00836ae]['nexusStates'] = $nexusStates;
     }
     $IPBHTML .= "" . ($this->settings['use_coppa'] && (!$this->request['coppa'] && !IPSCookie::get('coppa')) ? "\n\t" . (method_exists($this->registry->getClass('output')->getTemplate('register'), 'registerCoppaStart') ? $this->registry->getClass('output')->getTemplate('register')->registerCoppaStart() : '') . "\n" : "" . (!$this->request['agree_tos'] ? "\n\t\t<div class='master_list'>\n\t\t\t<h2>{$this->lang->words['reg_terms_popup_title']}</h2>\n\t\t\t<div class='row post line_spacing'>\n\t\t\t\t{$this->settings['_termsAndConditions']}\n\t\t\t</div>\n\t\t\t<div class='submit'>\n\t\t\t\t<a class='button secondary' href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=register&amp;agree_tos=1", "public", ''), "", "") . "'>{$this->lang->words['mobile_agree_to_tos']}</a>\n\t\t\t</div>\n\t\t</div>\n\t" : "<div class='master_list'>\n\t\t\t<h2>{$this->lang->words['register']}</h2>\n\t\t\t" . (is_array($general_errors) && count($general_errors) ? "\n\t\t\t\t<div class='message error'>\n\t\t\t\t\t<strong>{$this->lang->words['following_errors']}</strong><br />\n\t\t\t\t\t" . $this->__f__19d06e799ceca51592bbfcc7cc259515($general_errors, $data, $inline_errors, $time_select, $custom_fields, $nexusFields, $nexusStates) . "\t\t\t\t</div>\n\t\t\t" : "") . "\n\t\n\t\t\t<form class='ipsForm_vertical' action=\"" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=register", "public", ''), "", "") . "\" method=\"post\" name=\"REG\" id='register'>\n\t\t\t\t<input type=\"hidden\" name=\"termsread\" value=\"1\" />\n\t\t\t\t<input type=\"hidden\" name=\"agree_to_terms\" value=\"1\" />\n\t\t\t\t<input type=\"hidden\" name=\"agree_tos\" value=\"1\" />\n\t\t\t\t<input type=\"hidden\" name=\"do\" value=\"process_form\" />\n\t\t\t\t<input type=\"hidden\" name=\"coppa_user\" value=\"{$data['coppa_user']}\" />\n\t\t\t\t<input type='hidden' name='nexus_pass' value='1' />\n\t\t\n\t\t\t\t<h3>{$this->lang->words['reg_step1']}</h3>\n\t\t\t\t<div class='ipsField'>\n\t\t\t\t\t<label for='display_name' class='ipsField_title'>{$this->lang->words['reg_choose_dname']}</label>\n\t\t\t\t\t<input type='text' class='input_text " . ($inline_errors['dname'] ? "error" : "") . "' id='display_name' size='30' maxlength='{$this->settings['max_user_name_length']}' value='{$this->request['members_display_name']}' name='members_display_name' /><br />\n\t\t\t\t\t<span class='desc'>" . ($inline_errors['dname'] ? "<span class='error'>{$inline_errors['dname']}<br /></span>" : "") . "" . sprintf($this->lang->words['dname_desc'], $this->settings['max_user_name_length']) . "</span>\n\t\t\t\t</div>\n\t\t\n\t\t\t\t<div class='ipsField'>\n\t\t\t\t\t<label for='email_1' class='ipsField_title'>{$this->lang->words['reg_enter_email']}</label>\n\t\t\t\t\t<input type='text' id='email_1' class='input_text email " . ($inline_errors['email'] ? "error" : "") . "' size='30' maxlength='150' name='EmailAddress' value='{$this->request['EmailAddress']}' /><br />\n\t\t\t\t\t<span class='desc'>" . ($inline_errors['email'] ? "<span class='error'>{$inline_errors['email']}<br /></span>" : "") . "{$this->lang->words['reg_enter_email_desc']}</span>\n\t\t\t\t</div>\n\t\n\t\t\n\t\t\t\t<div class='ipsField'>\n\t\t\t\t\t<label for='password_1' class='ipsField_title'>{$this->lang->words['reg_choose_password']}</label>\n\t\t\t\t\t<input type='password' id='password_1' class='input_text password " . ($inline_errors['password'] ? "error" : "") . "' size='30' maxlength='32' value='{$this->request['PassWord']}' name='PassWord' /><br />\n\t\t\t\t\t<span class='desc'>" . ($inline_errors['password'] ? "<span class='error'>{$inline_errors['password']}<br /></span>" : "") . "{$this->lang->words['reg_choose_password_desc']}</span>\n\t\t\t\t</div>\n\t\t\n\t\t\t\t<div class='ipsField'>\n\t\t\t\t\t<label for='password_2' class='ipsField_title'>{$this->lang->words['reg_reenter_password']}</label>\n\t\t\t\t\t<input type='password' id='password_2' class='input_text password' size='30' maxlength='32' value='{$this->request['PassWord_Check']}' name='PassWord_Check' />\n\t\t\t\t</div>\n\t\t\n\t\t\t\t" . (is_array($custom_fields['required']) && count($custom_fields['required']) || is_array($custom_fields['optional']) && count($custom_fields['optional']) ? "<div class='row line_spacing'>\n\t\t\t\t\t\t" . (is_array($custom_fields['required']) && count($custom_fields['required']) ? "\n\t\t\t\t\t\t\t" . $this->__f__b992a2c8c4e8170e08721054c6f36ab3($general_errors, $data, $inline_errors, $time_select, $custom_fields, $nexusFields, $nexusStates) . "\t\t\t\t\t\t" : "") . "\n\t\t\t\t\n\t\t\t\t\t\t" . (is_array($custom_fields['optional']) && count($custom_fields['optional']) ? "\n\t\t\t\t\t\t\t" . $this->__f__c270991a3640ceae9340642786f02629($general_errors, $data, $inline_errors, $time_select, $custom_fields, $nexusFields, $nexusStates) . "\t\t\t\t\t\t" : "") . "\n\t\t\t\t\t\t<!--IBF.MODULES.EXTRA-->\n\t\t\t\t\t</div>" : "") . "\n\t\t\n\t\t\t\t" . ($data['captchaHTML'] || $data['qandaHTML'] ? "\n\t\t\t\t\t<h3>{$this->lang->words['reg_step3_spam']}</h3>\n\t\t\t\t\t{$data['qandaHTML']}\n\t\t\t\t\t{$data['captchaHTML']}\n\t\t\t\t" : "") . "\n\t\t\t\n\t\t\t\t<div class='ipsField ipsField_checkbox'>\n\t\t\t\t\t<input type=\"checkbox\" name=\"allow_admin_mail\" id=\"allow_admin_mail\" value=\"1\" class=\"input_check\" " . ($this->request['allow_admin_mail'] || !isset($this->request['allow_admin_mail']) ? "checked='checked'" : "") . " />\n\t\t\t\t\t<p class='ipsField_content'>{$this->lang->words['receive_admin_emails']}</p>\n\t\t\t\t</div>\n\t\t\t\t<div class='submit'>\n\t\t\t\t\t<input type='submit' class='button' value='{$this->lang->words['register']}' />\n\t\t\t\t</div>\n\t\t\t</form>\n\t\n\t\t</div>") . "") . "";
     return $IPBHTML;
 }
開發者ID:mover5,項目名稱:imobackup,代碼行數:16,代碼來源:skin_register.php

示例12: registerForm

 /**
  * Displays the registration form
  *
  * @access	public
  * @param	array 	$form_errors
  * @return	void
  */
 public function registerForm($form_errors = array())
 {
     /* INIT */
     $final_errors = array();
     if ($this->settings['no_reg'] == 1) {
         $this->registry->output->showError('registration_disabled', 10123);
     }
     $coppa = IPSCookie::get('coppa');
     if ($coppa == 'yes') {
         $this->registry->output->showError('awaiting_coppa', 10124);
     }
     $this->settings['username_errormsg'] = str_replace('{chars}', $this->settings['username_characters'], $this->settings['username_errormsg']);
     /* Read T&Cs yet? */
     if (!$this->request['termsread']) {
         if ($this->memberData['member_id']) {
             require_once IPS_ROOT_PATH . 'sources/handlers/han_login.php';
             $this->han_login = new han_login($this->registry);
             $this->han_login->init();
             //-----------------------------------------
             // Set some cookies
             //-----------------------------------------
             IPSCookie::set("member_id", "0");
             IPSCookie::set("pass_hash", "0");
             IPSCookie::set("anonlogin", "-1");
             if (is_array($_COOKIE)) {
                 foreach ($_COOKIE as $cookie => $value) {
                     if (stripos($cookie, $this->settings['cookie_id'] . "ipbforum") !== false) {
                         IPSCookie::set(str_replace($this->settings['cookie_id'], "", $match[0]), '-', -1);
                     }
                 }
             }
             //-----------------------------------------
             // Logout callbacks...
             //-----------------------------------------
             $this->han_login->logoutCallback();
             //-----------------------------------------
             // Do it..
             //-----------------------------------------
             $this->member->sessionClass()->convertMemberToGuest();
             list($privacy, $loggedin) = explode('&', $this->memberData['login_anonymous']);
             IPSMember::save($this->memberData['member_id'], array('core' => array('login_anonymous' => "{$privacy}&0", 'last_activity' => time())));
         }
         /* Continue */
         $cache = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'core_sys_conf_settings', 'where' => "conf_key='reg_rules'"));
         $text = $cache['conf_value'] ? $cache['conf_value'] : $cache['conf_default'];
         /* Load the Parser */
         IPSText::getTextClass('bbcode')->bypass_badwords = 1;
         IPSText::getTextClass('bbcode')->parse_smilies = 1;
         IPSText::getTextClass('bbcode')->parse_html = 1;
         IPSText::getTextClass('bbcode')->parse_bbcode = 1;
         IPSText::getTextClass('bbcode')->parsing_section = 'global';
         $text = IPSText::getTextClass('bbcode')->preDbParse($text);
         $text = IPSText::getTextClass('bbcode')->preDisplayParse($text);
         $this->registry->output->setTitle($this->lang->words['registration_form']);
         $this->registry->output->addNavigation($this->lang->words['registration_form'], '');
         $this->output .= $this->registry->output->getTemplate('register')->registerShowTerms($text, $coppa);
         return;
     } else {
         /* Did we agree to the t&c? */
         if (!$this->request['agree_to_terms']) {
             $this->registry->output->showError('must_agree_to_terms', 10125);
         }
     }
     /* Do we have another URL that one needs to visit to register? */
     $this->DB->build(array('select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1'));
     $this->DB->execute();
     while ($r = $this->DB->fetch()) {
         if ($r['login_register_url']) {
             $this->registry->output->silentRedirect($r['login_register_url']);
             exit;
         }
     }
     /* Continue... */
     if ($this->settings['reg_auth_type']) {
         if ($this->settings['reg_auth_type'] == 'admin_user' or $this->settings['reg_auth_type'] == 'user') {
             $this->lang->words['std_text'] .= "<br />" . $this->lang->words['email_validate_text'];
         }
         /* User then admin? */
         if ($this->settings['reg_auth_type'] == 'admin_user') {
             $this->lang->words['std_text'] .= "<br />" . $this->lang->words['user_admin_validation'];
         }
         if ($this->settings['reg_auth_type'] == 'admin') {
             $this->lang->words['std_text'] .= "<br />" . $this->lang->words['just_admin_validation'];
         }
     }
     $captchaHTML = '';
     $qandaHTML = '';
     $this->cache->updateCacheWithoutSaving('_hasStep3', 0);
     /* Q and A Challenge */
     if ($this->settings['registration_qanda']) {
         // Grab a random question...
         $question = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'question_and_answer', 'order' => 'rand()', 'limit' => array(1)));
         if (count($question)) {
//.........這裏部分代碼省略.........
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:101,代碼來源:register.php

示例13: doLogout

 /**
  * Log a user out
  *
  * @param	integer		Flag to check md5 key
  * @return	mixed		Error message or array [0=immediate|redirect, 1=words to show, 2=URL to send to]
  */
 public function doLogout($check_key = true)
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     if ($check_key) {
         $key = $this->request['k'];
         # Check for funny business
         if ($key != $this->member->form_hash) {
             $this->registry->getClass('output')->showError('bad_logout_key', 2012);
         }
     }
     //-----------------------------------------
     // Set some cookies
     //-----------------------------------------
     IPSCookie::set("member_id", "0", 1, 0, FALSE, TRUE);
     IPSCookie::set("pass_hash", "0", 1, 0, FALSE, TRUE);
     if (IPSCookie::get("ipsconnect_" . md5($this->settings['board_url'] . '/interface/ipsconnect/ipsconnect.php'))) {
         IPSCookie::set("ipsconnect_" . md5($this->settings['board_url'] . '/interface/ipsconnect/ipsconnect.php'), '0', 1, 0, FALSE, FALSE);
     }
     //-----------------------------------------
     // IPS Connect
     //-----------------------------------------
     foreach ($this->caches['login_methods'] as $k => $data) {
         if ($data['login_folder_name'] == 'ipsconnect' and $data['login_enabled']) {
             $ipsConnectSettings = unserialize($data['login_custom_config']);
             IPSCookie::set("ipsconnect_" . md5($ipsConnectSettings['master_url']), '0', 1, 0, FALSE, FALSE);
         }
     }
     if (is_array($_COOKIE)) {
         foreach ($_COOKIE as $cookie => $value) {
             if (stripos($cookie, $this->settings['cookie_id'] . 'ipbforumpass') !== false and !strstr($value, 'mobileApp')) {
                 IPSCookie::set(str_replace($this->settings['cookie_id'], "", $cookie), '-', -1);
             }
         }
     }
     //-----------------------------------------
     // Do it..
     //-----------------------------------------
     $this->member->sessionClass()->convertMemberToGuest();
     $privacy = intval(IPSMember::isLoggedInAnon($this->memberData));
     IPSMember::save($this->memberData['member_id'], array('core' => array('login_anonymous' => "{$privacy}&0", 'last_activity' => IPS_UNIX_TIME_NOW)));
     //-----------------------------------------
     // Logout callbacks...
     //-----------------------------------------
     IPSLib::runMemberSync('onLogOut', $this->memberData);
     $this->han_login->logoutCallback($this->memberData);
     //-----------------------------------------
     // Return..
     //-----------------------------------------
     $url = "";
     if ($this->request['return'] and $this->request['return'] != "") {
         $return = urldecode($this->request['return']);
         if (strpos($return, "http://") === 0) {
             return array('immediate', '', $return);
         }
     }
     return array('redirect', $this->lang->words['thanks_for_logout'], $this->settings['board_url']);
 }
開發者ID:ConnorChristie,項目名稱:GrabViews,代碼行數:65,代碼來源:login.php

示例14: registerCoppaStart

 function registerCoppaStart()
 {
     $IPBHTML = "";
     if (IPSLib::locationHasHooks('skin_register', $this->_funcHooks['registerCoppaStart'])) {
         $count_3eafce7c341045eb32531a207fe147aa = is_array($this->functionData['registerCoppaStart']) ? count($this->functionData['registerCoppaStart']) : 0;
     }
     $IPBHTML .= "" . ($this->settings['use_coppa'] && (!$this->request['coppa'] && !IPSCookie::get('coppa')) ? "\n<div class='post_form' id='coppa_form'>\n\t<fieldset class='general_box'>\n\t\t<h3>{$this->lang->words['coppa_info']}</h3>\n\t\t<div class='ipsPad'>\n\t\t\t{$this->lang->words['confirm_over_thirteen']}\n\t\t</div>\n\t\t<div class='ipsPad ipsForm_center'>\n\t\t\t<form>\n\t\t\t<select name='month' id='coppa_bday_m'>\n\t\t\t\t" . $this->__f__31289532bb29664f292237ebeb94fedb() . "\t\t\t</select>\n\t\t\t&nbsp;\n\t\t\t<select name='day' id='coppa_bday_d'>\n\t\t\t\t" . $this->__f__4e3f5a71c65d7d600e3d4aced376270e() . "\t\t\t</select>\n\t\t\t&nbsp;\n\t\t\t<select name='year' id='coppa_bday_y'>\n\t\t\t\t" . $this->__f__bbfa142154b328986bcce1b3c0f0b237() . "\t\t\t</select>\n\t\t\t</form>\n\t\t</div>\n\t</fieldset>\n\t<fieldset class='ipsForm_submit ipsForm_right'>\n\t\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("app=core&amp;module=global&amp;section=register&amp;do=coppa_two&amp;coppa=1", "public", ''), "", "") . "' id='confirm_coppa' class='ipsButton'>{$this->lang->words['coppa_continue_button']}</a>\n\t</fieldset>\n</div>\n<script type='text/javascript'>\n\t\$('coppa_form').hide();\n\t\n\tfunction validateDate( popup )\n\t{\n\t\tvar day\t\t= parseInt(\$('coppa_bday_d').value);\n\t\tvar month\t= parseInt(\$('coppa_bday_m').value);\n\t\tvar year\t= parseInt(\$('coppa_bday_y').value);\n\t\tvar compare\t\t= Math.round( new Date( year + 13, month - 1, day ).getTime() / 1000 );\n\t\tvar today\t\t= Math.round( new Date().getTime() / 1000 );\n\t\tif ( (today - compare) < 0 )\n\t\t{\n\t\t\twindow.location = ipb.vars['base_url'] + \"app=core&module=global&section=register&do=coppa_two\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpopup.hide();\n\t\t\tipb.Cookie.set('coppa', 'no', true);\n\t\t}\n\t}\n\t\n\tipb.vars['coppa_popup'] = new ipb.Popup( 'coppa_popup', {\ttype: 'pane',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinitial: \$('coppa_form').show(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thideAtStart: false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thideClose: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefer: false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tw: '550px' },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tafterInit: function( popup ){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpopup.getObj().select(\"#confirm_coppa\")[0].observe('click', function(e){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEvent.stop(e);\n\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\t\t\t\t\t\t\t\t\t\t\t\treturn validateDate( popup );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} );\n</script>\n" : "") . "";
     return $IPBHTML;
 }
開發者ID:ConnorChristie,項目名稱:GrabViews-Live,代碼行數:9,代碼來源:skin_register.php

示例15: topicSetUp

 /**
  * Topic set up ya'll
  *
  * @access	public
  * @return	void
  **/
 public function topicSetUp()
 {
     //-----------------------------------------
     // Memory...
     //-----------------------------------------
     $_before = IPSDebug::getMemoryDebugFlag();
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $this->request['start'] = !empty($this->request['start']) ? intval($this->request['start']) : '';
     $this->request['st'] = !empty($this->request['st']) ? intval($this->request['st']) : '';
     //-----------------------------------------
     // Compile the language file
     //-----------------------------------------
     $this->registry->class_localization->loadLanguageFile(array('public_boards', 'public_topic'));
     $this->registry->class_localization->loadLanguageFile(array('public_editors'), 'core');
     //-----------------------------------------
     // Get all the member groups and
     // member title info
     //-----------------------------------------
     if (!is_array($this->cache->getCache('ranks'))) {
         $this->cache->rebuildCache('ranks', 'global');
     }
     //-----------------------------------------
     // Are we actually a moderator for this forum?
     //-----------------------------------------
     if (!$this->memberData['g_is_supmod']) {
         $moderator = $this->memberData['forumsModeratorData'];
         if (!isset($moderator[$this->forum['id']]) or !is_array($moderator[$this->forum['id']])) {
             $this->memberData['is_mod'] = 0;
         }
     }
     $this->settings['_base_url'] = $this->settings['base_url'];
     $this->forum['FORUM_JUMP'] = $this->registry->getClass('class_forums')->buildForumJump();
     $this->first = intval($this->request['st']) > 0 ? intval($this->request['st']) : 0;
     $this->request['view'] = !empty($this->request['view']) ? $this->request['view'] : NULL;
     //-----------------------------------------
     // Check viewing permissions, private forums,
     // password forums, etc
     //-----------------------------------------
     if (!$this->memberData['g_other_topics'] and $this->topic['starter_id'] != $this->memberData['member_id']) {
         $this->registry->output->showError('topics_not_yours', 10359);
     } else {
         if (!$this->forum['can_view_others'] and !$this->memberData['is_mod'] and $this->topic['starter_id'] != $this->memberData['member_id']) {
             $this->registry->output->showError('topics_not_yours2', 10360);
         }
     }
     //-----------------------------------------
     // Update the topic views counter
     //-----------------------------------------
     if (!$this->request['view'] and $this->topic['state'] != 'link') {
         if ($this->settings['update_topic_views_immediately']) {
             $this->DB->update('topics', 'views=views+1', "tid=" . $this->topic['tid'], true, true);
         } else {
             $this->DB->insert('topic_views', array('views_tid' => $this->topic['tid']), true);
         }
     }
     //-----------------------------------------
     // Need to update this topic?
     //-----------------------------------------
     if ($this->topic['state'] == 'open') {
         if (!$this->topic['topic_open_time'] or $this->topic['topic_open_time'] < $this->topic['topic_close_time']) {
             if ($this->topic['topic_close_time'] and ($this->topic['topic_close_time'] <= time() and (time() >= $this->topic['topic_open_time'] or !$this->topic['topic_open_time']))) {
                 $this->topic['state'] = 'closed';
                 $this->DB->update('topics', array('state' => 'closed'), 'tid=' . $this->topic['tid'], true);
             }
         } else {
             if ($this->topic['topic_open_time'] or $this->topic['topic_open_time'] > $this->topic['topic_close_time']) {
                 if ($this->topic['topic_close_time'] and ($this->topic['topic_close_time'] <= time() and time() <= $this->topic['topic_open_time'])) {
                     $this->topic['state'] = 'closed';
                     $this->DB->update('topics', array('state' => 'closed'), 'tid=' . $this->topic['tid'], true);
                 }
             }
         }
     } else {
         if ($this->topic['state'] == 'closed') {
             if (!$this->topic['topic_close_time'] or $this->topic['topic_close_time'] < $this->topic['topic_open_time']) {
                 if ($this->topic['topic_open_time'] and ($this->topic['topic_open_time'] <= time() and (time() >= $this->topic['topic_close_time'] or !$this->topic['topic_close_time']))) {
                     $this->topic['state'] = 'open';
                     $this->DB->update('topics', array('state' => 'open'), 'tid=' . $this->topic['tid'], true);
                 }
             } else {
                 if ($this->topic['topic_close_time'] or $this->topic['topic_close_time'] > $this->topic['topic_open_time']) {
                     if ($this->topic['topic_open_time'] and ($this->topic['topic_open_time'] <= time() and time() <= $this->topic['topic_close_time'])) {
                         $this->topic['state'] = 'open';
                         $this->DB->update('topics', array('state' => 'open'), 'tid=' . $this->topic['tid'], true);
                     }
                 }
             }
         }
     }
     //-----------------------------------------
     // Current topic rating value
     //-----------------------------------------
//.........這裏部分代碼省略.........
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:101,代碼來源:topics.php


注:本文中的IPSCookie::get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。